added support for retrieving progress information via helpers
This commit is contained in:
parent
c40348a007
commit
36b0036285
10 changed files with 463 additions and 7 deletions
15
README.md
15
README.md
|
|
@ -27,6 +27,21 @@ $ffmpeg->open('Video.mpeg')
|
|||
->close();
|
||||
```
|
||||
|
||||
##Getting progress information
|
||||
|
||||
|
||||
```php
|
||||
$progressHelper = new FFMpeg\Helper\AudioProgressHelper(function($percent, $remaining, $rate) {
|
||||
echo "Current progress: " . $percent "%\n";
|
||||
echo "Remaining time: " . $remaining " seconds\n";
|
||||
});
|
||||
|
||||
$ffmpeg->open('Audio.wav')
|
||||
->attachHelper($progressHelper)
|
||||
->encode(new Mp3(), 'file.mp3')
|
||||
->close();
|
||||
```
|
||||
|
||||
##Using with Silex Microframework
|
||||
|
||||
```php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue