From 2ddf9ae37771b99bec8d3922461a9d6733c0962c Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Wed, 12 Apr 2017 17:58:04 +0200 Subject: [PATCH] add missing chapter about audio clipping in readme (#329) --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 51b5f55..5817d19 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) @@ -98,7 +98,7 @@ $ffmpeg->open('video.mpeg'); Two types of media can be resolved: `FFMpeg\Media\Audio` and `FFMpeg\Media\Video`. A third type, `FFMpeg\Media\Frame`, is available through videos. -#### Video +### Video `FFMpeg\Media\Video` can be transcoded, ie: change codec, isolate audio or video. Frames can be extracted. @@ -317,9 +317,9 @@ The clip filter takes two parameters: - `$start`, an instance of `FFMpeg\Coordinate\TimeCode`, specifies the start point of the clip - `$duration`, optional, an instance of `FFMpeg\Coordinate\TimeCode`, specifies the duration of the clip -#### Audio +### Audio -`FFMpeg\Media\Audio` can be transcoded, ie: change codec, isolate audio or +`FFMpeg\Media\Audio` can be transcoded too, ie: change codec, isolate audio or video. Frames can be extracted. ##### Transcoding @@ -356,6 +356,14 @@ method. It only accepts audio filters. You can build your own filters and some are bundled in PHP-FFMpeg - they are accessible through the `FFMpeg\Media\Audio::filters` method. +##### Clipping +Cuts the audio at a desired point. + +```php +$audio->filters()->clip(FFMpeg\Coordinate\TimeCode::fromSeconds(30), FFMpeg\Coordinate\TimeCode::fromSeconds(15)); +``` + + ###### Metadata Add metadata to audio files. Just pass an array of key=value pairs of all