From ed22de7eb100e077a48963bb1df11217d3b8de24 Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Thu, 4 Oct 2018 15:42:02 +0200 Subject: [PATCH] fix #547 --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1be8aa..2bb14cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PHP FFmpeg +# php-ffmpeg [![Build Status](https://secure.travis-ci.org/PHP-FFMpeg/PHP-FFMpeg.png?branch=master)](http://travis-ci.org/PHP-FFMpeg/PHP-FFMpeg) @@ -144,7 +144,7 @@ $frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(42)); $frame->save('image.jpg'); ``` -If you want to extract multiple images from your video, you can use the following filter: +If you want to extract multiple images from the video, you can use the following filter: ```php $video @@ -155,6 +155,16 @@ $video $video ->save(new FFMpeg\Format\Video\X264(), '/path/to/new/file'); ``` +By default, this will save the frames as `jpg` images. + +You are able to override this using `setFrameFileType` to save the frames in another format: +```php +$frameFileType = 'jpg'; // either 'jpg', 'jpeg' or 'png' +$filter = new ExtractMultipleFramesFilter($frameRate, $destinationFolder); +$filter->setFrameFileType($frameFileType); + +$video->addFilter($filter); +``` ##### Clip