From 521c708290860e62e701c6169cba8ba097fee3ca Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Tue, 3 Jun 2014 09:47:27 +0200 Subject: [PATCH] Fixed sample for duration and added sample for codec_name I've updated the README file, because the existing example for getting the duration of a file was not working for file-types like WebM (see #103). To not to loose the sample that was already in place, I changed it to return the codec-name for the video. Maybe returning width or height of a video is more used, but we can't have a sample for all ;) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a83bd8..df29ebc 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,14 @@ $ffprobe ->streams('/path/to/video/mp4') // extracts streams informations ->videos() // filters video streams ->first() // returns the first video stream - ->get('duration'); // returns the duration property + ->get('codec_name'); // returns the codec_name property +``` + +```php +$ffprobe = FFMpeg\FFProbe::create(); +$ffprobe + ->format('/path/to/video/mp4') // extracts file informations + ->get('duration'); // returns the duration property ``` ##Using with Silex Microframework