diff --git a/docs/source/Recipes.rst b/docs/source/Recipes.rst index c7c4e61..722aede 100644 --- a/docs/source/Recipes.rst +++ b/docs/source/Recipes.rst @@ -48,24 +48,27 @@ You can also initialize with a custom path to the binary : encode($oggFormat, 'file.ogv') ->close(); +.. note:: All formats provided by PHP-FFMpeg extends DefaultVideo, have a look + at the API doc for more information on its behavior. + .. note:: Use PHP-MP4Box to make it compatible with pseudo stream ! Create your own media type -^^^^^^^^^^^^^^^^^^^^^^^^^^ +++++++++++++++++++++++++++ -It is very easy to define the media type you want as target. All you need to -do is implement the ``FFMpeg\Format\Video`` interface +PHP-FFMpeg provides ``FFMpeg\Format\Video``, as base interface for creating a +Video format. To define a target format, all you need to do is implement this +Interface. .. code-block:: php @@ -162,13 +168,13 @@ PHP-FFmpeg brings more interfaces for your video formats : .. note:: You can combine these features in one video format. Advanced media type -^^^^^^^^^^^^^^^^^^^ ++++++++++++++++++++ This section present basic usage of the different interfaces. You can combine them in your own format. Resizable -+++++++++ +......... This interface provide an easy way to resize a video The example below resizes a video by half. @@ -198,7 +204,7 @@ The example below resizes a video by half. Resamplable -+++++++++++ +........... This interface provide an easy way to resample a video The example below resample the video at 15 frame per second with a keyframe @@ -232,7 +238,7 @@ every 30 image. ->close(); Interactive -+++++++++++ +........... This interface provide a method to list available codec for the format The example below provide a format object listing available videocodec for @@ -265,17 +271,45 @@ flash video. ->encode($format, 'file.mp4') ->close(); -Adding custom commandline options -+++++++++++++++++++++++++++++++++ -If you need to add custom FFmpeg command line option, you can use the +Audio +^^^^^ + +This section describes audio processing and Interfaces for building video +formats. + +Simple transcoding +++++++++++++++++++ + +Extract soundtrack from movie ++++++++++++++++++++++++++++++ + +Create your own media type +++++++++++++++++++++++++++ + +Advanced media type ++++++++++++++++++++ + +Resamplable +........... + +Transcodable +............ + +Interactive +........... + + +Custom commandline options +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you need to add custom FFmpeg command line option, use the ``FFMpeg\Format\Audio::getExtraParams`` method. -As Video extends Audio, it is also available in any format. +As ``Video`` extends ``Audio``, it is also available in any format. -The following example shows a getExtraParams usage for aac encoding. With the -latest FFMPeg version, aac encoding can be executed with command parameters -``-strict experimental``. Here is what happens if you do not add this extra -parameter : +The following example shows a ``getExtraParams`` usage for aac encoding. With the +latest AvConv / FFMPeg version, aac encoding has to be executed with extra command parameters +``-strict experimental``. .. code-block:: php @@ -310,8 +344,6 @@ parameter : ->encode($format, 'output-aac.mp4') ->close(); - - FFProbe recipes ---------------