fix audio example on README.md
This commit is contained in:
parent
c8949fe3df
commit
fcedd81332
1 changed files with 5 additions and 2 deletions
|
|
@ -241,8 +241,11 @@ pass a `FFMpeg\Format\FormatInterface` for that.
|
|||
Please note that audio kilobitrate is set on the audio format.
|
||||
|
||||
```php
|
||||
$format = new Format\Audio\Flac();
|
||||
$format->on('progress', function ($$audio, $format, $percentage) {
|
||||
$ffmpeg = FFMpeg\FFMpeg::create();
|
||||
$audio = $ffmpeg->open('track.mp3');
|
||||
|
||||
$format = new FFMpeg\Format\Audio\Flac();
|
||||
$format->on('progress', function ($audio, $format, $percentage) {
|
||||
echo "$percentage % transcoded";
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue