Added initial parameters

This commit is contained in:
Ilja Lukin 2020-02-24 21:42:38 +01:00
commit 73fdec8290
6 changed files with 85 additions and 5 deletions

View file

@ -554,6 +554,18 @@ $format->setAdditionalParameters(array('foo', 'bar'));
$video->save($format, 'video.avi');
```
##### Add initial parameters
You can also add initial parameters to your encoding requests based on your video format. This can be expecially handy in overriding a default input codec in FFMpeg.
The argument of the setInitialParameters method is an array.
```php
$format = new FFMpeg\Format\Video\X264();
$format->setInitialParameters(array('-acodec', 'libopus'));
$video->save($format, 'video.avi');
```
##### Create your own format
The easiest way to create a format is to extend the abstract