<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<ul class="toc">
<li><a name="toc-API" href="#API">1.1 API</a></li>
<li><a name="toc-Integrating-libavcodec-or-libavformat-in-your-program" href="#Integrating-libavcodec-or-libavformat-in-your-program">1.2 Integrating libavcodec or libavformat in your program</a></li>
- <li><a name="toc-Coding-Rules-1" href="#Coding-Rules-1">1.3 Coding Rules</a></li>
- <li><a name="toc-Development-Policy" href="#Development-Policy">1.4 Development Policy</a></li>
- <li><a name="toc-Submitting-patches" href="#Submitting-patches">1.5 Submitting patches</a></li>
- <li><a name="toc-New-codecs-or-formats-checklist" href="#New-codecs-or-formats-checklist">1.6 New codecs or formats checklist</a></li>
- <li><a name="toc-patch-submission-checklist" href="#patch-submission-checklist">1.7 patch submission checklist</a></li>
- <li><a name="toc-Patch-review-process" href="#Patch-review-process">1.8 Patch review process</a></li>
- <li><a name="toc-Regression-tests" href="#Regression-tests">1.9 Regression tests</a></li>
+ <li><a name="toc-Contributing" href="#Contributing">1.3 Contributing</a></li>
+ <li><a name="toc-Coding-Rules-1" href="#Coding-Rules-1">1.4 Coding Rules</a></li>
+ <li><a name="toc-Development-Policy" href="#Development-Policy">1.5 Development Policy</a></li>
+ <li><a name="toc-Submitting-patches-1" href="#Submitting-patches-1">1.6 Submitting patches</a></li>
+ <li><a name="toc-New-codecs-or-formats-checklist" href="#New-codecs-or-formats-checklist">1.7 New codecs or formats checklist</a></li>
+ <li><a name="toc-patch-submission-checklist" href="#patch-submission-checklist">1.8 patch submission checklist</a></li>
+ <li><a name="toc-Patch-review-process" href="#Patch-review-process">1.9 Patch review process</a></li>
+ <li><a name="toc-Regression-tests" href="#Regression-tests">1.10 Regression tests</a></li>
</ul>
</li>
</ul>
<em>any patch you make must be published</em>. The best way to proceed is
to send your patches to the FFmpeg mailing list.
</p>
+<a name="Contributing"></a>
+<h2 class="section"><a href="developer.html#toc-Contributing">1.3 Contributing</a></h2>
+<p>There are 3 ways by which code gets into ffmpeg.
+</p><ul>
+<li> Submiting Patches to the main developer mailing list
+ see <a href="#Submitting-patches">Submitting patches</a> for details.
+</li><li> Directly commiting changes to the main tree.
+</li><li> Commiting changes to a git clone, for example on github.com or
+ gitorious.org. And asking us to merge these changes.
+</li></ul>
+
+<p>Whichever way, changes should be reviewed by the maintainer of the code
+before they are commited. And they should follow the <a href="#Coding-Rules">Coding Rules</a>.
+The developer making the commit and the author are responsible for their changes
+and should try to fix issues their commit causes.
+</p>
<p><a name="Coding-Rules"></a>
</p><a name="Coding-Rules-1"></a>
-<h2 class="section"><a href="developer.html#toc-Coding-Rules-1">1.3 Coding Rules</a></h2>
+<h2 class="section"><a href="developer.html#toc-Coding-Rules-1">1.4 Coding Rules</a></h2>
<p>FFmpeg is programmed in the ISO C90 language with a few additional
features from ISO C99, namely:
should also be avoided if they don’t make the code easier to understand.
</p>
<a name="Development-Policy"></a>
-<h2 class="section"><a href="developer.html#toc-Development-Policy">1.4 Development Policy</a></h2>
+<h2 class="section"><a href="developer.html#toc-Development-Policy">1.5 Development Policy</a></h2>
<ol>
<li>
</p>
<p>Note, these rules are mostly borrowed from the MPlayer project.
</p>
-<a name="Submitting-patches"></a>
-<h2 class="section"><a href="developer.html#toc-Submitting-patches">1.5 Submitting patches</a></h2>
+<p><a name="Submitting-patches"></a>
+</p><a name="Submitting-patches-1"></a>
+<h2 class="section"><a href="developer.html#toc-Submitting-patches-1">1.6 Submitting patches</a></h2>
<p>First, read the <a href="#Coding-Rules">Coding Rules</a> above if you did not yet, in particular
the rules regarding patch submission.
</p>
<a name="New-codecs-or-formats-checklist"></a>
-<h2 class="section"><a href="developer.html#toc-New-codecs-or-formats-checklist">1.6 New codecs or formats checklist</a></h2>
+<h2 class="section"><a href="developer.html#toc-New-codecs-or-formats-checklist">1.7 New codecs or formats checklist</a></h2>
<ol>
<li>
<a name="patch-submission-checklist"></a>
-<h2 class="section"><a href="developer.html#toc-patch-submission-checklist">1.7 patch submission checklist</a></h2>
+<h2 class="section"><a href="developer.html#toc-patch-submission-checklist">1.8 patch submission checklist</a></h2>
<ol>
<li>
- Does ’make fate’ pass with the patch applied?
+ Does <code>make fate</code> pass with the patch applied?
</li><li>
Was the patch generated with git format-patch or send-email?
</li><li>
</li><li>
Is the patch against latest FFmpeg git master branch?
</li><li>
- Are you subscribed to ffmpeg-dev?
+ Are you subscribed to ffmpeg-devel?
(the list is subscribers only due to spam)
</li><li>
Have you checked that the changes are minimal, so that the same cannot be
</li></ol>
<a name="Patch-review-process"></a>
-<h2 class="section"><a href="developer.html#toc-Patch-review-process">1.8 Patch review process</a></h2>
+<h2 class="section"><a href="developer.html#toc-Patch-review-process">1.9 Patch review process</a></h2>
<p>All patches posted to ffmpeg-devel will be reviewed, unless they contain a
clear note that the patch is not for the git master branch.
<p>We will review all submitted patches, but sometimes we are quite busy so
especially for large patches this can take several weeks.
</p>
+<p>If you feel that the review process is too slow and you are willing to try to
+take over maintainership of the area of code you change then just clone
+git master and maintain the area of code there. We will merge each area from
+where its best maintained.
+</p>
<p>When resubmitting patches, please do not make any significant changes
not related to the comments received during review. Such patches will
be rejected. Instead, submit significant changes or new features as
separate patches.
</p>
<a name="Regression-tests"></a>
-<h2 class="section"><a href="developer.html#toc-Regression-tests">1.9 Regression tests</a></h2>
+<h2 class="section"><a href="developer.html#toc-Regression-tests">1.10 Regression tests</a></h2>
<p>Before submitting a patch (or committing to the repository), you should at least
test that you did not break anything.
</p>
-<p>The regression tests build a synthetic video stream and a synthetic
-audio stream. These are then encoded and decoded with all codecs or
-formats. The CRC (or MD5) of each generated file is recorded in a
-result file. A ’diff’ is launched to compare the reference results and
-the result file. The output is checked immediately after each test
-has run.
-</p>
-<p>The regression tests then go on to test the FFserver code with a
-limited set of streams. It is important that this step runs correctly
-as well.
-</p>
-<p>Run ’make test’ to test all the codecs and formats. Commands like
-’make regtest-mpeg2’ can be used to run a single test. By default,
-make will abort if any test fails. To run all tests regardless,
-use make -k. To get a more verbose output, use ’make V=1 test’ or
-’make V=2 test’.
-</p>
-<p>Run ’make fulltest’ to test all the codecs, formats and FFserver.
+<p>Running ’make fate’ accomplishes this, please see ‘<tt>doc/fate.txt</tt>’ for details.
</p>
<p>[Of course, some patches may change the results of the regression tests. In
this case, the reference results of the regression tests shall be modified
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<ul class="toc">
<li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li>
<li><a name="toc-Description" href="#Description">2. Description</a></li>
- <li><a name="toc-Options-5" href="#Options-5">3. Options</a>
+ <li><a name="toc-Options-6" href="#Options-6">3. Options</a>
<ul class="toc">
<li><a name="toc-Generic-options" href="#Generic-options">3.1 Generic options</a></li>
- <li><a name="toc-Main-options" href="#Main-options">3.2 Main options</a></li>
- <li><a name="toc-Video-Options" href="#Video-Options">3.3 Video Options</a></li>
- <li><a name="toc-Advanced-Video-Options" href="#Advanced-Video-Options">3.4 Advanced Video Options</a></li>
- <li><a name="toc-Audio-Options" href="#Audio-Options">3.5 Audio Options</a></li>
- <li><a name="toc-Advanced-Audio-options_003a" href="#Advanced-Audio-options_003a">3.6 Advanced Audio options:</a></li>
- <li><a name="toc-Subtitle-options_003a" href="#Subtitle-options_003a">3.7 Subtitle options:</a></li>
- <li><a name="toc-Audio_002fVideo-grab-options" href="#Audio_002fVideo-grab-options">3.8 Audio/Video grab options</a></li>
- <li><a name="toc-Advanced-options" href="#Advanced-options">3.9 Advanced options</a></li>
- <li><a name="toc-Preset-files" href="#Preset-files">3.10 Preset files</a></li>
+ <li><a name="toc-AVOptions" href="#AVOptions">3.2 AVOptions</a></li>
+ <li><a name="toc-Main-options" href="#Main-options">3.3 Main options</a></li>
+ <li><a name="toc-Video-Options" href="#Video-Options">3.4 Video Options</a></li>
+ <li><a name="toc-Advanced-Video-Options" href="#Advanced-Video-Options">3.5 Advanced Video Options</a></li>
+ <li><a name="toc-Audio-Options" href="#Audio-Options">3.6 Audio Options</a></li>
+ <li><a name="toc-Advanced-Audio-options_003a" href="#Advanced-Audio-options_003a">3.7 Advanced Audio options:</a></li>
+ <li><a name="toc-Subtitle-options_003a" href="#Subtitle-options_003a">3.8 Subtitle options:</a></li>
+ <li><a name="toc-Audio_002fVideo-grab-options" href="#Audio_002fVideo-grab-options">3.9 Audio/Video grab options</a></li>
+ <li><a name="toc-Advanced-options" href="#Advanced-options">3.10 Advanced options</a></li>
+ <li><a name="toc-Preset-files" href="#Preset-files">3.11 Preset files</a></li>
</ul></li>
<li><a name="toc-Tips" href="#Tips">4. Tips</a></li>
<li><a name="toc-Examples" href="#Examples">5. Examples</a>
<ul class="toc">
<li><a name="toc-rawvideo" href="#rawvideo">8.1 rawvideo</a>
<ul class="toc">
- <li><a name="toc-Options-2" href="#Options-2">8.1.1 Options</a></li>
+ <li><a name="toc-Options-1" href="#Options-1">8.1.1 Options</a></li>
</ul>
</li>
</ul></li>
<ul class="toc">
<li><a name="toc-libvpx" href="#libvpx">11.1 libvpx</a>
<ul class="toc">
- <li><a name="toc-Options-3" href="#Options-3">11.1.1 Options</a></li>
+ <li><a name="toc-Options-4" href="#Options-4">11.1.1 Options</a></li>
</ul></li>
<li><a name="toc-libx264" href="#libx264">11.2 libx264</a>
<ul class="toc">
- <li><a name="toc-Options-4" href="#Options-4">11.2.1 Options</a></li>
+ <li><a name="toc-Options-5" href="#Options-5">11.2.1 Options</a></li>
</ul>
</li>
</ul></li>
<li><a name="toc-Demuxers" href="#Demuxers">12. Demuxers</a>
<ul class="toc">
<li><a name="toc-image2" href="#image2">12.1 image2</a></li>
- <li><a name="toc-applehttp" href="#applehttp">12.2 applehttp</a></li>
+ <li><a name="toc-applehttp-1" href="#applehttp-1">12.2 applehttp</a></li>
</ul></li>
<li><a name="toc-Muxers" href="#Muxers">13. Muxers</a>
<ul class="toc">
<li><a name="toc-framecrc-1" href="#framecrc-1">13.2 framecrc</a></li>
<li><a name="toc-image2-1" href="#image2-1">13.3 image2</a></li>
<li><a name="toc-mpegts" href="#mpegts">13.4 mpegts</a></li>
- <li><a name="toc-null" href="#null">13.5 null</a></li>
+ <li><a name="toc-null-1" href="#null-1">13.5 null</a></li>
<li><a name="toc-matroska" href="#matroska">13.6 matroska</a></li>
</ul></li>
<li><a name="toc-Input-Devices" href="#Input-Devices">14. Input Devices</a>
<li><a name="toc-dv1394" href="#dv1394">14.3 dv1394</a></li>
<li><a name="toc-fbdev" href="#fbdev">14.4 fbdev</a></li>
<li><a name="toc-jack" href="#jack">14.5 jack</a></li>
- <li><a name="toc-libdc1394" href="#libdc1394">14.6 libdc1394</a></li>
- <li><a name="toc-openal" href="#openal">14.7 openal</a>
+ <li><a name="toc-lavfi" href="#lavfi">14.6 lavfi</a>
<ul class="toc">
- <li><a name="toc-Options-1" href="#Options-1">14.7.1 Options</a></li>
- <li><a name="toc-Examples-2" href="#Examples-2">14.7.2 Examples</a></li>
+ <li><a name="toc-Options" href="#Options">14.6.1 Options</a></li>
+ <li><a name="toc-Examples-3" href="#Examples-3">14.6.2 Examples</a></li>
</ul></li>
- <li><a name="toc-oss" href="#oss">14.8 oss</a></li>
- <li><a name="toc-sndio-1" href="#sndio-1">14.9 sndio</a></li>
- <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">14.10 video4linux and video4linux2</a></li>
- <li><a name="toc-vfwcap" href="#vfwcap">14.11 vfwcap</a></li>
- <li><a name="toc-x11grab" href="#x11grab">14.12 x11grab</a></li>
+ <li><a name="toc-libdc1394" href="#libdc1394">14.7 libdc1394</a></li>
+ <li><a name="toc-openal" href="#openal">14.8 openal</a>
+ <ul class="toc">
+ <li><a name="toc-Options-3" href="#Options-3">14.8.1 Options</a></li>
+ <li><a name="toc-Examples-2" href="#Examples-2">14.8.2 Examples</a></li>
+ </ul></li>
+ <li><a name="toc-oss" href="#oss">14.9 oss</a></li>
+ <li><a name="toc-sndio" href="#sndio">14.10 sndio</a></li>
+ <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">14.11 video4linux and video4linux2</a></li>
+ <li><a name="toc-vfwcap" href="#vfwcap">14.12 vfwcap</a></li>
+ <li><a name="toc-x11grab" href="#x11grab">14.13 x11grab</a>
+ <ul class="toc">
+ <li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">14.13.1 <var>follow_mouse</var> AVOption</a></li>
+ <li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">14.13.2 <var>show_region</var> AVOption</a></li>
+ </ul>
+</li>
</ul></li>
<li><a name="toc-Output-Devices" href="#Output-Devices">15. Output Devices</a>
<ul class="toc">
<li><a name="toc-oss-1" href="#oss-1">15.2 oss</a></li>
<li><a name="toc-sdl" href="#sdl">15.3 sdl</a>
<ul class="toc">
- <li><a name="toc-Options" href="#Options">15.3.1 Options</a></li>
+ <li><a name="toc-Options-2" href="#Options-2">15.3.1 Options</a></li>
<li><a name="toc-Examples-1" href="#Examples-1">15.3.2 Examples</a></li>
</ul></li>
- <li><a name="toc-sndio" href="#sndio">15.4 sndio</a></li>
+ <li><a name="toc-sndio-1" href="#sndio-1">15.4 sndio</a></li>
</ul></li>
<li><a name="toc-Protocols" href="#Protocols">16. Protocols</a>
<ul class="toc">
- <li><a name="toc-applehttp-1" href="#applehttp-1">16.1 applehttp</a></li>
+ <li><a name="toc-applehttp" href="#applehttp">16.1 applehttp</a></li>
<li><a name="toc-concat" href="#concat">16.2 concat</a></li>
<li><a name="toc-file" href="#file">16.3 file</a></li>
<li><a name="toc-gopher" href="#gopher">16.4 gopher</a></li>
</ul></li>
<li><a name="toc-Audio-Filters" href="#Audio-Filters">19. Audio Filters</a>
<ul class="toc">
- <li><a name="toc-anull" href="#anull">19.1 anull</a></li>
+ <li><a name="toc-aformat" href="#aformat">19.1 aformat</a></li>
+ <li><a name="toc-anull" href="#anull">19.2 anull</a></li>
+ <li><a name="toc-aresample" href="#aresample">19.3 aresample</a></li>
+ <li><a name="toc-ashowinfo" href="#ashowinfo">19.4 ashowinfo</a></li>
</ul></li>
<li><a name="toc-Audio-Sources" href="#Audio-Sources">20. Audio Sources</a>
<ul class="toc">
- <li><a name="toc-anullsrc" href="#anullsrc">20.1 anullsrc</a></li>
+ <li><a name="toc-abuffer" href="#abuffer">20.1 abuffer</a></li>
+ <li><a name="toc-amovie" href="#amovie">20.2 amovie</a></li>
+ <li><a name="toc-anullsrc" href="#anullsrc">20.3 anullsrc</a></li>
</ul></li>
<li><a name="toc-Audio-Sinks" href="#Audio-Sinks">21. Audio Sinks</a>
<ul class="toc">
- <li><a name="toc-anullsink" href="#anullsink">21.1 anullsink</a></li>
+ <li><a name="toc-abuffersink" href="#abuffersink">21.1 abuffersink</a></li>
+ <li><a name="toc-anullsink" href="#anullsink">21.2 anullsink</a></li>
</ul></li>
<li><a name="toc-Video-Filters" href="#Video-Filters">22. Video Filters</a>
<ul class="toc">
<li><a name="toc-copy" href="#copy">22.3 copy</a></li>
<li><a name="toc-crop" href="#crop">22.4 crop</a></li>
<li><a name="toc-cropdetect" href="#cropdetect">22.5 cropdetect</a></li>
- <li><a name="toc-drawbox" href="#drawbox">22.6 drawbox</a></li>
- <li><a name="toc-drawtext" href="#drawtext">22.7 drawtext</a></li>
- <li><a name="toc-fade" href="#fade">22.8 fade</a></li>
- <li><a name="toc-fieldorder" href="#fieldorder">22.9 fieldorder</a></li>
- <li><a name="toc-fifo" href="#fifo">22.10 fifo</a></li>
- <li><a name="toc-format" href="#format">22.11 format</a></li>
- <li><a name="toc-frei0r-1" href="#frei0r-1">22.12 frei0r</a></li>
- <li><a name="toc-gradfun" href="#gradfun">22.13 gradfun</a></li>
- <li><a name="toc-hflip" href="#hflip">22.14 hflip</a></li>
- <li><a name="toc-hqdn3d" href="#hqdn3d">22.15 hqdn3d</a></li>
- <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">22.16 lut, lutrgb, lutyuv</a></li>
- <li><a name="toc-mp" href="#mp">22.17 mp</a></li>
- <li><a name="toc-negate" href="#negate">22.18 negate</a></li>
- <li><a name="toc-noformat" href="#noformat">22.19 noformat</a></li>
- <li><a name="toc-null-1" href="#null-1">22.20 null</a></li>
- <li><a name="toc-ocv" href="#ocv">22.21 ocv</a>
+ <li><a name="toc-delogo" href="#delogo">22.6 delogo</a></li>
+ <li><a name="toc-drawbox" href="#drawbox">22.7 drawbox</a></li>
+ <li><a name="toc-drawtext" href="#drawtext">22.8 drawtext</a></li>
+ <li><a name="toc-fade" href="#fade">22.9 fade</a></li>
+ <li><a name="toc-fieldorder" href="#fieldorder">22.10 fieldorder</a></li>
+ <li><a name="toc-fifo" href="#fifo">22.11 fifo</a></li>
+ <li><a name="toc-format" href="#format">22.12 format</a></li>
+ <li><a name="toc-frei0r-1" href="#frei0r-1">22.13 frei0r</a></li>
+ <li><a name="toc-gradfun" href="#gradfun">22.14 gradfun</a></li>
+ <li><a name="toc-hflip" href="#hflip">22.15 hflip</a></li>
+ <li><a name="toc-hqdn3d" href="#hqdn3d">22.16 hqdn3d</a></li>
+ <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">22.17 lut, lutrgb, lutyuv</a></li>
+ <li><a name="toc-mp" href="#mp">22.18 mp</a></li>
+ <li><a name="toc-negate" href="#negate">22.19 negate</a></li>
+ <li><a name="toc-noformat" href="#noformat">22.20 noformat</a></li>
+ <li><a name="toc-null" href="#null">22.21 null</a></li>
+ <li><a name="toc-ocv" href="#ocv">22.22 ocv</a>
<ul class="toc">
- <li><a name="toc-dilate-1" href="#dilate-1">22.21.1 dilate</a></li>
- <li><a name="toc-erode" href="#erode">22.21.2 erode</a></li>
- <li><a name="toc-smooth" href="#smooth">22.21.3 smooth</a></li>
+ <li><a name="toc-dilate-1" href="#dilate-1">22.22.1 dilate</a></li>
+ <li><a name="toc-erode" href="#erode">22.22.2 erode</a></li>
+ <li><a name="toc-smooth" href="#smooth">22.22.3 smooth</a></li>
</ul></li>
- <li><a name="toc-overlay" href="#overlay">22.22 overlay</a></li>
- <li><a name="toc-pad" href="#pad">22.23 pad</a></li>
- <li><a name="toc-pixdesctest" href="#pixdesctest">22.24 pixdesctest</a></li>
- <li><a name="toc-scale" href="#scale">22.25 scale</a></li>
- <li><a name="toc-select" href="#select">22.26 select</a></li>
- <li><a name="toc-setdar-1" href="#setdar-1">22.27 setdar</a></li>
- <li><a name="toc-setpts" href="#setpts">22.28 setpts</a></li>
- <li><a name="toc-setsar-1" href="#setsar-1">22.29 setsar</a></li>
- <li><a name="toc-settb" href="#settb">22.30 settb</a></li>
- <li><a name="toc-showinfo" href="#showinfo">22.31 showinfo</a></li>
- <li><a name="toc-slicify" href="#slicify">22.32 slicify</a></li>
- <li><a name="toc-split" href="#split">22.33 split</a></li>
- <li><a name="toc-transpose" href="#transpose">22.34 transpose</a></li>
- <li><a name="toc-unsharp" href="#unsharp">22.35 unsharp</a></li>
- <li><a name="toc-vflip" href="#vflip">22.36 vflip</a></li>
- <li><a name="toc-yadif" href="#yadif">22.37 yadif</a></li>
+ <li><a name="toc-overlay" href="#overlay">22.23 overlay</a></li>
+ <li><a name="toc-pad" href="#pad">22.24 pad</a></li>
+ <li><a name="toc-pixdesctest" href="#pixdesctest">22.25 pixdesctest</a></li>
+ <li><a name="toc-scale" href="#scale">22.26 scale</a></li>
+ <li><a name="toc-select" href="#select">22.27 select</a></li>
+ <li><a name="toc-setdar-1" href="#setdar-1">22.28 setdar</a></li>
+ <li><a name="toc-setpts" href="#setpts">22.29 setpts</a></li>
+ <li><a name="toc-setsar-1" href="#setsar-1">22.30 setsar</a></li>
+ <li><a name="toc-settb" href="#settb">22.31 settb</a></li>
+ <li><a name="toc-showinfo" href="#showinfo">22.32 showinfo</a></li>
+ <li><a name="toc-slicify" href="#slicify">22.33 slicify</a></li>
+ <li><a name="toc-split" href="#split">22.34 split</a></li>
+ <li><a name="toc-transpose" href="#transpose">22.35 transpose</a></li>
+ <li><a name="toc-unsharp" href="#unsharp">22.36 unsharp</a></li>
+ <li><a name="toc-vflip" href="#vflip">22.37 vflip</a></li>
+ <li><a name="toc-yadif" href="#yadif">22.38 yadif</a></li>
</ul></li>
<li><a name="toc-Video-Sources" href="#Video-Sources">23. Video Sources</a>
<ul class="toc">
<li><a name="toc-buffer" href="#buffer">23.1 buffer</a></li>
<li><a name="toc-color" href="#color">23.2 color</a></li>
<li><a name="toc-movie" href="#movie">23.3 movie</a></li>
- <li><a name="toc-nullsrc" href="#nullsrc">23.4 nullsrc</a></li>
- <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">23.5 frei0r_src</a></li>
- <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">23.6 rgbtestsrc, testsrc</a></li>
+ <li><a name="toc-mptestsrc" href="#mptestsrc">23.4 mptestsrc</a></li>
+ <li><a name="toc-nullsrc" href="#nullsrc">23.5 nullsrc</a></li>
+ <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">23.6 frei0r_src</a></li>
+ <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">23.7 rgbtestsrc, testsrc</a></li>
</ul></li>
<li><a name="toc-Video-Sinks" href="#Video-Sinks">24. Video Sinks</a>
<ul class="toc">
specified for the inputs.
</p>
-<a name="Options-5"></a>
-<h1 class="chapter"><a href="ffmpeg.html#toc-Options-5">3. Options</a></h1>
+<a name="Options-6"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Options-6">3. Options</a></h1>
<p>All the numerical options, if not specified otherwise, accept in input
a string representing a number, which may contain one of the
</dd>
</dl>
+<a name="AVOptions"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-AVOptions">3.2 AVOptions</a></h2>
+
+<p>These options are provided directly by the libavformat, libavdevice and
+libavcodec libraries. To see the list of available AVOptions, use the
+‘<samp>-help</samp>’ option. They are separated into two categories:
+</p><dl compact="compact">
+<dt> ‘<samp>generic</samp>’</dt>
+<dd><p>These options can be set for any container, codec or device. Generic options are
+listed under AVFormatContext options for containers/devices and under
+AVCodecContext options for codecs.
+</p></dd>
+<dt> ‘<samp>private</samp>’</dt>
+<dd><p>These options are specific to the given container, device or codec. Private
+options are listed under their corresponding containers/devices/codecs.
+</p></dd>
+</dl>
+
+<p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
+an MP3 file, use the ‘<samp>id3v2_version</samp>’ private option of the MP3
+muxer:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
+</pre></td></tr></table>
+
+<p>You can precisely specify which stream(s) should the codec AVOption apply to by
+appending a stream specifier of the form
+‘<samp>[:<var>stream_type</var>][:<var>stream_index</var>]</samp>’ to the option name.
+<var>stream_type</var> is ’v’ for video, ’a’ for audio and ’s’ for subtitle streams.
+<var>stream_index</var> is a global stream index when <var>stream_type</var> isn’t
+given, otherwise it counts streams of the given type only. As always, the index
+is zero-based. For example
+</p><table><tr><td> </td><td><pre class="example">-foo -- applies to all applicable streams
+-foo:v -- applies to all video streams
+-foo:a:2 -- applies to the third audio stream
+-foo:0 -- applies to the first stream
+</pre></td></tr></table>
+
+<p>Note -nooption syntax cannot be used for boolean AVOptions, use -option
+0/-option 1.
+</p>
+<p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
+v/a/s to the options name is now obsolete and will be removed soon.
+</p>
<a name="Main-options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Main-options">3.2 Main options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Main-options">3.3 Main options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-f <var>fmt</var></samp>’</dt>
</dl>
<a name="Video-Options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Video-Options">3.3 Video Options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Video-Options">3.4 Video Options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-vframes <var>number</var></samp>’</dt>
</dl>
<a name="Advanced-Video-Options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Advanced-Video-Options">3.4 Advanced Video Options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Advanced-Video-Options">3.5 Advanced Video Options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-pix_fmt <var>format</var></samp>’</dt>
<dd><p>FF_ER_AGGRESSIVE
</p></dd>
<dt> ‘<samp>4</samp>’</dt>
-<dd><p>FF_ER_VERY_AGGRESSIVE
+<dd><p>FF_ER_EXPLODE
</p></dd>
</dl>
</dl>
<a name="Audio-Options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Audio-Options">3.5 Audio Options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Audio-Options">3.6 Audio Options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-aframes <var>number</var></samp>’</dt>
</dl>
<a name="Advanced-Audio-options_003a"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Advanced-Audio-options_003a">3.6 Advanced Audio options:</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Advanced-Audio-options_003a">3.7 Advanced Audio options:</a></h2>
<dl compact="compact">
<dt> ‘<samp>-atag <var>fourcc/tag</var></samp>’</dt>
</dl>
<a name="Subtitle-options_003a"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Subtitle-options_003a">3.7 Subtitle options:</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Subtitle-options_003a">3.8 Subtitle options:</a></h2>
<dl compact="compact">
<dt> ‘<samp>-scodec <var>codec</var></samp>’</dt>
</dl>
<a name="Audio_002fVideo-grab-options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Audio_002fVideo-grab-options">3.8 Audio/Video grab options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Audio_002fVideo-grab-options">3.9 Audio/Video grab options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-vc <var>channel</var></samp>’</dt>
</dl>
<a name="Advanced-options"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Advanced-options">3.9 Advanced options</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Advanced-options">3.10 Advanced options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-map <var>input_file_id</var>.<var>input_stream_id</var>[:<var>sync_file_id</var>.<var>sync_stream_id</var>]</samp>’</dt>
<dt> ‘<samp>-loop_input</samp>’</dt>
<dd><p>Loop over the input stream. Currently it works only for image
streams. This option is used for automatic FFserver testing.
-This option is deprecated, use -loop.
+This option is deprecated, use -loop 1.
</p></dd>
<dt> ‘<samp>-loop_output <var>number_of_times</var></samp>’</dt>
<dd><p>Repeatedly loop output for formats that support looping such as animated GIF
</dl>
<a name="Preset-files"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-Preset-files">3.10 Preset files</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-Preset-files">3.11 Preset files</a></h2>
<p>A preset file contains a sequence of <var>option</var>=<var>value</var> pairs,
one for each line, specifying a sequence of options which would be
<table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
</pre></td></tr></table>
-<p>0.0 is display.screen number of your X11 server, same as the DISPLAY environment
-variable. 10 is the x-offset and 20 the y-offset for the grabbing.
+<p>10 is the x-offset and 20 the y-offset for the grabbing.
</p>
+<table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -s cif -r 25 -i :0.0 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>The grabbing region follows the mouse pointer, which stays at the center of
+region.
+</p>
+<table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse 100 -s cif -r 25 -i :0.0 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>Only follows when mouse pointer reaches within 100 pixels to the edge of
+region.
+</p>
+<table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>The grabbing region will be indicated on screen.
+</p>
+<table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -s cif -r 25 -i :0.0 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>The grabbing region indication will follow the mouse pointer.
+</p>
+
<a name="Video-and-Audio-file-format-conversion"></a>
<h2 class="section"><a href="ffmpeg.html#toc-Video-and-Audio-file-format-conversion">5.3 Video and Audio file format conversion</a></h2>
</p>
<p>This decoder decodes rawvideo streams.
</p>
-<a name="Options-2"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Options-2">8.1.1 Options</a></h3>
+<a name="Options-1"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options-1">8.1.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
<p>Requires the presence of the libvpx headers and library during configuration.
You need to explicitly configure the build with <code>--enable-libvpx</code>.
</p>
-<a name="Options-3"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Options-3">11.1.1 Options</a></h3>
+<a name="Options-4"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options-4">11.1.1 Options</a></h3>
<p>Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
</p>
configuration. You need to explicitly configure the build with
<code>--enable-libx264</code>.
</p>
-<a name="Options-4"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Options-4">11.2.1 Options</a></h3>
+<a name="Options-5"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options-5">11.2.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>preset <var>preset_name</var></samp>’</dt>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f image2 -i img.jpeg img.png
</pre></td></tr></table>
-<a name="applehttp"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-applehttp">12.2 applehttp</a></h2>
+<a name="applehttp-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-applehttp-1">12.2 applehttp</a></h2>
<p>Apple HTTP Live Streaming demuxer.
</p>
-y out.ts
</pre></td></tr></table>
-<a name="null"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-null">13.5 null</a></h2>
+<a name="null-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-null-1">13.5 null</a></h2>
<p>Null muxer.
</p>
<p>For more information read:
<a href="http://jackaudio.org/">http://jackaudio.org/</a>
</p>
+<a name="lavfi"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-lavfi">14.6 lavfi</a></h2>
+
+<p>Libavfilter input virtual device.
+</p>
+<p>This input device reads data from the open output pads of a libavfilter
+filtergraph.
+</p>
+<p>For each filtergraph open output, the input device will create a
+corresponding stream which is mapped to the generated output. Currently
+only video data is supported. The filtergraph is specified through the
+option ‘<samp>graph</samp>’.
+</p>
+<p>To enable this input device, you need to configure your build with
+<code>--enable-libavfilter</code>.
+</p>
+<a name="Options"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options">14.6.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> ‘<samp>graph</samp>’</dt>
+<dd><p>Specify the filtergraph to use as input. Each video open output must be
+labelled by a unique string of the form "out<var>N</var>", where <var>N</var> is a
+number starting from 0 corresponding to the mapped input stream
+generated by the device.
+The first unlabelled output is automatically assigned to the "out0"
+label, but all the others need to be specified explicitely.
+</p>
+<p>If not specified defaults to the filename specified for the input
+device.
+</p></dd>
+</dl>
+
+<a name="Examples-3"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Examples-3">14.6.2 Examples</a></h3>
+
+<ul>
+<li>
+Create a color video stream and play it back with ‘<tt>ffplay</tt>’:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "color=pink [out0]" dummy
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use filename for specifying the graph
+description, and omit the "out0" label:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi color=pink
+</pre></td></tr></table>
+
+</li><li>
+Create three different video test filtered sources and play them:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
+</pre></td></tr></table>
+</li></ul>
+
<a name="libdc1394"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-libdc1394">14.6 libdc1394</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-libdc1394">14.7 libdc1394</a></h2>
<p>IIDC1394 input device, based on libdc1394 and libraw1394.
</p>
<a name="openal"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-openal">14.7 openal</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-openal">14.8 openal</a></h2>
<p>The OpenAL input device provides audio capture on all systems with a
working OpenAL 1.1 implementation.
automatically select the default device. You can get the list of the
supported devices by using the option <var>list_devices</var>.
</p>
-<a name="Options-1"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Options-1">14.7.1 Options</a></h3>
+<a name="Options-3"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options-3">14.8.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>channels</samp>’</dt>
</dl>
<a name="Examples-2"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Examples-2">14.7.2 Examples</a></h3>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Examples-2">14.8.2 Examples</a></h3>
<p>Print the list of OpenAL supported devices and exit:
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
try the latest OpenAL Soft if the above does not work.
</p>
<a name="oss"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-oss">14.8 oss</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-oss">14.9 oss</a></h2>
<p>Open Sound System input device.
</p>
<p>For more information about OSS see:
<a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
</p>
-<a name="sndio-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-sndio-1">14.9 sndio</a></h2>
+<a name="sndio"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-sndio">14.10 sndio</a></h2>
<p>sndio input device.
</p>
</pre></td></tr></table>
<a name="video4linux-and-video4linux2"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-video4linux-and-video4linux2">14.10 video4linux and video4linux2</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-video4linux-and-video4linux2">14.11 video4linux and video4linux2</a></h2>
<p>Video4Linux and Video4Linux2 input video devices.
</p>
</pre></td></tr></table>
<a name="vfwcap"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-vfwcap">14.11 vfwcap</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-vfwcap">14.12 vfwcap</a></h2>
<p>VfW (Video for Windows) capture input device.
</p>
other filename will be interpreted as device number 0.
</p>
<a name="x11grab"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-x11grab">14.12 x11grab</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-x11grab">14.13 x11grab</a></h2>
<p>X11 video input device.
</p>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
# Grab at position 10,20.
-ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
+ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
+</pre></td></tr></table>
+
+<a name="follow_005fmouse-AVOption"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-follow_005fmouse-AVOption">14.13.1 <var>follow_mouse</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
+</pre></td></tr></table>
+
+<p>When it is specified with "centered", the grabbing region follows the mouse
+pointer and keeps the pointer at the center of region; otherwise, the region
+follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
+zero) to the edge of region.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
+
+# Follows only when the mouse pointer reaches within 100 pixels to edge
+ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
+</pre></td></tr></table>
+
+<a name="show_005fregion-AVOption"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-show_005fregion-AVOption">14.13.2 <var>show_region</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-show_region 1
+</pre></td></tr></table>
+
+<p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
+region will be indicated on screen. With this option, it’s easy to know what is
+being grabbed if only a portion of the screen is grabbed.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
+
+# With follow_mouse
+ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
</pre></td></tr></table>
<a name="Output-Devices"></a>
<p>For more information about SDL, check:
<a href="http://www.libsdl.org/">http://www.libsdl.org/</a>
</p>
-<a name="Options"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-Options">15.3.1 Options</a></h3>
+<a name="Options-2"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Options-2">15.3.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>window_title</samp>’</dt>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
</pre></td></tr></table>
-<a name="sndio"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-sndio">15.4 sndio</a></h2>
+<a name="sndio-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-sndio-1">15.4 sndio</a></h2>
<p>sndio audio output device.
</p>
</p>
<p>A description of the currently available protocols follows.
</p>
-<a name="applehttp-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-applehttp-1">16.1 applehttp</a></h2>
+<a name="applehttp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-applehttp">16.1 applehttp</a></h2>
<p>Read Apple HTTP Live Streaming compliant segmented stream as
a uniform one. The M3U8 playlists describing the segments can be
<p>A filtergraph can be represented using a textual representation, which
is recognized by the <code>-vf</code> and <code>-af</code> options of the ff*
-tools, and by the <code>av_parse_graph()</code> function defined in
-‘<tt>libavfilter/avfiltergraph</tt>’.
+tools, and by the <code>avfilter_graph_parse()</code> function defined in
+‘<tt>libavfilter/avfiltergraph.h</tt>’.
</p>
<p>A filterchain consists of a sequence of connected filters, each one
connected to the previous one in the sequence. A filterchain is
</p>
<p>Below is a description of the currently available audio filters.
</p>
+<a name="aformat"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-aformat">19.1 aformat</a></h2>
+
+<p>Convert the input audio to one of the specified formats. The framework will
+negotiate the most appropriate format to minimize conversions.
+</p>
+<p>The filter accepts three lists of formats, separated by ":", in the form:
+"<var>sample_formats</var>:<var>channel_layouts</var>:<var>packing_formats</var>".
+</p>
+<p>Elements in each list are separated by "," which has to be escaped in the
+filtergraph specification.
+</p>
+<p>The special parameter "all", in place of a list of elements, signifies all
+supported formats.
+</p>
+<p>Some examples follow:
+</p><table><tr><td> </td><td><pre class="example">aformat=u8\\,s16:mono:packed
+
+aformat=s16:mono\\,stereo:all
+</pre></td></tr></table>
+
<a name="anull"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-anull">19.1 anull</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-anull">19.2 anull</a></h2>
<p>Pass the audio source unchanged to the output.
</p>
+<a name="aresample"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-aresample">19.3 aresample</a></h2>
+
+<p>Resample the input audio to the specified sample rate.
+</p>
+<p>The filter accepts exactly one parameter, the output sample rate. If not
+specified then the filter will automatically convert between its input
+and output sample rates.
+</p>
+<p>For example, to resample the input audio to 44100Hz:
+</p><table><tr><td> </td><td><pre class="example">aresample=44100
+</pre></td></tr></table>
+
+<a name="ashowinfo"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-ashowinfo">19.4 ashowinfo</a></h2>
+
+<p>Show a line containing various information for each input audio frame.
+The input audio is not modified.
+</p>
+<p>The shown line contains a sequence of key/value pairs of the form
+<var>key</var>:<var>value</var>.
+</p>
+<p>A description of each shown parameter follows:
+</p>
+<dl compact="compact">
+<dt> ‘<samp>n</samp>’</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> ‘<samp>pts</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+time base units. The time base unit depends on the filter input pad, and
+is usually 1/<var>sample_rate</var>.
+</p>
+</dd>
+<dt> ‘<samp>pts_time</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> ‘<samp>pos</samp>’</dt>
+<dd><p>position of the frame in the input stream, -1 if this information in
+unavailable and/or meanigless (for example in case of synthetic audio)
+</p>
+</dd>
+<dt> ‘<samp>fmt</samp>’</dt>
+<dd><p>sample format name
+</p>
+</dd>
+<dt> ‘<samp>chlayout</samp>’</dt>
+<dd><p>channel layout description
+</p>
+</dd>
+<dt> ‘<samp>nb_samples</samp>’</dt>
+<dd><p>number of samples (per each channel) contained in the filtered frame
+</p>
+</dd>
+<dt> ‘<samp>rate</samp>’</dt>
+<dd><p>sample rate for the audio frame
+</p>
+</dd>
+<dt> ‘<samp>planar</samp>’</dt>
+<dd><p>if the packing format is planar, 0 if packed
+</p>
+</dd>
+<dt> ‘<samp>checksum</samp>’</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> ‘<samp>plane_checksum</samp>’</dt>
+<dd><p>Adler-32 checksum for each input frame plane, expressed in the form
+"[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var> <var>c4</var> <var>c5</var> <var>c6</var> <var>c7</var>]"
+</p></dd>
+</dl>
+
<a name="Audio-Sources"></a>
<h1 class="chapter"><a href="ffmpeg.html#toc-Audio-Sources">20. Audio Sources</a></h1>
<p>Below is a description of the currently available audio sources.
</p>
+<a name="abuffer"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-abuffer">20.1 abuffer</a></h2>
+
+<p>Buffer audio frames, and make them available to the filter chain.
+</p>
+<p>This source is mainly intended for a programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asrc_abuffer.h</tt>’.
+</p>
+<p>It accepts the following mandatory parameters:
+<var>sample_rate</var>:<var>sample_fmt</var>:<var>channel_layout</var>:<var>packing</var>
+</p>
+<dl compact="compact">
+<dt> ‘<samp>sample_rate</samp>’</dt>
+<dd><p>The sample rate of the incoming audio buffers.
+</p>
+</dd>
+<dt> ‘<samp>sample_fmt</samp>’</dt>
+<dd><p>The sample format of the incoming audio buffers.
+Either a sample format name or its corresponging integer representation from
+the enum AVSampleFormat in ‘<tt>libavutil/samplefmt.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>channel_layout</samp>’</dt>
+<dd><p>The channel layout of the incoming audio buffers.
+Either a channel layout name from channel_layout_map in
+‘<tt>libavutil/audioconvert.c</tt>’ or its corresponding integer representation
+from the AV_CH_LAYOUT_* macros in ‘<tt>libavutil/audioconvert.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>packing</samp>’</dt>
+<dd><p>Either "packed" or "planar", or their integer representation: 0 or 1
+respectively.
+</p>
+</dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:s16:stereo:planar
+</pre></td></tr></table>
+
+<p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
+Since the sample format with name "s16" corresponds to the number
+1 and the "stereo" channel layout corresponds to the value 3, this is
+equivalent to:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:1:3:1
+</pre></td></tr></table>
+
+<a name="amovie"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-amovie">20.2 amovie</a></h2>
+
+<p>Read an audio stream from a movie container.
+</p>
+<p>It accepts the syntax: <var>movie_name</var>[:<var>options</var>] where
+<var>movie_name</var> is the name of the resource to read (not necessarily
+a file but also a device or a stream accessed through some protocol),
+and <var>options</var> is an optional sequence of <var>key</var>=<var>value</var>
+pairs, separated by ":".
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>format_name, f</samp>’</dt>
+<dd><p>Specify the format assumed for the movie to read, and can be either
+the name of a container or an input device. If not specified the
+format is guessed from <var>movie_name</var> or by probing.
+</p>
+</dd>
+<dt> ‘<samp>seek_point, sp</samp>’</dt>
+<dd><p>Specify the seek point in seconds, the frames will be output
+starting from this seek point, the parameter is evaluated with
+<code>av_strtod</code> so the numerical value may be suffixed by an IS
+postfix. Default value is "0".
+</p>
+</dd>
+<dt> ‘<samp>stream_index, si</samp>’</dt>
+<dd><p>Specify the index of the audio stream to read. If the value is -1,
+the best suited audio stream will be automatically selected. Default
+value is "-1".
+</p>
+</dd>
+</dl>
+
<a name="anullsrc"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-anullsrc">20.1 anullsrc</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-anullsrc">20.3 anullsrc</a></h2>
<p>Null audio source, never return audio frames. It is mainly useful as a
template and to be employed in analysis / debugging tools.
<p>Below is a description of the currently available audio sinks.
</p>
+<a name="abuffersink"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-abuffersink">21.1 abuffersink</a></h2>
+
+<p>Buffer audio frames, and make them available to the end of filter chain.
+</p>
+<p>This sink is mainly intended for programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asink_abuffer.h</tt>’.
+</p>
+<p>It requires a pointer to a ABufferSinkContext structure, which defines the
+incoming buffers’ format, to be passed as the opaque parameter to
+<code>avfilter_init_filter</code> for initialization.
+</p>
<a name="anullsink"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-anullsink">21.1 anullsink</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-anullsink">21.2 anullsink</a></h2>
<p>Null audio sink, do absolutely nothing with the input audio. It is
mainly useful as a template and to be employed in analysis / debugging
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
+<dt> ‘<samp>hsub, vsub</samp>’</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p>
+</dd>
<dt> ‘<samp>n</samp>’</dt>
<dd><p>the number of input frame, starting from 0
</p>
</p></dd>
</dl>
+<a name="delogo"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-delogo">22.6 delogo</a></h2>
+
+<p>Suppress a TV station logo by a simple interpolation of the surrounding
+pixels. Just set a rectangle covering the logo and watch it disappear
+(and sometimes something even uglier appear - your mileage may vary).
+</p>
+<p>The filter accepts parameters as a string of the form
+"<var>x</var>:<var>y</var>:<var>w</var>:<var>h</var>:<var>band</var>", or as a list of
+<var>key</var>=<var>value</var> pairs, separated by ":".
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>x, y</samp>’</dt>
+<dd><p>Specify the top left corner coordinates of the logo. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>w, h</samp>’</dt>
+<dd><p>Specify the width and height of the logo to clear. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>band, t</samp>’</dt>
+<dd><p>Specify the thickness of the fuzzy edge of the rectangle (added to
+<var>w</var> and <var>h</var>). The default value is 4.
+</p>
+</dd>
+<dt> ‘<samp>show</samp>’</dt>
+<dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
+finding the right <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> parameters, and
+<var>band</var> is set to 4. The default value is 0.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow.
+</p>
+<ul>
+<li>
+Set a rectangle covering the area with top left corner coordinates 0,0
+and size 100x77, setting a band of size 10:
+<table><tr><td> </td><td><pre class="example">delogo=0:0:100:77:10
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use named options:
+<table><tr><td> </td><td><pre class="example">delogo=x=0:y=0:w=100:h=77:band=10
+</pre></td></tr></table>
+
+</li></ul>
+
<a name="drawbox"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-drawbox">22.6 drawbox</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-drawbox">22.7 drawbox</a></h2>
<p>Draw a colored box on the input image.
</p>
</pre></td></tr></table>
<a name="drawtext"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-drawtext">22.7 drawtext</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-drawtext">22.8 drawtext</a></h2>
<p>Draw text string or text from specified file on top of video using the
libfreetype library.
<a href="http://www.freetype.org/">http://www.freetype.org/</a>.
</p>
<a name="fade"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-fade">22.8 fade</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-fade">22.9 fade</a></h2>
<p>Apply fade-in/out effect to input video.
</p>
</pre></td></tr></table>
<a name="fieldorder"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-fieldorder">22.9 fieldorder</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-fieldorder">22.10 fieldorder</a></h2>
<p>Transform the field order of the input video.
</p>
</pre></td></tr></table>
<a name="fifo"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-fifo">22.10 fifo</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-fifo">22.11 fifo</a></h2>
<p>Buffer input images and send them when they are requested.
</p>
<p>The filter does not take parameters.
</p>
<a name="format"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-format">22.11 format</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-format">22.12 format</a></h2>
<p>Convert the input video to one of the specified pixel formats.
Libavfilter will try to pick one that is supported for the input to
<p><a name="frei0r"></a>
</p><a name="frei0r-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-frei0r-1">22.12 frei0r</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-frei0r-1">22.13 frei0r</a></h2>
<p>Apply a frei0r effect to the input video.
</p>
<a href="http://piksel.org/frei0r">http://piksel.org/frei0r</a>
</p>
<a name="gradfun"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-gradfun">22.13 gradfun</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-gradfun">22.14 gradfun</a></h2>
<p>Fix the banding artifacts that are sometimes introduced into nearly flat
regions by truncation to 8bit colordepth.
</pre></td></tr></table>
<a name="hflip"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-hflip">22.14 hflip</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-hflip">22.15 hflip</a></h2>
<p>Flip the input video horizontally.
</p>
</pre></td></tr></table>
<a name="hqdn3d"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-hqdn3d">22.15 hqdn3d</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-hqdn3d">22.16 hqdn3d</a></h2>
<p>High precision/quality 3d denoise filter. This filter aims to reduce
image noise producing smooth images and making still images really
</dl>
<a name="lut_002c-lutrgb_002c-lutyuv"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-lut_002c-lutrgb_002c-lutyuv">22.16 lut, lutrgb, lutyuv</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-lut_002c-lutrgb_002c-lutyuv">22.17 lut, lutrgb, lutyuv</a></h2>
<p>Compute a look-up table for binding each pixel component input value
to an output value, and apply it to input video.
</pre></td></tr></table>
<a name="mp"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-mp">22.17 mp</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-mp">22.18 mp</a></h2>
<p>Apply an MPlayer filter to the input video.
</p>
</p><dl compact="compact">
<dt> <var>2xsai</var></dt>
<dt> <var>decimate</var></dt>
-<dt> <var>delogo</var></dt>
<dt> <var>denoise3d</var></dt>
<dt> <var>detc</var></dt>
<dt> <var>dint</var></dt>
<dt> <var>framestep</var></dt>
<dt> <var>fspp</var></dt>
<dt> <var>geq</var></dt>
-<dt> <var>gradfun</var></dt>
<dt> <var>harddup</var></dt>
<dt> <var>hqdn3d</var></dt>
<dt> <var>hue</var></dt>
<dt> <var>spp</var></dt>
<dt> <var>swapuv</var></dt>
<dt> <var>telecine</var></dt>
-<dt> <var>test</var></dt>
<dt> <var>tile</var></dt>
<dt> <var>tinterlace</var></dt>
<dt> <var>unsharp</var></dt>
<p>See also mplayer(1), <a href="http://www.mplayerhq.hu/">http://www.mplayerhq.hu/</a>.
</p>
<a name="negate"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-negate">22.18 negate</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-negate">22.19 negate</a></h2>
<p>Negate input video.
</p>
alpha component (if available). The default value in input is 0.
</p>
<a name="noformat"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-noformat">22.19 noformat</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-noformat">22.20 noformat</a></h2>
<p>Force libavfilter not to use any of the specified pixel formats for the
input to the next filter.
noformat=yuv420p:yuv444p:yuv410p
</pre></td></tr></table>
-<a name="null-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-null-1">22.20 null</a></h2>
+<a name="null"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-null">22.21 null</a></h2>
<p>Pass the video source unchanged to the output.
</p>
<a name="ocv"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-ocv">22.21 ocv</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-ocv">22.22 ocv</a></h2>
<p>Apply video transform using libopencv.
</p>
</p>
<p><a name="dilate"></a>
</p><a name="dilate-1"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-dilate-1">22.21.1 dilate</a></h3>
+<h3 class="subsection"><a href="ffmpeg.html#toc-dilate-1">22.22.1 dilate</a></h3>
<p>Dilate an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvDilate</code>.
</pre></td></tr></table>
<a name="erode"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-erode">22.21.2 erode</a></h3>
+<h3 class="subsection"><a href="ffmpeg.html#toc-erode">22.22.2 erode</a></h3>
<p>Erode an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvErode</code>.
with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
</p>
<a name="smooth"></a>
-<h3 class="subsection"><a href="ffmpeg.html#toc-smooth">22.21.3 smooth</a></h3>
+<h3 class="subsection"><a href="ffmpeg.html#toc-smooth">22.22.3 smooth</a></h3>
<p>Smooth the input video.
</p>
libopencv function <code>cvSmooth</code>.
</p>
<a name="overlay"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-overlay">22.22 overlay</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-overlay">22.23 overlay</a></h2>
<p>Overlay one video on top of another.
</p>
approach is yet to be tested.
</p>
<a name="pad"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-pad">22.23 pad</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-pad">22.24 pad</a></h2>
<p>Add paddings to the input image, and places the original input at the
given coordinates <var>x</var>, <var>y</var>.
expressions, or NAN if not yet specified
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
# pad the input to get a final w/h ratio of 16:9
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
+# for anamorphic video, in order to set the output display aspect ratio,
+# it is necessary to use sar in the expression, according to the relation:
+# (ih * X / ih) * sar = output_dar
+# X = output_dar / sar
+pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
+
# double output size and put the input video in the bottom-right
# corner of the output padded area
pad="2*iw:2*ih:ow-iw:oh-ih"
</pre></td></tr></table>
<a name="pixdesctest"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-pixdesctest">22.24 pixdesctest</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-pixdesctest">22.25 pixdesctest</a></h2>
<p>Pixel format descriptor test filter, mainly useful for internal
testing. The output video should be equal to the input video.
<p>can be used to test the monowhite pixel format descriptor definition.
</p>
<a name="scale"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-scale">22.25 scale</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-scale">22.26 scale</a></h2>
<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
</p>
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
</pre></td></tr></table>
<a name="select"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-select">22.26 select</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-select">22.27 select</a></h2>
<p>Select frames to pass in output.
</p>
<p>It accepts in input an expression, which is evaluated for each input
<p><a name="setdar"></a>
</p><a name="setdar-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-setdar-1">22.27 setdar</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-setdar-1">22.28 setdar</a></h2>
<p>Set the Display Aspect Ratio for the filter output video.
</p>
<p>See also the <a href="#setsar">setsar</a> filter documentation.
</p>
<a name="setpts"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-setpts">22.28 setpts</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-setpts">22.29 setpts</a></h2>
<p>Change the PTS (presentation timestamp) of the input video frames.
</p>
<p><a name="setsar"></a>
</p><a name="setsar-1"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-setsar-1">22.29 setsar</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-setsar-1">22.30 setsar</a></h2>
<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
</p>
</pre></td></tr></table>
<a name="settb"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-settb">22.30 settb</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-settb">22.31 settb</a></h2>
<p>Set the timebase to use for the output frames timestamps.
It is mainly useful for testing timebase configuration.
</pre></td></tr></table>
<a name="showinfo"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-showinfo">22.31 showinfo</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-showinfo">22.32 showinfo</a></h2>
<p>Show a line containing various information for each input video frame.
The input video is not modified.
</dl>
<a name="slicify"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-slicify">22.32 slicify</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-slicify">22.33 slicify</a></h2>
<p>Pass the images of input video on to next video filter as multiple
slices.
faster due to better use of the memory cache.
</p>
<a name="split"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-split">22.33 split</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-split">22.34 split</a></h2>
<p>Pass on the input video to two outputs. Both outputs are identical to
the input video.
one padded.
</p>
<a name="transpose"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-transpose">22.34 transpose</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-transpose">22.35 transpose</a></h2>
<p>Transpose rows with columns in the input video and optionally flip it.
</p>
</dl>
<a name="unsharp"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-unsharp">22.35 unsharp</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-unsharp">22.36 unsharp</a></h2>
<p>Sharpen or blur the input video.
</p>
</p>
<p>Negative values for the amount will blur the input video, while positive
values will sharpen. All parameters are optional and default to the
-equivalent of the string ’5:5:1.0:0:0:0.0’.
+equivalent of the string ’5:5:1.0:5:5:0.0’.
</p>
<dl compact="compact">
<dt> ‘<samp>luma_msize_x</samp>’</dt>
</dd>
<dt> ‘<samp>chroma_msize_x</samp>’</dt>
<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
<dt> ‘<samp>chroma_msize_y</samp>’</dt>
<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
-<dt> ‘<samp>luma_amount</samp>’</dt>
+<dt> ‘<samp>chroma_amount</samp>’</dt>
<dd><p>Set the chroma effect strength. It can be a float number between -2.0
and 5.0, default value is 0.0.
</p>
</pre></td></tr></table>
<a name="vflip"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-vflip">22.36 vflip</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-vflip">22.37 vflip</a></h2>
<p>Flip the input video vertically.
</p>
</pre></td></tr></table>
<a name="yadif"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-yadif">22.37 yadif</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-yadif">22.38 yadif</a></h2>
<p>Deinterlace the input video ("yadif" means "yet another deinterlacing
filter").
</p>
<dl compact="compact">
<dt> ‘<samp>0</samp>’</dt>
-<dd><p>assume bottom field first
+<dd><p>assume top field first
</p></dd>
<dt> ‘<samp>1</samp>’</dt>
-<dd><p>assume top field first
+<dd><p>assume bottom field first
</p></dd>
<dt> ‘<samp>-1</samp>’</dt>
<dd><p>enable automatic detection
</pre></td></tr></table>
+<a name="mptestsrc"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mptestsrc">23.4 mptestsrc</a></h2>
+
+<p>Generate various test patterns, as generated by the MPlayer test filter.
+</p>
+<p>The size of the generated video is fixed, and is 256x256.
+This source is useful in particular for testing encoding features.
+</p>
+<p>This source accepts an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by ":". The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>rate, r</samp>’</dt>
+<dd><p>Specify the frame rate of the sourced video, as the number of frames
+generated per second. It has to be a string in the format
+<var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
+number or a valid video frame rate abbreviation. The default value is
+"25".
+</p>
+</dd>
+<dt> ‘<samp>duration, d</samp>’</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
+[-]S+[.m...]
+</pre></td></tr></table>
+<p>See also the function <code>av_parse_time()</code>.
+</p>
+<p>If not specified, or the expressed duration is negative, the video is
+supposed to be generated forever.
+</p>
+</dd>
+<dt> ‘<samp>test, t</samp>’</dt>
+<dd>
+<p>Set the number or the name of the test to perform. Supported tests are:
+</p><dl compact="compact">
+<dt> ‘<samp>dc_luma</samp>’</dt>
+<dt> ‘<samp>dc_chroma</samp>’</dt>
+<dt> ‘<samp>freq_luma</samp>’</dt>
+<dt> ‘<samp>freq_chroma</samp>’</dt>
+<dt> ‘<samp>amp_luma</samp>’</dt>
+<dt> ‘<samp>amp_chroma</samp>’</dt>
+<dt> ‘<samp>cbp</samp>’</dt>
+<dt> ‘<samp>mv</samp>’</dt>
+<dt> ‘<samp>ring1</samp>’</dt>
+<dt> ‘<samp>ring2</samp>’</dt>
+<dt> ‘<samp>all</samp>’</dt>
+</dl>
+
+<p>Default value is "all", which will cycle through the list of all tests.
+</p></dd>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td> </td><td><pre class="example">testsrc=t=dc_luma
+</pre></td></tr></table>
+
+<p>will generate a "dc_luma" test pattern.
+</p>
<a name="nullsrc"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-nullsrc">23.4 nullsrc</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-nullsrc">23.5 nullsrc</a></h2>
<p>Null video source, never return images. It is mainly useful as a
template and to be employed in analysis / debugging tools.
"AVTB" (the default timebase), and defaults to the value "AVTB".
</p>
<a name="frei0r_005fsrc"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-frei0r_005fsrc">23.5 frei0r_src</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-frei0r_005fsrc">23.6 frei0r_src</a></h2>
<p>Provide a frei0r source.
</p>
</pre></td></tr></table>
<a name="rgbtestsrc_002c-testsrc"></a>
-<h2 class="section"><a href="ffmpeg.html#toc-rgbtestsrc_002c-testsrc">23.6 rgbtestsrc, testsrc</a></h2>
+<h2 class="section"><a href="ffmpeg.html#toc-rgbtestsrc_002c-testsrc">23.7 rgbtestsrc, testsrc</a></h2>
<p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
detecting RGB vs BGR issues. You should see a red, green and blue
"25".
</p>
</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>Set the sample aspect ratio of the sourced video.
+</p>
+</dd>
<dt> ‘<samp>duration</samp>’</dt>
<dd><p>Set the video duration of the sourced video. The accepted syntax is:
</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<ul class="toc">
<li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li>
<li><a name="toc-Description" href="#Description">2. Description</a></li>
- <li><a name="toc-Options-3" href="#Options-3">3. Options</a>
+ <li><a name="toc-Options-4" href="#Options-4">3. Options</a>
<ul class="toc">
<li><a name="toc-Generic-options" href="#Generic-options">3.1 Generic options</a></li>
- <li><a name="toc-Main-options" href="#Main-options">3.2 Main options</a></li>
- <li><a name="toc-Advanced-options" href="#Advanced-options">3.3 Advanced options</a></li>
- <li><a name="toc-While-playing" href="#While-playing">3.4 While playing</a></li>
+ <li><a name="toc-AVOptions" href="#AVOptions">3.2 AVOptions</a></li>
+ <li><a name="toc-Main-options" href="#Main-options">3.3 Main options</a></li>
+ <li><a name="toc-Advanced-options" href="#Advanced-options">3.4 Advanced options</a></li>
+ <li><a name="toc-While-playing" href="#While-playing">3.5 While playing</a></li>
</ul></li>
<li><a name="toc-Expression-Evaluation" href="#Expression-Evaluation">4. Expression Evaluation</a></li>
<li><a name="toc-Decoders" href="#Decoders">5. Decoders</a></li>
<ul class="toc">
<li><a name="toc-rawvideo" href="#rawvideo">6.1 rawvideo</a>
<ul class="toc">
- <li><a name="toc-Options-1" href="#Options-1">6.1.1 Options</a></li>
+ <li><a name="toc-Options-3" href="#Options-3">6.1.1 Options</a></li>
</ul>
</li>
</ul></li>
<li><a name="toc-dv1394" href="#dv1394">9.3 dv1394</a></li>
<li><a name="toc-fbdev" href="#fbdev">9.4 fbdev</a></li>
<li><a name="toc-jack" href="#jack">9.5 jack</a></li>
- <li><a name="toc-libdc1394" href="#libdc1394">9.6 libdc1394</a></li>
- <li><a name="toc-openal" href="#openal">9.7 openal</a>
+ <li><a name="toc-lavfi" href="#lavfi">9.6 lavfi</a>
<ul class="toc">
- <li><a name="toc-Options" href="#Options">9.7.1 Options</a></li>
- <li><a name="toc-Examples" href="#Examples">9.7.2 Examples</a></li>
+ <li><a name="toc-Options" href="#Options">9.6.1 Options</a></li>
+ <li><a name="toc-Examples" href="#Examples">9.6.2 Examples</a></li>
</ul></li>
- <li><a name="toc-oss" href="#oss">9.8 oss</a></li>
- <li><a name="toc-sndio-1" href="#sndio-1">9.9 sndio</a></li>
- <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">9.10 video4linux and video4linux2</a></li>
- <li><a name="toc-vfwcap" href="#vfwcap">9.11 vfwcap</a></li>
- <li><a name="toc-x11grab" href="#x11grab">9.12 x11grab</a></li>
+ <li><a name="toc-libdc1394" href="#libdc1394">9.7 libdc1394</a></li>
+ <li><a name="toc-openal" href="#openal">9.8 openal</a>
+ <ul class="toc">
+ <li><a name="toc-Options-1" href="#Options-1">9.8.1 Options</a></li>
+ <li><a name="toc-Examples-2" href="#Examples-2">9.8.2 Examples</a></li>
+ </ul></li>
+ <li><a name="toc-oss" href="#oss">9.9 oss</a></li>
+ <li><a name="toc-sndio-1" href="#sndio-1">9.10 sndio</a></li>
+ <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">9.11 video4linux and video4linux2</a></li>
+ <li><a name="toc-vfwcap" href="#vfwcap">9.12 vfwcap</a></li>
+ <li><a name="toc-x11grab" href="#x11grab">9.13 x11grab</a>
+ <ul class="toc">
+ <li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">9.13.1 <var>follow_mouse</var> AVOption</a></li>
+ <li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">9.13.2 <var>show_region</var> AVOption</a></li>
+ </ul>
+</li>
</ul></li>
<li><a name="toc-Output-Devices" href="#Output-Devices">10. Output Devices</a>
<ul class="toc">
</ul></li>
<li><a name="toc-Audio-Filters" href="#Audio-Filters">13. Audio Filters</a>
<ul class="toc">
- <li><a name="toc-anull" href="#anull">13.1 anull</a></li>
+ <li><a name="toc-aformat" href="#aformat">13.1 aformat</a></li>
+ <li><a name="toc-anull" href="#anull">13.2 anull</a></li>
+ <li><a name="toc-aresample" href="#aresample">13.3 aresample</a></li>
+ <li><a name="toc-ashowinfo" href="#ashowinfo">13.4 ashowinfo</a></li>
</ul></li>
<li><a name="toc-Audio-Sources" href="#Audio-Sources">14. Audio Sources</a>
<ul class="toc">
- <li><a name="toc-anullsrc" href="#anullsrc">14.1 anullsrc</a></li>
+ <li><a name="toc-abuffer" href="#abuffer">14.1 abuffer</a></li>
+ <li><a name="toc-amovie" href="#amovie">14.2 amovie</a></li>
+ <li><a name="toc-anullsrc" href="#anullsrc">14.3 anullsrc</a></li>
</ul></li>
<li><a name="toc-Audio-Sinks" href="#Audio-Sinks">15. Audio Sinks</a>
<ul class="toc">
- <li><a name="toc-anullsink" href="#anullsink">15.1 anullsink</a></li>
+ <li><a name="toc-abuffersink" href="#abuffersink">15.1 abuffersink</a></li>
+ <li><a name="toc-anullsink" href="#anullsink">15.2 anullsink</a></li>
</ul></li>
<li><a name="toc-Video-Filters" href="#Video-Filters">16. Video Filters</a>
<ul class="toc">
<li><a name="toc-copy" href="#copy">16.3 copy</a></li>
<li><a name="toc-crop" href="#crop">16.4 crop</a></li>
<li><a name="toc-cropdetect" href="#cropdetect">16.5 cropdetect</a></li>
- <li><a name="toc-drawbox" href="#drawbox">16.6 drawbox</a></li>
- <li><a name="toc-drawtext" href="#drawtext">16.7 drawtext</a></li>
- <li><a name="toc-fade" href="#fade">16.8 fade</a></li>
- <li><a name="toc-fieldorder" href="#fieldorder">16.9 fieldorder</a></li>
- <li><a name="toc-fifo" href="#fifo">16.10 fifo</a></li>
- <li><a name="toc-format" href="#format">16.11 format</a></li>
- <li><a name="toc-frei0r-1" href="#frei0r-1">16.12 frei0r</a></li>
- <li><a name="toc-gradfun" href="#gradfun">16.13 gradfun</a></li>
- <li><a name="toc-hflip" href="#hflip">16.14 hflip</a></li>
- <li><a name="toc-hqdn3d" href="#hqdn3d">16.15 hqdn3d</a></li>
- <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">16.16 lut, lutrgb, lutyuv</a></li>
- <li><a name="toc-mp" href="#mp">16.17 mp</a></li>
- <li><a name="toc-negate" href="#negate">16.18 negate</a></li>
- <li><a name="toc-noformat" href="#noformat">16.19 noformat</a></li>
- <li><a name="toc-null-1" href="#null-1">16.20 null</a></li>
- <li><a name="toc-ocv" href="#ocv">16.21 ocv</a>
+ <li><a name="toc-delogo" href="#delogo">16.6 delogo</a></li>
+ <li><a name="toc-drawbox" href="#drawbox">16.7 drawbox</a></li>
+ <li><a name="toc-drawtext" href="#drawtext">16.8 drawtext</a></li>
+ <li><a name="toc-fade" href="#fade">16.9 fade</a></li>
+ <li><a name="toc-fieldorder" href="#fieldorder">16.10 fieldorder</a></li>
+ <li><a name="toc-fifo" href="#fifo">16.11 fifo</a></li>
+ <li><a name="toc-format" href="#format">16.12 format</a></li>
+ <li><a name="toc-frei0r-1" href="#frei0r-1">16.13 frei0r</a></li>
+ <li><a name="toc-gradfun" href="#gradfun">16.14 gradfun</a></li>
+ <li><a name="toc-hflip" href="#hflip">16.15 hflip</a></li>
+ <li><a name="toc-hqdn3d" href="#hqdn3d">16.16 hqdn3d</a></li>
+ <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">16.17 lut, lutrgb, lutyuv</a></li>
+ <li><a name="toc-mp" href="#mp">16.18 mp</a></li>
+ <li><a name="toc-negate" href="#negate">16.19 negate</a></li>
+ <li><a name="toc-noformat" href="#noformat">16.20 noformat</a></li>
+ <li><a name="toc-null-1" href="#null-1">16.21 null</a></li>
+ <li><a name="toc-ocv" href="#ocv">16.22 ocv</a>
<ul class="toc">
- <li><a name="toc-dilate-1" href="#dilate-1">16.21.1 dilate</a></li>
- <li><a name="toc-erode" href="#erode">16.21.2 erode</a></li>
- <li><a name="toc-smooth" href="#smooth">16.21.3 smooth</a></li>
+ <li><a name="toc-dilate-1" href="#dilate-1">16.22.1 dilate</a></li>
+ <li><a name="toc-erode" href="#erode">16.22.2 erode</a></li>
+ <li><a name="toc-smooth" href="#smooth">16.22.3 smooth</a></li>
</ul></li>
- <li><a name="toc-overlay" href="#overlay">16.22 overlay</a></li>
- <li><a name="toc-pad" href="#pad">16.23 pad</a></li>
- <li><a name="toc-pixdesctest" href="#pixdesctest">16.24 pixdesctest</a></li>
- <li><a name="toc-scale" href="#scale">16.25 scale</a></li>
- <li><a name="toc-select" href="#select">16.26 select</a></li>
- <li><a name="toc-setdar-1" href="#setdar-1">16.27 setdar</a></li>
- <li><a name="toc-setpts" href="#setpts">16.28 setpts</a></li>
- <li><a name="toc-setsar-1" href="#setsar-1">16.29 setsar</a></li>
- <li><a name="toc-settb" href="#settb">16.30 settb</a></li>
- <li><a name="toc-showinfo" href="#showinfo">16.31 showinfo</a></li>
- <li><a name="toc-slicify" href="#slicify">16.32 slicify</a></li>
- <li><a name="toc-split" href="#split">16.33 split</a></li>
- <li><a name="toc-transpose" href="#transpose">16.34 transpose</a></li>
- <li><a name="toc-unsharp" href="#unsharp">16.35 unsharp</a></li>
- <li><a name="toc-vflip" href="#vflip">16.36 vflip</a></li>
- <li><a name="toc-yadif" href="#yadif">16.37 yadif</a></li>
+ <li><a name="toc-overlay" href="#overlay">16.23 overlay</a></li>
+ <li><a name="toc-pad" href="#pad">16.24 pad</a></li>
+ <li><a name="toc-pixdesctest" href="#pixdesctest">16.25 pixdesctest</a></li>
+ <li><a name="toc-scale" href="#scale">16.26 scale</a></li>
+ <li><a name="toc-select" href="#select">16.27 select</a></li>
+ <li><a name="toc-setdar-1" href="#setdar-1">16.28 setdar</a></li>
+ <li><a name="toc-setpts" href="#setpts">16.29 setpts</a></li>
+ <li><a name="toc-setsar-1" href="#setsar-1">16.30 setsar</a></li>
+ <li><a name="toc-settb" href="#settb">16.31 settb</a></li>
+ <li><a name="toc-showinfo" href="#showinfo">16.32 showinfo</a></li>
+ <li><a name="toc-slicify" href="#slicify">16.33 slicify</a></li>
+ <li><a name="toc-split" href="#split">16.34 split</a></li>
+ <li><a name="toc-transpose" href="#transpose">16.35 transpose</a></li>
+ <li><a name="toc-unsharp" href="#unsharp">16.36 unsharp</a></li>
+ <li><a name="toc-vflip" href="#vflip">16.37 vflip</a></li>
+ <li><a name="toc-yadif" href="#yadif">16.38 yadif</a></li>
</ul></li>
<li><a name="toc-Video-Sources" href="#Video-Sources">17. Video Sources</a>
<ul class="toc">
<li><a name="toc-buffer" href="#buffer">17.1 buffer</a></li>
<li><a name="toc-color" href="#color">17.2 color</a></li>
<li><a name="toc-movie" href="#movie">17.3 movie</a></li>
- <li><a name="toc-nullsrc" href="#nullsrc">17.4 nullsrc</a></li>
- <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">17.5 frei0r_src</a></li>
- <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">17.6 rgbtestsrc, testsrc</a></li>
+ <li><a name="toc-mptestsrc" href="#mptestsrc">17.4 mptestsrc</a></li>
+ <li><a name="toc-nullsrc" href="#nullsrc">17.5 nullsrc</a></li>
+ <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">17.6 frei0r_src</a></li>
+ <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">17.7 rgbtestsrc, testsrc</a></li>
</ul></li>
<li><a name="toc-Video-Sinks" href="#Video-Sinks">18. Video Sinks</a>
<ul class="toc">
libraries and the SDL library. It is mostly used as a testbed for the
various FFmpeg APIs.
</p>
-<a name="Options-3"></a>
-<h1 class="chapter"><a href="ffplay.html#toc-Options-3">3. Options</a></h1>
+<a name="Options-4"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Options-4">3. Options</a></h1>
<p>All the numerical options, if not specified otherwise, accept in input
a string representing a number, which may contain one of the
</dd>
</dl>
+<a name="AVOptions"></a>
+<h2 class="section"><a href="ffplay.html#toc-AVOptions">3.2 AVOptions</a></h2>
+
+<p>These options are provided directly by the libavformat, libavdevice and
+libavcodec libraries. To see the list of available AVOptions, use the
+‘<samp>-help</samp>’ option. They are separated into two categories:
+</p><dl compact="compact">
+<dt> ‘<samp>generic</samp>’</dt>
+<dd><p>These options can be set for any container, codec or device. Generic options are
+listed under AVFormatContext options for containers/devices and under
+AVCodecContext options for codecs.
+</p></dd>
+<dt> ‘<samp>private</samp>’</dt>
+<dd><p>These options are specific to the given container, device or codec. Private
+options are listed under their corresponding containers/devices/codecs.
+</p></dd>
+</dl>
+
+<p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
+an MP3 file, use the ‘<samp>id3v2_version</samp>’ private option of the MP3
+muxer:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
+</pre></td></tr></table>
+
+<p>You can precisely specify which stream(s) should the codec AVOption apply to by
+appending a stream specifier of the form
+‘<samp>[:<var>stream_type</var>][:<var>stream_index</var>]</samp>’ to the option name.
+<var>stream_type</var> is ’v’ for video, ’a’ for audio and ’s’ for subtitle streams.
+<var>stream_index</var> is a global stream index when <var>stream_type</var> isn’t
+given, otherwise it counts streams of the given type only. As always, the index
+is zero-based. For example
+</p><table><tr><td> </td><td><pre class="example">-foo -- applies to all applicable streams
+-foo:v -- applies to all video streams
+-foo:a:2 -- applies to the third audio stream
+-foo:0 -- applies to the first stream
+</pre></td></tr></table>
+
+<p>Note -nooption syntax cannot be used for boolean AVOptions, use -option
+0/-option 1.
+</p>
+<p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
+v/a/s to the options name is now obsolete and will be removed soon.
+</p>
<a name="Main-options"></a>
-<h2 class="section"><a href="ffplay.html#toc-Main-options">3.2 Main options</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-Main-options">3.3 Main options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-x <var>width</var></samp>’</dt>
<dd><p>Force displayed height.
</p></dd>
<dt> ‘<samp>-s <var>size</var></samp>’</dt>
-<dd><p>This option has been removed. Use private format options for specifying the
-input video size.
+<dd><p>Set frame size (WxH or abbreviation), needed for videos which do
+not contain a header with the frame size like raw YUV. This option
+has been deprecated in favor of private options, try -video_size.
</p></dd>
<dt> ‘<samp>-an</samp>’</dt>
<dd><p>Disable audio.
</dl>
<a name="Advanced-options"></a>
-<h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.3 Advanced options</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.4 Advanced options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-pix_fmt <var>format</var></samp>’</dt>
-<dd><p>This option has been removed. Use private options for specifying the
-input pixel format.
+<dd><p>Set pixel format.
+This option has been deprecated in favor of private options, try -pixel_format.
</p></dd>
<dt> ‘<samp>-stats</samp>’</dt>
<dd><p>Show the stream duration, the codec parameters, the current position in
</dl>
<a name="While-playing"></a>
-<h2 class="section"><a href="ffplay.html#toc-While-playing">3.4 While playing</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-While-playing">3.5 While playing</a></h2>
<dl compact="compact">
<dt> <q, ESC></dt>
</p>
<p>This decoder decodes rawvideo streams.
</p>
-<a name="Options-1"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-Options-1">6.1.1 Options</a></h3>
+<a name="Options-3"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Options-3">6.1.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
<p>For more information read:
<a href="http://jackaudio.org/">http://jackaudio.org/</a>
</p>
+<a name="lavfi"></a>
+<h2 class="section"><a href="ffplay.html#toc-lavfi">9.6 lavfi</a></h2>
+
+<p>Libavfilter input virtual device.
+</p>
+<p>This input device reads data from the open output pads of a libavfilter
+filtergraph.
+</p>
+<p>For each filtergraph open output, the input device will create a
+corresponding stream which is mapped to the generated output. Currently
+only video data is supported. The filtergraph is specified through the
+option ‘<samp>graph</samp>’.
+</p>
+<p>To enable this input device, you need to configure your build with
+<code>--enable-libavfilter</code>.
+</p>
+<a name="Options"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Options">9.6.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> ‘<samp>graph</samp>’</dt>
+<dd><p>Specify the filtergraph to use as input. Each video open output must be
+labelled by a unique string of the form "out<var>N</var>", where <var>N</var> is a
+number starting from 0 corresponding to the mapped input stream
+generated by the device.
+The first unlabelled output is automatically assigned to the "out0"
+label, but all the others need to be specified explicitely.
+</p>
+<p>If not specified defaults to the filename specified for the input
+device.
+</p></dd>
+</dl>
+
+<a name="Examples"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Examples">9.6.2 Examples</a></h3>
+
+<ul>
+<li>
+Create a color video stream and play it back with ‘<tt>ffplay</tt>’:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "color=pink [out0]" dummy
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use filename for specifying the graph
+description, and omit the "out0" label:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi color=pink
+</pre></td></tr></table>
+
+</li><li>
+Create three different video test filtered sources and play them:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
+</pre></td></tr></table>
+</li></ul>
+
<a name="libdc1394"></a>
-<h2 class="section"><a href="ffplay.html#toc-libdc1394">9.6 libdc1394</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-libdc1394">9.7 libdc1394</a></h2>
<p>IIDC1394 input device, based on libdc1394 and libraw1394.
</p>
<a name="openal"></a>
-<h2 class="section"><a href="ffplay.html#toc-openal">9.7 openal</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-openal">9.8 openal</a></h2>
<p>The OpenAL input device provides audio capture on all systems with a
working OpenAL 1.1 implementation.
automatically select the default device. You can get the list of the
supported devices by using the option <var>list_devices</var>.
</p>
-<a name="Options"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-Options">9.7.1 Options</a></h3>
+<a name="Options-1"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Options-1">9.8.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>channels</samp>’</dt>
</dd>
</dl>
-<a name="Examples"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-Examples">9.7.2 Examples</a></h3>
+<a name="Examples-2"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Examples-2">9.8.2 Examples</a></h3>
<p>Print the list of OpenAL supported devices and exit:
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
try the latest OpenAL Soft if the above does not work.
</p>
<a name="oss"></a>
-<h2 class="section"><a href="ffplay.html#toc-oss">9.8 oss</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-oss">9.9 oss</a></h2>
<p>Open Sound System input device.
</p>
<a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
</p>
<a name="sndio-1"></a>
-<h2 class="section"><a href="ffplay.html#toc-sndio-1">9.9 sndio</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-sndio-1">9.10 sndio</a></h2>
<p>sndio input device.
</p>
</pre></td></tr></table>
<a name="video4linux-and-video4linux2"></a>
-<h2 class="section"><a href="ffplay.html#toc-video4linux-and-video4linux2">9.10 video4linux and video4linux2</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-video4linux-and-video4linux2">9.11 video4linux and video4linux2</a></h2>
<p>Video4Linux and Video4Linux2 input video devices.
</p>
</pre></td></tr></table>
<a name="vfwcap"></a>
-<h2 class="section"><a href="ffplay.html#toc-vfwcap">9.11 vfwcap</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-vfwcap">9.12 vfwcap</a></h2>
<p>VfW (Video for Windows) capture input device.
</p>
other filename will be interpreted as device number 0.
</p>
<a name="x11grab"></a>
-<h2 class="section"><a href="ffplay.html#toc-x11grab">9.12 x11grab</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-x11grab">9.13 x11grab</a></h2>
<p>X11 video input device.
</p>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
# Grab at position 10,20.
-ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
+ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
+</pre></td></tr></table>
+
+<a name="follow_005fmouse-AVOption"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-follow_005fmouse-AVOption">9.13.1 <var>follow_mouse</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
+</pre></td></tr></table>
+
+<p>When it is specified with "centered", the grabbing region follows the mouse
+pointer and keeps the pointer at the center of region; otherwise, the region
+follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
+zero) to the edge of region.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
+
+# Follows only when the mouse pointer reaches within 100 pixels to edge
+ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
+</pre></td></tr></table>
+
+<a name="show_005fregion-AVOption"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-show_005fregion-AVOption">9.13.2 <var>show_region</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-show_region 1
+</pre></td></tr></table>
+
+<p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
+region will be indicated on screen. With this option, it’s easy to know what is
+being grabbed if only a portion of the screen is grabbed.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
+
+# With follow_mouse
+ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
</pre></td></tr></table>
<a name="Output-Devices"></a>
<p>A filtergraph can be represented using a textual representation, which
is recognized by the <code>-vf</code> and <code>-af</code> options of the ff*
-tools, and by the <code>av_parse_graph()</code> function defined in
-‘<tt>libavfilter/avfiltergraph</tt>’.
+tools, and by the <code>avfilter_graph_parse()</code> function defined in
+‘<tt>libavfilter/avfiltergraph.h</tt>’.
</p>
<p>A filterchain consists of a sequence of connected filters, each one
connected to the previous one in the sequence. A filterchain is
</p>
<p>Below is a description of the currently available audio filters.
</p>
+<a name="aformat"></a>
+<h2 class="section"><a href="ffplay.html#toc-aformat">13.1 aformat</a></h2>
+
+<p>Convert the input audio to one of the specified formats. The framework will
+negotiate the most appropriate format to minimize conversions.
+</p>
+<p>The filter accepts three lists of formats, separated by ":", in the form:
+"<var>sample_formats</var>:<var>channel_layouts</var>:<var>packing_formats</var>".
+</p>
+<p>Elements in each list are separated by "," which has to be escaped in the
+filtergraph specification.
+</p>
+<p>The special parameter "all", in place of a list of elements, signifies all
+supported formats.
+</p>
+<p>Some examples follow:
+</p><table><tr><td> </td><td><pre class="example">aformat=u8\\,s16:mono:packed
+
+aformat=s16:mono\\,stereo:all
+</pre></td></tr></table>
+
<a name="anull"></a>
-<h2 class="section"><a href="ffplay.html#toc-anull">13.1 anull</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-anull">13.2 anull</a></h2>
<p>Pass the audio source unchanged to the output.
</p>
+<a name="aresample"></a>
+<h2 class="section"><a href="ffplay.html#toc-aresample">13.3 aresample</a></h2>
+
+<p>Resample the input audio to the specified sample rate.
+</p>
+<p>The filter accepts exactly one parameter, the output sample rate. If not
+specified then the filter will automatically convert between its input
+and output sample rates.
+</p>
+<p>For example, to resample the input audio to 44100Hz:
+</p><table><tr><td> </td><td><pre class="example">aresample=44100
+</pre></td></tr></table>
+
+<a name="ashowinfo"></a>
+<h2 class="section"><a href="ffplay.html#toc-ashowinfo">13.4 ashowinfo</a></h2>
+
+<p>Show a line containing various information for each input audio frame.
+The input audio is not modified.
+</p>
+<p>The shown line contains a sequence of key/value pairs of the form
+<var>key</var>:<var>value</var>.
+</p>
+<p>A description of each shown parameter follows:
+</p>
+<dl compact="compact">
+<dt> ‘<samp>n</samp>’</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> ‘<samp>pts</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+time base units. The time base unit depends on the filter input pad, and
+is usually 1/<var>sample_rate</var>.
+</p>
+</dd>
+<dt> ‘<samp>pts_time</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> ‘<samp>pos</samp>’</dt>
+<dd><p>position of the frame in the input stream, -1 if this information in
+unavailable and/or meanigless (for example in case of synthetic audio)
+</p>
+</dd>
+<dt> ‘<samp>fmt</samp>’</dt>
+<dd><p>sample format name
+</p>
+</dd>
+<dt> ‘<samp>chlayout</samp>’</dt>
+<dd><p>channel layout description
+</p>
+</dd>
+<dt> ‘<samp>nb_samples</samp>’</dt>
+<dd><p>number of samples (per each channel) contained in the filtered frame
+</p>
+</dd>
+<dt> ‘<samp>rate</samp>’</dt>
+<dd><p>sample rate for the audio frame
+</p>
+</dd>
+<dt> ‘<samp>planar</samp>’</dt>
+<dd><p>if the packing format is planar, 0 if packed
+</p>
+</dd>
+<dt> ‘<samp>checksum</samp>’</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> ‘<samp>plane_checksum</samp>’</dt>
+<dd><p>Adler-32 checksum for each input frame plane, expressed in the form
+"[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var> <var>c4</var> <var>c5</var> <var>c6</var> <var>c7</var>]"
+</p></dd>
+</dl>
+
<a name="Audio-Sources"></a>
<h1 class="chapter"><a href="ffplay.html#toc-Audio-Sources">14. Audio Sources</a></h1>
<p>Below is a description of the currently available audio sources.
</p>
+<a name="abuffer"></a>
+<h2 class="section"><a href="ffplay.html#toc-abuffer">14.1 abuffer</a></h2>
+
+<p>Buffer audio frames, and make them available to the filter chain.
+</p>
+<p>This source is mainly intended for a programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asrc_abuffer.h</tt>’.
+</p>
+<p>It accepts the following mandatory parameters:
+<var>sample_rate</var>:<var>sample_fmt</var>:<var>channel_layout</var>:<var>packing</var>
+</p>
+<dl compact="compact">
+<dt> ‘<samp>sample_rate</samp>’</dt>
+<dd><p>The sample rate of the incoming audio buffers.
+</p>
+</dd>
+<dt> ‘<samp>sample_fmt</samp>’</dt>
+<dd><p>The sample format of the incoming audio buffers.
+Either a sample format name or its corresponging integer representation from
+the enum AVSampleFormat in ‘<tt>libavutil/samplefmt.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>channel_layout</samp>’</dt>
+<dd><p>The channel layout of the incoming audio buffers.
+Either a channel layout name from channel_layout_map in
+‘<tt>libavutil/audioconvert.c</tt>’ or its corresponding integer representation
+from the AV_CH_LAYOUT_* macros in ‘<tt>libavutil/audioconvert.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>packing</samp>’</dt>
+<dd><p>Either "packed" or "planar", or their integer representation: 0 or 1
+respectively.
+</p>
+</dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:s16:stereo:planar
+</pre></td></tr></table>
+
+<p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
+Since the sample format with name "s16" corresponds to the number
+1 and the "stereo" channel layout corresponds to the value 3, this is
+equivalent to:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:1:3:1
+</pre></td></tr></table>
+
+<a name="amovie"></a>
+<h2 class="section"><a href="ffplay.html#toc-amovie">14.2 amovie</a></h2>
+
+<p>Read an audio stream from a movie container.
+</p>
+<p>It accepts the syntax: <var>movie_name</var>[:<var>options</var>] where
+<var>movie_name</var> is the name of the resource to read (not necessarily
+a file but also a device or a stream accessed through some protocol),
+and <var>options</var> is an optional sequence of <var>key</var>=<var>value</var>
+pairs, separated by ":".
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>format_name, f</samp>’</dt>
+<dd><p>Specify the format assumed for the movie to read, and can be either
+the name of a container or an input device. If not specified the
+format is guessed from <var>movie_name</var> or by probing.
+</p>
+</dd>
+<dt> ‘<samp>seek_point, sp</samp>’</dt>
+<dd><p>Specify the seek point in seconds, the frames will be output
+starting from this seek point, the parameter is evaluated with
+<code>av_strtod</code> so the numerical value may be suffixed by an IS
+postfix. Default value is "0".
+</p>
+</dd>
+<dt> ‘<samp>stream_index, si</samp>’</dt>
+<dd><p>Specify the index of the audio stream to read. If the value is -1,
+the best suited audio stream will be automatically selected. Default
+value is "-1".
+</p>
+</dd>
+</dl>
+
<a name="anullsrc"></a>
-<h2 class="section"><a href="ffplay.html#toc-anullsrc">14.1 anullsrc</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-anullsrc">14.3 anullsrc</a></h2>
<p>Null audio source, never return audio frames. It is mainly useful as a
template and to be employed in analysis / debugging tools.
<p>Below is a description of the currently available audio sinks.
</p>
+<a name="abuffersink"></a>
+<h2 class="section"><a href="ffplay.html#toc-abuffersink">15.1 abuffersink</a></h2>
+
+<p>Buffer audio frames, and make them available to the end of filter chain.
+</p>
+<p>This sink is mainly intended for programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asink_abuffer.h</tt>’.
+</p>
+<p>It requires a pointer to a ABufferSinkContext structure, which defines the
+incoming buffers’ format, to be passed as the opaque parameter to
+<code>avfilter_init_filter</code> for initialization.
+</p>
<a name="anullsink"></a>
-<h2 class="section"><a href="ffplay.html#toc-anullsink">15.1 anullsink</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-anullsink">15.2 anullsink</a></h2>
<p>Null audio sink, do absolutely nothing with the input audio. It is
mainly useful as a template and to be employed in analysis / debugging
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
+<dt> ‘<samp>hsub, vsub</samp>’</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p>
+</dd>
<dt> ‘<samp>n</samp>’</dt>
<dd><p>the number of input frame, starting from 0
</p>
</p></dd>
</dl>
+<a name="delogo"></a>
+<h2 class="section"><a href="ffplay.html#toc-delogo">16.6 delogo</a></h2>
+
+<p>Suppress a TV station logo by a simple interpolation of the surrounding
+pixels. Just set a rectangle covering the logo and watch it disappear
+(and sometimes something even uglier appear - your mileage may vary).
+</p>
+<p>The filter accepts parameters as a string of the form
+"<var>x</var>:<var>y</var>:<var>w</var>:<var>h</var>:<var>band</var>", or as a list of
+<var>key</var>=<var>value</var> pairs, separated by ":".
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>x, y</samp>’</dt>
+<dd><p>Specify the top left corner coordinates of the logo. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>w, h</samp>’</dt>
+<dd><p>Specify the width and height of the logo to clear. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>band, t</samp>’</dt>
+<dd><p>Specify the thickness of the fuzzy edge of the rectangle (added to
+<var>w</var> and <var>h</var>). The default value is 4.
+</p>
+</dd>
+<dt> ‘<samp>show</samp>’</dt>
+<dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
+finding the right <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> parameters, and
+<var>band</var> is set to 4. The default value is 0.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow.
+</p>
+<ul>
+<li>
+Set a rectangle covering the area with top left corner coordinates 0,0
+and size 100x77, setting a band of size 10:
+<table><tr><td> </td><td><pre class="example">delogo=0:0:100:77:10
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use named options:
+<table><tr><td> </td><td><pre class="example">delogo=x=0:y=0:w=100:h=77:band=10
+</pre></td></tr></table>
+
+</li></ul>
+
<a name="drawbox"></a>
-<h2 class="section"><a href="ffplay.html#toc-drawbox">16.6 drawbox</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-drawbox">16.7 drawbox</a></h2>
<p>Draw a colored box on the input image.
</p>
</pre></td></tr></table>
<a name="drawtext"></a>
-<h2 class="section"><a href="ffplay.html#toc-drawtext">16.7 drawtext</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-drawtext">16.8 drawtext</a></h2>
<p>Draw text string or text from specified file on top of video using the
libfreetype library.
<a href="http://www.freetype.org/">http://www.freetype.org/</a>.
</p>
<a name="fade"></a>
-<h2 class="section"><a href="ffplay.html#toc-fade">16.8 fade</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-fade">16.9 fade</a></h2>
<p>Apply fade-in/out effect to input video.
</p>
</pre></td></tr></table>
<a name="fieldorder"></a>
-<h2 class="section"><a href="ffplay.html#toc-fieldorder">16.9 fieldorder</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-fieldorder">16.10 fieldorder</a></h2>
<p>Transform the field order of the input video.
</p>
</pre></td></tr></table>
<a name="fifo"></a>
-<h2 class="section"><a href="ffplay.html#toc-fifo">16.10 fifo</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-fifo">16.11 fifo</a></h2>
<p>Buffer input images and send them when they are requested.
</p>
<p>The filter does not take parameters.
</p>
<a name="format"></a>
-<h2 class="section"><a href="ffplay.html#toc-format">16.11 format</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-format">16.12 format</a></h2>
<p>Convert the input video to one of the specified pixel formats.
Libavfilter will try to pick one that is supported for the input to
<p><a name="frei0r"></a>
</p><a name="frei0r-1"></a>
-<h2 class="section"><a href="ffplay.html#toc-frei0r-1">16.12 frei0r</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-frei0r-1">16.13 frei0r</a></h2>
<p>Apply a frei0r effect to the input video.
</p>
<a href="http://piksel.org/frei0r">http://piksel.org/frei0r</a>
</p>
<a name="gradfun"></a>
-<h2 class="section"><a href="ffplay.html#toc-gradfun">16.13 gradfun</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-gradfun">16.14 gradfun</a></h2>
<p>Fix the banding artifacts that are sometimes introduced into nearly flat
regions by truncation to 8bit colordepth.
</pre></td></tr></table>
<a name="hflip"></a>
-<h2 class="section"><a href="ffplay.html#toc-hflip">16.14 hflip</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-hflip">16.15 hflip</a></h2>
<p>Flip the input video horizontally.
</p>
</pre></td></tr></table>
<a name="hqdn3d"></a>
-<h2 class="section"><a href="ffplay.html#toc-hqdn3d">16.15 hqdn3d</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-hqdn3d">16.16 hqdn3d</a></h2>
<p>High precision/quality 3d denoise filter. This filter aims to reduce
image noise producing smooth images and making still images really
</dl>
<a name="lut_002c-lutrgb_002c-lutyuv"></a>
-<h2 class="section"><a href="ffplay.html#toc-lut_002c-lutrgb_002c-lutyuv">16.16 lut, lutrgb, lutyuv</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-lut_002c-lutrgb_002c-lutyuv">16.17 lut, lutrgb, lutyuv</a></h2>
<p>Compute a look-up table for binding each pixel component input value
to an output value, and apply it to input video.
</pre></td></tr></table>
<a name="mp"></a>
-<h2 class="section"><a href="ffplay.html#toc-mp">16.17 mp</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-mp">16.18 mp</a></h2>
<p>Apply an MPlayer filter to the input video.
</p>
</p><dl compact="compact">
<dt> <var>2xsai</var></dt>
<dt> <var>decimate</var></dt>
-<dt> <var>delogo</var></dt>
<dt> <var>denoise3d</var></dt>
<dt> <var>detc</var></dt>
<dt> <var>dint</var></dt>
<dt> <var>framestep</var></dt>
<dt> <var>fspp</var></dt>
<dt> <var>geq</var></dt>
-<dt> <var>gradfun</var></dt>
<dt> <var>harddup</var></dt>
<dt> <var>hqdn3d</var></dt>
<dt> <var>hue</var></dt>
<dt> <var>spp</var></dt>
<dt> <var>swapuv</var></dt>
<dt> <var>telecine</var></dt>
-<dt> <var>test</var></dt>
<dt> <var>tile</var></dt>
<dt> <var>tinterlace</var></dt>
<dt> <var>unsharp</var></dt>
<p>See also mplayer(1), <a href="http://www.mplayerhq.hu/">http://www.mplayerhq.hu/</a>.
</p>
<a name="negate"></a>
-<h2 class="section"><a href="ffplay.html#toc-negate">16.18 negate</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-negate">16.19 negate</a></h2>
<p>Negate input video.
</p>
alpha component (if available). The default value in input is 0.
</p>
<a name="noformat"></a>
-<h2 class="section"><a href="ffplay.html#toc-noformat">16.19 noformat</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-noformat">16.20 noformat</a></h2>
<p>Force libavfilter not to use any of the specified pixel formats for the
input to the next filter.
</pre></td></tr></table>
<a name="null-1"></a>
-<h2 class="section"><a href="ffplay.html#toc-null-1">16.20 null</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-null-1">16.21 null</a></h2>
<p>Pass the video source unchanged to the output.
</p>
<a name="ocv"></a>
-<h2 class="section"><a href="ffplay.html#toc-ocv">16.21 ocv</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-ocv">16.22 ocv</a></h2>
<p>Apply video transform using libopencv.
</p>
</p>
<p><a name="dilate"></a>
</p><a name="dilate-1"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-dilate-1">16.21.1 dilate</a></h3>
+<h3 class="subsection"><a href="ffplay.html#toc-dilate-1">16.22.1 dilate</a></h3>
<p>Dilate an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvDilate</code>.
</pre></td></tr></table>
<a name="erode"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-erode">16.21.2 erode</a></h3>
+<h3 class="subsection"><a href="ffplay.html#toc-erode">16.22.2 erode</a></h3>
<p>Erode an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvErode</code>.
with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
</p>
<a name="smooth"></a>
-<h3 class="subsection"><a href="ffplay.html#toc-smooth">16.21.3 smooth</a></h3>
+<h3 class="subsection"><a href="ffplay.html#toc-smooth">16.22.3 smooth</a></h3>
<p>Smooth the input video.
</p>
libopencv function <code>cvSmooth</code>.
</p>
<a name="overlay"></a>
-<h2 class="section"><a href="ffplay.html#toc-overlay">16.22 overlay</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-overlay">16.23 overlay</a></h2>
<p>Overlay one video on top of another.
</p>
approach is yet to be tested.
</p>
<a name="pad"></a>
-<h2 class="section"><a href="ffplay.html#toc-pad">16.23 pad</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-pad">16.24 pad</a></h2>
<p>Add paddings to the input image, and places the original input at the
given coordinates <var>x</var>, <var>y</var>.
expressions, or NAN if not yet specified
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
# pad the input to get a final w/h ratio of 16:9
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
+# for anamorphic video, in order to set the output display aspect ratio,
+# it is necessary to use sar in the expression, according to the relation:
+# (ih * X / ih) * sar = output_dar
+# X = output_dar / sar
+pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
+
# double output size and put the input video in the bottom-right
# corner of the output padded area
pad="2*iw:2*ih:ow-iw:oh-ih"
</pre></td></tr></table>
<a name="pixdesctest"></a>
-<h2 class="section"><a href="ffplay.html#toc-pixdesctest">16.24 pixdesctest</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-pixdesctest">16.25 pixdesctest</a></h2>
<p>Pixel format descriptor test filter, mainly useful for internal
testing. The output video should be equal to the input video.
<p>can be used to test the monowhite pixel format descriptor definition.
</p>
<a name="scale"></a>
-<h2 class="section"><a href="ffplay.html#toc-scale">16.25 scale</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-scale">16.26 scale</a></h2>
<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
</p>
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
</pre></td></tr></table>
<a name="select"></a>
-<h2 class="section"><a href="ffplay.html#toc-select">16.26 select</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-select">16.27 select</a></h2>
<p>Select frames to pass in output.
</p>
<p>It accepts in input an expression, which is evaluated for each input
<p><a name="setdar"></a>
</p><a name="setdar-1"></a>
-<h2 class="section"><a href="ffplay.html#toc-setdar-1">16.27 setdar</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-setdar-1">16.28 setdar</a></h2>
<p>Set the Display Aspect Ratio for the filter output video.
</p>
<p>See also the <a href="#setsar">setsar</a> filter documentation.
</p>
<a name="setpts"></a>
-<h2 class="section"><a href="ffplay.html#toc-setpts">16.28 setpts</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-setpts">16.29 setpts</a></h2>
<p>Change the PTS (presentation timestamp) of the input video frames.
</p>
<p><a name="setsar"></a>
</p><a name="setsar-1"></a>
-<h2 class="section"><a href="ffplay.html#toc-setsar-1">16.29 setsar</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-setsar-1">16.30 setsar</a></h2>
<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
</p>
</pre></td></tr></table>
<a name="settb"></a>
-<h2 class="section"><a href="ffplay.html#toc-settb">16.30 settb</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-settb">16.31 settb</a></h2>
<p>Set the timebase to use for the output frames timestamps.
It is mainly useful for testing timebase configuration.
</pre></td></tr></table>
<a name="showinfo"></a>
-<h2 class="section"><a href="ffplay.html#toc-showinfo">16.31 showinfo</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-showinfo">16.32 showinfo</a></h2>
<p>Show a line containing various information for each input video frame.
The input video is not modified.
</dl>
<a name="slicify"></a>
-<h2 class="section"><a href="ffplay.html#toc-slicify">16.32 slicify</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-slicify">16.33 slicify</a></h2>
<p>Pass the images of input video on to next video filter as multiple
slices.
faster due to better use of the memory cache.
</p>
<a name="split"></a>
-<h2 class="section"><a href="ffplay.html#toc-split">16.33 split</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-split">16.34 split</a></h2>
<p>Pass on the input video to two outputs. Both outputs are identical to
the input video.
one padded.
</p>
<a name="transpose"></a>
-<h2 class="section"><a href="ffplay.html#toc-transpose">16.34 transpose</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-transpose">16.35 transpose</a></h2>
<p>Transpose rows with columns in the input video and optionally flip it.
</p>
</dl>
<a name="unsharp"></a>
-<h2 class="section"><a href="ffplay.html#toc-unsharp">16.35 unsharp</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-unsharp">16.36 unsharp</a></h2>
<p>Sharpen or blur the input video.
</p>
</p>
<p>Negative values for the amount will blur the input video, while positive
values will sharpen. All parameters are optional and default to the
-equivalent of the string ’5:5:1.0:0:0:0.0’.
+equivalent of the string ’5:5:1.0:5:5:0.0’.
</p>
<dl compact="compact">
<dt> ‘<samp>luma_msize_x</samp>’</dt>
</dd>
<dt> ‘<samp>chroma_msize_x</samp>’</dt>
<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
<dt> ‘<samp>chroma_msize_y</samp>’</dt>
<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
-<dt> ‘<samp>luma_amount</samp>’</dt>
+<dt> ‘<samp>chroma_amount</samp>’</dt>
<dd><p>Set the chroma effect strength. It can be a float number between -2.0
and 5.0, default value is 0.0.
</p>
</pre></td></tr></table>
<a name="vflip"></a>
-<h2 class="section"><a href="ffplay.html#toc-vflip">16.36 vflip</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-vflip">16.37 vflip</a></h2>
<p>Flip the input video vertically.
</p>
</pre></td></tr></table>
<a name="yadif"></a>
-<h2 class="section"><a href="ffplay.html#toc-yadif">16.37 yadif</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-yadif">16.38 yadif</a></h2>
<p>Deinterlace the input video ("yadif" means "yet another deinterlacing
filter").
</p>
<dl compact="compact">
<dt> ‘<samp>0</samp>’</dt>
-<dd><p>assume bottom field first
+<dd><p>assume top field first
</p></dd>
<dt> ‘<samp>1</samp>’</dt>
-<dd><p>assume top field first
+<dd><p>assume bottom field first
</p></dd>
<dt> ‘<samp>-1</samp>’</dt>
<dd><p>enable automatic detection
</pre></td></tr></table>
+<a name="mptestsrc"></a>
+<h2 class="section"><a href="ffplay.html#toc-mptestsrc">17.4 mptestsrc</a></h2>
+
+<p>Generate various test patterns, as generated by the MPlayer test filter.
+</p>
+<p>The size of the generated video is fixed, and is 256x256.
+This source is useful in particular for testing encoding features.
+</p>
+<p>This source accepts an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by ":". The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>rate, r</samp>’</dt>
+<dd><p>Specify the frame rate of the sourced video, as the number of frames
+generated per second. It has to be a string in the format
+<var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
+number or a valid video frame rate abbreviation. The default value is
+"25".
+</p>
+</dd>
+<dt> ‘<samp>duration, d</samp>’</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
+[-]S+[.m...]
+</pre></td></tr></table>
+<p>See also the function <code>av_parse_time()</code>.
+</p>
+<p>If not specified, or the expressed duration is negative, the video is
+supposed to be generated forever.
+</p>
+</dd>
+<dt> ‘<samp>test, t</samp>’</dt>
+<dd>
+<p>Set the number or the name of the test to perform. Supported tests are:
+</p><dl compact="compact">
+<dt> ‘<samp>dc_luma</samp>’</dt>
+<dt> ‘<samp>dc_chroma</samp>’</dt>
+<dt> ‘<samp>freq_luma</samp>’</dt>
+<dt> ‘<samp>freq_chroma</samp>’</dt>
+<dt> ‘<samp>amp_luma</samp>’</dt>
+<dt> ‘<samp>amp_chroma</samp>’</dt>
+<dt> ‘<samp>cbp</samp>’</dt>
+<dt> ‘<samp>mv</samp>’</dt>
+<dt> ‘<samp>ring1</samp>’</dt>
+<dt> ‘<samp>ring2</samp>’</dt>
+<dt> ‘<samp>all</samp>’</dt>
+</dl>
+
+<p>Default value is "all", which will cycle through the list of all tests.
+</p></dd>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td> </td><td><pre class="example">testsrc=t=dc_luma
+</pre></td></tr></table>
+
+<p>will generate a "dc_luma" test pattern.
+</p>
<a name="nullsrc"></a>
-<h2 class="section"><a href="ffplay.html#toc-nullsrc">17.4 nullsrc</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-nullsrc">17.5 nullsrc</a></h2>
<p>Null video source, never return images. It is mainly useful as a
template and to be employed in analysis / debugging tools.
"AVTB" (the default timebase), and defaults to the value "AVTB".
</p>
<a name="frei0r_005fsrc"></a>
-<h2 class="section"><a href="ffplay.html#toc-frei0r_005fsrc">17.5 frei0r_src</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-frei0r_005fsrc">17.6 frei0r_src</a></h2>
<p>Provide a frei0r source.
</p>
</pre></td></tr></table>
<a name="rgbtestsrc_002c-testsrc"></a>
-<h2 class="section"><a href="ffplay.html#toc-rgbtestsrc_002c-testsrc">17.6 rgbtestsrc, testsrc</a></h2>
+<h2 class="section"><a href="ffplay.html#toc-rgbtestsrc_002c-testsrc">17.7 rgbtestsrc, testsrc</a></h2>
<p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
detecting RGB vs BGR issues. You should see a red, green and blue
"25".
</p>
</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>Set the sample aspect ratio of the sourced video.
+</p>
+</dd>
<dt> ‘<samp>duration</samp>’</dt>
<dd><p>Set the video duration of the sourced video. The accepted syntax is:
</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<ul class="toc">
<li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li>
<li><a name="toc-Description" href="#Description">2. Description</a></li>
- <li><a name="toc-Options-1" href="#Options-1">3. Options</a>
+ <li><a name="toc-Options-3" href="#Options-3">3. Options</a>
<ul class="toc">
<li><a name="toc-Generic-options" href="#Generic-options">3.1 Generic options</a></li>
- <li><a name="toc-Main-options" href="#Main-options">3.2 Main options</a></li>
+ <li><a name="toc-AVOptions" href="#AVOptions">3.2 AVOptions</a></li>
+ <li><a name="toc-Main-options" href="#Main-options">3.3 Main options</a></li>
</ul></li>
<li><a name="toc-Decoders" href="#Decoders">4. Decoders</a></li>
<li><a name="toc-Video-Decoders" href="#Video-Decoders">5. Video Decoders</a>
<li><a name="toc-Demuxers" href="#Demuxers">6. Demuxers</a>
<ul class="toc">
<li><a name="toc-image2" href="#image2">6.1 image2</a></li>
- <li><a name="toc-applehttp-1" href="#applehttp-1">6.2 applehttp</a></li>
+ <li><a name="toc-applehttp" href="#applehttp">6.2 applehttp</a></li>
</ul></li>
<li><a name="toc-Protocols" href="#Protocols">7. Protocols</a>
<ul class="toc">
- <li><a name="toc-applehttp" href="#applehttp">7.1 applehttp</a></li>
+ <li><a name="toc-applehttp-1" href="#applehttp-1">7.1 applehttp</a></li>
<li><a name="toc-concat" href="#concat">7.2 concat</a></li>
<li><a name="toc-file" href="#file">7.3 file</a></li>
<li><a name="toc-gopher" href="#gopher">7.4 gopher</a></li>
<li><a name="toc-dv1394" href="#dv1394">8.3 dv1394</a></li>
<li><a name="toc-fbdev" href="#fbdev">8.4 fbdev</a></li>
<li><a name="toc-jack" href="#jack">8.5 jack</a></li>
- <li><a name="toc-libdc1394" href="#libdc1394">8.6 libdc1394</a></li>
- <li><a name="toc-openal" href="#openal">8.7 openal</a>
+ <li><a name="toc-lavfi" href="#lavfi">8.6 lavfi</a>
<ul class="toc">
- <li><a name="toc-Options" href="#Options">8.7.1 Options</a></li>
- <li><a name="toc-Examples" href="#Examples">8.7.2 Examples</a></li>
+ <li><a name="toc-Options-1" href="#Options-1">8.6.1 Options</a></li>
+ <li><a name="toc-Examples" href="#Examples">8.6.2 Examples</a></li>
</ul></li>
- <li><a name="toc-oss" href="#oss">8.8 oss</a></li>
- <li><a name="toc-sndio" href="#sndio">8.9 sndio</a></li>
- <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">8.10 video4linux and video4linux2</a></li>
- <li><a name="toc-vfwcap" href="#vfwcap">8.11 vfwcap</a></li>
- <li><a name="toc-x11grab" href="#x11grab">8.12 x11grab</a></li>
+ <li><a name="toc-libdc1394" href="#libdc1394">8.7 libdc1394</a></li>
+ <li><a name="toc-openal" href="#openal">8.8 openal</a>
+ <ul class="toc">
+ <li><a name="toc-Options" href="#Options">8.8.1 Options</a></li>
+ <li><a name="toc-Examples-1" href="#Examples-1">8.8.2 Examples</a></li>
+ </ul></li>
+ <li><a name="toc-oss" href="#oss">8.9 oss</a></li>
+ <li><a name="toc-sndio" href="#sndio">8.10 sndio</a></li>
+ <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">8.11 video4linux and video4linux2</a></li>
+ <li><a name="toc-vfwcap" href="#vfwcap">8.12 vfwcap</a></li>
+ <li><a name="toc-x11grab" href="#x11grab">8.13 x11grab</a>
+ <ul class="toc">
+ <li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">8.13.1 <var>follow_mouse</var> AVOption</a></li>
+ <li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">8.13.2 <var>show_region</var> AVOption</a></li>
+ </ul>
+</li>
</ul>
</li>
</ul>
are prefixed by the string "TAG:".
</p>
-<a name="Options-1"></a>
-<h1 class="chapter"><a href="ffprobe.html#toc-Options-1">3. Options</a></h1>
+<a name="Options-3"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Options-3">3. Options</a></h1>
<p>All the numerical options, if not specified otherwise, accept in input
a string representing a number, which may contain one of the
</dd>
</dl>
+<a name="AVOptions"></a>
+<h2 class="section"><a href="ffprobe.html#toc-AVOptions">3.2 AVOptions</a></h2>
+
+<p>These options are provided directly by the libavformat, libavdevice and
+libavcodec libraries. To see the list of available AVOptions, use the
+‘<samp>-help</samp>’ option. They are separated into two categories:
+</p><dl compact="compact">
+<dt> ‘<samp>generic</samp>’</dt>
+<dd><p>These options can be set for any container, codec or device. Generic options are
+listed under AVFormatContext options for containers/devices and under
+AVCodecContext options for codecs.
+</p></dd>
+<dt> ‘<samp>private</samp>’</dt>
+<dd><p>These options are specific to the given container, device or codec. Private
+options are listed under their corresponding containers/devices/codecs.
+</p></dd>
+</dl>
+
+<p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
+an MP3 file, use the ‘<samp>id3v2_version</samp>’ private option of the MP3
+muxer:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
+</pre></td></tr></table>
+
+<p>You can precisely specify which stream(s) should the codec AVOption apply to by
+appending a stream specifier of the form
+‘<samp>[:<var>stream_type</var>][:<var>stream_index</var>]</samp>’ to the option name.
+<var>stream_type</var> is ’v’ for video, ’a’ for audio and ’s’ for subtitle streams.
+<var>stream_index</var> is a global stream index when <var>stream_type</var> isn’t
+given, otherwise it counts streams of the given type only. As always, the index
+is zero-based. For example
+</p><table><tr><td> </td><td><pre class="example">-foo -- applies to all applicable streams
+-foo:v -- applies to all video streams
+-foo:a:2 -- applies to the third audio stream
+-foo:0 -- applies to the first stream
+</pre></td></tr></table>
+
+<p>Note -nooption syntax cannot be used for boolean AVOptions, use -option
+0/-option 1.
+</p>
+<p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
+v/a/s to the options name is now obsolete and will be removed soon.
+</p>
<a name="Main-options"></a>
-<h2 class="section"><a href="ffprobe.html#toc-Main-options">3.2 Main options</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-Main-options">3.3 Main options</a></h2>
<dl compact="compact">
<dt> ‘<samp>-f <var>format</var></samp>’</dt>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f image2 -i img.jpeg img.png
</pre></td></tr></table>
-<a name="applehttp-1"></a>
-<h2 class="section"><a href="ffprobe.html#toc-applehttp-1">6.2 applehttp</a></h2>
+<a name="applehttp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-applehttp">6.2 applehttp</a></h2>
<p>Apple HTTP Live Streaming demuxer.
</p>
</p>
<p>A description of the currently available protocols follows.
</p>
-<a name="applehttp"></a>
-<h2 class="section"><a href="ffprobe.html#toc-applehttp">7.1 applehttp</a></h2>
+<a name="applehttp-1"></a>
+<h2 class="section"><a href="ffprobe.html#toc-applehttp-1">7.1 applehttp</a></h2>
<p>Read Apple HTTP Live Streaming compliant segmented stream as
a uniform one. The M3U8 playlists describing the segments can be
<p>For more information read:
<a href="http://jackaudio.org/">http://jackaudio.org/</a>
</p>
+<a name="lavfi"></a>
+<h2 class="section"><a href="ffprobe.html#toc-lavfi">8.6 lavfi</a></h2>
+
+<p>Libavfilter input virtual device.
+</p>
+<p>This input device reads data from the open output pads of a libavfilter
+filtergraph.
+</p>
+<p>For each filtergraph open output, the input device will create a
+corresponding stream which is mapped to the generated output. Currently
+only video data is supported. The filtergraph is specified through the
+option ‘<samp>graph</samp>’.
+</p>
+<p>To enable this input device, you need to configure your build with
+<code>--enable-libavfilter</code>.
+</p>
+<a name="Options-1"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Options-1">8.6.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> ‘<samp>graph</samp>’</dt>
+<dd><p>Specify the filtergraph to use as input. Each video open output must be
+labelled by a unique string of the form "out<var>N</var>", where <var>N</var> is a
+number starting from 0 corresponding to the mapped input stream
+generated by the device.
+The first unlabelled output is automatically assigned to the "out0"
+label, but all the others need to be specified explicitely.
+</p>
+<p>If not specified defaults to the filename specified for the input
+device.
+</p></dd>
+</dl>
+
+<a name="Examples"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Examples">8.6.2 Examples</a></h3>
+
+<ul>
+<li>
+Create a color video stream and play it back with ‘<tt>ffplay</tt>’:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "color=pink [out0]" dummy
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use filename for specifying the graph
+description, and omit the "out0" label:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi color=pink
+</pre></td></tr></table>
+
+</li><li>
+Create three different video test filtered sources and play them:
+<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
+</pre></td></tr></table>
+</li></ul>
+
<a name="libdc1394"></a>
-<h2 class="section"><a href="ffprobe.html#toc-libdc1394">8.6 libdc1394</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-libdc1394">8.7 libdc1394</a></h2>
<p>IIDC1394 input device, based on libdc1394 and libraw1394.
</p>
<a name="openal"></a>
-<h2 class="section"><a href="ffprobe.html#toc-openal">8.7 openal</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-openal">8.8 openal</a></h2>
<p>The OpenAL input device provides audio capture on all systems with a
working OpenAL 1.1 implementation.
supported devices by using the option <var>list_devices</var>.
</p>
<a name="Options"></a>
-<h3 class="subsection"><a href="ffprobe.html#toc-Options">8.7.1 Options</a></h3>
+<h3 class="subsection"><a href="ffprobe.html#toc-Options">8.8.1 Options</a></h3>
<dl compact="compact">
<dt> ‘<samp>channels</samp>’</dt>
</dd>
</dl>
-<a name="Examples"></a>
-<h3 class="subsection"><a href="ffprobe.html#toc-Examples">8.7.2 Examples</a></h3>
+<a name="Examples-1"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Examples-1">8.8.2 Examples</a></h3>
<p>Print the list of OpenAL supported devices and exit:
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
try the latest OpenAL Soft if the above does not work.
</p>
<a name="oss"></a>
-<h2 class="section"><a href="ffprobe.html#toc-oss">8.8 oss</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-oss">8.9 oss</a></h2>
<p>Open Sound System input device.
</p>
<a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
</p>
<a name="sndio"></a>
-<h2 class="section"><a href="ffprobe.html#toc-sndio">8.9 sndio</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-sndio">8.10 sndio</a></h2>
<p>sndio input device.
</p>
</pre></td></tr></table>
<a name="video4linux-and-video4linux2"></a>
-<h2 class="section"><a href="ffprobe.html#toc-video4linux-and-video4linux2">8.10 video4linux and video4linux2</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-video4linux-and-video4linux2">8.11 video4linux and video4linux2</a></h2>
<p>Video4Linux and Video4Linux2 input video devices.
</p>
</pre></td></tr></table>
<a name="vfwcap"></a>
-<h2 class="section"><a href="ffprobe.html#toc-vfwcap">8.11 vfwcap</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-vfwcap">8.12 vfwcap</a></h2>
<p>VfW (Video for Windows) capture input device.
</p>
other filename will be interpreted as device number 0.
</p>
<a name="x11grab"></a>
-<h2 class="section"><a href="ffprobe.html#toc-x11grab">8.12 x11grab</a></h2>
+<h2 class="section"><a href="ffprobe.html#toc-x11grab">8.13 x11grab</a></h2>
<p>X11 video input device.
</p>
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
# Grab at position 10,20.
-ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
+ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
+</pre></td></tr></table>
+
+<a name="follow_005fmouse-AVOption"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-follow_005fmouse-AVOption">8.13.1 <var>follow_mouse</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
+</pre></td></tr></table>
+
+<p>When it is specified with "centered", the grabbing region follows the mouse
+pointer and keeps the pointer at the center of region; otherwise, the region
+follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
+zero) to the edge of region.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
+
+# Follows only when the mouse pointer reaches within 100 pixels to edge
+ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
+</pre></td></tr></table>
+
+<a name="show_005fregion-AVOption"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-show_005fregion-AVOption">8.13.2 <var>show_region</var> AVOption</a></h3>
+
+<p>The syntax is:
+</p><table><tr><td> </td><td><pre class="example">-show_region 1
+</pre></td></tr></table>
+
+<p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
+region will be indicated on screen. With this option, it’s easy to know what is
+being grabbed if only a portion of the screen is grabbed.
+</p>
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
+
+# With follow_mouse
+ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
</pre></td></tr></table>
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<tr><td width="40%">IV8</td><td width="10%"></td><td width="10%">X</td><td width="40%">A format generated by IndigoVision 8000 video server.</td></tr>
<tr><td width="40%">IVF (On2)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">A format used by libvpx</td></tr>
<tr><td width="40%">LMLM4</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by Linux Media Labs MPEG-4 PCI boards</td></tr>
+<tr><td width="40%">LOAS</td><td width="10%"></td><td width="10%">X</td><td width="40%">contains LATM multiplexed AAC audio</td></tr>
<tr><td width="40%">LXF</td><td width="10%"></td><td width="10%">X</td><td width="40%">VR native stream format, used by Leitch/Harris’ video servers.</td></tr>
<tr><td width="40%">Matroska</td><td width="10%">X</td><td width="10%">X</td></tr>
<tr><td width="40%">Matroska audio</td><td width="10%">X</td><td width="10%"></td></tr>
<tr><td width="40%">Wing Commander III movie</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Origin’s Wing Commander III computer game.</td></tr>
<tr><td width="40%">Westwood Studios audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Westwood Studios games.</td></tr>
<tr><td width="40%">Westwood Studios VQA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Westwood Studios games.</td></tr>
+<tr><td width="40%">XMV</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft video container used in Xbox games.</td></tr>
<tr><td width="40%">xWMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft audio container used by XAudio 2.</td></tr>
<tr><td width="40%">YUV4MPEG pipe</td><td width="10%">X</td><td width="10%">X</td></tr>
<tr><td width="40%">Psygnosis YOP</td><td width="10%"></td><td width="10%">X</td></tr>
<tr><td width="40%">V210 Quicktime Uncompressed 4:2:2 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
<tr><td width="40%">VMware Screen Codec / VMware Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in videos captured by VMware.</td></tr>
<tr><td width="40%">Westwood Studios VQA (Vector Quantized Animation) video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Media Image</td><td width="10%"></td><td width="10%">X</td></tr>
<tr><td width="40%">Windows Media Video 7</td><td width="10%">X</td><td width="10%">X</td></tr>
<tr><td width="40%">Windows Media Video 8</td><td width="10%">X</td><td width="10%">X</td></tr>
<tr><td width="40%">Windows Media Video 9</td><td width="10%"></td><td width="10%">X</td><td width="40%">not completely working</td></tr>
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
-<!-- Created on July 23, 2011 by texi2html 1.82
+<!-- Created on September 2, 2011 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
</ul></li>
<li><a name="toc-Audio-Filters" href="#Audio-Filters">5. Audio Filters</a>
<ul class="toc">
- <li><a name="toc-anull" href="#anull">5.1 anull</a></li>
+ <li><a name="toc-aformat" href="#aformat">5.1 aformat</a></li>
+ <li><a name="toc-anull" href="#anull">5.2 anull</a></li>
+ <li><a name="toc-aresample" href="#aresample">5.3 aresample</a></li>
+ <li><a name="toc-ashowinfo" href="#ashowinfo">5.4 ashowinfo</a></li>
</ul></li>
<li><a name="toc-Audio-Sources" href="#Audio-Sources">6. Audio Sources</a>
<ul class="toc">
- <li><a name="toc-anullsrc" href="#anullsrc">6.1 anullsrc</a></li>
+ <li><a name="toc-abuffer" href="#abuffer">6.1 abuffer</a></li>
+ <li><a name="toc-amovie" href="#amovie">6.2 amovie</a></li>
+ <li><a name="toc-anullsrc" href="#anullsrc">6.3 anullsrc</a></li>
</ul></li>
<li><a name="toc-Audio-Sinks" href="#Audio-Sinks">7. Audio Sinks</a>
<ul class="toc">
- <li><a name="toc-anullsink" href="#anullsink">7.1 anullsink</a></li>
+ <li><a name="toc-abuffersink" href="#abuffersink">7.1 abuffersink</a></li>
+ <li><a name="toc-anullsink" href="#anullsink">7.2 anullsink</a></li>
</ul></li>
<li><a name="toc-Video-Filters" href="#Video-Filters">8. Video Filters</a>
<ul class="toc">
<li><a name="toc-copy" href="#copy">8.3 copy</a></li>
<li><a name="toc-crop" href="#crop">8.4 crop</a></li>
<li><a name="toc-cropdetect" href="#cropdetect">8.5 cropdetect</a></li>
- <li><a name="toc-drawbox" href="#drawbox">8.6 drawbox</a></li>
- <li><a name="toc-drawtext" href="#drawtext">8.7 drawtext</a></li>
- <li><a name="toc-fade" href="#fade">8.8 fade</a></li>
- <li><a name="toc-fieldorder" href="#fieldorder">8.9 fieldorder</a></li>
- <li><a name="toc-fifo" href="#fifo">8.10 fifo</a></li>
- <li><a name="toc-format" href="#format">8.11 format</a></li>
- <li><a name="toc-frei0r-1" href="#frei0r-1">8.12 frei0r</a></li>
- <li><a name="toc-gradfun" href="#gradfun">8.13 gradfun</a></li>
- <li><a name="toc-hflip" href="#hflip">8.14 hflip</a></li>
- <li><a name="toc-hqdn3d" href="#hqdn3d">8.15 hqdn3d</a></li>
- <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">8.16 lut, lutrgb, lutyuv</a></li>
- <li><a name="toc-mp" href="#mp">8.17 mp</a></li>
- <li><a name="toc-negate" href="#negate">8.18 negate</a></li>
- <li><a name="toc-noformat" href="#noformat">8.19 noformat</a></li>
- <li><a name="toc-null" href="#null">8.20 null</a></li>
- <li><a name="toc-ocv" href="#ocv">8.21 ocv</a>
+ <li><a name="toc-delogo" href="#delogo">8.6 delogo</a></li>
+ <li><a name="toc-drawbox" href="#drawbox">8.7 drawbox</a></li>
+ <li><a name="toc-drawtext" href="#drawtext">8.8 drawtext</a></li>
+ <li><a name="toc-fade" href="#fade">8.9 fade</a></li>
+ <li><a name="toc-fieldorder" href="#fieldorder">8.10 fieldorder</a></li>
+ <li><a name="toc-fifo" href="#fifo">8.11 fifo</a></li>
+ <li><a name="toc-format" href="#format">8.12 format</a></li>
+ <li><a name="toc-frei0r-1" href="#frei0r-1">8.13 frei0r</a></li>
+ <li><a name="toc-gradfun" href="#gradfun">8.14 gradfun</a></li>
+ <li><a name="toc-hflip" href="#hflip">8.15 hflip</a></li>
+ <li><a name="toc-hqdn3d" href="#hqdn3d">8.16 hqdn3d</a></li>
+ <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">8.17 lut, lutrgb, lutyuv</a></li>
+ <li><a name="toc-mp" href="#mp">8.18 mp</a></li>
+ <li><a name="toc-negate" href="#negate">8.19 negate</a></li>
+ <li><a name="toc-noformat" href="#noformat">8.20 noformat</a></li>
+ <li><a name="toc-null" href="#null">8.21 null</a></li>
+ <li><a name="toc-ocv" href="#ocv">8.22 ocv</a>
<ul class="toc">
- <li><a name="toc-dilate-1" href="#dilate-1">8.21.1 dilate</a></li>
- <li><a name="toc-erode" href="#erode">8.21.2 erode</a></li>
- <li><a name="toc-smooth" href="#smooth">8.21.3 smooth</a></li>
+ <li><a name="toc-dilate-1" href="#dilate-1">8.22.1 dilate</a></li>
+ <li><a name="toc-erode" href="#erode">8.22.2 erode</a></li>
+ <li><a name="toc-smooth" href="#smooth">8.22.3 smooth</a></li>
</ul></li>
- <li><a name="toc-overlay" href="#overlay">8.22 overlay</a></li>
- <li><a name="toc-pad" href="#pad">8.23 pad</a></li>
- <li><a name="toc-pixdesctest" href="#pixdesctest">8.24 pixdesctest</a></li>
- <li><a name="toc-scale" href="#scale">8.25 scale</a></li>
- <li><a name="toc-select" href="#select">8.26 select</a></li>
- <li><a name="toc-setdar-1" href="#setdar-1">8.27 setdar</a></li>
- <li><a name="toc-setpts" href="#setpts">8.28 setpts</a></li>
- <li><a name="toc-setsar-1" href="#setsar-1">8.29 setsar</a></li>
- <li><a name="toc-settb" href="#settb">8.30 settb</a></li>
- <li><a name="toc-showinfo" href="#showinfo">8.31 showinfo</a></li>
- <li><a name="toc-slicify" href="#slicify">8.32 slicify</a></li>
- <li><a name="toc-split" href="#split">8.33 split</a></li>
- <li><a name="toc-transpose" href="#transpose">8.34 transpose</a></li>
- <li><a name="toc-unsharp" href="#unsharp">8.35 unsharp</a></li>
- <li><a name="toc-vflip" href="#vflip">8.36 vflip</a></li>
- <li><a name="toc-yadif" href="#yadif">8.37 yadif</a></li>
+ <li><a name="toc-overlay" href="#overlay">8.23 overlay</a></li>
+ <li><a name="toc-pad" href="#pad">8.24 pad</a></li>
+ <li><a name="toc-pixdesctest" href="#pixdesctest">8.25 pixdesctest</a></li>
+ <li><a name="toc-scale" href="#scale">8.26 scale</a></li>
+ <li><a name="toc-select" href="#select">8.27 select</a></li>
+ <li><a name="toc-setdar-1" href="#setdar-1">8.28 setdar</a></li>
+ <li><a name="toc-setpts" href="#setpts">8.29 setpts</a></li>
+ <li><a name="toc-setsar-1" href="#setsar-1">8.30 setsar</a></li>
+ <li><a name="toc-settb" href="#settb">8.31 settb</a></li>
+ <li><a name="toc-showinfo" href="#showinfo">8.32 showinfo</a></li>
+ <li><a name="toc-slicify" href="#slicify">8.33 slicify</a></li>
+ <li><a name="toc-split" href="#split">8.34 split</a></li>
+ <li><a name="toc-transpose" href="#transpose">8.35 transpose</a></li>
+ <li><a name="toc-unsharp" href="#unsharp">8.36 unsharp</a></li>
+ <li><a name="toc-vflip" href="#vflip">8.37 vflip</a></li>
+ <li><a name="toc-yadif" href="#yadif">8.38 yadif</a></li>
</ul></li>
<li><a name="toc-Video-Sources" href="#Video-Sources">9. Video Sources</a>
<ul class="toc">
<li><a name="toc-buffer" href="#buffer">9.1 buffer</a></li>
<li><a name="toc-color" href="#color">9.2 color</a></li>
<li><a name="toc-movie" href="#movie">9.3 movie</a></li>
- <li><a name="toc-nullsrc" href="#nullsrc">9.4 nullsrc</a></li>
- <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">9.5 frei0r_src</a></li>
- <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">9.6 rgbtestsrc, testsrc</a></li>
+ <li><a name="toc-mptestsrc" href="#mptestsrc">9.4 mptestsrc</a></li>
+ <li><a name="toc-nullsrc" href="#nullsrc">9.5 nullsrc</a></li>
+ <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">9.6 frei0r_src</a></li>
+ <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">9.7 rgbtestsrc, testsrc</a></li>
</ul></li>
<li><a name="toc-Video-Sinks" href="#Video-Sinks">10. Video Sinks</a>
<ul class="toc">
<p>A filtergraph can be represented using a textual representation, which
is recognized by the <code>-vf</code> and <code>-af</code> options of the ff*
-tools, and by the <code>av_parse_graph()</code> function defined in
-‘<tt>libavfilter/avfiltergraph</tt>’.
+tools, and by the <code>avfilter_graph_parse()</code> function defined in
+‘<tt>libavfilter/avfiltergraph.h</tt>’.
</p>
<p>A filterchain consists of a sequence of connected filters, each one
connected to the previous one in the sequence. A filterchain is
</p>
<p>Below is a description of the currently available audio filters.
</p>
+<a name="aformat"></a>
+<h2 class="section"><a href="libavfilter.html#toc-aformat">5.1 aformat</a></h2>
+
+<p>Convert the input audio to one of the specified formats. The framework will
+negotiate the most appropriate format to minimize conversions.
+</p>
+<p>The filter accepts three lists of formats, separated by ":", in the form:
+"<var>sample_formats</var>:<var>channel_layouts</var>:<var>packing_formats</var>".
+</p>
+<p>Elements in each list are separated by "," which has to be escaped in the
+filtergraph specification.
+</p>
+<p>The special parameter "all", in place of a list of elements, signifies all
+supported formats.
+</p>
+<p>Some examples follow:
+</p><table><tr><td> </td><td><pre class="example">aformat=u8\\,s16:mono:packed
+
+aformat=s16:mono\\,stereo:all
+</pre></td></tr></table>
+
<a name="anull"></a>
-<h2 class="section"><a href="libavfilter.html#toc-anull">5.1 anull</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-anull">5.2 anull</a></h2>
<p>Pass the audio source unchanged to the output.
</p>
+<a name="aresample"></a>
+<h2 class="section"><a href="libavfilter.html#toc-aresample">5.3 aresample</a></h2>
+
+<p>Resample the input audio to the specified sample rate.
+</p>
+<p>The filter accepts exactly one parameter, the output sample rate. If not
+specified then the filter will automatically convert between its input
+and output sample rates.
+</p>
+<p>For example, to resample the input audio to 44100Hz:
+</p><table><tr><td> </td><td><pre class="example">aresample=44100
+</pre></td></tr></table>
+
+<a name="ashowinfo"></a>
+<h2 class="section"><a href="libavfilter.html#toc-ashowinfo">5.4 ashowinfo</a></h2>
+
+<p>Show a line containing various information for each input audio frame.
+The input audio is not modified.
+</p>
+<p>The shown line contains a sequence of key/value pairs of the form
+<var>key</var>:<var>value</var>.
+</p>
+<p>A description of each shown parameter follows:
+</p>
+<dl compact="compact">
+<dt> ‘<samp>n</samp>’</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> ‘<samp>pts</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+time base units. The time base unit depends on the filter input pad, and
+is usually 1/<var>sample_rate</var>.
+</p>
+</dd>
+<dt> ‘<samp>pts_time</samp>’</dt>
+<dd><p>presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> ‘<samp>pos</samp>’</dt>
+<dd><p>position of the frame in the input stream, -1 if this information in
+unavailable and/or meanigless (for example in case of synthetic audio)
+</p>
+</dd>
+<dt> ‘<samp>fmt</samp>’</dt>
+<dd><p>sample format name
+</p>
+</dd>
+<dt> ‘<samp>chlayout</samp>’</dt>
+<dd><p>channel layout description
+</p>
+</dd>
+<dt> ‘<samp>nb_samples</samp>’</dt>
+<dd><p>number of samples (per each channel) contained in the filtered frame
+</p>
+</dd>
+<dt> ‘<samp>rate</samp>’</dt>
+<dd><p>sample rate for the audio frame
+</p>
+</dd>
+<dt> ‘<samp>planar</samp>’</dt>
+<dd><p>if the packing format is planar, 0 if packed
+</p>
+</dd>
+<dt> ‘<samp>checksum</samp>’</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> ‘<samp>plane_checksum</samp>’</dt>
+<dd><p>Adler-32 checksum for each input frame plane, expressed in the form
+"[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var> <var>c4</var> <var>c5</var> <var>c6</var> <var>c7</var>]"
+</p></dd>
+</dl>
+
<a name="Audio-Sources"></a>
<h1 class="chapter"><a href="libavfilter.html#toc-Audio-Sources">6. Audio Sources</a></h1>
<p>Below is a description of the currently available audio sources.
</p>
+<a name="abuffer"></a>
+<h2 class="section"><a href="libavfilter.html#toc-abuffer">6.1 abuffer</a></h2>
+
+<p>Buffer audio frames, and make them available to the filter chain.
+</p>
+<p>This source is mainly intended for a programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asrc_abuffer.h</tt>’.
+</p>
+<p>It accepts the following mandatory parameters:
+<var>sample_rate</var>:<var>sample_fmt</var>:<var>channel_layout</var>:<var>packing</var>
+</p>
+<dl compact="compact">
+<dt> ‘<samp>sample_rate</samp>’</dt>
+<dd><p>The sample rate of the incoming audio buffers.
+</p>
+</dd>
+<dt> ‘<samp>sample_fmt</samp>’</dt>
+<dd><p>The sample format of the incoming audio buffers.
+Either a sample format name or its corresponging integer representation from
+the enum AVSampleFormat in ‘<tt>libavutil/samplefmt.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>channel_layout</samp>’</dt>
+<dd><p>The channel layout of the incoming audio buffers.
+Either a channel layout name from channel_layout_map in
+‘<tt>libavutil/audioconvert.c</tt>’ or its corresponding integer representation
+from the AV_CH_LAYOUT_* macros in ‘<tt>libavutil/audioconvert.h</tt>’
+</p>
+</dd>
+<dt> ‘<samp>packing</samp>’</dt>
+<dd><p>Either "packed" or "planar", or their integer representation: 0 or 1
+respectively.
+</p>
+</dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:s16:stereo:planar
+</pre></td></tr></table>
+
+<p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
+Since the sample format with name "s16" corresponds to the number
+1 and the "stereo" channel layout corresponds to the value 3, this is
+equivalent to:
+</p><table><tr><td> </td><td><pre class="example">abuffer=44100:1:3:1
+</pre></td></tr></table>
+
+<a name="amovie"></a>
+<h2 class="section"><a href="libavfilter.html#toc-amovie">6.2 amovie</a></h2>
+
+<p>Read an audio stream from a movie container.
+</p>
+<p>It accepts the syntax: <var>movie_name</var>[:<var>options</var>] where
+<var>movie_name</var> is the name of the resource to read (not necessarily
+a file but also a device or a stream accessed through some protocol),
+and <var>options</var> is an optional sequence of <var>key</var>=<var>value</var>
+pairs, separated by ":".
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>format_name, f</samp>’</dt>
+<dd><p>Specify the format assumed for the movie to read, and can be either
+the name of a container or an input device. If not specified the
+format is guessed from <var>movie_name</var> or by probing.
+</p>
+</dd>
+<dt> ‘<samp>seek_point, sp</samp>’</dt>
+<dd><p>Specify the seek point in seconds, the frames will be output
+starting from this seek point, the parameter is evaluated with
+<code>av_strtod</code> so the numerical value may be suffixed by an IS
+postfix. Default value is "0".
+</p>
+</dd>
+<dt> ‘<samp>stream_index, si</samp>’</dt>
+<dd><p>Specify the index of the audio stream to read. If the value is -1,
+the best suited audio stream will be automatically selected. Default
+value is "-1".
+</p>
+</dd>
+</dl>
+
<a name="anullsrc"></a>
-<h2 class="section"><a href="libavfilter.html#toc-anullsrc">6.1 anullsrc</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-anullsrc">6.3 anullsrc</a></h2>
<p>Null audio source, never return audio frames. It is mainly useful as a
template and to be employed in analysis / debugging tools.
<p>Below is a description of the currently available audio sinks.
</p>
+<a name="abuffersink"></a>
+<h2 class="section"><a href="libavfilter.html#toc-abuffersink">7.1 abuffersink</a></h2>
+
+<p>Buffer audio frames, and make them available to the end of filter chain.
+</p>
+<p>This sink is mainly intended for programmatic use, in particular
+through the interface defined in ‘<tt>libavfilter/asink_abuffer.h</tt>’.
+</p>
+<p>It requires a pointer to a ABufferSinkContext structure, which defines the
+incoming buffers’ format, to be passed as the opaque parameter to
+<code>avfilter_init_filter</code> for initialization.
+</p>
<a name="anullsink"></a>
-<h2 class="section"><a href="libavfilter.html#toc-anullsink">7.1 anullsink</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-anullsink">7.2 anullsink</a></h2>
<p>Null audio sink, do absolutely nothing with the input audio. It is
mainly useful as a template and to be employed in analysis / debugging
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
+<dt> ‘<samp>hsub, vsub</samp>’</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p>
+</dd>
<dt> ‘<samp>n</samp>’</dt>
<dd><p>the number of input frame, starting from 0
</p>
</p></dd>
</dl>
+<a name="delogo"></a>
+<h2 class="section"><a href="libavfilter.html#toc-delogo">8.6 delogo</a></h2>
+
+<p>Suppress a TV station logo by a simple interpolation of the surrounding
+pixels. Just set a rectangle covering the logo and watch it disappear
+(and sometimes something even uglier appear - your mileage may vary).
+</p>
+<p>The filter accepts parameters as a string of the form
+"<var>x</var>:<var>y</var>:<var>w</var>:<var>h</var>:<var>band</var>", or as a list of
+<var>key</var>=<var>value</var> pairs, separated by ":".
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>x, y</samp>’</dt>
+<dd><p>Specify the top left corner coordinates of the logo. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>w, h</samp>’</dt>
+<dd><p>Specify the width and height of the logo to clear. They must be
+specified.
+</p>
+</dd>
+<dt> ‘<samp>band, t</samp>’</dt>
+<dd><p>Specify the thickness of the fuzzy edge of the rectangle (added to
+<var>w</var> and <var>h</var>). The default value is 4.
+</p>
+</dd>
+<dt> ‘<samp>show</samp>’</dt>
+<dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
+finding the right <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> parameters, and
+<var>band</var> is set to 4. The default value is 0.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow.
+</p>
+<ul>
+<li>
+Set a rectangle covering the area with top left corner coordinates 0,0
+and size 100x77, setting a band of size 10:
+<table><tr><td> </td><td><pre class="example">delogo=0:0:100:77:10
+</pre></td></tr></table>
+
+</li><li>
+As the previous example, but use named options:
+<table><tr><td> </td><td><pre class="example">delogo=x=0:y=0:w=100:h=77:band=10
+</pre></td></tr></table>
+
+</li></ul>
+
<a name="drawbox"></a>
-<h2 class="section"><a href="libavfilter.html#toc-drawbox">8.6 drawbox</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-drawbox">8.7 drawbox</a></h2>
<p>Draw a colored box on the input image.
</p>
</pre></td></tr></table>
<a name="drawtext"></a>
-<h2 class="section"><a href="libavfilter.html#toc-drawtext">8.7 drawtext</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-drawtext">8.8 drawtext</a></h2>
<p>Draw text string or text from specified file on top of video using the
libfreetype library.
<a href="http://www.freetype.org/">http://www.freetype.org/</a>.
</p>
<a name="fade"></a>
-<h2 class="section"><a href="libavfilter.html#toc-fade">8.8 fade</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-fade">8.9 fade</a></h2>
<p>Apply fade-in/out effect to input video.
</p>
</pre></td></tr></table>
<a name="fieldorder"></a>
-<h2 class="section"><a href="libavfilter.html#toc-fieldorder">8.9 fieldorder</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-fieldorder">8.10 fieldorder</a></h2>
<p>Transform the field order of the input video.
</p>
</pre></td></tr></table>
<a name="fifo"></a>
-<h2 class="section"><a href="libavfilter.html#toc-fifo">8.10 fifo</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-fifo">8.11 fifo</a></h2>
<p>Buffer input images and send them when they are requested.
</p>
<p>The filter does not take parameters.
</p>
<a name="format"></a>
-<h2 class="section"><a href="libavfilter.html#toc-format">8.11 format</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-format">8.12 format</a></h2>
<p>Convert the input video to one of the specified pixel formats.
Libavfilter will try to pick one that is supported for the input to
<p><a name="frei0r"></a>
</p><a name="frei0r-1"></a>
-<h2 class="section"><a href="libavfilter.html#toc-frei0r-1">8.12 frei0r</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-frei0r-1">8.13 frei0r</a></h2>
<p>Apply a frei0r effect to the input video.
</p>
<a href="http://piksel.org/frei0r">http://piksel.org/frei0r</a>
</p>
<a name="gradfun"></a>
-<h2 class="section"><a href="libavfilter.html#toc-gradfun">8.13 gradfun</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-gradfun">8.14 gradfun</a></h2>
<p>Fix the banding artifacts that are sometimes introduced into nearly flat
regions by truncation to 8bit colordepth.
</pre></td></tr></table>
<a name="hflip"></a>
-<h2 class="section"><a href="libavfilter.html#toc-hflip">8.14 hflip</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-hflip">8.15 hflip</a></h2>
<p>Flip the input video horizontally.
</p>
</pre></td></tr></table>
<a name="hqdn3d"></a>
-<h2 class="section"><a href="libavfilter.html#toc-hqdn3d">8.15 hqdn3d</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-hqdn3d">8.16 hqdn3d</a></h2>
<p>High precision/quality 3d denoise filter. This filter aims to reduce
image noise producing smooth images and making still images really
</dl>
<a name="lut_002c-lutrgb_002c-lutyuv"></a>
-<h2 class="section"><a href="libavfilter.html#toc-lut_002c-lutrgb_002c-lutyuv">8.16 lut, lutrgb, lutyuv</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-lut_002c-lutrgb_002c-lutyuv">8.17 lut, lutrgb, lutyuv</a></h2>
<p>Compute a look-up table for binding each pixel component input value
to an output value, and apply it to input video.
</pre></td></tr></table>
<a name="mp"></a>
-<h2 class="section"><a href="libavfilter.html#toc-mp">8.17 mp</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-mp">8.18 mp</a></h2>
<p>Apply an MPlayer filter to the input video.
</p>
</p><dl compact="compact">
<dt> <var>2xsai</var></dt>
<dt> <var>decimate</var></dt>
-<dt> <var>delogo</var></dt>
<dt> <var>denoise3d</var></dt>
<dt> <var>detc</var></dt>
<dt> <var>dint</var></dt>
<dt> <var>framestep</var></dt>
<dt> <var>fspp</var></dt>
<dt> <var>geq</var></dt>
-<dt> <var>gradfun</var></dt>
<dt> <var>harddup</var></dt>
<dt> <var>hqdn3d</var></dt>
<dt> <var>hue</var></dt>
<dt> <var>spp</var></dt>
<dt> <var>swapuv</var></dt>
<dt> <var>telecine</var></dt>
-<dt> <var>test</var></dt>
<dt> <var>tile</var></dt>
<dt> <var>tinterlace</var></dt>
<dt> <var>unsharp</var></dt>
<p>See also mplayer(1), <a href="http://www.mplayerhq.hu/">http://www.mplayerhq.hu/</a>.
</p>
<a name="negate"></a>
-<h2 class="section"><a href="libavfilter.html#toc-negate">8.18 negate</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-negate">8.19 negate</a></h2>
<p>Negate input video.
</p>
alpha component (if available). The default value in input is 0.
</p>
<a name="noformat"></a>
-<h2 class="section"><a href="libavfilter.html#toc-noformat">8.19 noformat</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-noformat">8.20 noformat</a></h2>
<p>Force libavfilter not to use any of the specified pixel formats for the
input to the next filter.
</pre></td></tr></table>
<a name="null"></a>
-<h2 class="section"><a href="libavfilter.html#toc-null">8.20 null</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-null">8.21 null</a></h2>
<p>Pass the video source unchanged to the output.
</p>
<a name="ocv"></a>
-<h2 class="section"><a href="libavfilter.html#toc-ocv">8.21 ocv</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-ocv">8.22 ocv</a></h2>
<p>Apply video transform using libopencv.
</p>
</p>
<p><a name="dilate"></a>
</p><a name="dilate-1"></a>
-<h3 class="subsection"><a href="libavfilter.html#toc-dilate-1">8.21.1 dilate</a></h3>
+<h3 class="subsection"><a href="libavfilter.html#toc-dilate-1">8.22.1 dilate</a></h3>
<p>Dilate an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvDilate</code>.
</pre></td></tr></table>
<a name="erode"></a>
-<h3 class="subsection"><a href="libavfilter.html#toc-erode">8.21.2 erode</a></h3>
+<h3 class="subsection"><a href="libavfilter.html#toc-erode">8.22.2 erode</a></h3>
<p>Erode an image by using a specific structuring element.
This filter corresponds to the libopencv function <code>cvErode</code>.
with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
</p>
<a name="smooth"></a>
-<h3 class="subsection"><a href="libavfilter.html#toc-smooth">8.21.3 smooth</a></h3>
+<h3 class="subsection"><a href="libavfilter.html#toc-smooth">8.22.3 smooth</a></h3>
<p>Smooth the input video.
</p>
libopencv function <code>cvSmooth</code>.
</p>
<a name="overlay"></a>
-<h2 class="section"><a href="libavfilter.html#toc-overlay">8.22 overlay</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-overlay">8.23 overlay</a></h2>
<p>Overlay one video on top of another.
</p>
approach is yet to be tested.
</p>
<a name="pad"></a>
-<h2 class="section"><a href="libavfilter.html#toc-pad">8.23 pad</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-pad">8.24 pad</a></h2>
<p>Add paddings to the input image, and places the original input at the
given coordinates <var>x</var>, <var>y</var>.
expressions, or NAN if not yet specified
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
# pad the input to get a final w/h ratio of 16:9
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
+# for anamorphic video, in order to set the output display aspect ratio,
+# it is necessary to use sar in the expression, according to the relation:
+# (ih * X / ih) * sar = output_dar
+# X = output_dar / sar
+pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
+
# double output size and put the input video in the bottom-right
# corner of the output padded area
pad="2*iw:2*ih:ow-iw:oh-ih"
</pre></td></tr></table>
<a name="pixdesctest"></a>
-<h2 class="section"><a href="libavfilter.html#toc-pixdesctest">8.24 pixdesctest</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-pixdesctest">8.25 pixdesctest</a></h2>
<p>Pixel format descriptor test filter, mainly useful for internal
testing. The output video should be equal to the input video.
<p>can be used to test the monowhite pixel format descriptor definition.
</p>
<a name="scale"></a>
-<h2 class="section"><a href="libavfilter.html#toc-scale">8.25 scale</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-scale">8.26 scale</a></h2>
<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
</p>
<dd><p>same as <var>out_w</var> and <var>out_h</var>
</p>
</dd>
-<dt> ‘<samp>dar, a</samp>’</dt>
-<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+<dt> ‘<samp>a</samp>’</dt>
+<dd><p>same as <var>iw</var> / <var>ih</var>
</p>
</dd>
<dt> ‘<samp>sar</samp>’</dt>
<dd><p>input sample aspect ratio
</p>
</dd>
+<dt> ‘<samp>dar</samp>’</dt>
+<dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
+</p>
+</dd>
<dt> ‘<samp>hsub, vsub</samp>’</dt>
<dd><p>horizontal and vertical chroma subsample values. For example for the
pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
</pre></td></tr></table>
<a name="select"></a>
-<h2 class="section"><a href="libavfilter.html#toc-select">8.26 select</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-select">8.27 select</a></h2>
<p>Select frames to pass in output.
</p>
<p>It accepts in input an expression, which is evaluated for each input
<p><a name="setdar"></a>
</p><a name="setdar-1"></a>
-<h2 class="section"><a href="libavfilter.html#toc-setdar-1">8.27 setdar</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-setdar-1">8.28 setdar</a></h2>
<p>Set the Display Aspect Ratio for the filter output video.
</p>
<p>See also the <a href="#setsar">setsar</a> filter documentation.
</p>
<a name="setpts"></a>
-<h2 class="section"><a href="libavfilter.html#toc-setpts">8.28 setpts</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-setpts">8.29 setpts</a></h2>
<p>Change the PTS (presentation timestamp) of the input video frames.
</p>
<p><a name="setsar"></a>
</p><a name="setsar-1"></a>
-<h2 class="section"><a href="libavfilter.html#toc-setsar-1">8.29 setsar</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-setsar-1">8.30 setsar</a></h2>
<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
</p>
</pre></td></tr></table>
<a name="settb"></a>
-<h2 class="section"><a href="libavfilter.html#toc-settb">8.30 settb</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-settb">8.31 settb</a></h2>
<p>Set the timebase to use for the output frames timestamps.
It is mainly useful for testing timebase configuration.
</pre></td></tr></table>
<a name="showinfo"></a>
-<h2 class="section"><a href="libavfilter.html#toc-showinfo">8.31 showinfo</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-showinfo">8.32 showinfo</a></h2>
<p>Show a line containing various information for each input video frame.
The input video is not modified.
</dl>
<a name="slicify"></a>
-<h2 class="section"><a href="libavfilter.html#toc-slicify">8.32 slicify</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-slicify">8.33 slicify</a></h2>
<p>Pass the images of input video on to next video filter as multiple
slices.
faster due to better use of the memory cache.
</p>
<a name="split"></a>
-<h2 class="section"><a href="libavfilter.html#toc-split">8.33 split</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-split">8.34 split</a></h2>
<p>Pass on the input video to two outputs. Both outputs are identical to
the input video.
one padded.
</p>
<a name="transpose"></a>
-<h2 class="section"><a href="libavfilter.html#toc-transpose">8.34 transpose</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-transpose">8.35 transpose</a></h2>
<p>Transpose rows with columns in the input video and optionally flip it.
</p>
</dl>
<a name="unsharp"></a>
-<h2 class="section"><a href="libavfilter.html#toc-unsharp">8.35 unsharp</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-unsharp">8.36 unsharp</a></h2>
<p>Sharpen or blur the input video.
</p>
</p>
<p>Negative values for the amount will blur the input video, while positive
values will sharpen. All parameters are optional and default to the
-equivalent of the string ’5:5:1.0:0:0:0.0’.
+equivalent of the string ’5:5:1.0:5:5:0.0’.
</p>
<dl compact="compact">
<dt> ‘<samp>luma_msize_x</samp>’</dt>
</dd>
<dt> ‘<samp>chroma_msize_x</samp>’</dt>
<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
<dt> ‘<samp>chroma_msize_y</samp>’</dt>
<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
-and 13, default value is 0.
+and 13, default value is 5.
</p>
</dd>
-<dt> ‘<samp>luma_amount</samp>’</dt>
+<dt> ‘<samp>chroma_amount</samp>’</dt>
<dd><p>Set the chroma effect strength. It can be a float number between -2.0
and 5.0, default value is 0.0.
</p>
</pre></td></tr></table>
<a name="vflip"></a>
-<h2 class="section"><a href="libavfilter.html#toc-vflip">8.36 vflip</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-vflip">8.37 vflip</a></h2>
<p>Flip the input video vertically.
</p>
</pre></td></tr></table>
<a name="yadif"></a>
-<h2 class="section"><a href="libavfilter.html#toc-yadif">8.37 yadif</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-yadif">8.38 yadif</a></h2>
<p>Deinterlace the input video ("yadif" means "yet another deinterlacing
filter").
</p>
<dl compact="compact">
<dt> ‘<samp>0</samp>’</dt>
-<dd><p>assume bottom field first
+<dd><p>assume top field first
</p></dd>
<dt> ‘<samp>1</samp>’</dt>
-<dd><p>assume top field first
+<dd><p>assume bottom field first
</p></dd>
<dt> ‘<samp>-1</samp>’</dt>
<dd><p>enable automatic detection
</pre></td></tr></table>
+<a name="mptestsrc"></a>
+<h2 class="section"><a href="libavfilter.html#toc-mptestsrc">9.4 mptestsrc</a></h2>
+
+<p>Generate various test patterns, as generated by the MPlayer test filter.
+</p>
+<p>The size of the generated video is fixed, and is 256x256.
+This source is useful in particular for testing encoding features.
+</p>
+<p>This source accepts an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by ":". The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> ‘<samp>rate, r</samp>’</dt>
+<dd><p>Specify the frame rate of the sourced video, as the number of frames
+generated per second. It has to be a string in the format
+<var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
+number or a valid video frame rate abbreviation. The default value is
+"25".
+</p>
+</dd>
+<dt> ‘<samp>duration, d</samp>’</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
+[-]S+[.m...]
+</pre></td></tr></table>
+<p>See also the function <code>av_parse_time()</code>.
+</p>
+<p>If not specified, or the expressed duration is negative, the video is
+supposed to be generated forever.
+</p>
+</dd>
+<dt> ‘<samp>test, t</samp>’</dt>
+<dd>
+<p>Set the number or the name of the test to perform. Supported tests are:
+</p><dl compact="compact">
+<dt> ‘<samp>dc_luma</samp>’</dt>
+<dt> ‘<samp>dc_chroma</samp>’</dt>
+<dt> ‘<samp>freq_luma</samp>’</dt>
+<dt> ‘<samp>freq_chroma</samp>’</dt>
+<dt> ‘<samp>amp_luma</samp>’</dt>
+<dt> ‘<samp>amp_chroma</samp>’</dt>
+<dt> ‘<samp>cbp</samp>’</dt>
+<dt> ‘<samp>mv</samp>’</dt>
+<dt> ‘<samp>ring1</samp>’</dt>
+<dt> ‘<samp>ring2</samp>’</dt>
+<dt> ‘<samp>all</samp>’</dt>
+</dl>
+
+<p>Default value is "all", which will cycle through the list of all tests.
+</p></dd>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td> </td><td><pre class="example">testsrc=t=dc_luma
+</pre></td></tr></table>
+
+<p>will generate a "dc_luma" test pattern.
+</p>
<a name="nullsrc"></a>
-<h2 class="section"><a href="libavfilter.html#toc-nullsrc">9.4 nullsrc</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-nullsrc">9.5 nullsrc</a></h2>
<p>Null video source, never return images. It is mainly useful as a
template and to be employed in analysis / debugging tools.
"AVTB" (the default timebase), and defaults to the value "AVTB".
</p>
<a name="frei0r_005fsrc"></a>
-<h2 class="section"><a href="libavfilter.html#toc-frei0r_005fsrc">9.5 frei0r_src</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-frei0r_005fsrc">9.6 frei0r_src</a></h2>
<p>Provide a frei0r source.
</p>
</pre></td></tr></table>
<a name="rgbtestsrc_002c-testsrc"></a>
-<h2 class="section"><a href="libavfilter.html#toc-rgbtestsrc_002c-testsrc">9.6 rgbtestsrc, testsrc</a></h2>
+<h2 class="section"><a href="libavfilter.html#toc-rgbtestsrc_002c-testsrc">9.7 rgbtestsrc, testsrc</a></h2>
<p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
detecting RGB vs BGR issues. You should see a red, green and blue
"25".
</p>
</dd>
+<dt> ‘<samp>sar</samp>’</dt>
+<dd><p>Set the sample aspect ratio of the sourced video.
+</p>
+</dd>
<dt> ‘<samp>duration</samp>’</dt>
<dd><p>Set the video duration of the sourced video. The accepted syntax is:
</p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
<hr size="1">
<p>
<font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>July 23, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
+ This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
CODEC_ID_PRORES,
CODEC_ID_JV,
CODEC_ID_DFA,
+ CODEC_ID_WMV3IMAGE,
+ CODEC_ID_VC1IMAGE,
CODEC_ID_8SVX_RAW,
CODEC_ID_G2M,
/* various PCM "codecs" */
+ CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
CODEC_ID_PCM_S16LE= 0x10000,
CODEC_ID_PCM_S16BE,
CODEC_ID_PCM_U16LE,
CODEC_ID_CELT,
/* subtitle codecs */
+ CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
CODEC_ID_DVD_SUBTITLE= 0x17000,
CODEC_ID_DVB_SUBTITLE,
CODEC_ID_TEXT, ///< raw UTF-8 text
CODEC_ID_MICRODVD,
/* other specific kind of codecs (generally used for attachments) */
+ CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
CODEC_ID_TTF= 0x18000,
CODEC_ID_PROBE= 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it
#define CODEC_FLAG_QPEL 0x0010 ///< Use qpel MC.
#define CODEC_FLAG_GMC 0x0020 ///< Use GMC.
#define CODEC_FLAG_MV0 0x0040 ///< Always try a MB with MV=<0,0>.
-#define CODEC_FLAG_PART 0x0080 ///< Use data partitioning.
/**
* The parent program guarantees that the input for B-frames containing
* streams is not written to for at least s->max_b_frames+1 frames, if
#define CODEC_FLAG_INPUT_PRESERVED 0x0100
#define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode.
#define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode.
-#define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< Use external Huffman table (for MJPEG).
#define CODEC_FLAG_GRAY 0x2000 ///< Only decode/encode grayscale.
#define CODEC_FLAG_EMU_EDGE 0x4000 ///< Don't draw edges.
#define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding.
#define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< Normalize adaptive quantization.
#define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT.
#define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay.
-#define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan.
#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe.
#define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT).
/* Fx : Flag for h263+ extra options */
#define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction
-#define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector
#define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp.
#define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon.
-#define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC
-#define CODEC_FLAG_OBMC 0x00000001 ///< OBMC
#define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter
-#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
#define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation
-#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< Will reserve space for SVCD scan offset user data.
#define CODEC_FLAG_CLOSED_GOP 0x80000000
#define CODEC_FLAG2_FAST 0x00000001 ///< Allow non spec compliant speedup tricks.
#define CODEC_FLAG2_STRICT_GOP 0x00000002 ///< Strictly enforce GOP size.
#define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< Skip bitstream encoding.
#define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata.
+#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping
+#define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
+/**
+ * @defgroup deprecated_flags Deprecated codec flags
+ * Use corresponding private codec options instead.
+ * @{
+ */
+#if FF_API_MPEGVIDEO_GLOBAL_OPTS
+#define CODEC_FLAG_OBMC 0x00000001 ///< OBMC
+#define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC
+#define CODEC_FLAG_PART 0x0080 ///< Use data partitioning.
+#define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan.
+#define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector
+#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
+#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< Will reserve space for SVCD scan offset user data.
+#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< Use MPEG-2 intra VLC table.
+#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format.
+#define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer.
+#endif
+#if FF_API_MJPEG_GLOBAL_OPTS
+#define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< Use external Huffman table (for MJPEG).
+#endif
+#if FF_API_X264_GLOBAL_OPTS
#define CODEC_FLAG2_BPYRAMID 0x00000010 ///< H.264 allow B-frames to be used as references.
#define CODEC_FLAG2_WPRED 0x00000020 ///< H.264 weighted biprediction for B-frames
#define CODEC_FLAG2_MIXED_REFS 0x00000040 ///< H.264 one reference per partition, as opposed to one reference per macroblock
#define CODEC_FLAG2_FASTPSKIP 0x00000100 ///< H.264 fast pskip
#define CODEC_FLAG2_AUD 0x00000200 ///< H.264 access unit delimiters
#define CODEC_FLAG2_BRDO 0x00000400 ///< B-frame rate-distortion optimization
-#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< Use MPEG-2 intra VLC table.
-#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
-#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format.
-#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping
-#define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
-#define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer.
-#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
#define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
#define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
#define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes.
+#endif
+#if FF_API_SNOW_GLOBAL_OPTS
+#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
+#endif
+#if FF_API_LAME_GLOBAL_OPTS
+#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
+#endif
+/**
+ * @}
+ */
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
int lowres;
/**
- * Bitstream width / height, may be different from width/height if lowres
- * or other things are used.
+ * Bitstream width / height, may be different from width/height if lowres enabled.
* - encoding: unused
* - decoding: Set by user before init if known. Codec should override / dynamically change if needed.
*/
*/
int brd_scale;
+#if FF_API_X264_GLOBAL_OPTS
/**
* constant rate factor - quality-based VBR - values ~correspond to qps
* - encoding: Set by user.
* - decoding: unused
+ * @deprecated use 'crf' libx264 private option
*/
- float crf;
+ attribute_deprecated float crf;
/**
* constant quantization parameter rate control method
* - encoding: Set by user.
* - decoding: unused
+ * @deprecated use 'cqp' libx264 private option
*/
- int cqp;
+ attribute_deprecated int cqp;
+#endif
/**
* minimum GOP size
/**
* Bits per sample/pixel of internal libavcodec pixel/sample format.
- * This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32.
* - encoding: set by user.
* - decoding: set by libavcodec.
*/
*/
int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
+#if FF_API_X264_GLOBAL_OPTS
/**
* explicit P-frame weighted prediction analysis method
* 0: off
* - encoding: Set by user.
* - decoding: unused
*/
- int weighted_p_pred;
+ attribute_deprecated int weighted_p_pred;
/**
* AQ mode
* - encoding: Set by user
* - decoding: unused
*/
- int aq_mode;
+ attribute_deprecated int aq_mode;
/**
* AQ strength
* - encoding: Set by user
* - decoding: unused
*/
- float aq_strength;
+ attribute_deprecated float aq_strength;
/**
* PSY RD
* - encoding: Set by user
* - decoding: unused
*/
- float psy_rd;
+ attribute_deprecated float psy_rd;
/**
* PSY trellis
* - encoding: Set by user
* - decoding: unused
*/
- float psy_trellis;
+ attribute_deprecated float psy_trellis;
/**
* RC lookahead
* - encoding: Set by user
* - decoding: unused
*/
- int rc_lookahead;
+ attribute_deprecated int rc_lookahead;
/**
* Constant rate factor maximum
* - encoding: Set by user.
* - decoding: unused
*/
- float crf_max;
+ attribute_deprecated float crf_max;
+#endif
int log_level_offset;
* - decoding: Set by user, otherwise the default is used.
*/
int thread_type;
-#define FF_THREAD_FRAME 1 //< Decode more than one frame at once
-#define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
+#define FF_THREAD_FRAME 1 ///< Decode more than one frame at once
+#define FF_THREAD_SLICE 2 ///< Decode more than one part of a single frame at once
/**
* Which multithreading methods are in use by the codec.
int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
+/**
+ * Get the name of a codec.
+ * @return a static string identifying the codec; never NULL
+ */
+const char *avcodec_get_name(enum CodecID id);
+
#if FF_API_GET_PIX_FMT_NAME
/**
* Return the short name for a pixel format.
* @param[in] dst_pix_fmt destination pixel format
* @param[in] src_pix_fmt source pixel format
* @param[in] has_alpha Whether the source pixel format alpha channel is used.
- * @return Combination of flags informing you what kind of losses will occur.
+ * @return Combination of flags informing you what kind of losses will occur
+ * (maximum loss for an invalid dst_pix_fmt).
*/
int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
int has_alpha);
* The pixel formats from which it chooses one, are determined by the
* pix_fmt_mask parameter.
*
+ * Note, only the first 64 pixel formats will fit in pix_fmt_mask.
+ *
* @code
* src_pix_fmt = PIX_FMT_YUV420P;
- * pix_fmt_mask = (1 << PIX_FMT_YUV422P) || (1 << PIX_FMT_RGB24);
+ * pix_fmt_mask = (1 << PIX_FMT_YUV422P) | (1 << PIX_FMT_RGB24);
* dst_pix_fmt = avcodec_find_best_pix_fmt(pix_fmt_mask, src_pix_fmt, alpha, &loss);
* @endcode
*
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr);
+/**
+ * Find the best pixel format to convert to given a certain source pixel
+ * format and a selection of two destination pixel formats. When converting from
+ * one pixel format to another, information loss may occur. For example, when converting
+ * from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when
+ * converting from some formats to other formats. avcodec_find_best_pix_fmt2() selects which of
+ * the given pixel formats should be used to suffer the least amount of loss.
+ *
+ * If one of the destination formats is PIX_FMT_NONE the other pixel format (if valid) will be
+ * returned.
+ *
+ * @code
+ * src_pix_fmt = PIX_FMT_YUV420P;
+ * dst_pix_fmt1= PIX_FMT_RGB24;
+ * dst_pix_fmt2= PIX_FMT_GRAY8;
+ * dst_pix_fmt3= PIX_FMT_RGB8;
+ * loss= FF_LOSS_CHROMA; // don't care about chroma loss, so chroma loss will be ignored.
+ * dst_pix_fmt = avcodec_find_best_pix_fmt2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, alpha, &loss);
+ * dst_pix_fmt = avcodec_find_best_pix_fmt2(dst_pix_fmt, dst_pix_fmt3, src_pix_fmt, alpha, &loss);
+ * @endcode
+ *
+ * @param[in] dst_pix_fmt1 One of the two destination pixel formats to choose from
+ * @param[in] dst_pix_fmt2 The other of the two destination pixel formats to choose from
+ * @param[in] src_pix_fmt Source pixel format
+ * @param[in] has_alpha Whether the source pixel format alpha channel is used.
+ * @param[in, out] loss_ptr Combination of loss flags. In: selects which of the losses to ignore, i.e.
+ * NULL or value of zero means we care about all losses. Out: the loss
+ * that occurs when converting from src to selected dst pixel format.
+ * @return The best pixel format to convert to or -1 if none was found.
+ */
+enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
+ enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
+
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
*/
int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
+/**
+ * Get the type of the given codec.
+ */
+enum AVMediaType avcodec_get_type(enum CodecID codec_id);
+
#endif /* AVCODEC_AVCODEC_H */
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
-#define LIBAVCODEC_VERSION_MINOR 10
+#define LIBAVCODEC_VERSION_MINOR 12
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#ifndef FF_API_AVCODEC_INIT
#define FF_API_AVCODEC_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
+#ifndef FF_API_X264_GLOBAL_OPTS
+#define FF_API_X264_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_MPEGVIDEO_GLOBAL_OPTS
+#define FF_API_MPEGVIDEO_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_LAME_GLOBAL_OPTS
+#define FF_API_LAME_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_SNOW_GLOBAL_OPTS
+#define FF_API_SNOW_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_MJPEG_GLOBAL_OPTS
+#define FF_API_MJPEG_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
#endif /* AVCODEC_VERSION_H */
#include "libavformat/avformat.h"
#define LIBAVDEVICE_VERSION_MAJOR 53
-#define LIBAVDEVICE_VERSION_MINOR 2
+#define LIBAVDEVICE_VERSION_MINOR 3
#define LIBAVDEVICE_VERSION_MICRO 0
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
-#define LIBAVFILTER_VERSION_MINOR 28
-#define LIBAVFILTER_VERSION_MICRO 1
+#define LIBAVFILTER_VERSION_MINOR 37
+#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
* NULL_IF_CONFIG_SMALL() macro to define it.
*/
const char *description;
+
+ /**
+ * Make the filter instance process a command.
+ *
+ * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only
+ * @param arg the argument for the command
+ * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.
+ * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be
+ * timeconsuming then a filter should treat it like an unsupported command
+ *
+ * @returns >=0 on success otherwise an error code.
+ * AVERROR(ENOSYS) on unsupported commands
+ */
+ int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
} AVFilter;
/** An instance of a filter */
AVFilterLink **outputs; ///< array of pointers to output links
void *priv; ///< private data for use by the filter
+
+ struct AVFilterCommand *command_queue;
};
enum AVFilterPacking {
*/
void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
+#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
+
+/**
+ * Make the filter instance process a command.
+ * It is recommanded to use avfilter_graph_send_command().
+ */
+int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
+
/**
* Send a buffer of audio samples to the next filter.
*
AVFilterInOut **inputs, AVFilterInOut **outputs,
void *log_ctx);
+/**
+ * Send a command to one or more filter instances.
+ *
+ * @param graph the filter graph
+ * @param target the filter(s) to which the command should be sent
+ * "all" sends to all filters
+ * otherwise it can be a filter or filter instance name
+ * which will send the command to all matching filters.
+ * @param cmd the command to sent, for handling simplicity all commands must be alphanumeric only
+ * @param arg the argument for the command
+ * @param res a buffer with size res_size where the filter(s) can return a response.
+ *
+ * @returns >=0 on success otherwise an error code.
+ * AVERROR(ENOSYS) on unsupported commands
+ */
+int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags);
+
+/**
+ * Queue a command for one or more filter instances.
+ *
+ * @param graph the filter graph
+ * @param target the filter(s) to which the command should be sent
+ * "all" sends to all filters
+ * otherwise it can be a filter or filter instance name
+ * which will send the command to all matching filters.
+ * @param cmd the command to sent, for handling simplicity all commands must be alphanummeric only
+ * @param arg the argument for the command
+ * @param ts time at which the command should be sent to the filter
+ *
+ * @note As this executes commands after this function returns, no return code
+ * from the filter is provided, also AVFILTER_CMD_FLAG_ONE is not supported.
+ */
+int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts);
+
+
#endif /* AVFILTER_AVFILTERGRAPH_H */
const AVClass *priv_class; ///< AVClass for the private context
+ /**
+ * Test if the given codec can be stored in this container.
+ *
+ * @return 1 if the codec is supported, 0 if it is not.
+ * A negative number if unknown.
+ */
+ int (*query_codec)(enum CodecID id, int std_compliance);
+
void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
int64_t *dts, int64_t *wall);
*/
int fps_probe_size;
+ /**
+ * Error recognition; higher values will detect more errors but may
+ * misdetect some more or less valid parts as errors.
+ * - encoding: unused
+ * - decoding: Set by user.
+ */
+ int error_recognition;
+
/**
* Transport stream id.
* This will be moved into demuxer private options. Thus no API/ABI compatibility
*/
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+/**
+ * Find the programs which belong to a given stream.
+ *
+ * @param ic media file handle
+ * @param last the last found program, the search will start after this
+ * program, or from the beginning if it is NULL
+ * @param s stream index
+ * @return the next program which belongs to s, NULL if no program is found or
+ * the last program is not among the programs of ic.
+ */
+AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s);
+
/**
* Find the "best" stream in the file.
* The best stream is determined according to various heuristics as the most
*/
int av_match_ext(const char *filename, const char *extensions);
+/**
+ * Test if the given container can store a codec.
+ *
+ * @param std_compliance standards compliance level, one of FF_COMPLIANCE_*
+ *
+ * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.
+ * A negative number if this information is not available.
+ */
+int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);
+
#endif /* AVFORMAT_AVFORMAT_H */
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 53
-#define LIBAVFORMAT_VERSION_MINOR 6
+#define LIBAVFORMAT_VERSION_MINOR 10
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 11
-#define LIBAVUTIL_VERSION_MICRO 1
+#define LIBAVUTIL_VERSION_MINOR 14
+#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
#ifndef FF_API_FIND_OPT
#define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 52)
#endif
+#ifndef FF_API_AV_FIFO_PEEK
+#define FF_API_AV_FIFO_PEEK (LIBAVUTIL_VERSION_MAJOR < 52)
+#endif
/**
* Return the LIBAVUTIL_VERSION_INT constant.
AVMEDIA_TYPE_NB
};
+/**
+ * Return a string describing the media_type enum, NULL if media_type
+ * is unknown.
+ */
+const char *av_get_media_type_string(enum AVMediaType media_type);
+
#define FF_LAMBDA_SHIFT 7
#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
#define AVUTIL_FIFO_H
#include <stdint.h>
+#include "avutil.h"
typedef struct AVFifoBuffer {
uint8_t *buffer;
/**
* Free an AVFifoBuffer.
- * @param *f AVFifoBuffer to free
+ * @param f AVFifoBuffer to free
*/
void av_fifo_free(AVFifoBuffer *f);
/**
* Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
- * @param *f AVFifoBuffer to reset
+ * @param f AVFifoBuffer to reset
*/
void av_fifo_reset(AVFifoBuffer *f);
/**
* Return the amount of data in bytes in the AVFifoBuffer, that is the
* amount of data you can read from it.
- * @param *f AVFifoBuffer to read from
+ * @param f AVFifoBuffer to read from
* @return size
*/
int av_fifo_size(AVFifoBuffer *f);
/**
* Return the amount of space in bytes in the AVFifoBuffer, that is the
* amount of data you can write into it.
- * @param *f AVFifoBuffer to write into
+ * @param f AVFifoBuffer to write into
* @return size
*/
int av_fifo_space(AVFifoBuffer *f);
/**
* Feed data from an AVFifoBuffer to a user-supplied callback.
- * @param *f AVFifoBuffer to read from
+ * @param f AVFifoBuffer to read from
* @param buf_size number of bytes to read
- * @param *func generic read function
- * @param *dest data destination
+ * @param func generic read function
+ * @param dest data destination
*/
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
/**
* Feed data from a user-supplied callback to an AVFifoBuffer.
- * @param *f AVFifoBuffer to write to
- * @param *src data source; non-const since it may be used as a
+ * @param f AVFifoBuffer to write to
+ * @param src data source; non-const since it may be used as a
* modifiable context by the function defined in func
* @param size number of bytes to write
- * @param *func generic write function; the first parameter is src,
+ * @param func generic write function; the first parameter is src,
* the second is dest_buf, the third is dest_buf_size.
* func must return the number of bytes written to dest_buf, or <= 0 to
* indicate no more data available to write.
/**
* Resize an AVFifoBuffer.
- * @param *f AVFifoBuffer to resize
+ * In case of reallocation failure, the old FIFO is kept unchanged.
+ *
+ * @param f AVFifoBuffer to resize
* @param size new AVFifoBuffer size in bytes
* @return <0 for failure, >=0 otherwise
*/
/**
* Read and discard the specified amount of data from an AVFifoBuffer.
- * @param *f AVFifoBuffer to read from
+ * @param f AVFifoBuffer to read from
* @param size amount of data to read in bytes
*/
void av_fifo_drain(AVFifoBuffer *f, int size);
-static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs)
+/**
+ * Return a pointer to the data stored in a FIFO buffer at a certain offset.
+ * The FIFO buffer is not modified.
+ *
+ * @param f AVFifoBuffer to peek at, f must be non-NULL
+ * @param offs an offset in bytes, its absolute value must be less
+ * than the used buffer size or the returned pointer will
+ * point outside to the buffer data.
+ * The used buffer size can be checked with av_fifo_size().
+ */
+static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
{
uint8_t *ptr = f->rptr + offs;
if (ptr >= f->end)
- ptr -= f->end - f->buffer;
- return *ptr;
+ ptr = f->buffer + (ptr - f->end);
+ else if (ptr < f->buffer)
+ ptr = f->end - (f->buffer - ptr);
+ return ptr;
+}
+
+#if FF_API_AV_FIFO_PEEK
+/**
+ * @deprecated Use av_fifo_peek2() instead.
+ */
+attribute_deprecated
+static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs)
+{
+ return *av_fifo_peek2(f, offs);
}
+#endif
+
#endif /* AVUTIL_FIFO_H */