added support for retrieving progress information via helpers

This commit is contained in:
Robert Gruendler 2012-11-25 15:40:20 +01:00
commit 36b0036285
10 changed files with 463 additions and 7 deletions

View file

@ -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