]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: Updated to ffmpeg 0.8.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 27 Jul 2011 11:00:39 +0000 (11:00 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 27 Jul 2011 11:00:39 +0000 (11:00 +0000)
94 files changed:
ffmpeg 0.8/README.txt [new file with mode: 0644]
ffmpeg 0.8/bin/avcodec-53.dll [new file with mode: 0644]
ffmpeg 0.8/bin/avdevice-53.dll [new file with mode: 0644]
ffmpeg 0.8/bin/avfilter-2.dll [new file with mode: 0644]
ffmpeg 0.8/bin/avformat-53.dll [new file with mode: 0644]
ffmpeg 0.8/bin/avutil-51.dll [new file with mode: 0644]
ffmpeg 0.8/bin/postproc-51.dll [new file with mode: 0644]
ffmpeg 0.8/bin/swscale-2.dll [new file with mode: 0644]
ffmpeg 0.8/doc/developer.html [new file with mode: 0644]
ffmpeg 0.8/doc/faq.html [new file with mode: 0644]
ffmpeg 0.8/doc/ffmpeg.html [new file with mode: 0644]
ffmpeg 0.8/doc/ffplay.html [new file with mode: 0644]
ffmpeg 0.8/doc/ffprobe.html [new file with mode: 0644]
ffmpeg 0.8/doc/general.html [new file with mode: 0644]
ffmpeg 0.8/doc/libavfilter.html [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/avcodec.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/avfft.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/dxva2.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/opt.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/vaapi.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/vdpau.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/version.h [new file with mode: 0644]
ffmpeg 0.8/include/libavcodec/xvmc.h [new file with mode: 0644]
ffmpeg 0.8/include/libavdevice/avdevice.h [new file with mode: 0644]
ffmpeg 0.8/include/libavfilter/avcodec.h [new file with mode: 0644]
ffmpeg 0.8/include/libavfilter/avfilter.h [new file with mode: 0644]
ffmpeg 0.8/include/libavfilter/avfiltergraph.h [new file with mode: 0644]
ffmpeg 0.8/include/libavfilter/vsink_buffer.h [new file with mode: 0644]
ffmpeg 0.8/include/libavfilter/vsrc_buffer.h [new file with mode: 0644]
ffmpeg 0.8/include/libavformat/avformat.h [new file with mode: 0644]
ffmpeg 0.8/include/libavformat/avio.h [new file with mode: 0644]
ffmpeg 0.8/include/libavformat/version.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/adler32.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/aes.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/attributes.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/audioconvert.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/avassert.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/avconfig.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/avstring.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/avutil.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/base64.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/bswap.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/common.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/cpu.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/crc.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/dict.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/error.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/eval.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/fifo.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/file.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/imgutils.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/intfloat_readwrite.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/intreadwrite.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/lfg.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/log.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/lzo.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/mathematics.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/md5.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/mem.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/opt.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/parseutils.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/pixdesc.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/pixfmt.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/random_seed.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/rational.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/samplefmt.h [new file with mode: 0644]
ffmpeg 0.8/include/libavutil/sha.h [new file with mode: 0644]
ffmpeg 0.8/include/libpostproc/postprocess.h [new file with mode: 0644]
ffmpeg 0.8/include/libswscale/swscale.h [new file with mode: 0644]
ffmpeg 0.8/lib/avcodec.lib [new file with mode: 0644]
ffmpeg 0.8/lib/avdevice.lib [new file with mode: 0644]
ffmpeg 0.8/lib/avfilter.lib [new file with mode: 0644]
ffmpeg 0.8/lib/avformat.lib [new file with mode: 0644]
ffmpeg 0.8/lib/avutil.lib [new file with mode: 0644]
ffmpeg 0.8/lib/postproc.lib [new file with mode: 0644]
ffmpeg 0.8/lib/swscale.lib [new file with mode: 0644]
ffmpeg 0.8/licenses/bzip2.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/ffmpeg.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/freetype.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/frei0r.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/gsm.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/lame.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/libvpx.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/opencore-amr.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/openjpeg.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/rtmp.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/schroedinger.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/speex.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/theora.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/vorbis.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/x264.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/xavs.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/xvid.txt [new file with mode: 0644]
ffmpeg 0.8/licenses/zlib.txt [new file with mode: 0644]

diff --git a/ffmpeg 0.8/README.txt b/ffmpeg 0.8/README.txt
new file mode 100644 (file)
index 0000000..783c84b
--- /dev/null
@@ -0,0 +1,76 @@
+This is a FFmpeg Win32 shared build by Kyle Schwarz.\r
+\r
+Zeranoe's FFmpeg Builds Home Page: http://ffmpeg.zeranoe.com/builds/\r
+\r
+Built on Jul 23 2011 15:03:26\r
+\r
+FFmpeg version git-9c2651a\r
+       libavutil    51. 11. 0 / 51. 11. 0\r
+       libavcodec   53.  9. 0 / 53.  9. 0\r
+       libavformat  53.  6. 0 / 53.  6. 0\r
+       libavdevice  53.  2. 0 / 53.  2. 0\r
+       libavfilter   2. 27. 3 /  2. 27. 3\r
+       libswscale    2.  0. 0 /  2.  0. 0\r
+       libpostproc  51.  2. 0 / 51.  2. 0\r
+\r
+FFmpeg configured with:\r
+       --disable-static\r
+       --enable-shared\r
+       --disable-outdev=sdl\r
+       --enable-gpl\r
+       --enable-version3\r
+       --enable-memalign-hack\r
+       --enable-runtime-cpudetect\r
+       --enable-avisynth\r
+       --enable-bzlib\r
+       --enable-frei0r\r
+       --enable-libopencore-amrnb\r
+       --enable-libopencore-amrwb\r
+       --enable-libfreetype\r
+       --enable-libgsm\r
+       --enable-libmp3lame\r
+       --enable-libopenjpeg\r
+       --enable-librtmp\r
+       --enable-libschroedinger\r
+       --enable-libspeex\r
+       --enable-libtheora\r
+       --enable-libvorbis\r
+       --enable-libvpx\r
+       --enable-libx264\r
+       --enable-libxavs\r
+       --enable-libxvid\r
+       --enable-zlib\r
+\r
+The source code for this FFmpeg build can be found at:\r
+       http://hawkeye.arrozcru.org/source/\r
+       \r
+This version of FFmpeg was built on:\r
+       Ubuntu Desktop 11.04: http://www.ubuntu.com/desktop\r
+       \r
+The cross-compile toolchain used to compile this FFmpeg was:\r
+       MinGW-w64 r4240: http://mingw-w64.sourceforge.net/\r
+       winpthreads (part of MinGW-w64)\r
+\r
+The GCC version used to compile this FFmpeg was:\r
+       GCC 4.6.1: http://gcc.gnu.org/\r
+       \r
+The external libaries compiled into this FFmpeg are:\r
+       bzip2 1.0.6 http://www.bzip.org\r
+       Frei0r 1.3 http://frei0r.dyne.org/\r
+       opencore-amr 0.1.2 http://sourceforge.net/projects/opencore-amr/\r
+       FreeType 2.4.4 http://www.freetype.org/\r
+       gsm 1.0.13-3 http://libgsm.sourcearchive.com/\r
+       LAME 3.98.4 http://lame.sourceforge.net/\r
+       OpenJPEG 1.4 http://www.openjpeg.org/\r
+       RTMP git-6155179b http://rtmpdump.mplayerhq.hu/\r
+       Schroedinger 1.0.10 http://diracvideo.org/\r
+       Speex 1.2rc1 http://www.speex.org/\r
+       Theora 1.1.1 http://www.theora.org/\r
+       Vorbis 1.3.2 http://www.vorbis.com/\r
+       libvpx 0.9.6 http://www.webmproject.org/code/\r
+       x264 git-4c552d87 http://www.videolan.org/developers/x264.html\r
+       XAVS r51 http://xavs.sourceforge.net/\r
+       Xvid 1.3.2 http://www.xvid.org/\r
+       zlib 1.2.5 http://zlib.net/\r
+\r
+License for each library can be found in the licenses folder.\r
diff --git a/ffmpeg 0.8/bin/avcodec-53.dll b/ffmpeg 0.8/bin/avcodec-53.dll
new file mode 100644 (file)
index 0000000..ad69678
Binary files /dev/null and b/ffmpeg 0.8/bin/avcodec-53.dll differ
diff --git a/ffmpeg 0.8/bin/avdevice-53.dll b/ffmpeg 0.8/bin/avdevice-53.dll
new file mode 100644 (file)
index 0000000..d1071df
Binary files /dev/null and b/ffmpeg 0.8/bin/avdevice-53.dll differ
diff --git a/ffmpeg 0.8/bin/avfilter-2.dll b/ffmpeg 0.8/bin/avfilter-2.dll
new file mode 100644 (file)
index 0000000..2819f83
Binary files /dev/null and b/ffmpeg 0.8/bin/avfilter-2.dll differ
diff --git a/ffmpeg 0.8/bin/avformat-53.dll b/ffmpeg 0.8/bin/avformat-53.dll
new file mode 100644 (file)
index 0000000..02d5bf3
Binary files /dev/null and b/ffmpeg 0.8/bin/avformat-53.dll differ
diff --git a/ffmpeg 0.8/bin/avutil-51.dll b/ffmpeg 0.8/bin/avutil-51.dll
new file mode 100644 (file)
index 0000000..528c80e
Binary files /dev/null and b/ffmpeg 0.8/bin/avutil-51.dll differ
diff --git a/ffmpeg 0.8/bin/postproc-51.dll b/ffmpeg 0.8/bin/postproc-51.dll
new file mode 100644 (file)
index 0000000..0c86639
Binary files /dev/null and b/ffmpeg 0.8/bin/postproc-51.dll differ
diff --git a/ffmpeg 0.8/bin/swscale-2.dll b/ffmpeg 0.8/bin/swscale-2.dll
new file mode 100644 (file)
index 0000000..77e4d7e
Binary files /dev/null and b/ffmpeg 0.8/bin/swscale-2.dll differ
diff --git a/ffmpeg 0.8/doc/developer.html b/ffmpeg 0.8/doc/developer.html
new file mode 100644 (file)
index 0000000..2e1f9f1
--- /dev/null
@@ -0,0 +1,523 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>Developer Documentation</title>
+
+<meta name="description" content="Developer Documentation">
+<meta name="keywords" content="Developer Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">Developer Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<ul class="toc">
+  <li><a name="toc-Developers-Guide" href="#Developers-Guide">1. Developers Guide</a>
+  <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>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="Developers-Guide"></a>
+<h1 class="chapter"><a href="developer.html#toc-Developers-Guide">1. Developers Guide</a></h1>
+
+<a name="API"></a>
+<h2 class="section"><a href="developer.html#toc-API">1.1 API</a></h2>
+<ul>
+<li> libavcodec is the library containing the codecs (both encoding and
+decoding). Look at &lsquo;<tt>libavcodec/apiexample.c</tt>&rsquo; to see how to use it.
+
+</li><li> libavformat is the library containing the file format handling (mux and
+demux code for several formats). Look at &lsquo;<tt>ffplay.c</tt>&rsquo; to use it in a
+player. See &lsquo;<tt>libavformat/output-example.c</tt>&rsquo; to use it to generate
+audio or video streams.
+
+</li></ul>
+
+<a name="Integrating-libavcodec-or-libavformat-in-your-program"></a>
+<h2 class="section"><a href="developer.html#toc-Integrating-libavcodec-or-libavformat-in-your-program">1.2 Integrating libavcodec or libavformat in your program</a></h2>
+
+<p>You can integrate all the source code of the libraries to link them
+statically to avoid any version problem. All you need is to provide a
+&rsquo;config.mak&rsquo; and a &rsquo;config.h&rsquo; in the parent directory. See the defines
+generated by ./configure to understand what is needed.
+</p>
+<p>You can use libavcodec or libavformat in your commercial program, but
+<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>
+
+<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>
+
+<p>FFmpeg is programmed in the ISO C90 language with a few additional
+features from ISO C99, namely:
+</p><ul>
+<li>
+the &lsquo;<samp>inline</samp>&rsquo; keyword;
+</li><li>
+&lsquo;<samp>//</samp>&rsquo; comments;
+</li><li>
+designated struct initializers (&lsquo;<samp>struct s x = { .i = 17 };</samp>&rsquo;)
+</li><li>
+compound literals (&lsquo;<samp>x = (struct s) { 17, 23 };</samp>&rsquo;)
+</li></ul>
+
+<p>These features are supported by all compilers we care about, so we will not
+accept patches to remove their use unless they absolutely do not impair
+clarity and performance.
+</p>
+<p>All code must compile with recent versions of GCC and a number of other
+currently supported compilers. To ensure compatibility, please do not use
+additional C99 features or GCC extensions. Especially watch out for:
+</p><ul>
+<li>
+mixing statements and declarations;
+</li><li>
+&lsquo;<samp>long long</samp>&rsquo; (use &lsquo;<samp>int64_t</samp>&rsquo; instead);
+</li><li>
+&lsquo;<samp>__attribute__</samp>&rsquo; not protected by &lsquo;<samp>#ifdef __GNUC__</samp>&rsquo; or similar;
+</li><li>
+GCC statement expressions (&lsquo;<samp>(x = ({ int y = 4; y; })</samp>&rsquo;).
+</li></ul>
+
+<p>Indent size is 4.
+The presentation is one inspired by &rsquo;indent -i4 -kr -nut&rsquo;.
+The TAB character is forbidden outside of Makefiles as is any
+form of trailing whitespace. Commits containing either will be
+rejected by the git repository.
+</p>
+<p>The main priority in FFmpeg is simplicity and small code size in order to
+minimize the bug count.
+</p>
+<p>Comments: Use the JavaDoc/Doxygen
+format (see examples below) so that code documentation
+can be generated automatically. All nontrivial functions should have a comment
+above them explaining what the function does, even if it is just one sentence.
+All structures and their member variables should be documented, too.
+</p><table><tr><td>&nbsp;</td><td><pre class="example">/**
+ * @file
+ * MPEG codec.
+ * @author ...
+ */
+
+/**
+ * Summary sentence.
+ * more text ...
+ * ...
+ */
+typedef struct Foobar{
+    int var1; /**&lt; var1 description */
+    int var2; ///&lt; var2 description
+    /** var3 description */
+    int var3;
+} Foobar;
+
+/**
+ * Summary sentence.
+ * more text ...
+ * ...
+ * @param my_parameter description of my_parameter
+ * @return return value description
+ */
+int myfunc(int my_parameter)
+...
+</pre></td></tr></table>
+
+<p>fprintf and printf are forbidden in libavformat and libavcodec,
+please use av_log() instead.
+</p>
+<p>Casts should be used only when necessary. Unneeded parentheses
+should also be avoided if they don&rsquo;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>
+
+<ol>
+<li>
+   Contributions should be licensed under the LGPL 2.1, including an
+   &quot;or any later version&quot; clause, or the MIT license.  GPL 2 including
+   an &quot;or any later version&quot; clause is also acceptable, but LGPL is
+   preferred.
+</li><li>
+   You must not commit code which breaks FFmpeg! (Meaning unfinished but
+   enabled code which breaks compilation or compiles but does not work or
+   breaks the regression tests)
+   You can commit unfinished stuff (for testing etc), but it must be disabled
+   (#ifdef etc) by default so it does not interfere with other developers&rsquo;
+   work.
+</li><li>
+   You do not have to over-test things. If it works for you, and you think it
+   should work for others, then commit. If your code has problems
+   (portability, triggers compiler bugs, unusual environment etc) they will be
+   reported and eventually fixed.
+</li><li>
+   Do not commit unrelated changes together, split them into self-contained
+   pieces. Also do not forget that if part B depends on part A, but A does not
+   depend on B, then A can and should be committed first and separate from B.
+   Keeping changes well split into self-contained parts makes reviewing and
+   understanding them on the commit log mailing list easier. This also helps
+   in case of debugging later on.
+   Also if you have doubts about splitting or not splitting, do not hesitate to
+   ask/discuss it on the developer mailing list.
+</li><li>
+   Do not change behavior of the programs (renaming options etc) or public
+   API or ABI without first discussing it on the ffmpeg-devel mailing list.
+   Do not remove functionality from the code. Just improve!
+
+<p>   Note: Redundant code can be removed.
+</p></li><li>
+   Do not commit changes to the build system (Makefiles, configure script)
+   which change behavior, defaults etc, without asking first. The same
+   applies to compiler warning fixes, trivial looking fixes and to code
+   maintained by other developers. We usually have a reason for doing things
+   the way we do. Send your changes as patches to the ffmpeg-devel mailing
+   list, and if the code maintainers say OK, you may commit. This does not
+   apply to files you wrote and/or maintain.
+</li><li>
+   We refuse source indentation and other cosmetic changes if they are mixed
+   with functional changes, such commits will be rejected and removed. Every
+   developer has his own indentation style, you should not change it. Of course
+   if you (re)write something, you can use your own style, even though we would
+   prefer if the indentation throughout FFmpeg was consistent (Many projects
+   force a given indentation style - we do not.). If you really need to make
+   indentation changes (try to avoid this), separate them strictly from real
+   changes.
+
+<p>   NOTE: If you had to put if(){ .. } over a large (&gt; 5 lines) chunk of code,
+   then either do NOT change the indentation of the inner part within (do not
+   move it to the right)! or do so in a separate commit
+</p></li><li>
+   Always fill out the commit log message. Describe in a few lines what you
+   changed and why. You can refer to mailing list postings if you fix a
+   particular bug. Comments such as &quot;fixed!&quot; or &quot;Changed it.&quot; are unacceptable.
+   Recommanded format:
+   area changed: Short 1 line description
+
+<p>   details describing what and why and giving references.
+</p></li><li>
+   Make sure the author of the commit is set correctly. (see git commit &ndash;author)
+   If you apply a patch, send an
+   answer to ffmpeg-devel (or wherever you got the patch from) saying that
+   you applied the patch.
+</li><li>
+   When applying patches that have been discussed (at length) on the mailing
+   list, reference the thread in the log message.
+</li><li>
+    Do NOT commit to code actively maintained by others without permission.
+    Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
+    timeframe (12h for build failures and security fixes, 3 days small changes,
+    1 week for big patches) then commit your patch if you think it is OK.
+    Also note, the maintainer can simply ask for more time to review!
+</li><li>
+    Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
+    are sent there and reviewed by all the other developers. Bugs and possible
+    improvements or general questions regarding commits are discussed there. We
+    expect you to react if problems with your code are uncovered.
+</li><li>
+    Update the documentation if you change behavior or add features. If you are
+    unsure how best to do this, send a patch to ffmpeg-devel, the documentation
+    maintainer(s) will review and commit your stuff.
+</li><li>
+    Try to keep important discussions and requests (also) on the public
+    developer mailing list, so that all developers can benefit from them.
+</li><li>
+    Never write to unallocated memory, never write over the end of arrays,
+    always check values read from some untrusted source before using them
+    as array index or other risky things.
+</li><li>
+    Remember to check if you need to bump versions for the specific libav
+    parts (libavutil, libavcodec, libavformat) you are changing. You need
+    to change the version integer.
+    Incrementing the first component means no backward compatibility to
+    previous versions (e.g. removal of a function from the public API).
+    Incrementing the second component means backward compatible change
+    (e.g. addition of a function to the public API or extension of an
+    existing data structure).
+    Incrementing the third component means a noteworthy binary compatible
+    change (e.g. encoder bug fix that matters for the decoder).
+</li><li>
+    Compiler warnings indicate potential bugs or code with bad style. If a type of
+    warning always points to correct and clean code, that warning should
+    be disabled, not the code changed.
+    Thus the remaining warnings can either be bugs or correct code.
+    If it is a bug, the bug has to be fixed. If it is not, the code should
+    be changed to not generate a warning unless that causes a slowdown
+    or obfuscates the code.
+</li><li>
+    If you add a new file, give it a proper license header. Do not copy and
+    paste it from a random place, use an existing file as template.
+</li></ol>
+
+<p>We think our rules are not too hard. If you have comments, contact us.
+</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>First, read the <a href="#Coding-Rules">Coding Rules</a> above if you did not yet, in particular
+the rules regarding patch submission.
+</p>
+<p>When you submit your patch, please use <code>git format-patch</code> or
+<code>git send-email</code>. We cannot read other diffs :-)
+</p>
+<p>Also please do not submit a patch which contains several unrelated changes.
+Split it into separate, self-contained pieces. This does not mean splitting
+file by file. Instead, make the patch as small as possible while still
+keeping it as a logical unit that contains an individual change, even
+if it spans multiple files. This makes reviewing your patches much easier
+for us and greatly increases your chances of getting your patch applied.
+</p>
+<p>Use the patcheck tool of FFmpeg to check your patch.
+The tool is located in the tools directory.
+</p>
+<p>Run the @ref{Regression Tests} before submitting a patch in order to verify
+it does not cause unexpected problems.
+</p>
+<p>Patches should be posted as base64 encoded attachments (or any other
+encoding which ensures that the patch will not be trashed during
+transmission) to the ffmpeg-devel mailing list, see
+<a href="http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel">http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel</a>
+</p>
+<p>It also helps quite a bit if you tell us what the patch does (for example
+&rsquo;replaces lrint by lrintf&rsquo;), and why (for example &rsquo;*BSD isn&rsquo;t C99 compliant
+and has no lrint()&rsquo;)
+</p>
+<p>Also please if you send several patches, send each patch as a separate mail,
+do not attach several unrelated patches to the same mail.
+</p>
+<p>Your patch will be reviewed on the mailing list. You will likely be asked
+to make some changes and are expected to send in an improved version that
+incorporates the requests from the review. This process may go through
+several iterations. Once your patch is deemed good enough, some developer
+will pick it up and commit it to the official FFmpeg tree.
+</p>
+<p>Give us a few days to react. But if some time passes without reaction,
+send a reminder by email. Your patch should eventually be dealt with.
+</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>
+
+<ol>
+<li>
+    Did you use av_cold for codec initialization and close functions?
+</li><li>
+    Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
+    AVInputFormat/AVOutputFormat struct?
+</li><li>
+    Did you bump the minor version number (and reset the micro version
+    number) in &lsquo;<tt>avcodec.h</tt>&rsquo; or &lsquo;<tt>avformat.h</tt>&rsquo;?
+</li><li>
+    Did you register it in &lsquo;<tt>allcodecs.c</tt>&rsquo; or &lsquo;<tt>allformats.c</tt>&rsquo;?
+</li><li>
+    Did you add the CodecID to &lsquo;<tt>avcodec.h</tt>&rsquo;?
+</li><li>
+    If it has a fourcc, did you add it to &lsquo;<tt>libavformat/riff.c</tt>&rsquo;,
+    even if it is only a decoder?
+</li><li>
+    Did you add a rule to compile the appropriate files in the Makefile?
+    Remember to do this even if you&rsquo;re just adding a format to a file that is
+    already being compiled by some other rule, like a raw demuxer.
+</li><li>
+    Did you add an entry to the table of supported formats or codecs in
+    &lsquo;<tt>doc/general.texi</tt>&rsquo;?
+</li><li>
+    Did you add an entry in the Changelog?
+</li><li>
+    If it depends on a parser or a library, did you add that dependency in
+    configure?
+</li><li>
+    Did you <code>git add</code> the appropriate files before committing?
+</li><li>
+    Did you make sure it compiles standalone, i.e. with
+    <code>configure --disable-everything --enable-decoder=foo</code>
+    (or <code>--enable-demuxer</code> or whatever your component is)?
+</li></ol>
+
+
+<a name="patch-submission-checklist"></a>
+<h2 class="section"><a href="developer.html#toc-patch-submission-checklist">1.7 patch submission checklist</a></h2>
+
+<ol>
+<li>
+    Does &rsquo;make fate&rsquo; pass with the patch applied?
+</li><li>
+    Was the patch generated with git format-patch or send-email?
+</li><li>
+    Did you sign off your patch? (git commit -s)
+    See <a href="http://kerneltrap.org/files/Jeremy/DCO.txt">http://kerneltrap.org/files/Jeremy/DCO.txt</a> for the meaning
+    of sign off.
+</li><li>
+    Did you provide a clear git commit log message?
+</li><li>
+    Is the patch against latest FFmpeg git master branch?
+</li><li>
+    Are you subscribed to ffmpeg-dev?
+    (the list is subscribers only due to spam)
+</li><li>
+    Have you checked that the changes are minimal, so that the same cannot be
+    achieved with a smaller patch and/or simpler final code?
+</li><li>
+    If the change is to speed critical code, did you benchmark it?
+</li><li>
+    If you did any benchmarks, did you provide them in the mail?
+</li><li>
+    Have you checked that the patch does not introduce buffer overflows or
+    other security issues?
+</li><li>
+    Did you test your decoder or demuxer against damaged data? If no, see
+    tools/trasher and the noise bitstream filter. Your decoder or demuxer
+    should not crash or end in a (near) infinite loop when fed damaged data.
+</li><li>
+    Does the patch not mix functional and cosmetic changes?
+</li><li>
+    Did you add tabs or trailing whitespace to the code? Both are forbidden.
+</li><li>
+    Is the patch attached to the email you send?
+</li><li>
+    Is the mime type of the patch correct? It should be text/x-diff or
+    text/x-patch or at least text/plain and not application/octet-stream.
+</li><li>
+    If the patch fixes a bug, did you provide a verbose analysis of the bug?
+</li><li>
+    If the patch fixes a bug, did you provide enough information, including
+    a sample, so the bug can be reproduced and the fix can be verified?
+    Note please do not attach samples &gt;100k to mails but rather provide a
+    URL, you can upload to ftp://upload.ffmpeg.org
+</li><li>
+    Did you provide a verbose summary about what the patch does change?
+</li><li>
+    Did you provide a verbose explanation why it changes things like it does?
+</li><li>
+    Did you provide a verbose summary of the user visible advantages and
+    disadvantages if the patch is applied?
+</li><li>
+    Did you provide an example so we can verify the new feature added by the
+    patch easily?
+</li><li>
+    If you added a new file, did you insert a license header? It should be
+    taken from FFmpeg, not randomly copied and pasted from somewhere else.
+</li><li>
+    You should maintain alphabetical order in alphabetically ordered lists as
+    long as doing so does not break API/ABI compatibility.
+</li><li>
+    Lines with similar content should be aligned vertically when doing so
+    improves readability.
+</li><li>
+    Consider to add a regression test for your code.
+</li><li>
+    If you added YASM code please check that things still work with &ndash;disable-yasm
+</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>
+
+<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.
+Reviews and comments will be posted as replies to the patch on the
+mailing list. The patch submitter then has to take care of every comment,
+that can be by resubmitting a changed patch or by discussion. Resubmitted
+patches will themselves be reviewed like any other patch. If at some point
+a patch passes review with no comments then it is approved, that can for
+simple and small patches happen immediately while large patches will generally
+have to be changed and reviewed many times before they are approved.
+After a patch is approved it will be committed to the repository.
+</p>
+<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>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>
+
+<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 &rsquo;diff&rsquo; 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 &rsquo;make test&rsquo; to test all the codecs and formats. Commands like
+&rsquo;make regtest-mpeg2&rsquo; 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 &rsquo;make V=1 test&rsquo; or
+&rsquo;make V=2 test&rsquo;.
+</p>
+<p>Run &rsquo;make fulltest&rsquo; to test all the codecs, formats and FFserver.
+</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
+accordingly].
+</p>
+<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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/faq.html b/ffmpeg 0.8/doc/faq.html
new file mode 100644 (file)
index 0000000..286ff2a
--- /dev/null
@@ -0,0 +1,657 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>FFmpeg FAQ</title>
+
+<meta name="description" content="FFmpeg FAQ">
+<meta name="keywords" content="FFmpeg FAQ">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">FFmpeg FAQ</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<ul class="toc">
+  <li><a name="toc-General-Questions" href="#General-Questions">1. General Questions</a>
+  <ul class="toc">
+    <li><a name="toc-When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f" href="#When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f">1.1 When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?</a></li>
+    <li><a name="toc-I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f" href="#I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f">1.2 I have a problem with an old version of FFmpeg; where should I report it?</a></li>
+    <li><a name="toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f" href="#Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f">1.3 Why doesn&rsquo;t FFmpeg support feature [xyz]?</a></li>
+    <li><a name="toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f" href="#FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f">1.4 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?</a></li>
+    <li><a name="toc-My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e" href="#My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e">1.5 My bug report/mail to ffmpeg-devel/user has not received any replies.</a></li>
+    <li><a name="toc-Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e" href="#Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e">1.6 Is there a forum for FFmpeg? I do not like mailing lists.</a></li>
+    <li><a name="toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e" href="#I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e">1.7 I cannot read this file although this format seems to be supported by ffmpeg.</a></li>
+    <li><a name="toc-Which-codecs-are-supported-by-Windows_003f" href="#Which-codecs-are-supported-by-Windows_003f">1.8 Which codecs are supported by Windows?</a></li>
+  </ul></li>
+  <li><a name="toc-Compilation" href="#Compilation">2. Compilation</a>
+  <ul class="toc">
+    <li><a name="toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027" href="#error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code></a></li>
+  </ul></li>
+  <li><a name="toc-Usage" href="#Usage">3. Usage</a>
+  <ul class="toc">
+    <li><a name="toc-ffmpeg-does-not-work_003b-what-is-wrong_003f" href="#ffmpeg-does-not-work_003b-what-is-wrong_003f">3.1 ffmpeg does not work; what is wrong?</a></li>
+    <li><a name="toc-How-do-I-encode-single-pictures-into-movies_003f" href="#How-do-I-encode-single-pictures-into-movies_003f">3.2 How do I encode single pictures into movies?</a></li>
+    <li><a name="toc-How-do-I-encode-movie-to-single-pictures_003f" href="#How-do-I-encode-movie-to-single-pictures_003f">3.3 How do I encode movie to single pictures?</a></li>
+    <li><a name="toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f" href="#Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?</a></li>
+    <li><a name="toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f" href="#How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f">3.5 How can I read from the standard input or write to the standard output?</a></li>
+    <li><a name="toc-_002df-jpeg-doesn_0027t-work_002e" href="#g_t_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></li>
+    <li><a name="toc-Why-can-I-not-change-the-framerate_003f" href="#Why-can-I-not-change-the-framerate_003f">3.7 Why can I not change the framerate?</a></li>
+    <li><a name="toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f" href="#How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f">3.8 How do I encode Xvid or DivX video with ffmpeg?</a></li>
+    <li><a name="toc-How-do-I-encode-videos-which-play-on-the-iPod_003f" href="#How-do-I-encode-videos-which-play-on-the-iPod_003f">3.9 How do I encode videos which play on the iPod?</a></li>
+    <li><a name="toc-How-do-I-encode-videos-which-play-on-the-PSP_003f" href="#How-do-I-encode-videos-which-play-on-the-PSP_003f">3.10 How do I encode videos which play on the PSP?</a></li>
+    <li><a name="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f">3.11 Which are good parameters for encoding high quality MPEG-4?</a></li>
+    <li><a name="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f">3.12 Which are good parameters for encoding high quality MPEG-1/MPEG-2?</a></li>
+    <li><a name="toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f" href="#Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f">3.13 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?</a></li>
+    <li><a name="toc-How-can-I-read-DirectShow-files_003f" href="#How-can-I-read-DirectShow-files_003f">3.14 How can I read DirectShow files?</a></li>
+    <li><a name="toc-How-can-I-join-video-files_003f" href="#How-can-I-join-video-files_003f">3.15 How can I join video files?</a></li>
+    <li><a name="toc-The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e" href="#The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e">3.16 The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.</a></li>
+    <li><a name="toc-I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e" href="#I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e">3.17 I want CBR, but no matter what I do frame sizes differ.</a></li>
+    <li><a name="toc-How-do-I-check-if-a-stream-is-CBR_003f" href="#How-do-I-check-if-a-stream-is-CBR_003f">3.18 How do I check if a stream is CBR?</a></li>
+  </ul></li>
+  <li><a name="toc-Development" href="#Development">4. Development</a>
+  <ul class="toc">
+    <li><a name="toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f" href="#Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?</a></li>
+    <li><a name="toc-Can-you-support-my-C-compiler-XXX_003f" href="#Can-you-support-my-C-compiler-XXX_003f">4.2 Can you support my C compiler XXX?</a></li>
+    <li><a name="toc-Is-Microsoft-Visual-C_002b_002b-supported_003f" href="#Is-Microsoft-Visual-C_002b_002b-supported_003f">4.3 Is Microsoft Visual C++ supported?</a></li>
+    <li><a name="toc-Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f" href="#Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f">4.4 Can I use FFmpeg or libavcodec under Windows?</a></li>
+    <li><a name="toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f" href="#Can-you-add-automake_002c-libtool-or-autoconf-support_003f">4.5 Can you add automake, libtool or autoconf support?</a></li>
+    <li><a name="toc-Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f" href="#Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f">4.6 Why not rewrite ffmpeg in object-oriented C++?</a></li>
+    <li><a name="toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f" href="#Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f">4.7 Why are the ffmpeg programs devoid of debugging symbols?</a></li>
+    <li><a name="toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f" href="#I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f">4.8 I do not like the LGPL, can I contribute code under the GPL instead?</a></li>
+    <li><a name="toc-I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e" href="#I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e">4.9 I want to compile xyz.c alone but my compiler produced many errors.</a></li>
+    <li><a name="toc-I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e" href="#I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e">4.10 I&rsquo;m using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.</a></li>
+    <li><a name="toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f" href="#I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?</a></li>
+    <li><a name="toc-I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e" href="#I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e">4.12 I get &quot;No compatible shell script interpreter found.&quot; in MSys.</a></li>
+    <li><a name="toc-I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e" href="#I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e">4.13 I get &quot;./configure: line &lt;xxx&gt;: pr: command not found&quot; in MSys.</a></li>
+    <li><a name="toc-Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f" href="#Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f">4.14 Where can I find libav* headers for Pascal/Delphi?</a></li>
+    <li><a name="toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f" href="#Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f">4.15 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?</a></li>
+    <li><a name="toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f" href="#How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f">4.16 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?</a></li>
+    <li><a name="toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e" href="#AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e">4.17 AVStream.r_frame_rate is wrong, it is much larger than the framerate.</a></li>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="General-Questions"></a>
+<h1 class="chapter"><a href="faq.html#toc-General-Questions">1. General Questions</a></h1>
+
+<a name="When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f"></a>
+<h2 class="section"><a href="faq.html#toc-When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f">1.1 When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?</a></h2>
+
+<p>Like most open source projects FFmpeg suffers from a certain lack of
+manpower. For this reason the developers have to prioritize the work
+they do and putting out releases is not at the top of the list, fixing
+bugs and reviewing patches takes precedence. Please don&rsquo;t complain or
+request more timely and/or frequent releases unless you are willing to
+help out creating them.
+</p>
+<a name="I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f"></a>
+<h2 class="section"><a href="faq.html#toc-I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f">1.2 I have a problem with an old version of FFmpeg; where should I report it?</a></h2>
+<p>Nowhere. We do not support old FFmpeg versions in any way, we simply lack
+the time, motivation and manpower to do so. If you have a problem with an
+old version of FFmpeg, upgrade to the latest git snapshot. If you
+still experience the problem, then you can report it according to the
+guidelines in <a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>.
+</p>
+<a name="Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f">1.3 Why doesn&rsquo;t FFmpeg support feature [xyz]?</a></h2>
+
+<p>Because no one has taken on that task yet. FFmpeg development is
+driven by the tasks that are important to the individual developers.
+If there is a feature that is important to you, the best way to get
+it implemented is to undertake the task yourself or sponsor a developer.
+</p>
+<a name="FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f"></a>
+<h2 class="section"><a href="faq.html#toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f">1.4 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?</a></h2>
+
+<p>No. Windows DLLs are not portable, bloated and often slow.
+Moreover FFmpeg strives to support all codecs natively.
+A DLL loader is not conducive to that goal.
+</p>
+<a name="My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e"></a>
+<h2 class="section"><a href="faq.html#toc-My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e">1.5 My bug report/mail to ffmpeg-devel/user has not received any replies.</a></h2>
+
+<p>Likely reasons
+</p><ul>
+<li> We are busy and haven&rsquo;t had time yet to read your report or
+investigate the issue.
+</li><li> You didn&rsquo;t follow <a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>.
+</li><li> You didn&rsquo;t use git master.
+</li><li> You reported a segmentation fault without gdb output.
+</li><li> You describe a problem but not how to reproduce it.
+</li><li> It&rsquo;s unclear if you use ffmpeg as command line tool or use
+libav* from another application.
+</li><li> You speak about a video having problems on playback but
+not what you use to play it.
+</li><li> We have no faint clue what you are talking about besides
+that it is related to FFmpeg.
+</li></ul>
+
+<a name="Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e"></a>
+<h2 class="section"><a href="faq.html#toc-Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e">1.6 Is there a forum for FFmpeg? I do not like mailing lists.</a></h2>
+
+<p>You may view our mailing lists with a more forum-alike look here:
+<a href="http://dir.gmane.org/gmane.comp.video.ffmpeg.user">http://dir.gmane.org/gmane.comp.video.ffmpeg.user</a>,
+but, if you post, please remember that our mailing list rules still apply there.
+</p>
+<a name="I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e">1.7 I cannot read this file although this format seems to be supported by ffmpeg.</a></h2>
+
+<p>Even if ffmpeg can read the container format, it may not support all its
+codecs. Please consult the supported codec list in the ffmpeg
+documentation.
+</p>
+<a name="Which-codecs-are-supported-by-Windows_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Which-codecs-are-supported-by-Windows_003f">1.8 Which codecs are supported by Windows?</a></h2>
+
+<p>Windows does not support standard formats like MPEG very well, unless you
+install some additional codecs.
+</p>
+<p>The following list of video codecs should work on most Windows systems:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>msmpeg4v2</samp>&rsquo;</dt>
+<dd><p>.avi/.asf
+</p></dd>
+<dt> &lsquo;<samp>msmpeg4</samp>&rsquo;</dt>
+<dd><p>.asf only
+</p></dd>
+<dt> &lsquo;<samp>wmv1</samp>&rsquo;</dt>
+<dd><p>.asf only
+</p></dd>
+<dt> &lsquo;<samp>wmv2</samp>&rsquo;</dt>
+<dd><p>.asf only
+</p></dd>
+<dt> &lsquo;<samp>mpeg4</samp>&rsquo;</dt>
+<dd><p>Only if you have some MPEG-4 codec like ffdshow or Xvid installed.
+</p></dd>
+<dt> &lsquo;<samp>mpeg1video</samp>&rsquo;</dt>
+<dd><p>.mpg only
+</p></dd>
+</dl>
+<p>Note, ASF files often have .wmv or .wma extensions in Windows. It should also
+be mentioned that Microsoft claims a patent on the ASF format, and may sue
+or threaten users who create ASF files with non-Microsoft software. It is
+strongly advised to avoid ASF where possible.
+</p>
+<p>The following list of audio codecs should work on most Windows systems:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>adpcm_ima_wav</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>adpcm_ms</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>pcm_s16le</samp>&rsquo;</dt>
+<dd><p>always
+</p></dd>
+<dt> &lsquo;<samp>libmp3lame</samp>&rsquo;</dt>
+<dd><p>If some MP3 codec like LAME is installed.
+</p></dd>
+</dl>
+
+
+<a name="Compilation"></a>
+<h1 class="chapter"><a href="faq.html#toc-Compilation">2. Compilation</a></h1>
+
+<a name="error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027"></a>
+<h2 class="section"><a href="faq.html#toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code></a></h2>
+
+<p>This is a bug in gcc. Do not report it to us. Instead, please report it to
+the gcc developers. Note that we will not add workarounds for gcc bugs.
+</p>
+<p>Also note that (some of) the gcc developers believe this is not a bug or
+not a bug they should fix:
+<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203</a>.
+Then again, some of them do not know the difference between an undecidable
+problem and an NP-hard problem...
+</p>
+<a name="Usage"></a>
+<h1 class="chapter"><a href="faq.html#toc-Usage">3. Usage</a></h1>
+
+<a name="ffmpeg-does-not-work_003b-what-is-wrong_003f"></a>
+<h2 class="section"><a href="faq.html#toc-ffmpeg-does-not-work_003b-what-is-wrong_003f">3.1 ffmpeg does not work; what is wrong?</a></h2>
+
+<p>Try a <code>make distclean</code> in the ffmpeg source directory before the build.
+If this does not help see
+(<a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>).
+</p>
+<a name="How-do-I-encode-single-pictures-into-movies_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-encode-single-pictures-into-movies_003f">3.2 How do I encode single pictures into movies?</a></h2>
+
+<p>First, rename your pictures to follow a numerical sequence.
+For example, img1.jpg, img2.jpg, img3.jpg,...
+Then you may run:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
+</pre></td></tr></table>
+
+<p>Notice that &lsquo;<samp>%d</samp>&rsquo; is replaced by the image number.
+</p>
+<p>&lsquo;<tt>img%03d.jpg</tt>&rsquo; means the sequence &lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo;, etc...
+</p>
+<p>If you have large number of pictures to rename, you can use the
+following command to ease the burden. The command, using the bourne
+shell syntax, symbolically links all files in the current directory
+that match <code>*jpg</code> to the &lsquo;<tt>/tmp</tt>&rsquo; directory in the sequence of
+&lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo; and so on.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">  x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s &quot;$i&quot; /tmp/img&quot;$counter&quot;.jpg; x=$(($x+1)); done
+</pre></td></tr></table>
+
+<p>If you want to sequence them by oldest modified first, substitute
+<code>$(ls -r -t *jpg)</code> in place of <code>*jpg</code>.
+</p>
+<p>Then run:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
+</pre></td></tr></table>
+
+<p>The same logic is used for any image format that ffmpeg reads.
+</p>
+<a name="How-do-I-encode-movie-to-single-pictures_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-encode-movie-to-single-pictures_003f">3.3 How do I encode movie to single pictures?</a></h2>
+
+<p>Use:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg movie%d.jpg
+</pre></td></tr></table>
+
+<p>The &lsquo;<tt>movie.mpg</tt>&rsquo; used as input will be converted to
+&lsquo;<tt>movie1.jpg</tt>&rsquo;, &lsquo;<tt>movie2.jpg</tt>&rsquo;, etc...
+</p>
+<p>Instead of relying on file format self-recognition, you may also use
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-vcodec ppm</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-vcodec png</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-vcodec mjpeg</samp>&rsquo;</dt>
+</dl>
+<p>to force the encoding.
+</p>
+<p>Applying that to the previous example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
+</pre></td></tr></table>
+
+<p>Beware that there is no &quot;jpeg&quot; codec. Use &quot;mjpeg&quot; instead.
+</p>
+<a name="Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?</a></h2>
+
+<p>For multithreaded MPEG* encoding, the encoded slices must be independent,
+otherwise thread n would practically have to wait for n-1 to finish, so it&rsquo;s
+quite logical that there is a small reduction of quality. This is not a bug.
+</p>
+<a name="How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f">3.5 How can I read from the standard input or write to the standard output?</a></h2>
+
+<p>Use &lsquo;<tt>-</tt>&rsquo; as file name.
+</p>
+<a name="g_t_002df-jpeg-doesn_0027t-work_002e"></a>
+<h2 class="section"><a href="faq.html#toc-_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></h2>
+
+<p>Try &rsquo;-f image2 test%d.jpg&rsquo;.
+</p>
+<a name="Why-can-I-not-change-the-framerate_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Why-can-I-not-change-the-framerate_003f">3.7 Why can I not change the framerate?</a></h2>
+
+<p>Some codecs, like MPEG-1/2, only allow a small number of fixed framerates.
+Choose a different codec with the -vcodec command line option.
+</p>
+<a name="How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f">3.8 How do I encode Xvid or DivX video with ffmpeg?</a></h2>
+
+<p>Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
+standard (note that there are many other coding formats that use this
+same standard). Thus, use &rsquo;-vcodec mpeg4&rsquo; to encode in these formats. The
+default fourcc stored in an MPEG-4-coded file will be &rsquo;FMP4&rsquo;. If you want
+a different fourcc, use the &rsquo;-vtag&rsquo; option. E.g., &rsquo;-vtag xvid&rsquo; will
+force the fourcc &rsquo;xvid&rsquo; to be stored as the video fourcc rather than the
+default.
+</p>
+<a name="How-do-I-encode-videos-which-play-on-the-iPod_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-encode-videos-which-play-on-the-iPod_003f">3.9 How do I encode videos which play on the iPod?</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
+<dd><p>-acodec libfaac -vcodec mpeg4 width&lt;=320 height&lt;=240
+</p></dd>
+<dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
+<dd><p>mv4, title
+</p></dd>
+<dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
+<dd><p>B-frames
+</p></dd>
+<dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
+<dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
+</p></dd>
+</dl>
+
+<a name="How-do-I-encode-videos-which-play-on-the-PSP_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-encode-videos-which-play-on-the-PSP_003f">3.10 How do I encode videos which play on the PSP?</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
+<dd><p>-acodec libfaac -vcodec mpeg4 width*height&lt;=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
+</p></dd>
+<dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
+<dd><p>mv4, title
+</p></dd>
+<dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
+<dd><p>B-frames
+</p></dd>
+<dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
+<dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
+</p></dd>
+<dt> &lsquo;<samp>needed stuff for H.264</samp>&rsquo;</dt>
+<dd><p>-acodec libfaac -vcodec libx264 width*height&lt;=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
+</p></dd>
+<dt> &lsquo;<samp>working stuff for H.264</samp>&rsquo;</dt>
+<dd><p>title, loop filter
+</p></dd>
+<dt> &lsquo;<samp>non-working stuff for H.264</samp>&rsquo;</dt>
+<dd><p>CAVLC
+</p></dd>
+<dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
+<dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
+</p></dd>
+<dt> &lsquo;<samp>higher resolution for newer PSP firmwares, width&lt;=480, height&lt;=272</samp>&rsquo;</dt>
+<dd><p>-vcodec libx264 -level 21 -coder 1 -f psp
+</p></dd>
+<dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
+<dd><p>ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
+</p></dd>
+</dl>
+
+<a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f">3.11 Which are good parameters for encoding high quality MPEG-4?</a></h2>
+
+<p>&rsquo;-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2&rsquo;,
+things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd&rsquo;.
+</p>
+<a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f">3.12 Which are good parameters for encoding high quality MPEG-1/MPEG-2?</a></h2>
+
+<p>&rsquo;-mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1/2&rsquo;
+but beware the &rsquo;-g 100&rsquo; might cause problems with some decoders.
+Things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd.
+</p>
+<a name="Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f">3.13 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?</a></h2>
+
+<p>You should use &rsquo;-flags +ilme+ildct&rsquo; and maybe &rsquo;-flags +alt&rsquo; for interlaced
+material, and try &rsquo;-top 0/1&rsquo; if the result looks really messed-up.
+</p>
+<a name="How-can-I-read-DirectShow-files_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-can-I-read-DirectShow-files_003f">3.14 How can I read DirectShow files?</a></h2>
+
+<p>If you have built FFmpeg with <code>./configure --enable-avisynth</code>
+(only possible on MinGW/Cygwin platforms),
+then you may use any file that DirectShow can read as input.
+</p>
+<p>Just create an &quot;input.avs&quot; text file with this single line ...
+</p><table><tr><td>&nbsp;</td><td><pre class="example">  DirectShowSource(&quot;C:\path to your file\yourfile.asf&quot;)
+</pre></td></tr></table>
+<p>... and then feed that text file to ffmpeg:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i input.avs
+</pre></td></tr></table>
+
+<p>For ANY other help on Avisynth, please visit the
+<a href="http://www.avisynth.org/">Avisynth homepage</a>.
+</p>
+<a name="How-can-I-join-video-files_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-can-I-join-video-files_003f">3.15 How can I join video files?</a></h2>
+
+<p>A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to join video files by
+merely concatenating them.
+</p>
+<p>Hence you may concatenate your multimedia files by first transcoding them to
+these privileged formats, then using the humble <code>cat</code> command (or the
+equally humble <code>copy</code> under Windows), and finally transcoding back to your
+format of choice.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input1.avi -sameq intermediate1.mpg
+ffmpeg -i input2.avi -sameq intermediate2.mpg
+cat intermediate1.mpg intermediate2.mpg &gt; intermediate_all.mpg
+ffmpeg -i intermediate_all.mpg -sameq output.avi
+</pre></td></tr></table>
+
+<p>Notice that you should either use <code>-sameq</code> or set a reasonably high
+bitrate for your intermediate and output files, if you want to preserve
+video quality.
+</p>
+<p>Also notice that you may avoid the huge intermediate files by taking advantage
+of named pipes, should your platform support it:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">mkfifo intermediate1.mpg
+mkfifo intermediate2.mpg
+ffmpeg -i input1.avi -sameq -y intermediate1.mpg &lt; /dev/null &amp;
+ffmpeg -i input2.avi -sameq -y intermediate2.mpg &lt; /dev/null &amp;
+cat intermediate1.mpg intermediate2.mpg |\
+ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
+</pre></td></tr></table>
+
+<p>Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
+allow concatenation, and the transcoding step is almost lossless.
+When using multiple yuv4mpegpipe(s), the first line needs to be discarded
+from all but the first stream. This can be accomplished by piping through
+<code>tail</code> as seen below. Note that when piping through <code>tail</code> you
+must use command grouping, <code>{  ;}</code>, to background properly.
+</p>
+<p>For example, let&rsquo;s say we want to join two FLV files into an output.flv file:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">mkfifo temp1.a
+mkfifo temp1.v
+mkfifo temp2.a
+mkfifo temp2.v
+mkfifo all.a
+mkfifo all.v
+ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp1.a &lt; /dev/null &amp;
+ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp2.a &lt; /dev/null &amp;
+ffmpeg -i input1.flv -an -f yuv4mpegpipe - &gt; temp1.v &lt; /dev/null &amp;
+{ ffmpeg -i input2.flv -an -f yuv4mpegpipe - &lt; /dev/null | tail -n +2 &gt; temp2.v ; } &amp;
+cat temp1.a temp2.a &gt; all.a &amp;
+cat temp1.v temp2.v &gt; all.v &amp;
+ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
+       -f yuv4mpegpipe -i all.v \
+       -sameq -y output.flv
+rm temp[12].[av] all.[av]
+</pre></td></tr></table>
+
+<a name="The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e"></a>
+<h2 class="section"><a href="faq.html#toc-The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e">3.16 The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.</a></h2>
+
+<p>Read the MPEG spec about video buffer verifier.
+</p>
+<a name="I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e">3.17 I want CBR, but no matter what I do frame sizes differ.</a></h2>
+
+<p>You do not understand what CBR is, please read the MPEG spec.
+Read about video buffer verifier and constant bitrate.
+The one sentence summary is that there is a buffer and the input rate is
+constant, the output can vary as needed.
+</p>
+<a name="How-do-I-check-if-a-stream-is-CBR_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-check-if-a-stream-is-CBR_003f">3.18 How do I check if a stream is CBR?</a></h2>
+
+<p>To quote the MPEG-2 spec:
+&quot;There is no way to tell that a bitstream is constant bitrate without
+examining all of the vbv_delay values and making complicated computations.&quot;
+</p>
+
+<a name="Development"></a>
+<h1 class="chapter"><a href="faq.html#toc-Development">4. Development</a></h1>
+
+<a name="Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?</a></h2>
+
+<p>Yes. Read the Developers Guide of the FFmpeg documentation. Alternatively,
+examine the source code for one of the many open source projects that
+already incorporate FFmpeg at (<a href="projects.html">projects.html</a>).
+</p>
+<a name="Can-you-support-my-C-compiler-XXX_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Can-you-support-my-C-compiler-XXX_003f">4.2 Can you support my C compiler XXX?</a></h2>
+
+<p>It depends. If your compiler is C99-compliant, then patches to support
+it are likely to be welcome if they do not pollute the source code
+with <code>#ifdef</code>s related to the compiler.
+</p>
+<a name="Is-Microsoft-Visual-C_002b_002b-supported_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Is-Microsoft-Visual-C_002b_002b-supported_003f">4.3 Is Microsoft Visual C++ supported?</a></h2>
+
+<p>No. Microsoft Visual C++ is not compliant to the C99 standard and does
+not - among other things - support the inline assembly used in FFmpeg.
+If you wish to use MSVC++ for your
+project then you can link the MSVC++ code with libav* as long as
+you compile the latter with a working C compiler. For more information, see
+the <em>Microsoft Visual C++ compatibility</em> section in the FFmpeg
+documentation.
+</p>
+<p>There have been efforts to make FFmpeg compatible with MSVC++ in the
+past. However, they have all been rejected as too intrusive, especially
+since MinGW does the job adequately. None of the core developers
+work with MSVC++ and thus this item is low priority. Should you find
+the silver bullet that solves this problem, feel free to shoot it at us.
+</p>
+<p>We strongly recommend you to move over from MSVC++ to MinGW tools.
+</p>
+<a name="Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f">4.4 Can I use FFmpeg or libavcodec under Windows?</a></h2>
+
+<p>Yes, but the Cygwin or MinGW tools <em>must</em> be used to compile FFmpeg.
+Read the <em>Windows</em> section in the FFmpeg documentation to find more
+information.
+</p>
+<p>To get help and instructions for building FFmpeg under Windows, check out
+the FFmpeg Windows Help Forum at
+<a href="http://ffmpeg.arrozcru.org/">http://ffmpeg.arrozcru.org/</a>.
+</p>
+<a name="Can-you-add-automake_002c-libtool-or-autoconf-support_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f">4.5 Can you add automake, libtool or autoconf support?</a></h2>
+
+<p>No. These tools are too bloated and they complicate the build.
+</p>
+<a name="Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f">4.6 Why not rewrite ffmpeg in object-oriented C++?</a></h2>
+
+<p>FFmpeg is already organized in a highly modular manner and does not need to
+be rewritten in a formal object language. Further, many of the developers
+favor straight C; it works for them. For more arguments on this matter,
+read <a href="http://www.tux.org/lkml/#s15">&quot;Programming Religion&quot;</a>.
+</p>
+<a name="Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f">4.7 Why are the ffmpeg programs devoid of debugging symbols?</a></h2>
+
+<p>The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
+information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
+you need the debug information, use the *_g versions.
+</p>
+<a name="I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f"></a>
+<h2 class="section"><a href="faq.html#toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f">4.8 I do not like the LGPL, can I contribute code under the GPL instead?</a></h2>
+
+<p>Yes, as long as the code is optional and can easily and cleanly be placed
+under #if CONFIG_GPL without breaking anything. So for example a new codec
+or filter would be OK under GPL while a bug fix to LGPL code would not.
+</p>
+<a name="I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e">4.9 I want to compile xyz.c alone but my compiler produced many errors.</a></h2>
+
+<p>Common code is in its own files in libav* and is used by the individual
+codecs. They will not work without the common parts, you have to compile
+the whole libav*. If you wish, disable some parts with configure switches.
+You can also try to hack it and remove more, but if you had problems fixing
+the compilation failure then you are probably not qualified for this.
+</p>
+<a name="I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e">4.10 I&rsquo;m using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.</a></h2>
+
+<p>FFmpeg is a pure C project, so to use the libraries within your C++ application
+you need to explicitly state that you are using a C library. You can do this by
+encompassing your FFmpeg includes using <code>extern &quot;C&quot;</code>.
+</p>
+<p>See <a href="http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3">http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3</a>
+</p>
+<a name="I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f"></a>
+<h2 class="section"><a href="faq.html#toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?</a></h2>
+
+<p>You have to implement a URLProtocol, see &lsquo;<tt>libavformat/file.c</tt>&rsquo; in
+FFmpeg and &lsquo;<tt>libmpdemux/demux_lavf.c</tt>&rsquo; in MPlayer sources.
+</p>
+<a name="I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e">4.12 I get &quot;No compatible shell script interpreter found.&quot; in MSys.</a></h2>
+
+<p>The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
+</p>
+<a name="I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e"></a>
+<h2 class="section"><a href="faq.html#toc-I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e">4.13 I get &quot;./configure: line &lt;xxx&gt;: pr: command not found&quot; in MSys.</a></h2>
+
+<p>The standard MSys install doesn&rsquo;t come with pr. You need to get it from the coreutils package.
+</p>
+<a name="Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f">4.14 Where can I find libav* headers for Pascal/Delphi?</a></h2>
+
+<p>see <a href="http://www.iversenit.dk/dev/ffmpeg-headers/">http://www.iversenit.dk/dev/ffmpeg-headers/</a>
+</p>
+<a name="Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f"></a>
+<h2 class="section"><a href="faq.html#toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f">4.15 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?</a></h2>
+
+<p>see <a href="http://www.ffmpeg.org/~michael/">http://www.ffmpeg.org/~michael/</a>
+</p>
+<a name="How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f"></a>
+<h2 class="section"><a href="faq.html#toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f">4.16 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?</a></h2>
+
+<p>Even if peculiar since it is network oriented, RTP is a container like any
+other. You have to <em>demux</em> RTP before feeding the payload to libavcodec.
+In this specific case please look at RFC 4629 to see how it should be done.
+</p>
+<a name="AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e"></a>
+<h2 class="section"><a href="faq.html#toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e">4.17 AVStream.r_frame_rate is wrong, it is much larger than the framerate.</a></h2>
+
+<p>r_frame_rate is NOT the average framerate, it is the smallest framerate
+that can accurately represent all timestamps. So no, it is not
+wrong if it is larger than the average!
+For example, if you have mixed 25 and 30 fps content, then r_frame_rate
+will be 150.
+</p>
+<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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/ffmpeg.html b/ffmpeg 0.8/doc/ffmpeg.html
new file mode 100644 (file)
index 0000000..298a47f
--- /dev/null
@@ -0,0 +1,6225 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>ffmpeg Documentation</title>
+
+<meta name="description" content="ffmpeg Documentation">
+<meta name="keywords" content="ffmpeg Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">ffmpeg Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<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>
+  <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>
+  </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-Video-and-Audio-grabbing" href="#Video-and-Audio-grabbing">5.1 Video and Audio grabbing</a></li>
+    <li><a name="toc-X11-grabbing" href="#X11-grabbing">5.2 X11 grabbing</a></li>
+    <li><a name="toc-Video-and-Audio-file-format-conversion" href="#Video-and-Audio-file-format-conversion">5.3 Video and Audio file format conversion</a></li>
+  </ul></li>
+  <li><a name="toc-Expression-Evaluation" href="#Expression-Evaluation">6. Expression Evaluation</a></li>
+  <li><a name="toc-Decoders" href="#Decoders">7. Decoders</a></li>
+  <li><a name="toc-Video-Decoders" href="#Video-Decoders">8. Video Decoders</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>
+    </ul>
+</li>
+  </ul></li>
+  <li><a name="toc-Encoders" href="#Encoders">9. Encoders</a></li>
+  <li><a name="toc-Audio-Encoders" href="#Audio-Encoders">10. Audio Encoders</a>
+  <ul class="toc">
+    <li><a name="toc-ac3-and-ac3_005ffixed" href="#ac3-and-ac3_005ffixed">10.1 ac3 and ac3_fixed</a>
+    <ul class="toc">
+      <li><a name="toc-AC_002d3-Metadata" href="#AC_002d3-Metadata">10.1.1 AC-3 Metadata</a>
+      <ul class="toc">
+        <li><a name="toc-Metadata-Control-Options" href="#Metadata-Control-Options">10.1.1.1 Metadata Control Options</a></li>
+        <li><a name="toc-Downmix-Levels" href="#Downmix-Levels">10.1.1.2 Downmix Levels</a></li>
+        <li><a name="toc-Audio-Production-Information" href="#Audio-Production-Information">10.1.1.3 Audio Production Information</a></li>
+        <li><a name="toc-Other-Metadata-Options" href="#Other-Metadata-Options">10.1.1.4 Other Metadata Options</a></li>
+      </ul></li>
+      <li><a name="toc-Extended-Bitstream-Information" href="#Extended-Bitstream-Information">10.1.2 Extended Bitstream Information</a>
+      <ul class="toc">
+        <li><a name="toc-Extended-Bitstream-Information-_002d-Part-1" href="#Extended-Bitstream-Information-_002d-Part-1">10.1.2.1 Extended Bitstream Information - Part 1</a></li>
+        <li><a name="toc-Extended-Bitstream-Information-_002d-Part-2" href="#Extended-Bitstream-Information-_002d-Part-2">10.1.2.2 Extended Bitstream Information - Part 2</a></li>
+      </ul></li>
+      <li><a name="toc-Other-AC_002d3-Encoding-Options" href="#Other-AC_002d3-Encoding-Options">10.1.3 Other AC-3 Encoding Options</a></li>
+      <li><a name="toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options" href="#Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">10.1.4 Floating-Point-Only AC-3 Encoding Options</a></li>
+    </ul>
+</li>
+  </ul></li>
+  <li><a name="toc-Video-Encoders" href="#Video-Encoders">11. Video Encoders</a>
+  <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>
+    </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>
+    </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>
+  </ul></li>
+  <li><a name="toc-Muxers" href="#Muxers">13. Muxers</a>
+  <ul class="toc">
+    <li><a name="toc-crc-1" href="#crc-1">13.1 crc</a></li>
+    <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-matroska" href="#matroska">13.6 matroska</a></li>
+  </ul></li>
+  <li><a name="toc-Input-Devices" href="#Input-Devices">14. Input Devices</a>
+  <ul class="toc">
+    <li><a name="toc-alsa-1" href="#alsa-1">14.1 alsa</a></li>
+    <li><a name="toc-bktr" href="#bktr">14.2 bktr</a></li>
+    <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>
+    <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>
+    </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>
+  </ul></li>
+  <li><a name="toc-Output-Devices" href="#Output-Devices">15. Output Devices</a>
+  <ul class="toc">
+    <li><a name="toc-alsa" href="#alsa">15.1 alsa</a></li>
+    <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-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>
+  </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-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>
+    <li><a name="toc-http" href="#http">16.5 http</a></li>
+    <li><a name="toc-mmst" href="#mmst">16.6 mmst</a></li>
+    <li><a name="toc-mmsh" href="#mmsh">16.7 mmsh</a></li>
+    <li><a name="toc-md5" href="#md5">16.8 md5</a></li>
+    <li><a name="toc-pipe" href="#pipe">16.9 pipe</a></li>
+    <li><a name="toc-rtmp" href="#rtmp">16.10 rtmp</a></li>
+    <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">16.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
+    <li><a name="toc-rtp" href="#rtp">16.12 rtp</a></li>
+    <li><a name="toc-rtsp" href="#rtsp">16.13 rtsp</a></li>
+    <li><a name="toc-sap" href="#sap">16.14 sap</a>
+    <ul class="toc">
+      <li><a name="toc-Muxer" href="#Muxer">16.14.1 Muxer</a></li>
+      <li><a name="toc-Demuxer" href="#Demuxer">16.14.2 Demuxer</a></li>
+    </ul></li>
+    <li><a name="toc-tcp" href="#tcp">16.15 tcp</a></li>
+    <li><a name="toc-udp" href="#udp">16.16 udp</a></li>
+  </ul></li>
+  <li><a name="toc-Bitstream-Filters" href="#Bitstream-Filters">17. Bitstream Filters</a>
+  <ul class="toc">
+    <li><a name="toc-aac_005fadtstoasc" href="#aac_005fadtstoasc">17.1 aac_adtstoasc</a></li>
+    <li><a name="toc-chomp" href="#chomp">17.2 chomp</a></li>
+    <li><a name="toc-dump_005fextradata" href="#dump_005fextradata">17.3 dump_extradata</a></li>
+    <li><a name="toc-h264_005fmp4toannexb" href="#h264_005fmp4toannexb">17.4 h264_mp4toannexb</a></li>
+    <li><a name="toc-imx_005fdump_005fheader" href="#imx_005fdump_005fheader">17.5 imx_dump_header</a></li>
+    <li><a name="toc-mjpeg2jpeg" href="#mjpeg2jpeg">17.6 mjpeg2jpeg</a></li>
+    <li><a name="toc-mjpega_005fdump_005fheader" href="#mjpega_005fdump_005fheader">17.7 mjpega_dump_header</a></li>
+    <li><a name="toc-movsub" href="#movsub">17.8 movsub</a></li>
+    <li><a name="toc-mp3_005fheader_005fcompress" href="#mp3_005fheader_005fcompress">17.9 mp3_header_compress</a></li>
+    <li><a name="toc-mp3_005fheader_005fdecompress" href="#mp3_005fheader_005fdecompress">17.10 mp3_header_decompress</a></li>
+    <li><a name="toc-noise" href="#noise">17.11 noise</a></li>
+    <li><a name="toc-remove_005fextradata" href="#remove_005fextradata">17.12 remove_extradata</a></li>
+  </ul></li>
+  <li><a name="toc-Filtergraph-description" href="#Filtergraph-description">18. Filtergraph description</a>
+  <ul class="toc">
+    <li><a name="toc-Filtergraph-syntax" href="#Filtergraph-syntax">18.1 Filtergraph syntax</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>
+  </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Filters" href="#Video-Filters">22. Video Filters</a>
+  <ul class="toc">
+    <li><a name="toc-blackframe" href="#blackframe">22.1 blackframe</a></li>
+    <li><a name="toc-boxblur" href="#boxblur">22.2 boxblur</a></li>
+    <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>
+    <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>
+    </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Sinks" href="#Video-Sinks">24. Video Sinks</a>
+  <ul class="toc">
+    <li><a name="toc-buffersink" href="#buffersink">24.1 buffersink</a></li>
+    <li><a name="toc-nullsink" href="#nullsink">24.2 nullsink</a></li>
+  </ul></li>
+  <li><a name="toc-Metadata" href="#Metadata">25. Metadata</a></li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="Synopsis"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Synopsis">1. Synopsis</a></h1>
+
+<p>The generic syntax is:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg [[infile options][&lsquo;<samp>-i</samp>&rsquo; <var>infile</var>]]... {[outfile options] <var>outfile</var>}...
+</pre></td></tr></table>
+
+<a name="Description"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Description">2. Description</a></h1>
+
+<p>ffmpeg is a very fast video and audio converter that can also grab from
+a live audio/video source. It can also convert between arbitrary sample
+rates and resize video on the fly with a high quality polyphase filter.
+</p>
+<p>The command line interface is designed to be intuitive, in the sense
+that ffmpeg tries to figure out all parameters that can possibly be
+derived automatically. You usually only have to specify the target
+bitrate you want.
+</p>
+<p>As a general rule, options are applied to the next specified
+file. Therefore, order is important, and you can have the same
+option on the command line multiple times. Each occurrence is
+then applied to the next input or output file.
+</p>
+<ul>
+<li>
+To set the video bitrate of the output file to 64kbit/s:
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.avi -b 64k output.avi
+</pre></td></tr></table>
+
+</li><li>
+To force the frame rate of the output file to 24 fps:
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.avi -r 24 output.avi
+</pre></td></tr></table>
+
+</li><li>
+To force the frame rate of the input file (valid for raw formats only)
+to 1 fps and the frame rate of the output file to 24 fps:
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -r 1 -i input.m2v -r 24 output.avi
+</pre></td></tr></table>
+</li></ul>
+
+<p>The format option may be needed for raw input files.
+</p>
+<p>By default ffmpeg tries to convert as losslessly as possible: It
+uses the same audio and video parameters for the outputs as the one
+specified for the inputs.
+</p>
+
+<a name="Options-5"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Options-5">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
+International System number postfixes, for example &rsquo;K&rsquo;, &rsquo;M&rsquo;, &rsquo;G&rsquo;.
+If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used instead of
+powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8, and can be
+appended after another postfix or used alone. This allows using for
+example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
+</p>
+<p>Options which do not take arguments are boolean options, and set the
+corresponding value to true. They can be set to false by prefixing
+with &quot;no&quot; the option name, for example using &quot;-nofoo&quot; in the
+commandline will set to false the boolean option with name &quot;foo&quot;.
+</p>
+<a name="Generic-options"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Generic-options">3.1 Generic options</a></h2>
+
+<p>These options are shared amongst the ff* tools.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-L</samp>&rsquo;</dt>
+<dd><p>Show license.
+</p>
+</dd>
+<dt> &lsquo;<samp>-h, -?, -help, --help</samp>&rsquo;</dt>
+<dd><p>Show help.
+</p>
+</dd>
+<dt> &lsquo;<samp>-version</samp>&rsquo;</dt>
+<dd><p>Show version.
+</p>
+</dd>
+<dt> &lsquo;<samp>-formats</samp>&rsquo;</dt>
+<dd><p>Show available formats.
+</p>
+<p>The fields preceding the format names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-codecs</samp>&rsquo;</dt>
+<dd><p>Show available codecs.
+</p>
+<p>The fields preceding the codec names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+<dt> &lsquo;<samp>V/A/S</samp>&rsquo;</dt>
+<dd><p>Video/audio/subtitle codec
+</p></dd>
+<dt> &lsquo;<samp>S</samp>&rsquo;</dt>
+<dd><p>Codec supports slices
+</p></dd>
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Codec supports direct rendering
+</p></dd>
+<dt> &lsquo;<samp>T</samp>&rsquo;</dt>
+<dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-bsfs</samp>&rsquo;</dt>
+<dd><p>Show available bitstream filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-protocols</samp>&rsquo;</dt>
+<dd><p>Show available protocols.
+</p>
+</dd>
+<dt> &lsquo;<samp>-filters</samp>&rsquo;</dt>
+<dd><p>Show available libavfilter filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-pix_fmts</samp>&rsquo;</dt>
+<dd><p>Show available pixel formats.
+</p>
+</dd>
+<dt> &lsquo;<samp>-loglevel <var>loglevel</var></samp>&rsquo;</dt>
+<dd><p>Set the logging level used by the library.
+<var>loglevel</var> is a number or a string containing one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>quiet</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>panic</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>fatal</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>error</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>warning</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>info</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>verbose</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>debug</samp>&rsquo;</dt>
+</dl>
+
+<p>By default the program logs to stderr, if coloring is supported by the
+terminal, colors are used to mark errors and warnings. Log coloring
+can be disabled setting the environment variable
+<code>FFMPEG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
+the environment variable <code>FFMPEG_FORCE_COLOR</code>.
+The use of the environment variable <code>NO_COLOR</code> is deprecated and
+will be dropped in a following FFmpeg version.
+</p>
+</dd>
+</dl>
+
+<a name="Main-options"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Main-options">3.2 Main options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-f <var>fmt</var></samp>&rsquo;</dt>
+<dd><p>Force format.
+</p>
+</dd>
+<dt> &lsquo;<samp>-i <var>filename</var></samp>&rsquo;</dt>
+<dd><p>input file name
+</p>
+</dd>
+<dt> &lsquo;<samp>-y</samp>&rsquo;</dt>
+<dd><p>Overwrite output files.
+</p>
+</dd>
+<dt> &lsquo;<samp>-t <var>duration</var></samp>&rsquo;</dt>
+<dd><p>Restrict the transcoded/captured video sequence
+to the duration specified in seconds.
+<code>hh:mm:ss[.xxx]</code> syntax is also supported.
+</p>
+</dd>
+<dt> &lsquo;<samp>-fs <var>limit_size</var></samp>&rsquo;</dt>
+<dd><p>Set the file size limit.
+</p>
+</dd>
+<dt> &lsquo;<samp>-ss <var>position</var></samp>&rsquo;</dt>
+<dd><p>Seek to given time position in seconds.
+<code>hh:mm:ss[.xxx]</code> syntax is also supported.
+</p>
+</dd>
+<dt> &lsquo;<samp>-itsoffset <var>offset</var></samp>&rsquo;</dt>
+<dd><p>Set the input time offset in seconds.
+<code>[-]hh:mm:ss[.xxx]</code> syntax is also supported.
+This option affects all the input files that follow it.
+The offset is added to the timestamps of the input files.
+Specifying a positive offset means that the corresponding
+streams are delayed by &rsquo;offset&rsquo; seconds.
+</p>
+</dd>
+<dt> &lsquo;<samp>-timestamp <var>time</var></samp>&rsquo;</dt>
+<dd><p>Set the recording timestamp in the container.
+The syntax for <var>time</var> is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">now|([(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH[:MM[:SS[.m...]]])|(HH[MM[SS[.m...]]]))[Z|z])
+</pre></td></tr></table>
+<p>If the value is &quot;now&quot; it takes the current time.
+Time is local time unless &rsquo;Z&rsquo; or &rsquo;z&rsquo; is appended, in which case it is
+interpreted as UTC.
+If the year-month-day part is not specified it takes the current
+year-month-day.
+</p>
+</dd>
+<dt> &lsquo;<samp>-metadata <var>key</var>=<var>value</var></samp>&rsquo;</dt>
+<dd><p>Set a metadata key/value pair.
+</p>
+<p>For example, for setting the title in the output file:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -metadata title=&quot;my title&quot; out.flv
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>-v <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the logging verbosity level.
+</p>
+</dd>
+<dt> &lsquo;<samp>-target <var>type</var></samp>&rsquo;</dt>
+<dd><p>Specify target file type (&quot;vcd&quot;, &quot;svcd&quot;, &quot;dvd&quot;, &quot;dv&quot;, &quot;dv50&quot;, &quot;pal-vcd&quot;,
+&quot;ntsc-svcd&quot;, ... ). All the format options (bitrate, codecs,
+buffer sizes) are then set automatically. You can just type:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
+</pre></td></tr></table>
+
+<p>Nevertheless you can specify additional options as long as you know
+they do not conflict with the standard, as in:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>-dframes <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the number of data frames to record.
+</p>
+</dd>
+<dt> &lsquo;<samp>-scodec <var>codec</var></samp>&rsquo;</dt>
+<dd><p>Force subtitle codec (&rsquo;copy&rsquo; to copy stream).
+</p>
+</dd>
+<dt> &lsquo;<samp>-newsubtitle</samp>&rsquo;</dt>
+<dd><p>Add a new subtitle stream to the current output stream.
+</p>
+</dd>
+<dt> &lsquo;<samp>-slang <var>code</var></samp>&rsquo;</dt>
+<dd><p>Set the ISO 639 language code (3 letters) of the current subtitle stream.
+</p>
+</dd>
+</dl>
+
+<a name="Video-Options"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Video-Options">3.3 Video Options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-vframes <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the number of video frames to record.
+</p></dd>
+<dt> &lsquo;<samp>-r <var>fps</var></samp>&rsquo;</dt>
+<dd><p>Set frame rate (Hz value, fraction or abbreviation), (default = 25).
+</p></dd>
+<dt> &lsquo;<samp>-s <var>size</var></samp>&rsquo;</dt>
+<dd><p>Set frame size. The format is &lsquo;<samp>wxh</samp>&rsquo; (ffserver default = 160x128).
+There is no default for input streams,
+for output streams it is set by default to the size of the source stream.
+The following abbreviations are recognized:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>sqcif</samp>&rsquo;</dt>
+<dd><p>128x96
+</p></dd>
+<dt> &lsquo;<samp>qcif</samp>&rsquo;</dt>
+<dd><p>176x144
+</p></dd>
+<dt> &lsquo;<samp>cif</samp>&rsquo;</dt>
+<dd><p>352x288
+</p></dd>
+<dt> &lsquo;<samp>4cif</samp>&rsquo;</dt>
+<dd><p>704x576
+</p></dd>
+<dt> &lsquo;<samp>16cif</samp>&rsquo;</dt>
+<dd><p>1408x1152
+</p></dd>
+<dt> &lsquo;<samp>qqvga</samp>&rsquo;</dt>
+<dd><p>160x120
+</p></dd>
+<dt> &lsquo;<samp>qvga</samp>&rsquo;</dt>
+<dd><p>320x240
+</p></dd>
+<dt> &lsquo;<samp>vga</samp>&rsquo;</dt>
+<dd><p>640x480
+</p></dd>
+<dt> &lsquo;<samp>svga</samp>&rsquo;</dt>
+<dd><p>800x600
+</p></dd>
+<dt> &lsquo;<samp>xga</samp>&rsquo;</dt>
+<dd><p>1024x768
+</p></dd>
+<dt> &lsquo;<samp>uxga</samp>&rsquo;</dt>
+<dd><p>1600x1200
+</p></dd>
+<dt> &lsquo;<samp>qxga</samp>&rsquo;</dt>
+<dd><p>2048x1536
+</p></dd>
+<dt> &lsquo;<samp>sxga</samp>&rsquo;</dt>
+<dd><p>1280x1024
+</p></dd>
+<dt> &lsquo;<samp>qsxga</samp>&rsquo;</dt>
+<dd><p>2560x2048
+</p></dd>
+<dt> &lsquo;<samp>hsxga</samp>&rsquo;</dt>
+<dd><p>5120x4096
+</p></dd>
+<dt> &lsquo;<samp>wvga</samp>&rsquo;</dt>
+<dd><p>852x480
+</p></dd>
+<dt> &lsquo;<samp>wxga</samp>&rsquo;</dt>
+<dd><p>1366x768
+</p></dd>
+<dt> &lsquo;<samp>wsxga</samp>&rsquo;</dt>
+<dd><p>1600x1024
+</p></dd>
+<dt> &lsquo;<samp>wuxga</samp>&rsquo;</dt>
+<dd><p>1920x1200
+</p></dd>
+<dt> &lsquo;<samp>woxga</samp>&rsquo;</dt>
+<dd><p>2560x1600
+</p></dd>
+<dt> &lsquo;<samp>wqsxga</samp>&rsquo;</dt>
+<dd><p>3200x2048
+</p></dd>
+<dt> &lsquo;<samp>wquxga</samp>&rsquo;</dt>
+<dd><p>3840x2400
+</p></dd>
+<dt> &lsquo;<samp>whsxga</samp>&rsquo;</dt>
+<dd><p>6400x4096
+</p></dd>
+<dt> &lsquo;<samp>whuxga</samp>&rsquo;</dt>
+<dd><p>7680x4800
+</p></dd>
+<dt> &lsquo;<samp>cga</samp>&rsquo;</dt>
+<dd><p>320x200
+</p></dd>
+<dt> &lsquo;<samp>ega</samp>&rsquo;</dt>
+<dd><p>640x350
+</p></dd>
+<dt> &lsquo;<samp>hd480</samp>&rsquo;</dt>
+<dd><p>852x480
+</p></dd>
+<dt> &lsquo;<samp>hd720</samp>&rsquo;</dt>
+<dd><p>1280x720
+</p></dd>
+<dt> &lsquo;<samp>hd1080</samp>&rsquo;</dt>
+<dd><p>1920x1080
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-aspect <var>aspect</var></samp>&rsquo;</dt>
+<dd><p>Set the video display aspect ratio specified by <var>aspect</var>.
+</p>
+<p><var>aspect</var> can be a floating point number string, or a string of the
+form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio. For example &quot;4:3&quot;,
+&quot;16:9&quot;, &quot;1.3333&quot;, and &quot;1.7777&quot; are valid argument values.
+</p>
+</dd>
+<dt> &lsquo;<samp>-croptop <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-cropbottom <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-cropleft <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-cropright <var>size</var></samp>&rsquo;</dt>
+<dd><p>All the crop options have been removed. Use -vf
+crop=width:height:x:y instead.
+</p>
+</dd>
+<dt> &lsquo;<samp>-padtop <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-padbottom <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-padleft <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-padright <var>size</var></samp>&rsquo;</dt>
+<dt> &lsquo;<samp>-padcolor <var>hex_color</var></samp>&rsquo;</dt>
+<dd><p>All the pad options have been removed. Use -vf
+pad=width:height:x:y:color instead.
+</p></dd>
+<dt> &lsquo;<samp>-vn</samp>&rsquo;</dt>
+<dd><p>Disable video recording.
+</p></dd>
+<dt> &lsquo;<samp>-bt <var>tolerance</var></samp>&rsquo;</dt>
+<dd><p>Set video bitrate tolerance (in bits, default 4000k).
+Has a minimum value of: (target_bitrate/target_framerate).
+In 1-pass mode, bitrate tolerance specifies how far ratecontrol is
+willing to deviate from the target average bitrate value. This is
+not related to min/max bitrate. Lowering tolerance too much has
+an adverse effect on quality.
+</p></dd>
+<dt> &lsquo;<samp>-maxrate <var>bitrate</var></samp>&rsquo;</dt>
+<dd><p>Set max video bitrate (in bit/s).
+Requires -bufsize to be set.
+</p></dd>
+<dt> &lsquo;<samp>-minrate <var>bitrate</var></samp>&rsquo;</dt>
+<dd><p>Set min video bitrate (in bit/s).
+Most useful in setting up a CBR encode:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
+</pre></td></tr></table>
+<p>It is of little use elsewise.
+</p></dd>
+<dt> &lsquo;<samp>-bufsize <var>size</var></samp>&rsquo;</dt>
+<dd><p>Set video buffer verifier buffer size (in bits).
+</p></dd>
+<dt> &lsquo;<samp>-vcodec <var>codec</var></samp>&rsquo;</dt>
+<dd><p>Force video codec to <var>codec</var>. Use the <code>copy</code> special value to
+tell that the raw codec data must be copied as is.
+</p></dd>
+<dt> &lsquo;<samp>-sameq</samp>&rsquo;</dt>
+<dd><p>Use same quantizer as source (implies VBR).
+</p>
+</dd>
+<dt> &lsquo;<samp>-pass <var>n</var></samp>&rsquo;</dt>
+<dd><p>Select the pass number (1 or 2). It is used to do two-pass
+video encoding. The statistics of the video are recorded in the first
+pass into a log file (see also the option -passlogfile),
+and in the second pass that log file is used to generate the video
+at the exact requested bitrate.
+On pass 1, you may just deactivate audio and set output to null,
+examples for Windows and Unix:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y NUL
+ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y /dev/null
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>-passlogfile <var>prefix</var></samp>&rsquo;</dt>
+<dd><p>Set two-pass log file name prefix to <var>prefix</var>, the default file name
+prefix is &ldquo;ffmpeg2pass&rdquo;. The complete file name will be
+&lsquo;<tt>PREFIX-N.log</tt>&rsquo;, where N is a number specific to the output
+stream.
+</p>
+</dd>
+<dt> &lsquo;<samp>-newvideo</samp>&rsquo;</dt>
+<dd><p>Add a new video stream to the current output stream.
+</p>
+</dd>
+<dt> &lsquo;<samp>-vlang <var>code</var></samp>&rsquo;</dt>
+<dd><p>Set the ISO 639 language code (3 letters) of the current video stream.
+</p>
+</dd>
+<dt> &lsquo;<samp>-vf <var>filter_graph</var></samp>&rsquo;</dt>
+<dd><p><var>filter_graph</var> is a description of the filter graph to apply to
+the input video.
+Use the option &quot;-filters&quot; to show all the available filters (including
+also sources and sinks).
+</p>
+</dd>
+</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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-pix_fmt <var>format</var></samp>&rsquo;</dt>
+<dd><p>Set pixel format. Use &rsquo;list&rsquo; as parameter to show all the supported
+pixel formats.
+</p></dd>
+<dt> &lsquo;<samp>-sws_flags <var>flags</var></samp>&rsquo;</dt>
+<dd><p>Set SwScaler flags.
+</p></dd>
+<dt> &lsquo;<samp>-g <var>gop_size</var></samp>&rsquo;</dt>
+<dd><p>Set the group of pictures size.
+</p></dd>
+<dt> &lsquo;<samp>-intra</samp>&rsquo;</dt>
+<dd><p>Use only intra frames.
+</p></dd>
+<dt> &lsquo;<samp>-vdt <var>n</var></samp>&rsquo;</dt>
+<dd><p>Discard threshold.
+</p></dd>
+<dt> &lsquo;<samp>-qscale <var>q</var></samp>&rsquo;</dt>
+<dd><p>Use fixed video quantizer scale (VBR).
+</p></dd>
+<dt> &lsquo;<samp>-qmin <var>q</var></samp>&rsquo;</dt>
+<dd><p>minimum video quantizer scale (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-qmax <var>q</var></samp>&rsquo;</dt>
+<dd><p>maximum video quantizer scale (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-qdiff <var>q</var></samp>&rsquo;</dt>
+<dd><p>maximum difference between the quantizer scales (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-qblur <var>blur</var></samp>&rsquo;</dt>
+<dd><p>video quantizer scale blur (VBR) (range 0.0 - 1.0)
+</p></dd>
+<dt> &lsquo;<samp>-qcomp <var>compression</var></samp>&rsquo;</dt>
+<dd><p>video quantizer scale compression (VBR) (default 0.5).
+Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
+</p>
+</dd>
+<dt> &lsquo;<samp>-lmin <var>lambda</var></samp>&rsquo;</dt>
+<dd><p>minimum video lagrange factor (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-lmax <var>lambda</var></samp>&rsquo;</dt>
+<dd><p>max video lagrange factor (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-mblmin <var>lambda</var></samp>&rsquo;</dt>
+<dd><p>minimum macroblock quantizer scale (VBR)
+</p></dd>
+<dt> &lsquo;<samp>-mblmax <var>lambda</var></samp>&rsquo;</dt>
+<dd><p>maximum macroblock quantizer scale (VBR)
+</p>
+<p>These four options (lmin, lmax, mblmin, mblmax) use &rsquo;lambda&rsquo; units,
+but you may use the QP2LAMBDA constant to easily convert from &rsquo;q&rsquo; units:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>-rc_init_cplx <var>complexity</var></samp>&rsquo;</dt>
+<dd><p>initial complexity for single pass encoding
+</p></dd>
+<dt> &lsquo;<samp>-b_qfactor <var>factor</var></samp>&rsquo;</dt>
+<dd><p>qp factor between P- and B-frames
+</p></dd>
+<dt> &lsquo;<samp>-i_qfactor <var>factor</var></samp>&rsquo;</dt>
+<dd><p>qp factor between P- and I-frames
+</p></dd>
+<dt> &lsquo;<samp>-b_qoffset <var>offset</var></samp>&rsquo;</dt>
+<dd><p>qp offset between P- and B-frames
+</p></dd>
+<dt> &lsquo;<samp>-i_qoffset <var>offset</var></samp>&rsquo;</dt>
+<dd><p>qp offset between P- and I-frames
+</p></dd>
+<dt> &lsquo;<samp>-rc_eq <var>equation</var></samp>&rsquo;</dt>
+<dd><p>Set rate control equation (see section &quot;Expression Evaluation&quot;)
+(default = <code>tex^qComp</code>).
+</p>
+<p>When computing the rate control equation expression, besides the
+standard functions defined in the section &quot;Expression Evaluation&quot;, the
+following functions are available:
+</p><dl compact="compact">
+<dt> <var>bits2qp(bits)</var></dt>
+<dt> <var>qp2bits(qp)</var></dt>
+</dl>
+
+<p>and the following constants are available:
+</p><dl compact="compact">
+<dt> <var>iTex</var></dt>
+<dt> <var>pTex</var></dt>
+<dt> <var>tex</var></dt>
+<dt> <var>mv</var></dt>
+<dt> <var>fCode</var></dt>
+<dt> <var>iCount</var></dt>
+<dt> <var>mcVar</var></dt>
+<dt> <var>var</var></dt>
+<dt> <var>isI</var></dt>
+<dt> <var>isP</var></dt>
+<dt> <var>isB</var></dt>
+<dt> <var>avgQP</var></dt>
+<dt> <var>qComp</var></dt>
+<dt> <var>avgIITex</var></dt>
+<dt> <var>avgPITex</var></dt>
+<dt> <var>avgPPTex</var></dt>
+<dt> <var>avgBPTex</var></dt>
+<dt> <var>avgTex</var></dt>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-rc_override <var>override</var></samp>&rsquo;</dt>
+<dd><p>Rate control override for specific intervals, formated as &quot;int,int,int&quot;
+list separated with slashes. Two first values are the beginning and
+end frame numbers, last one is quantizer to use if positive, or quality
+factor if negative.
+</p></dd>
+<dt> &lsquo;<samp>-me_method <var>method</var></samp>&rsquo;</dt>
+<dd><p>Set motion estimation method to <var>method</var>.
+Available methods are (from lowest to best quality):
+</p><dl compact="compact">
+<dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
+<dd><p>Try just the (0, 0) vector.
+</p></dd>
+<dt> &lsquo;<samp>phods</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>log</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>x1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>hex</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>umh</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>epzs</samp>&rsquo;</dt>
+<dd><p>(default method)
+</p></dd>
+<dt> &lsquo;<samp>full</samp>&rsquo;</dt>
+<dd><p>exhaustive search (slow and marginally better than epzs)
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-dct_algo <var>algo</var></samp>&rsquo;</dt>
+<dd><p>Set DCT algorithm to <var>algo</var>. Available values are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>FF_DCT_AUTO (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>FF_DCT_FASTINT
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>FF_DCT_INT
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>FF_DCT_MMX
+</p></dd>
+<dt> &lsquo;<samp>4</samp>&rsquo;</dt>
+<dd><p>FF_DCT_MLIB
+</p></dd>
+<dt> &lsquo;<samp>5</samp>&rsquo;</dt>
+<dd><p>FF_DCT_ALTIVEC
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-idct_algo <var>algo</var></samp>&rsquo;</dt>
+<dd><p>Set IDCT algorithm to <var>algo</var>. Available values are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_AUTO (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_INT
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_SIMPLE
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_SIMPLEMMX
+</p></dd>
+<dt> &lsquo;<samp>4</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_LIBMPEG2MMX
+</p></dd>
+<dt> &lsquo;<samp>5</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_PS2
+</p></dd>
+<dt> &lsquo;<samp>6</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_MLIB
+</p></dd>
+<dt> &lsquo;<samp>7</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_ARM
+</p></dd>
+<dt> &lsquo;<samp>8</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_ALTIVEC
+</p></dd>
+<dt> &lsquo;<samp>9</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_SH4
+</p></dd>
+<dt> &lsquo;<samp>10</samp>&rsquo;</dt>
+<dd><p>FF_IDCT_SIMPLEARM
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-er <var>n</var></samp>&rsquo;</dt>
+<dd><p>Set error resilience to <var>n</var>.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>FF_ER_CAREFUL (default)
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>FF_ER_COMPLIANT
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>FF_ER_AGGRESSIVE
+</p></dd>
+<dt> &lsquo;<samp>4</samp>&rsquo;</dt>
+<dd><p>FF_ER_VERY_AGGRESSIVE
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-ec <var>bit_mask</var></samp>&rsquo;</dt>
+<dd><p>Set error concealment to <var>bit_mask</var>. <var>bit_mask</var> is a bit mask of
+the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>FF_EC_GUESS_MVS (default = enabled)
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>FF_EC_DEBLOCK (default = enabled)
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-bf <var>frames</var></samp>&rsquo;</dt>
+<dd><p>Use &rsquo;frames&rsquo; B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
+</p></dd>
+<dt> &lsquo;<samp>-mbd <var>mode</var></samp>&rsquo;</dt>
+<dd><p>macroblock decision
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in ffmpeg).
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>FF_MB_DECISION_RD: rate distortion
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-4mv</samp>&rsquo;</dt>
+<dd><p>Use four motion vector by macroblock (MPEG-4 only).
+</p></dd>
+<dt> &lsquo;<samp>-part</samp>&rsquo;</dt>
+<dd><p>Use data partitioning (MPEG-4 only).
+</p></dd>
+<dt> &lsquo;<samp>-bug <var>param</var></samp>&rsquo;</dt>
+<dd><p>Work around encoder bugs that are not auto-detected.
+</p></dd>
+<dt> &lsquo;<samp>-strict <var>strictness</var></samp>&rsquo;</dt>
+<dd><p>How strictly to follow the standards.
+</p></dd>
+<dt> &lsquo;<samp>-aic</samp>&rsquo;</dt>
+<dd><p>Enable Advanced intra coding (h263+).
+</p></dd>
+<dt> &lsquo;<samp>-umv</samp>&rsquo;</dt>
+<dd><p>Enable Unlimited Motion Vector (h263+)
+</p>
+</dd>
+<dt> &lsquo;<samp>-deinterlace</samp>&rsquo;</dt>
+<dd><p>Deinterlace pictures.
+</p></dd>
+<dt> &lsquo;<samp>-ilme</samp>&rsquo;</dt>
+<dd><p>Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
+Use this option if your input file is interlaced and you want
+to keep the interlaced format for minimum losses.
+The alternative is to deinterlace the input stream with
+&lsquo;<samp>-deinterlace</samp>&rsquo;, but deinterlacing introduces losses.
+</p></dd>
+<dt> &lsquo;<samp>-psnr</samp>&rsquo;</dt>
+<dd><p>Calculate PSNR of compressed frames.
+</p></dd>
+<dt> &lsquo;<samp>-vstats</samp>&rsquo;</dt>
+<dd><p>Dump video coding statistics to &lsquo;<tt>vstats_HHMMSS.log</tt>&rsquo;.
+</p></dd>
+<dt> &lsquo;<samp>-vstats_file <var>file</var></samp>&rsquo;</dt>
+<dd><p>Dump video coding statistics to <var>file</var>.
+</p></dd>
+<dt> &lsquo;<samp>-top <var>n</var></samp>&rsquo;</dt>
+<dd><p>top=1/bottom=0/auto=-1 field first
+</p></dd>
+<dt> &lsquo;<samp>-dc <var>precision</var></samp>&rsquo;</dt>
+<dd><p>Intra_dc_precision.
+</p></dd>
+<dt> &lsquo;<samp>-vtag <var>fourcc/tag</var></samp>&rsquo;</dt>
+<dd><p>Force video tag/fourcc.
+</p></dd>
+<dt> &lsquo;<samp>-qphist</samp>&rsquo;</dt>
+<dd><p>Show QP histogram.
+</p></dd>
+<dt> &lsquo;<samp>-vbsf <var>bitstream_filter</var></samp>&rsquo;</dt>
+<dd><p>Bitstream filters available are &quot;dump_extra&quot;, &quot;remove_extra&quot;, &quot;noise&quot;, &quot;h264_mp4toannexb&quot;, &quot;imxdump&quot;, &quot;mjpegadump&quot;, &quot;mjpeg2jpeg&quot;.
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i h264.mp4 -vcodec copy -vbsf h264_mp4toannexb -an out.h264
+</pre></td></tr></table>
+</dd>
+<dt> &lsquo;<samp>-force_key_frames <var>time</var>[,<var>time</var>...]</samp>&rsquo;</dt>
+<dd><p>Force key frames at the specified timestamps, more precisely at the first
+frames after each specified time.
+This option can be useful to ensure that a seek point is present at a
+chapter mark or any other designated place in the output file.
+The timestamps must be specified in ascending order.
+</p></dd>
+</dl>
+
+<a name="Audio-Options"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Audio-Options">3.5 Audio Options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-aframes <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the number of audio frames to record.
+</p></dd>
+<dt> &lsquo;<samp>-ar <var>freq</var></samp>&rsquo;</dt>
+<dd><p>Set the audio sampling frequency. For output streams it is set by
+default to the frequency of the corresponding input stream. For input
+streams this option only makes sense for audio grabbing devices and raw
+demuxers and is mapped to the corresponding demuxer options.
+</p></dd>
+<dt> &lsquo;<samp>-aq <var>q</var></samp>&rsquo;</dt>
+<dd><p>Set the audio quality (codec-specific, VBR).
+</p></dd>
+<dt> &lsquo;<samp>-ac <var>channels</var></samp>&rsquo;</dt>
+<dd><p>Set the number of audio channels. For output streams it is set by
+default to the number of input audio channels. For input streams
+this option only makes sense for audio grabbing devices and raw demuxers
+and is mapped to the corresponding demuxer options.
+</p></dd>
+<dt> &lsquo;<samp>-an</samp>&rsquo;</dt>
+<dd><p>Disable audio recording.
+</p></dd>
+<dt> &lsquo;<samp>-acodec <var>codec</var></samp>&rsquo;</dt>
+<dd><p>Force audio codec to <var>codec</var>. Use the <code>copy</code> special value to
+specify that the raw codec data must be copied as is.
+</p></dd>
+<dt> &lsquo;<samp>-newaudio</samp>&rsquo;</dt>
+<dd><p>Add a new audio track to the output file. If you want to specify parameters,
+do so before <code>-newaudio</code> (<code>-acodec</code>, <code>-ab</code>, etc..).
+</p>
+<p>Mapping will be done automatically, if the number of output streams is equal to
+the number of input streams, else it will pick the first one that matches. You
+can override the mapping using <code>-map</code> as usual.
+</p>
+<p>Example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio
+</pre></td></tr></table>
+</dd>
+<dt> &lsquo;<samp>-alang <var>code</var></samp>&rsquo;</dt>
+<dd><p>Set the ISO 639 language code (3 letters) of the current audio stream.
+</p></dd>
+</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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-atag <var>fourcc/tag</var></samp>&rsquo;</dt>
+<dd><p>Force audio tag/fourcc.
+</p></dd>
+<dt> &lsquo;<samp>-audio_service_type <var>type</var></samp>&rsquo;</dt>
+<dd><p>Set the type of service that the audio stream contains.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>ma</samp>&rsquo;</dt>
+<dd><p>Main Audio Service (default)
+</p></dd>
+<dt> &lsquo;<samp>ef</samp>&rsquo;</dt>
+<dd><p>Effects
+</p></dd>
+<dt> &lsquo;<samp>vi</samp>&rsquo;</dt>
+<dd><p>Visually Impaired
+</p></dd>
+<dt> &lsquo;<samp>hi</samp>&rsquo;</dt>
+<dd><p>Hearing Impaired
+</p></dd>
+<dt> &lsquo;<samp>di</samp>&rsquo;</dt>
+<dd><p>Dialogue
+</p></dd>
+<dt> &lsquo;<samp>co</samp>&rsquo;</dt>
+<dd><p>Commentary
+</p></dd>
+<dt> &lsquo;<samp>em</samp>&rsquo;</dt>
+<dd><p>Emergency
+</p></dd>
+<dt> &lsquo;<samp>vo</samp>&rsquo;</dt>
+<dd><p>Voice Over
+</p></dd>
+<dt> &lsquo;<samp>ka</samp>&rsquo;</dt>
+<dd><p>Karaoke
+</p></dd>
+</dl>
+</dd>
+<dt> &lsquo;<samp>-absf <var>bitstream_filter</var></samp>&rsquo;</dt>
+<dd><p>Bitstream filters available are &quot;dump_extra&quot;, &quot;remove_extra&quot;, &quot;noise&quot;, &quot;mp3comp&quot;, &quot;mp3decomp&quot;.
+</p></dd>
+</dl>
+
+<a name="Subtitle-options_003a"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Subtitle-options_003a">3.7 Subtitle options:</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-scodec <var>codec</var></samp>&rsquo;</dt>
+<dd><p>Force subtitle codec (&rsquo;copy&rsquo; to copy stream).
+</p></dd>
+<dt> &lsquo;<samp>-newsubtitle</samp>&rsquo;</dt>
+<dd><p>Add a new subtitle stream to the current output stream.
+</p></dd>
+<dt> &lsquo;<samp>-slang <var>code</var></samp>&rsquo;</dt>
+<dd><p>Set the ISO 639 language code (3 letters) of the current subtitle stream.
+</p></dd>
+<dt> &lsquo;<samp>-sn</samp>&rsquo;</dt>
+<dd><p>Disable subtitle recording.
+</p></dd>
+<dt> &lsquo;<samp>-sbsf <var>bitstream_filter</var></samp>&rsquo;</dt>
+<dd><p>Bitstream filters available are &quot;mov2textsub&quot;, &quot;text2movsub&quot;.
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file.mov -an -vn -sbsf mov2textsub -scodec copy -f rawvideo sub.txt
+</pre></td></tr></table>
+</dd>
+</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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-vc <var>channel</var></samp>&rsquo;</dt>
+<dd><p>Set video grab channel (DV1394 only).
+</p></dd>
+<dt> &lsquo;<samp>-tvstd <var>standard</var></samp>&rsquo;</dt>
+<dd><p>Set television standard (NTSC, PAL (SECAM)).
+</p></dd>
+<dt> &lsquo;<samp>-isync</samp>&rsquo;</dt>
+<dd><p>Synchronize read on input.
+</p></dd>
+</dl>
+
+<a name="Advanced-options"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Advanced-options">3.9 Advanced options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-map <var>input_file_id</var>.<var>input_stream_id</var>[:<var>sync_file_id</var>.<var>sync_stream_id</var>]</samp>&rsquo;</dt>
+<dd>
+<p>Designate an input stream as a source for the output file. Each input
+stream is identified by the input file index <var>input_file_id</var> and
+the input stream index <var>input_stream_id</var> within the input
+file. Both indexes start at 0. If specified,
+<var>sync_file_id</var>.<var>sync_stream_id</var> sets which input stream
+is used as a presentation sync reference.
+</p>
+<p>The <code>-map</code> options must be specified just after the output file.
+If any <code>-map</code> options are used, the number of <code>-map</code> options
+on the command line must match the number of streams in the output
+file. The first <code>-map</code> option on the command line specifies the
+source for output stream 0, the second <code>-map</code> option specifies
+the source for output stream 1, etc.
+</p>
+<p>For example, if you have two audio streams in the first input file,
+these streams are identified by &quot;0.0&quot; and &quot;0.1&quot;. You can use
+<code>-map</code> to select which stream to place in an output file. For
+example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT out.wav -map 0.1
+</pre></td></tr></table>
+<p>will map the input stream in &lsquo;<tt>INPUT</tt>&rsquo; identified by &quot;0.1&quot; to
+the (single) output stream in &lsquo;<tt>out.wav</tt>&rsquo;.
+</p>
+<p>For example, to select the stream with index 2 from input file
+&lsquo;<tt>a.mov</tt>&rsquo; (specified by the identifier &quot;0.2&quot;), and stream with
+index 6 from input &lsquo;<tt>b.mov</tt>&rsquo; (specified by the identifier &quot;1.6&quot;),
+and copy them to the output file &lsquo;<tt>out.mov</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i a.mov -i b.mov -vcodec copy -acodec copy out.mov -map 0.2 -map 1.6
+</pre></td></tr></table>
+
+<p>To add more streams to the output file, you can use the
+<code>-newaudio</code>, <code>-newvideo</code>, <code>-newsubtitle</code> options.
+</p>
+</dd>
+<dt> &lsquo;<samp>-map_meta_data <var>outfile</var>[,<var>metadata</var>]:<var>infile</var>[,<var>metadata</var>]</samp>&rsquo;</dt>
+<dd><p>Deprecated, use <var>-map_metadata</var> instead.
+</p>
+</dd>
+<dt> &lsquo;<samp>-map_metadata <var>outfile</var>[,<var>metadata</var>]:<var>infile</var>[,<var>metadata</var>]</samp>&rsquo;</dt>
+<dd><p>Set metadata information of <var>outfile</var> from <var>infile</var>. Note that those
+are file indices (zero-based), not filenames.
+Optional <var>metadata</var> parameters specify, which metadata to copy - (g)lobal
+(i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter or
+per-(p)rogram. All metadata specifiers other than global must be followed by the
+stream/chapter/program number. If metadata specifier is omitted, it defaults to
+global.
+</p>
+<p>By default, global metadata is copied from the first input file to all output files,
+per-stream and per-chapter metadata is copied along with streams/chapters. These
+default mappings are disabled by creating any mapping of the relevant type. A negative
+file index can be used to create a dummy mapping that just disables automatic copying.
+</p>
+<p>For example to copy metadata from the first stream of the input file to global metadata
+of the output file:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.ogg -map_metadata 0:0,s0 out.mp3
+</pre></td></tr></table>
+</dd>
+<dt> &lsquo;<samp>-map_chapters <var>outfile</var>:<var>infile</var></samp>&rsquo;</dt>
+<dd><p>Copy chapters from <var>infile</var> to <var>outfile</var>. If no chapter mapping is specified,
+then chapters are copied from the first input file with at least one chapter to all
+output files. Use a negative file index to disable any chapter copying.
+</p></dd>
+<dt> &lsquo;<samp>-debug</samp>&rsquo;</dt>
+<dd><p>Print specific debug info.
+</p></dd>
+<dt> &lsquo;<samp>-benchmark</samp>&rsquo;</dt>
+<dd><p>Show benchmarking information at the end of an encode.
+Shows CPU time used and maximum memory consumption.
+Maximum memory consumption is not supported on all systems,
+it will usually display as 0 if not supported.
+</p></dd>
+<dt> &lsquo;<samp>-dump</samp>&rsquo;</dt>
+<dd><p>Dump each input packet.
+</p></dd>
+<dt> &lsquo;<samp>-hex</samp>&rsquo;</dt>
+<dd><p>When dumping packets, also dump the payload.
+</p></dd>
+<dt> &lsquo;<samp>-bitexact</samp>&rsquo;</dt>
+<dd><p>Only use bit exact algorithms (for codec testing).
+</p></dd>
+<dt> &lsquo;<samp>-ps <var>size</var></samp>&rsquo;</dt>
+<dd><p>Set RTP payload size in bytes.
+</p></dd>
+<dt> &lsquo;<samp>-re</samp>&rsquo;</dt>
+<dd><p>Read input at native frame rate. Mainly used to simulate a grab device.
+</p></dd>
+<dt> &lsquo;<samp>-loop_input</samp>&rsquo;</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.
+</p></dd>
+<dt> &lsquo;<samp>-loop_output <var>number_of_times</var></samp>&rsquo;</dt>
+<dd><p>Repeatedly loop output for formats that support looping such as animated GIF
+(0 will loop the output infinitely).
+This option is deprecated, use -loop.
+</p></dd>
+<dt> &lsquo;<samp>-threads <var>count</var></samp>&rsquo;</dt>
+<dd><p>Thread count.
+</p></dd>
+<dt> &lsquo;<samp>-vsync <var>parameter</var></samp>&rsquo;</dt>
+<dd><p>Video sync method.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>Each frame is passed with its timestamp from the demuxer to the muxer.
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>Frames will be duplicated and dropped to achieve exactly the requested
+constant framerate.
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>Frames are passed through with their timestamp or dropped so as to
+prevent 2 frames from having the same timestamp.
+</p></dd>
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>Chooses between 1 and 2 depending on muxer capabilities. This is the
+default method.
+</p></dd>
+</dl>
+
+<p>With -map you can select from which stream the timestamps should be
+taken. You can leave either video or audio unchanged and sync the
+remaining stream(s) to the unchanged one.
+</p>
+</dd>
+<dt> &lsquo;<samp>-async <var>samples_per_second</var></samp>&rsquo;</dt>
+<dd><p>Audio sync method. &quot;Stretches/squeezes&quot; the audio stream to match the timestamps,
+the parameter is the maximum samples per second by which the audio is changed.
+-async 1 is a special case where only the start of the audio stream is corrected
+without any later correction.
+</p></dd>
+<dt> &lsquo;<samp>-copyts</samp>&rsquo;</dt>
+<dd><p>Copy timestamps from input to output.
+</p></dd>
+<dt> &lsquo;<samp>-copytb</samp>&rsquo;</dt>
+<dd><p>Copy input stream time base from input to output when stream copying.
+</p></dd>
+<dt> &lsquo;<samp>-shortest</samp>&rsquo;</dt>
+<dd><p>Finish encoding when the shortest input stream ends.
+</p></dd>
+<dt> &lsquo;<samp>-dts_delta_threshold</samp>&rsquo;</dt>
+<dd><p>Timestamp discontinuity delta threshold.
+</p></dd>
+<dt> &lsquo;<samp>-muxdelay <var>seconds</var></samp>&rsquo;</dt>
+<dd><p>Set the maximum demux-decode delay.
+</p></dd>
+<dt> &lsquo;<samp>-muxpreload <var>seconds</var></samp>&rsquo;</dt>
+<dd><p>Set the initial demux-decode delay.
+</p></dd>
+<dt> &lsquo;<samp>-streamid <var>output-stream-index</var>:<var>new-value</var></samp>&rsquo;</dt>
+<dd><p>Assign a new stream-id value to an output stream. This option should be
+specified prior to the output filename to which it applies.
+For the situation where multiple output files exist, a streamid
+may be reassigned to a different value.
+</p>
+<p>For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 for
+an output mpegts file:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i infile -streamid 0:33 -streamid 1:36 out.ts
+</pre></td></tr></table>
+</dd>
+</dl>
+
+<a name="Preset-files"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Preset-files">3.10 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
+awkward to specify on the command line. Lines starting with the hash
+(&rsquo;#&rsquo;) character are ignored and are used to provide comments. Check
+the &lsquo;<tt>ffpresets</tt>&rsquo; directory in the FFmpeg source tree for examples.
+</p>
+<p>Preset files are specified with the <code>vpre</code>, <code>apre</code>,
+<code>spre</code>, and <code>fpre</code> options. The <code>fpre</code> option takes the
+filename of the preset instead of a preset name as input and can be
+used for any kind of codec. For the <code>vpre</code>, <code>apre</code>, and
+<code>spre</code> options, the options specified in a preset file are
+applied to the currently selected codec of the same type as the preset
+option.
+</p>
+<p>The argument passed to the <code>vpre</code>, <code>apre</code>, and <code>spre</code>
+preset options identifies the preset file to use according to the
+following rules:
+</p>
+<p>First ffmpeg searches for a file named <var>arg</var>.ffpreset in the
+directories &lsquo;<tt>$FFMPEG_DATADIR</tt>&rsquo; (if set), and &lsquo;<tt>$HOME/.ffmpeg</tt>&rsquo;, and in
+the datadir defined at configuration time (usually &lsquo;<tt>PREFIX/share/ffmpeg</tt>&rsquo;)
+or in a &lsquo;<tt>ffpresets</tt>&rsquo; folder along the executable on win32,
+in that order. For example, if the argument is <code>libx264-max</code>, it will
+search for the file &lsquo;<tt>libx264-max.ffpreset</tt>&rsquo;.
+</p>
+<p>If no such file is found, then ffmpeg will search for a file named
+<var>codec_name</var>-<var>arg</var>.ffpreset in the above-mentioned
+directories, where <var>codec_name</var> is the name of the codec to which
+the preset file options will be applied. For example, if you select
+the video codec with <code>-vcodec libx264</code> and use <code>-vpre max</code>,
+then it will search for the file &lsquo;<tt>libx264-max.ffpreset</tt>&rsquo;.
+</p>
+<a name="Tips"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Tips">4. Tips</a></h1>
+
+<ul>
+<li>
+For streaming at very low bitrate application, use a low frame rate
+and a small GOP size. This is especially true for RealVideo where
+the Linux player does not seem to be very fast, so it can miss
+frames. An example is:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
+</pre></td></tr></table>
+
+</li><li>
+The parameter &rsquo;q&rsquo; which is displayed while encoding is the current
+quantizer. The value 1 indicates that a very good quality could
+be achieved. The value 31 indicates the worst quality. If q=31 appears
+too often, it means that the encoder cannot compress enough to meet
+your bitrate. You must either increase the bitrate, decrease the
+frame rate or decrease the frame size.
+
+</li><li>
+If your computer is not fast enough, you can speed up the
+compression at the expense of the compression ratio. You can use
+&rsquo;-me zero&rsquo; to speed up motion estimation, and &rsquo;-intra&rsquo; to disable
+motion estimation completely (you have only I-frames, which means it
+is about as good as JPEG compression).
+
+</li><li>
+To have very low audio bitrates, reduce the sampling frequency
+(down to 22050 Hz for MPEG audio, 22050 or 11025 for AC-3).
+
+</li><li>
+To have a constant quality (but a variable bitrate), use the option
+&rsquo;-qscale n&rsquo; when &rsquo;n&rsquo; is between 1 (excellent quality) and 31 (worst
+quality).
+
+</li><li>
+When converting video files, you can use the &rsquo;-sameq&rsquo; option which
+uses the same quality factor in the encoder as in the decoder.
+It allows almost lossless encoding.
+
+</li></ul>
+
+<a name="Examples"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Examples">5. Examples</a></h1>
+
+<a name="Video-and-Audio-grabbing"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Video-and-Audio-grabbing">5.1 Video and Audio grabbing</a></h2>
+
+<p>If you specify the input format and device then ffmpeg can grab video
+and audio directly.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>Note that you must activate the right video source and channel before
+launching ffmpeg with any TV viewer such as
+<a href="http://linux.bytesex.org/xawtv/">xawtv</a> by Gerd Knorr. You also
+have to set the audio recording levels correctly with a
+standard mixer.
+</p>
+<a name="X11-grabbing"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-X11-grabbing">5.2 X11 grabbing</a></h2>
+
+<p>Grab the X11 display with ffmpeg via
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>0.0 is display.screen number of your X11 server, same as
+the DISPLAY environment variable.
+</p>
+<table><tr><td>&nbsp;</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>
+<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>Any supported file format and protocol can serve as input to ffmpeg:
+</p>
+<p>Examples:
+</p><ul>
+<li>
+You can use YUV files as input:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
+</pre></td></tr></table>
+
+<p>It will use the files:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
+/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
+</pre></td></tr></table>
+
+<p>The Y files use twice the resolution of the U and V files. They are
+raw files, without header. They can be generated by all decent video
+decoders. You must specify the size of the image with the &lsquo;<samp>-s</samp>&rsquo; option
+if ffmpeg cannot guess it.
+</p>
+</li><li>
+You can input from a raw YUV420P file:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i /tmp/test.yuv /tmp/out.avi
+</pre></td></tr></table>
+
+<p>test.yuv is a file containing raw YUV planar data. Each frame is composed
+of the Y plane followed by the U and V planes at half vertical and
+horizontal resolution.
+</p>
+</li><li>
+You can output to a raw YUV420P file:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i mydivx.avi hugefile.yuv
+</pre></td></tr></table>
+
+</li><li>
+You can set several input files and output files:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
+</pre></td></tr></table>
+
+<p>Converts the audio file a.wav and the raw YUV video file a.yuv
+to MPEG file a.mpg.
+</p>
+</li><li>
+You can also do audio and video conversions at the same time:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
+</pre></td></tr></table>
+
+<p>Converts a.wav to MPEG audio at 22050 Hz sample rate.
+</p>
+</li><li>
+You can encode to several formats at the same time and define a
+mapping from input stream to output streams:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0
+</pre></td></tr></table>
+
+<p>Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. &rsquo;-map
+file:index&rsquo; specifies which input stream is used for each output
+stream, in the order of the definition of output streams.
+</p>
+</li><li>
+You can transcode decrypted VOBs:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec libmp3lame -ab 128k snatch.avi
+</pre></td></tr></table>
+
+<p>This is a typical DVD ripping example; the input is a VOB file, the
+output an AVI file with MPEG-4 video and MP3 audio. Note that in this
+command we use B-frames so the MPEG-4 stream is DivX5 compatible, and
+GOP size is 300 which means one intra frame every 10 seconds for 29.97fps
+input video. Furthermore, the audio stream is MP3-encoded so you need
+to enable LAME support by passing <code>--enable-libmp3lame</code> to configure.
+The mapping is particularly useful for DVD transcoding
+to get the desired audio language.
+</p>
+<p>NOTE: To see the supported input formats, use <code>ffmpeg -formats</code>.
+</p>
+</li><li>
+You can extract images from a video, or create a video from many images:
+
+<p>For extracting images from a video:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
+</pre></td></tr></table>
+
+<p>This will extract one video frame per second from the video and will
+output them in files named &lsquo;<tt>foo-001.jpeg</tt>&rsquo;, &lsquo;<tt>foo-002.jpeg</tt>&rsquo;,
+etc. Images will be rescaled to fit the new WxH values.
+</p>
+<p>If you want to extract just a limited number of frames, you can use the
+above command in combination with the -vframes or -t option, or in
+combination with -ss to start extracting from a certain point in time.
+</p>
+<p>For creating a video from many images:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
+</pre></td></tr></table>
+
+<p>The syntax <code>foo-%03d.jpeg</code> specifies to use a decimal number
+composed of three digits padded with zeroes to express the sequence
+number. It is the same syntax supported by the C printf function, but
+only formats accepting a normal integer are suitable.
+</p>
+</li><li>
+You can put many streams of the same type in the output:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i test1.avi -i test2.avi -vcodec copy -acodec copy -vcodec copy -acodec copy test12.avi -newvideo -newaudio
+</pre></td></tr></table>
+
+<p>In addition to the first video and audio streams, the resulting
+output file &lsquo;<tt>test12.avi</tt>&rsquo; will contain the second video
+and the second audio stream found in the input streams list.
+</p>
+<p>The <code>-newvideo</code>, <code>-newaudio</code> and <code>-newsubtitle</code>
+options have to be specified immediately after the name of the output
+file to which you want to add them.
+</p>
+</li></ul>
+
+<a name="Expression-Evaluation"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Expression-Evaluation">6. Expression Evaluation</a></h1>
+
+<p>When evaluating an arithemetic expression, FFmpeg uses an internal
+formula evaluator, implemented through the &lsquo;<tt>libavutil/eval.h</tt>&rsquo;
+interface.
+</p>
+<p>An expression may contain unary, binary operators, constants, and
+functions.
+</p>
+<p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
+another expression &quot;<var>expr1</var>;<var>expr2</var>&quot;.
+<var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
+expression evaluates to the value of <var>expr2</var>.
+</p>
+<p>The following binary operators are available: <code>+</code>, <code>-</code>,
+<code>*</code>, <code>/</code>, <code>^</code>.
+</p>
+<p>The following unary operators are available: <code>+</code>, <code>-</code>.
+</p>
+<p>The following functions are available:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>sinh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>cosh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>tanh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>sin(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>cos(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>tan(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>atan(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>asin(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>acos(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>exp(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>log(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>abs(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>squish(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gauss(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>isnan(x)</samp>&rsquo;</dt>
+<dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
+</p>
+</dd>
+<dt> &lsquo;<samp>mod(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>max(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>min(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>eq(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gte(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gt(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>lte(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>lt(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>st(var, expr)</samp>&rsquo;</dt>
+<dd><p>Allow to store the value of the expression <var>expr</var> in an internal
+variable. <var>var</var> specifies the number of the variable where to
+store the value, and it is a value ranging from 0 to 9. The function
+returns the value stored in the internal variable.
+</p>
+</dd>
+<dt> &lsquo;<samp>ld(var)</samp>&rsquo;</dt>
+<dd><p>Allow to load the value of the internal variable with number
+<var>var</var>, which was previosly stored with st(<var>var</var>, <var>expr</var>).
+The function returns the loaded value.
+</p>
+</dd>
+<dt> &lsquo;<samp>while(cond, expr)</samp>&rsquo;</dt>
+<dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
+non-zero, and returns the value of the last <var>expr</var> evaluation, or
+NAN if <var>cond</var> was always false.
+</p>
+</dd>
+<dt> &lsquo;<samp>ceil(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> upwards to the nearest
+integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>floor(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> downwards to the nearest
+integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>trunc(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
+integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sqrt(expr)</samp>&rsquo;</dt>
+<dd><p>Compute the square root of <var>expr</var>. This is equivalent to
+&quot;(<var>expr</var>)^.5&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>not(expr)</samp>&rsquo;</dt>
+<dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
+</p>
+</dd>
+<dt> &lsquo;<samp>pow(x, y)</samp>&rsquo;</dt>
+<dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
+&quot;(<var>x</var>)^(<var>y</var>)&quot;.
+</p></dd>
+</dl>
+
+<p>Note that:
+</p>
+<p><code>*</code> works like AND
+</p>
+<p><code>+</code> works like OR
+</p>
+<p>thus
+</p><table><tr><td>&nbsp;</td><td><pre class="example">if A then B else C
+</pre></td></tr></table>
+<p>is equivalent to
+</p><table><tr><td>&nbsp;</td><td><pre class="example">A*B + not(A)*C
+</pre></td></tr></table>
+
+<p>In your C code, you can extend the list of unary and binary functions,
+and define recognized constants, so that they are available for your
+expressions.
+</p>
+<p>The evaluator also recognizes the International System number
+postfixes. If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used
+instead of powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8,
+and can be appended after another postfix or used alone. This allows
+using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
+</p>
+<p>Follows the list of available International System postfixes, with
+indication of the corresponding powers of 10 and of 2.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>y</samp>&rsquo;</dt>
+<dd><p>-24 / -80
+</p></dd>
+<dt> &lsquo;<samp>z</samp>&rsquo;</dt>
+<dd><p>-21 / -70
+</p></dd>
+<dt> &lsquo;<samp>a</samp>&rsquo;</dt>
+<dd><p>-18 / -60
+</p></dd>
+<dt> &lsquo;<samp>f</samp>&rsquo;</dt>
+<dd><p>-15 / -50
+</p></dd>
+<dt> &lsquo;<samp>p</samp>&rsquo;</dt>
+<dd><p>-12 / -40
+</p></dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>-9 / -30
+</p></dd>
+<dt> &lsquo;<samp>u</samp>&rsquo;</dt>
+<dd><p>-6 / -20
+</p></dd>
+<dt> &lsquo;<samp>m</samp>&rsquo;</dt>
+<dd><p>-3 / -10
+</p></dd>
+<dt> &lsquo;<samp>c</samp>&rsquo;</dt>
+<dd><p>-2
+</p></dd>
+<dt> &lsquo;<samp>d</samp>&rsquo;</dt>
+<dd><p>-1
+</p></dd>
+<dt> &lsquo;<samp>h</samp>&rsquo;</dt>
+<dd><p>2
+</p></dd>
+<dt> &lsquo;<samp>k</samp>&rsquo;</dt>
+<dd><p>3 / 10
+</p></dd>
+<dt> &lsquo;<samp>K</samp>&rsquo;</dt>
+<dd><p>3 / 10
+</p></dd>
+<dt> &lsquo;<samp>M</samp>&rsquo;</dt>
+<dd><p>6 / 20
+</p></dd>
+<dt> &lsquo;<samp>G</samp>&rsquo;</dt>
+<dd><p>9 / 30
+</p></dd>
+<dt> &lsquo;<samp>T</samp>&rsquo;</dt>
+<dd><p>12 / 40
+</p></dd>
+<dt> &lsquo;<samp>P</samp>&rsquo;</dt>
+<dd><p>15 / 40
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>18 / 50
+</p></dd>
+<dt> &lsquo;<samp>Z</samp>&rsquo;</dt>
+<dd><p>21 / 60
+</p></dd>
+<dt> &lsquo;<samp>Y</samp>&rsquo;</dt>
+<dd><p>24 / 70
+</p></dd>
+</dl>
+
+<a name="Decoders"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Decoders">7. Decoders</a></h1>
+
+<p>Decoders are configured elements in FFmpeg which allow the decoding of
+multimedia streams.
+</p>
+<p>When you configure your FFmpeg build, all the supported native decoders
+are enabled by default. Decoders requiring an external library must be enabled
+manually via the corresponding <code>--enable-lib</code> option. You can list all
+available decoders using the configure option <code>--list-decoders</code>.
+</p>
+<p>You can disable all the decoders with the configure option
+<code>--disable-decoders</code> and selectively enable / disable single decoders
+with the options <code>--enable-decoder=<var>DECODER</var></code> /
+<code>--disable-decoder=<var>DECODER</var></code>.
+</p>
+<p>The option <code>-codecs</code> of the ff* tools will display the list of
+enabled decoders.
+</p>
+
+<a name="Video-Decoders"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Video-Decoders">8. Video Decoders</a></h1>
+
+<p>A description of some of the currently available video decoders
+follows.
+</p>
+<a name="rawvideo"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-rawvideo">8.1 rawvideo</a></h2>
+
+<p>Rawvideo decoder.
+</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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
+<dd><p>Specify the assumed field type of the input video.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>the video is assumed to be progressive (default)
+</p></dd>
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>bottom-field-first is assumed
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>top-field-first is assumed
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Encoders"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Encoders">9. Encoders</a></h1>
+
+<p>Encoders are configured elements in FFmpeg which allow the encoding of
+multimedia streams.
+</p>
+<p>When you configure your FFmpeg build, all the supported native encoders
+are enabled by default. Encoders requiring an external library must be enabled
+manually via the corresponding <code>--enable-lib</code> option. You can list all
+available encoders using the configure option <code>--list-encoders</code>.
+</p>
+<p>You can disable all the encoders with the configure option
+<code>--disable-encoders</code> and selectively enable / disable single encoders
+with the options <code>--enable-encoder=<var>ENCODER</var></code> /
+<code>--disable-encoder=<var>ENCODER</var></code>.
+</p>
+<p>The option <code>-codecs</code> of the ff* tools will display the list of
+enabled encoders.
+</p>
+
+<a name="Audio-Encoders"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Audio-Encoders">10. Audio Encoders</a></h1>
+
+<p>A description of some of the currently available audio encoders
+follows.
+</p>
+<a name="ac3-and-ac3_005ffixed"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-ac3-and-ac3_005ffixed">10.1 ac3 and ac3_fixed</a></h2>
+
+<p>AC-3 audio encoders.
+</p>
+<p>These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
+the undocumented RealAudio 3 (a.k.a. dnet).
+</p>
+<p>The <var>ac3</var> encoder uses floating-point math, while the <var>ac3_fixed</var>
+encoder only uses fixed-point integer math. This does not mean that one is
+always faster, just that one or the other may be better suited to a
+particular system. The floating-point encoder will generally produce better
+quality audio for a given bitrate. The <var>ac3_fixed</var> encoder is not the
+default codec for any of the output formats, so it must be specified explicitly
+using the option <code>-acodec ac3_fixed</code> in order to use it.
+</p>
+<a name="AC_002d3-Metadata"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-AC_002d3-Metadata">10.1.1 AC-3 Metadata</a></h3>
+
+<p>The AC-3 metadata options are used to set parameters that describe the audio,
+but in most cases do not affect the audio encoding itself. Some of the options
+do directly affect or influence the decoding and playback of the resulting
+bitstream, while others are just for informational purposes. A few of the
+options will add bits to the output stream that could otherwise be used for
+audio data, and will thus affect the quality of the output. Those will be
+indicated accordingly with a note in the option list below.
+</p>
+<p>These parameters are described in detail in several publicly-available
+documents.
+</p><ul>
+<li> <a href="http://www.atsc.org/cms/standards/a_52-2010.pdf">A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard</a>
+</li><li> <a href="http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf">A/54 - Guide to the Use of the ATSC Digital Television Standard</a>
+</li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf">Dolby Metadata Guide</a>
+</li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf">Dolby Digital Professional Encoding Guidelines</a>
+</li></ul>
+
+<a name="Metadata-Control-Options"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Metadata-Control-Options">10.1.1.1 Metadata Control Options</a></h4>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-per_frame_metadata <var>boolean</var></samp>&rsquo;</dt>
+<dd><p>Allow Per-Frame Metadata. Specifies if the encoder should check for changing
+metadata for each frame.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>The metadata values set at initialization will be used for every frame in the
+stream. (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>Metadata values can be changed before encoding each frame.
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Downmix-Levels"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Downmix-Levels">10.1.1.2 Downmix Levels</a></h4>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-center_mixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Center Mix Level. The amount of gain the decoder should apply to the center
+channel when downmixing to stereo. This field will only be written to the
+bitstream if a center channel is present. The value is specified as a scale
+factor. There are 3 valid values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
+<dd><p>Apply -4.5dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6dB gain
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-surround_mixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Surround Mix Level. The amount of gain the decoder should apply to the surround
+channel(s) when downmixing to stereo. This field will only be written to the
+bitstream if one or more surround channels are present. The value is specified
+as a scale factor.  There are 3 valid values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
+<dd><p>Silence Surround Channel(s)
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Audio-Production-Information"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Audio-Production-Information">10.1.1.3 Audio Production Information</a></h4>
+<p>Audio Production Information is optional information describing the mixing
+environment.  Either none or both of the fields are written to the bitstream.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-mixing_level <var>number</var></samp>&rsquo;</dt>
+<dd><p>Mixing Level. Specifies peak sound pressure level (SPL) in the production
+environment when the mix was mastered. Valid values are 80 to 111, or -1 for
+unknown or not indicated. The default value is -1, but that value cannot be
+used if the Audio Production Information is written to the bitstream. Therefore,
+if the <code>room_type</code> option is not the default value, the <code>mixing_level</code>
+option must not be -1.
+</p>
+</dd>
+<dt> &lsquo;<samp>-room_type <var>type</var></samp>&rsquo;</dt>
+<dd><p>Room Type. Describes the equalization used during the final mixing session at
+the studio or on the dubbing stage. A large room is a dubbing stage with the
+industry standard X-curve equalization; a small room has flat equalization.
+This field will not be written to the bitstream if both the <code>mixing_level</code>
+option and the <code>room_type</code> option have the default values.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
+<dd><p>Not Indicated (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>large</samp>&rsquo;</dt>
+<dd><p>Large Room
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>small</samp>&rsquo;</dt>
+<dd><p>Small Room
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Other-Metadata-Options"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Other-Metadata-Options">10.1.1.4 Other Metadata Options</a></h4>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-copyright <var>boolean</var></samp>&rsquo;</dt>
+<dd><p>Copyright Indicator. Specifies whether a copyright exists for this audio.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>No Copyright Exists (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Copyright Exists
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-dialnorm <var>value</var></samp>&rsquo;</dt>
+<dd><p>Dialogue Normalization. Indicates how far the average dialogue level of the
+program is below digital 100% full scale (0 dBFS). This parameter determines a
+level shift during audio reproduction that sets the average volume of the
+dialogue to a preset level. The goal is to match volume level between program
+sources. A value of -31dB will result in no volume level change, relative to
+the source volume, during audio reproduction. Valid values are whole numbers in
+the range -31 to -1, with -31 being the default.
+</p>
+</dd>
+<dt> &lsquo;<samp>-dsur_mode <var>mode</var></samp>&rsquo;</dt>
+<dd><p>Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
+(Pro Logic). This field will only be written to the bitstream if the audio
+stream is stereo. Using this option does <b>NOT</b> mean the encoder will actually
+apply Dolby Surround processing.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
+<dd><p>Not Indicated (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>Not Dolby Surround Encoded
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Dolby Surround Encoded
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-original <var>boolean</var></samp>&rsquo;</dt>
+<dd><p>Original Bit Stream Indicator. Specifies whether this audio is from the
+original source and not a copy.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>Not Original Source
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Original Source (default)
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Extended-Bitstream-Information"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Extended-Bitstream-Information">10.1.2 Extended Bitstream Information</a></h3>
+<p>The extended bitstream options are part of the Alternate Bit Stream Syntax as
+specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
+If any one parameter in a group is specified, all values in that group will be
+written to the bitstream.  Default values are used for those that are written
+but have not been specified.  If the mixing levels are written, the decoder
+will use these values instead of the ones specified in the <code>center_mixlev</code>
+and <code>surround_mixlev</code> options if it supports the Alternate Bit Stream
+Syntax.
+</p>
+<a name="Extended-Bitstream-Information-_002d-Part-1"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Extended-Bitstream-Information-_002d-Part-1">10.1.2.1 Extended Bitstream Information - Part 1</a></h4>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-dmix_mode <var>mode</var></samp>&rsquo;</dt>
+<dd><p>Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
+(Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
+<dd><p>Not Indicated (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>ltrt</samp>&rsquo;</dt>
+<dd><p>Lt/Rt Downmix Preferred
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>loro</samp>&rsquo;</dt>
+<dd><p>Lo/Ro Downmix Preferred
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-ltrt_cmixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
+center channel when downmixing to stereo in Lt/Rt mode.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>1.414</samp>&rsquo;</dt>
+<dd><p>Apply +3dB gain
+</p></dd>
+<dt> &lsquo;<samp>1.189</samp>&rsquo;</dt>
+<dd><p>Apply +1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>1.000</samp>&rsquo;</dt>
+<dd><p>Apply 0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
+<dd><p>Apply -1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
+<dd><p>Apply -4.5dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
+<dd><p>Silence Center Channel
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-ltrt_surmixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
+surround channel(s) when downmixing to stereo in Lt/Rt mode.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
+<dd><p>Apply -1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
+<dd><p>Apply -4.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6.0dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
+<dd><p>Silence Surround Channel(s)
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-loro_cmixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
+center channel when downmixing to stereo in Lo/Ro mode.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>1.414</samp>&rsquo;</dt>
+<dd><p>Apply +3dB gain
+</p></dd>
+<dt> &lsquo;<samp>1.189</samp>&rsquo;</dt>
+<dd><p>Apply +1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>1.000</samp>&rsquo;</dt>
+<dd><p>Apply 0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
+<dd><p>Apply -1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
+<dd><p>Apply -4.5dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
+<dd><p>Silence Center Channel
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-loro_surmixlev <var>level</var></samp>&rsquo;</dt>
+<dd><p>Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
+surround channel(s) when downmixing to stereo in Lo/Ro mode.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
+<dd><p>Apply -1.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
+<dd><p>Apply -3.0dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
+<dd><p>Apply -4.5dB gain
+</p></dd>
+<dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
+<dd><p>Apply -6.0dB gain (default)
+</p></dd>
+<dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
+<dd><p>Silence Surround Channel(s)
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Extended-Bitstream-Information-_002d-Part-2"></a>
+<h4 class="subsubsection"><a href="ffmpeg.html#toc-Extended-Bitstream-Information-_002d-Part-2">10.1.2.2 Extended Bitstream Information - Part 2</a></h4>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-dsurex_mode <var>mode</var></samp>&rsquo;</dt>
+<dd><p>Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
+(7.1 matrixed to 5.1). Using this option does <b>NOT</b> mean the encoder will actually
+apply Dolby Surround EX processing.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
+<dd><p>Not Indicated (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Dolby Surround EX On
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>Dolby Surround EX Off
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-dheadphone_mode <var>mode</var></samp>&rsquo;</dt>
+<dd><p>Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
+encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
+option does <b>NOT</b> mean the encoder will actually apply Dolby Headphone
+processing.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
+<dd><p>Not Indicated (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Dolby Headphone On
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>Dolby Headphone Off
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-ad_conv_type <var>type</var></samp>&rsquo;</dt>
+<dd><p>A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
+conversion.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>standard</samp>&rsquo;</dt>
+<dd><p>Standard A/D Converter (default)
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>hdcd</samp>&rsquo;</dt>
+<dd><p>HDCD A/D Converter
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Other-AC_002d3-Encoding-Options"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Other-AC_002d3-Encoding-Options">10.1.3 Other AC-3 Encoding Options</a></h3>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-stereo_rematrixing <var>boolean</var></samp>&rsquo;</dt>
+<dd><p>Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
+is an optional AC-3 feature that increases quality by selectively encoding
+the left/right channels as mid/side. This option is enabled by default, and it
+is highly recommended that it be left as enabled except for testing purposes.
+</p>
+</dd>
+</dl>
+
+<a name="Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">10.1.4 Floating-Point-Only AC-3 Encoding Options</a></h3>
+
+<p>These options are only valid for the floating-point encoder and do not exist
+for the fixed-point encoder due to the corresponding features not being
+implemented in fixed-point.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-channel_coupling <var>boolean</var></samp>&rsquo;</dt>
+<dd><p>Enables/Disables use of channel coupling, which is an optional AC-3 feature
+that increases quality by combining high frequency information from multiple
+channels into a single channel. The per-channel high frequency information is
+sent with less accuracy in both the frequency and time domains. This allows
+more bits to be used for lower frequencies while preserving enough information
+to reconstruct the high frequencies. This option is enabled by default for the
+floating-point encoder and should generally be left as enabled except for
+testing purposes or to increase encoding speed.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
+<dd><p>Selected by Encoder (default)
+</p></dd>
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>off</samp>&rsquo;</dt>
+<dd><p>Disable Channel Coupling
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>on</samp>&rsquo;</dt>
+<dd><p>Enable Channel Coupling
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-cpl_start_band <var>number</var></samp>&rsquo;</dt>
+<dd><p>Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
+value higher than the bandwidth is used, it will be reduced to 1 less than the
+coupling end band. If <var>auto</var> is used, the start band will be determined by
+the encoder based on the bit rate, sample rate, and channel layout. This option
+has no effect if channel coupling is disabled.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
+<dd><p>Selected by Encoder (default)
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+
+<a name="Video-Encoders"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Video-Encoders">11. Video Encoders</a></h1>
+
+<p>A description of some of the currently available video encoders
+follows.
+</p>
+<a name="libvpx"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-libvpx">11.1 libvpx</a></h2>
+
+<p>VP8 format supported through libvpx.
+</p>
+<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>
+
+<p>Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>threads</samp>&rsquo;</dt>
+<dd><p>g_threads
+</p>
+</dd>
+<dt> &lsquo;<samp>profile</samp>&rsquo;</dt>
+<dd><p>g_profile
+</p>
+</dd>
+<dt> &lsquo;<samp>vb</samp>&rsquo;</dt>
+<dd><p>rc_target_bitrate
+</p>
+</dd>
+<dt> &lsquo;<samp>g</samp>&rsquo;</dt>
+<dd><p>kf_max_dist
+</p>
+</dd>
+<dt> &lsquo;<samp>keyint_min</samp>&rsquo;</dt>
+<dd><p>kf_min_dist
+</p>
+</dd>
+<dt> &lsquo;<samp>qmin</samp>&rsquo;</dt>
+<dd><p>rc_min_quantizer
+</p>
+</dd>
+<dt> &lsquo;<samp>qmax</samp>&rsquo;</dt>
+<dd><p>rc_max_quantizer
+</p>
+</dd>
+<dt> &lsquo;<samp>bufsize, vb</samp>&rsquo;</dt>
+<dd><p>rc_buf_sz
+<code>(bufsize * 1000 / vb)</code>
+</p>
+<p>rc_buf_optimal_sz
+<code>(bufsize * 1000 / vb * 5 / 6)</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>rc_init_occupancy, vb</samp>&rsquo;</dt>
+<dd><p>rc_buf_initial_sz
+<code>(rc_init_occupancy * 1000 / vb)</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>rc_buffer_aggressivity</samp>&rsquo;</dt>
+<dd><p>rc_undershoot_pct
+</p>
+</dd>
+<dt> &lsquo;<samp>skip_threshold</samp>&rsquo;</dt>
+<dd><p>rc_dropframe_thresh
+</p>
+</dd>
+<dt> &lsquo;<samp>qcomp</samp>&rsquo;</dt>
+<dd><p>rc_2pass_vbr_bias_pct
+</p>
+</dd>
+<dt> &lsquo;<samp>maxrate, vb</samp>&rsquo;</dt>
+<dd><p>rc_2pass_vbr_maxsection_pct
+<code>(maxrate * 100 / vb)</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>minrate, vb</samp>&rsquo;</dt>
+<dd><p>rc_2pass_vbr_minsection_pct
+<code>(minrate * 100 / vb)</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>minrate, maxrate, vb</samp>&rsquo;</dt>
+<dd><p><code>VPX_CBR</code>
+<code>(minrate == maxrate == vb)</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>crf</samp>&rsquo;</dt>
+<dd><p><code>VPX_CQ</code>, <code>VP8E_SET_CQ_LEVEL</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>quality</samp>&rsquo;</dt>
+<dd><dl compact="compact">
+<dt> &lsquo;<samp><var>best</var></samp>&rsquo;</dt>
+<dd><p><code>VPX_DL_BEST_QUALITY</code>
+</p></dd>
+<dt> &lsquo;<samp><var>good</var></samp>&rsquo;</dt>
+<dd><p><code>VPX_DL_GOOD_QUALITY</code>
+</p></dd>
+<dt> &lsquo;<samp><var>realtime</var></samp>&rsquo;</dt>
+<dd><p><code>VPX_DL_REALTIME</code>
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>speed</samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_CPUUSED</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>nr</samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_NOISE_SENSITIVITY</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>mb_threshold</samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_STATIC_THRESHOLD</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>slices</samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_TOKEN_PARTITIONS</code>
+</p>
+</dd>
+<dt> &lsquo;<samp>Alternate reference frame related</samp>&rsquo;</dt>
+<dd><dl compact="compact">
+<dt> &lsquo;<samp>vp8flags altref</samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_ENABLEAUTOALTREF</code>
+</p></dd>
+<dt> &lsquo;<samp><var>arnr_max_frames</var></samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_ARNR_MAXFRAMES</code>
+</p></dd>
+<dt> &lsquo;<samp><var>arnr_type</var></samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_ARNR_TYPE</code>
+</p></dd>
+<dt> &lsquo;<samp><var>arnr_strength</var></samp>&rsquo;</dt>
+<dd><p><code>VP8E_SET_ARNR_STRENGTH</code>
+</p></dd>
+<dt> &lsquo;<samp><var>rc_lookahead</var></samp>&rsquo;</dt>
+<dd><p>g_lag_in_frames
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>vp8flags error_resilient</samp>&rsquo;</dt>
+<dd><p>g_error_resilient
+</p>
+</dd>
+</dl>
+
+<p>For more information about libvpx see:
+<a href="http://www.webmproject.org/">http://www.webmproject.org/</a>
+</p>
+<a name="libx264"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-libx264">11.2 libx264</a></h2>
+
+<p>H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 format supported through
+libx264.
+</p>
+<p>Requires the presence of the libx264 headers and library during
+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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>preset <var>preset_name</var></samp>&rsquo;</dt>
+<dd><p>Set the encoding preset.
+</p>
+</dd>
+<dt> &lsquo;<samp>tune <var>tune_name</var></samp>&rsquo;</dt>
+<dd><p>Tune the encoding params.
+Deprecated in favor of <var>x264_opts</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>fastfirstpass <var>bool</var></samp>&rsquo;</dt>
+<dd><p>Use fast settings when encoding first pass, default value is 1.
+Deprecated in favor of <var>x264_opts</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>profile <var>profile_name</var></samp>&rsquo;</dt>
+<dd><p>Set profile restrictions.
+Deprecated in favor of <var>x264_opts</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>level <var>level</var></samp>&rsquo;</dt>
+<dd><p>Specify level (as defined by Annex A).
+Deprecated in favor of <var>x264_opts</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>passlogfile <var>filename</var></samp>&rsquo;</dt>
+<dd><p>Specify filename for 2 pass stats.
+Deprecated in favor of <var>x264_opts</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>wpredp <var>wpred_type</var></samp>&rsquo;</dt>
+<dd><p>Specify Weighted prediction for P-frames.
+Deprecated in favor of <var>x264_opts</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>x264opts <var>options</var></samp>&rsquo;</dt>
+<dd><p>Allow to set any x264 option, see x264 manual for a list.
+</p>
+<p><var>options</var> is a list of <var>key</var>=<var>value</var> couples separated by
+&quot;:&quot;.
+</p></dd>
+</dl>
+
+<p>For example to specify libx264 encoding options with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
+</pre></td></tr></table>
+
+<p>For more information about libx264 and the supported options see:
+<a href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a>
+</p>
+<a name="Demuxers"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Demuxers">12. Demuxers</a></h1>
+
+<p>Demuxers are configured elements in FFmpeg which allow to read the
+multimedia streams from a particular type of file.
+</p>
+<p>When you configure your FFmpeg build, all the supported demuxers
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-demuxers&quot;.
+</p>
+<p>You can disable all the demuxers using the configure option
+&quot;&ndash;disable-demuxers&quot;, and selectively enable a single demuxer with
+the option &quot;&ndash;enable-demuxer=<var>DEMUXER</var>&quot;, or disable it
+with the option &quot;&ndash;disable-demuxer=<var>DEMUXER</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+enabled demuxers.
+</p>
+<p>The description of some of the currently available demuxers follows.
+</p>
+<a name="image2"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-image2">12.1 image2</a></h2>
+
+<p>Image file demuxer.
+</p>
+<p>This demuxer reads from a list of image files specified by a pattern.
+</p>
+<p>The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
+specifies the position of the characters representing a sequential
+number in each filename matched by the pattern. If the form
+&quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
+filename is 0-padded and <var>N</var> is the total number of 0-padded
+digits representing the number. The literal character &rsquo;%&rsquo; can be
+specified in the pattern with the string &quot;%%&quot;.
+</p>
+<p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
+the file list specified by the pattern must contain a number
+inclusively contained between 0 and 4, all the following numbers must
+be sequential. This limitation may be hopefully fixed.
+</p>
+<p>The pattern may contain a suffix which is used to automatically
+determine the format of the images contained in the files.
+</p>
+<p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
+filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
+&lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
+sequence of filenames of the form &lsquo;<tt>i%m%g-1.jpg</tt>&rsquo;,
+&lsquo;<tt>i%m%g-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>i%m%g-10.jpg</tt>&rsquo;, etc.
+</p>
+<p>The size, the pixel format, and the format of each image must be the
+same for all the files in the sequence.
+</p>
+<p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
+video from the images in the file sequence &lsquo;<tt>img-001.jpeg</tt>&rsquo;,
+&lsquo;<tt>img-002.jpeg</tt>&rsquo;, ..., assuming an input framerate of 10 frames per
+second:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
+</pre></td></tr></table>
+
+<p>Note that the pattern must not necessarily contain &quot;%d&quot; or
+&quot;%0<var>N</var>d&quot;, for example to convert a single image file
+&lsquo;<tt>img.jpeg</tt>&rsquo; you can employ the command:
+</p><table><tr><td>&nbsp;</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>
+
+<p>Apple HTTP Live Streaming demuxer.
+</p>
+<p>This demuxer presents all AVStreams from all variant streams.
+The id field is set to the bitrate variant index number. By setting
+the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
+the caller can decide which variant streams to actually receive.
+The total bitrate of the variant that the stream belongs to is
+available in a metadata key named &quot;variant_bitrate&quot;.
+</p>
+<a name="Muxers"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Muxers">13. Muxers</a></h1>
+
+<p>Muxers are configured elements in FFmpeg which allow writing
+multimedia streams to a particular type of file.
+</p>
+<p>When you configure your FFmpeg build, all the supported muxers
+are enabled by default. You can list all available muxers using the
+configure option <code>--list-muxers</code>.
+</p>
+<p>You can disable all the muxers with the configure option
+<code>--disable-muxers</code> and selectively enable / disable single muxers
+with the options <code>--enable-muxer=<var>MUXER</var></code> /
+<code>--disable-muxer=<var>MUXER</var></code>.
+</p>
+<p>The option <code>-formats</code> of the ff* tools will display the list of
+enabled muxers.
+</p>
+<p>A description of some of the currently available muxers follows.
+</p>
+<p><a name="crc"></a>
+</p><a name="crc-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-crc-1">13.1 crc</a></h2>
+
+<p>CRC (Cyclic Redundancy Check) testing format.
+</p>
+<p>This muxer computes and prints the Adler-32 CRC of all the input audio
+and video frames. By default audio frames are converted to signed
+16-bit raw audio and video frames to raw video before computing the
+CRC.
+</p>
+<p>The output of the muxer consists of a single line of the form:
+CRC=0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal number 0-padded to
+8 digits containing the CRC for all the decoded input frames.
+</p>
+<p>For example to compute the CRC of the input, and store it in the file
+&lsquo;<tt>out.crc</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f crc out.crc
+</pre></td></tr></table>
+
+<p>You can print the CRC to stdout with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f crc -
+</pre></td></tr></table>
+
+<p>You can select the output format of each frame with &lsquo;<tt>ffmpeg</tt>&rsquo; by
+specifying the audio and video codec and format. For example to
+compute the CRC of the input audio converted to PCM unsigned 8-bit
+and the input video converted to MPEG-2 video, use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
+</pre></td></tr></table>
+
+<p>See also the <a href="#framecrc">framecrc</a> muxer.
+</p>
+<p><a name="framecrc"></a>
+</p><a name="framecrc-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-framecrc-1">13.2 framecrc</a></h2>
+
+<p>Per-frame CRC (Cyclic Redundancy Check) testing format.
+</p>
+<p>This muxer computes and prints the Adler-32 CRC for each decoded audio
+and video frame. By default audio frames are converted to signed
+16-bit raw audio and video frames to raw video before computing the
+CRC.
+</p>
+<p>The output of the muxer consists of a line for each audio and video
+frame of the form: <var>stream_index</var>, <var>frame_dts</var>,
+<var>frame_size</var>, 0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal
+number 0-padded to 8 digits containing the CRC of the decoded frame.
+</p>
+<p>For example to compute the CRC of each decoded frame in the input, and
+store it in the file &lsquo;<tt>out.crc</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f framecrc out.crc
+</pre></td></tr></table>
+
+<p>You can print the CRC of each decoded frame to stdout with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f framecrc -
+</pre></td></tr></table>
+
+<p>You can select the output format of each frame with &lsquo;<tt>ffmpeg</tt>&rsquo; by
+specifying the audio and video codec and format. For example, to
+compute the CRC of each decoded input audio frame converted to PCM
+unsigned 8-bit and of each decoded input video frame converted to
+MPEG-2 video, use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
+</pre></td></tr></table>
+
+<p>See also the <a href="#crc">crc</a> muxer.
+</p>
+<a name="image2-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-image2-1">13.3 image2</a></h2>
+
+<p>Image file muxer.
+</p>
+<p>The image file muxer writes video frames to image files.
+</p>
+<p>The output filenames are specified by a pattern, which can be used to
+produce sequentially numbered series of files.
+The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, this string
+specifies the position of the characters representing a numbering in
+the filenames. If the form &quot;%0<var>N</var>d&quot; is used, the string
+representing the number in each filename is 0-padded to <var>N</var>
+digits. The literal character &rsquo;%&rsquo; can be specified in the pattern with
+the string &quot;%%&quot;.
+</p>
+<p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
+the file list specified will contain the number 1, all the following
+numbers will be sequential.
+</p>
+<p>The pattern may contain a suffix which is used to automatically
+determine the format of the image files to write.
+</p>
+<p>For example the pattern &quot;img-%03d.bmp&quot; will specify a sequence of
+filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
+&lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.
+The pattern &quot;img%%-%d.jpg&quot; will specify a sequence of filenames of the
+form &lsquo;<tt>img%-1.jpg</tt>&rsquo;, &lsquo;<tt>img%-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>img%-10.jpg</tt>&rsquo;,
+etc.
+</p>
+<p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
+sequence of files &lsquo;<tt>img-001.jpeg</tt>&rsquo;, &lsquo;<tt>img-002.jpeg</tt>&rsquo;, ...,
+taking one image every second from the input video:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
+</pre></td></tr></table>
+
+<p>Note that with &lsquo;<tt>ffmpeg</tt>&rsquo;, if the format is not specified with the
+<code>-f</code> option and the output filename specifies an image file
+format, the image2 muxer is automatically selected, so the previous
+command can be written as:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
+</pre></td></tr></table>
+
+<p>Note also that the pattern must not necessarily contain &quot;%d&quot; or
+&quot;%0<var>N</var>d&quot;, for example to create a single image file
+&lsquo;<tt>img.jpeg</tt>&rsquo; from the input video you can employ the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
+</pre></td></tr></table>
+
+<p>The image muxer supports the .Y.U.V image file format. This format is
+special in that that each image frame consists of three files, for
+each of the YUV420P components. To read or write this image file format,
+specify the name of the &rsquo;.Y&rsquo; file. The muxer will automatically open the
+&rsquo;.U&rsquo; and &rsquo;.V&rsquo; files as required.
+</p>
+<a name="mpegts"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mpegts">13.4 mpegts</a></h2>
+
+<p>MPEG transport stream muxer.
+</p>
+<p>This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
+</p>
+<p>The muxer options are:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-mpegts_original_network_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the original_network_id (default 0x0001). This is unique identifier
+of a network in DVB. Its main use is in the unique identification of a
+service through the path Original_Network_ID, Transport_Stream_ID.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_transport_stream_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the transport_stream_id (default 0x0001). This identifies a
+transponder in DVB.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_service_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the service_id (default 0x0001) also known as program in DVB.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_pmt_start_pid <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the first PID for PMT (default 0x1000, max 0x1f00).
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_start_pid <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the first PID for data packets (default 0x0100, max 0x0f00).
+</p></dd>
+</dl>
+
+<p>The recognized metadata settings in mpegts muxer are <code>service_provider</code>
+and <code>service_name</code>. If they are not set the default for
+<code>service_provider</code> is &quot;FFmpeg&quot; and the default for
+<code>service_name</code> is &quot;Service01&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file.mpg -acodec copy -vcodec copy \
+     -mpegts_original_network_id 0x1122 \
+     -mpegts_transport_stream_id 0x3344 \
+     -mpegts_service_id 0x5566 \
+     -mpegts_pmt_start_pid 0x1500 \
+     -mpegts_start_pid 0x150 \
+     -metadata service_provider=&quot;Some provider&quot; \
+     -metadata service_name=&quot;Some Channel&quot; \
+     -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>
+
+<p>Null muxer.
+</p>
+<p>This muxer does not generate any output file, it is mainly useful for
+testing or benchmarking purposes.
+</p>
+<p>For example to benchmark decoding with &lsquo;<tt>ffmpeg</tt>&rsquo; you can use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null out.null
+</pre></td></tr></table>
+
+<p>Note that the above command does not read or write the &lsquo;<tt>out.null</tt>&rsquo;
+file, but specifying the output file is required by the &lsquo;<tt>ffmpeg</tt>&rsquo;
+syntax.
+</p>
+<p>Alternatively you can write the command as:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null -
+</pre></td></tr></table>
+
+<a name="matroska"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-matroska">13.6 matroska</a></h2>
+
+<p>Matroska container muxer.
+</p>
+<p>This muxer implements the matroska and webm container specs.
+</p>
+<p>The recognized metadata settings in this muxer are:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>title=<var>title name</var></samp>&rsquo;</dt>
+<dd><p>Name provided to a single track
+</p></dd>
+</dl>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>language=<var>language name</var></samp>&rsquo;</dt>
+<dd><p>Specifies the language of the track in the Matroska languages form
+</p></dd>
+</dl>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>stereo_mode=<var>mode</var></samp>&rsquo;</dt>
+<dd><p>Stereo 3D video layout of two views in a single video track
+</p><dl compact="compact">
+<dt> &lsquo;<samp>mono</samp>&rsquo;</dt>
+<dd><p>video is not stereo
+</p></dd>
+<dt> &lsquo;<samp>left_right</samp>&rsquo;</dt>
+<dd><p>Both views are arranged side by side, Left-eye view is on the left
+</p></dd>
+<dt> &lsquo;<samp>bottom_top</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in top-bottom orientation, Left-eye view is at bottom
+</p></dd>
+<dt> &lsquo;<samp>top_bottom</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in top-bottom orientation, Left-eye view is on top
+</p></dd>
+<dt> &lsquo;<samp>checkerboard_rl</samp>&rsquo;</dt>
+<dd><p>Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
+</p></dd>
+<dt> &lsquo;<samp>checkerboard_lr</samp>&rsquo;</dt>
+<dd><p>Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
+</p></dd>
+<dt> &lsquo;<samp>row_interleaved_rl</samp>&rsquo;</dt>
+<dd><p>Each view is constituted by a row based interleaving, Right-eye view is first row
+</p></dd>
+<dt> &lsquo;<samp>row_interleaved_lr</samp>&rsquo;</dt>
+<dd><p>Each view is constituted by a row based interleaving, Left-eye view is first row
+</p></dd>
+<dt> &lsquo;<samp>col_interleaved_rl</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in a column based interleaving manner, Right-eye view is first column
+</p></dd>
+<dt> &lsquo;<samp>col_interleaved_lr</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in a column based interleaving manner, Left-eye view is first column
+</p></dd>
+<dt> &lsquo;<samp>anaglyph_cyan_red</samp>&rsquo;</dt>
+<dd><p>All frames are in anaglyph format viewable through red-cyan filters
+</p></dd>
+<dt> &lsquo;<samp>right_left</samp>&rsquo;</dt>
+<dd><p>Both views are arranged side by side, Right-eye view is on the left
+</p></dd>
+<dt> &lsquo;<samp>anaglyph_green_magenta</samp>&rsquo;</dt>
+<dd><p>All frames are in anaglyph format viewable through green-magenta filters
+</p></dd>
+<dt> &lsquo;<samp>block_lr</samp>&rsquo;</dt>
+<dd><p>Both eyes laced in one Block, Left-eye view is first
+</p></dd>
+<dt> &lsquo;<samp>block_rl</samp>&rsquo;</dt>
+<dd><p>Both eyes laced in one Block, Right-eye view is first
+</p></dd>
+</dl>
+</dd>
+</dl>
+
+<p>For example a 3D WebM clip can be created using the following command line:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
+</pre></td></tr></table>
+
+<a name="Input-Devices"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Input-Devices">14. Input Devices</a></h1>
+
+<p>Input devices are configured elements in FFmpeg which allow to access
+the data coming from a multimedia device attached to your system.
+</p>
+<p>When you configure your FFmpeg build, all the supported input devices
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-indevs&quot;.
+</p>
+<p>You can disable all the input devices using the configure option
+&quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
+option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
+input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+supported input devices (amongst the demuxers).
+</p>
+<p>A description of the currently available input devices follows.
+</p>
+<a name="alsa-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-alsa-1">14.1 alsa</a></h2>
+
+<p>ALSA (Advanced Linux Sound Architecture) input device.
+</p>
+<p>To enable this input device during configuration you need libasound
+installed on your system.
+</p>
+<p>This device allows capturing from an ALSA device. The name of the
+device to capture has to be an ALSA card identifier.
+</p>
+<p>An ALSA identifier has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
+</pre></td></tr></table>
+
+<p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
+</p>
+<p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
+specify card number or identifier, device number and subdevice number
+(-1 means any).
+</p>
+<p>To see the list of cards currently recognized by your system check the
+files &lsquo;<tt>/proc/asound/cards</tt>&rsquo; and &lsquo;<tt>/proc/asound/devices</tt>&rsquo;.
+</p>
+<p>For example to capture with &lsquo;<tt>ffmpeg</tt>&rsquo; from an ALSA device with
+card id 0, you may run the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
+</pre></td></tr></table>
+
+<p>For more information see:
+<a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
+</p>
+<a name="bktr"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-bktr">14.2 bktr</a></h2>
+
+<p>BSD video input device.
+</p>
+<a name="dv1394"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-dv1394">14.3 dv1394</a></h2>
+
+<p>Linux DV 1394 input device.
+</p>
+<a name="fbdev"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-fbdev">14.4 fbdev</a></h2>
+
+<p>Linux framebuffer input device.
+</p>
+<p>The Linux framebuffer is a graphic hardware-independent abstraction
+layer to show graphics on a computer monitor, typically on the
+console. It is accessed through a file device node, usually
+&lsquo;<tt>/dev/fb0</tt>&rsquo;.
+</p>
+<p>For more detailed information read the file
+Documentation/fb/framebuffer.txt included in the Linux source tree.
+</p>
+<p>To record from the framebuffer device &lsquo;<tt>/dev/fb0</tt>&rsquo; with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
+</pre></td></tr></table>
+
+<p>You can take a single screenshot image with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
+</pre></td></tr></table>
+
+<p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
+</p>
+<a name="jack"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-jack">14.5 jack</a></h2>
+
+<p>JACK input device.
+</p>
+<p>To enable this input device during configuration you need libjack
+installed on your system.
+</p>
+<p>A JACK input device creates one or more JACK writable clients, one for
+each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
+<var>client_name</var> is the name provided by the application, and <var>N</var>
+is a number which identifies the channel.
+Each writable client will send the acquired data to the FFmpeg input
+device.
+</p>
+<p>Once you have created one or more JACK readable clients, you need to
+connect them to one or more JACK writable clients.
+</p>
+<p>To connect or disconnect JACK clients you can use the
+&lsquo;<tt>jack_connect</tt>&rsquo; and &lsquo;<tt>jack_disconnect</tt>&rsquo; programs, or do it
+through a graphical interface, for example with &lsquo;<tt>qjackctl</tt>&rsquo;.
+</p>
+<p>To list the JACK clients and their properties you can invoke the command
+&lsquo;<tt>jack_lsp</tt>&rsquo;.
+</p>
+<p>Follows an example which shows how to capture a JACK readable client
+with &lsquo;<tt>ffmpeg</tt>&rsquo;.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
+$ ffmpeg -f jack -i ffmpeg -y out.wav
+
+# Start the sample jack_metro readable client.
+$ jack_metro -b 120 -d 0.2 -f 4000
+
+# List the current JACK clients.
+$ jack_lsp -c
+system:capture_1
+system:capture_2
+system:playback_1
+system:playback_2
+ffmpeg:input_1
+metro:120_bpm
+
+# Connect metro to the ffmpeg writable client.
+$ jack_connect metro:120_bpm ffmpeg:input_1
+</pre></td></tr></table>
+
+<p>For more information read:
+<a href="http://jackaudio.org/">http://jackaudio.org/</a>
+</p>
+<a name="libdc1394"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-libdc1394">14.6 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>
+
+<p>The OpenAL input device provides audio capture on all systems with a
+working OpenAL 1.1 implementation.
+</p>
+<p>To enable this input device during configuration, you need OpenAL
+headers and libraries installed on your system, and need to configure
+FFmpeg with <code>--enable-openal</code>.
+</p>
+<p>OpenAL headers and libraries should be provided as part of your OpenAL
+implementation, or as an additional download (an SDK). Depending on your
+installation you may need to specify additional flags via the
+<code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
+system to locate the OpenAL headers and libraries.
+</p>
+<p>An incomplete list of OpenAL implementations follows:
+</p>
+<dl compact="compact">
+<dt> <strong>Creative</strong></dt>
+<dd><p>The official Windows implementation, providing hardware acceleration
+with supported devices and software fallback.
+See <a href="http://openal.org/">http://openal.org/</a>.
+</p></dd>
+<dt> <strong>OpenAL Soft</strong></dt>
+<dd><p>Portable, open source (LGPL) software implementation. Includes
+backends for the most common sound APIs on the Windows, Linux,
+Solaris, and BSD operating systems.
+See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
+</p></dd>
+<dt> <strong>Apple</strong></dt>
+<dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
+See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
+</p></dd>
+</dl>
+
+<p>This device allows to capture from an audio input device handled
+through OpenAL.
+</p>
+<p>You need to specify the name of the device to capture in the provided
+filename. If the empty string is provided, the device will
+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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>channels</samp>&rsquo;</dt>
+<dd><p>Set the number of channels in the captured audio. Only the values
+&lsquo;<samp>1</samp>&rsquo; (monaural) and &lsquo;<samp>2</samp>&rsquo; (stereo) are currently supported.
+Defaults to &lsquo;<samp>2</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_size</samp>&rsquo;</dt>
+<dd><p>Set the sample size (in bits) of the captured audio. Only the values
+&lsquo;<samp>8</samp>&rsquo; and &lsquo;<samp>16</samp>&rsquo; are currently supported. Defaults to
+&lsquo;<samp>16</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_rate</samp>&rsquo;</dt>
+<dd><p>Set the sample rate (in Hz) of the captured audio.
+Defaults to &lsquo;<samp>44.1k</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>list_devices</samp>&rsquo;</dt>
+<dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
+Defaults to &lsquo;<samp>false</samp>&rsquo;.
+</p>
+</dd>
+</dl>
+
+<a name="Examples-2"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Examples-2">14.7.2 Examples</a></h3>
+
+<p>Print the list of OpenAL supported devices and exit:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the OpenAL device &lsquo;<tt>DR-BT101 via PulseAudio</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the default device (note the empty string &rdquo; as filename):
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from two devices simultaneously, writing to two different files,
+within the same &lsquo;<tt>ffmpeg</tt>&rsquo; command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
+</pre></td></tr></table>
+<p>Note: not all OpenAL implementations support multiple simultaneous capture -
+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>
+
+<p>Open Sound System input device.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the OSS input device, and is usually set to
+&lsquo;<tt>/dev/dsp</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/dsp</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
+</pre></td></tr></table>
+
+<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>
+
+<p>sndio input device.
+</p>
+<p>To enable this input device during configuration you need libsndio
+installed on your system.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the sndio input device, and is usually set to
+&lsquo;<tt>/dev/audio0</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/audio0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
+</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>
+
+<p>Video4Linux and Video4Linux2 input video devices.
+</p>
+<p>The name of the device to grab is a file device node, usually Linux
+systems tend to automatically create such nodes when the device
+(e.g. an USB webcam) is plugged into the system, and has a name of the
+kind &lsquo;<tt>/dev/video<var>N</var></tt>&rsquo;, where <var>N</var> is a number associated to
+the device.
+</p>
+<p>Video4Linux and Video4Linux2 devices only support a limited set of
+<var>width</var>x<var>height</var> sizes and framerates. You can check which are
+supported for example with the command &lsquo;<tt>dov4l</tt>&rsquo; for Video4Linux
+devices and the command &lsquo;<tt>v4l-info</tt>&rsquo; for Video4Linux2 devices.
+</p>
+<p>If the size for the device is set to 0x0, the input device will
+try to autodetect the size to use.
+Only for the video4linux2 device, if the frame rate is set to 0/0 the
+input device will use the frame rate value already set in the driver.
+</p>
+<p>Video4Linux support is deprecated since Linux 2.6.30, and will be
+dropped in later versions.
+</p>
+<p>Follow some usage examples of the video4linux devices with the ff*
+tools.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
+# to the default of 25/1.
+ffplay -s 320x240 -f video4linux /dev/video0
+
+# Grab and show the input of a video4linux2 device, autoadjust size.
+ffplay -f video4linux2 /dev/video0
+
+# Grab and record the input of a video4linux2 device, autoadjust size,
+# frame rate value defaults to 0/0 so it is read from the video4linux2
+# driver.
+ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
+</pre></td></tr></table>
+
+<a name="vfwcap"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-vfwcap">14.11 vfwcap</a></h2>
+
+<p>VfW (Video for Windows) capture input device.
+</p>
+<p>The filename passed as input is the capture driver number, ranging from
+0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
+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>
+
+<p>X11 video input device.
+</p>
+<p>This device allows to capture a region of an X11 display.
+</p>
+<p>The filename passed as input has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
+</pre></td></tr></table>
+
+<p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
+X11 display name of the screen to grab from. <var>hostname</var> can be
+ommitted, and defaults to &quot;localhost&quot;. The environment variable
+<code>DISPLAY</code> contains the default display name.
+</p>
+<p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
+area with respect to the top-left border of the X11 screen. They
+default to 0.
+</p>
+<p>Check the X11 documentation (e.g. man X) for more detailed information.
+</p>
+<p>Use the &lsquo;<tt>dpyinfo</tt>&rsquo; program for getting basic information about the
+properties of your X11 display (e.g. grep for &quot;name&quot; or &quot;dimensions&quot;).
+</p>
+<p>For example to grab from &lsquo;<tt>:0.0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</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
+</pre></td></tr></table>
+
+<a name="Output-Devices"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Output-Devices">15. Output Devices</a></h1>
+
+<p>Output devices are configured elements in FFmpeg which allow to write
+multimedia data to an output device attached to your system.
+</p>
+<p>When you configure your FFmpeg build, all the supported output devices
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-outdevs&quot;.
+</p>
+<p>You can disable all the output devices using the configure option
+&quot;&ndash;disable-outdevs&quot;, and selectively enable an output device using the
+option &quot;&ndash;enable-outdev=<var>OUTDEV</var>&quot;, or you can disable a particular
+input device using the option &quot;&ndash;disable-outdev=<var>OUTDEV</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+enabled output devices (amongst the muxers).
+</p>
+<p>A description of the currently available output devices follows.
+</p>
+<a name="alsa"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-alsa">15.1 alsa</a></h2>
+
+<p>ALSA (Advanced Linux Sound Architecture) output device.
+</p>
+<a name="oss-1"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-oss-1">15.2 oss</a></h2>
+
+<p>OSS (Open Sound System) output device.
+</p>
+<a name="sdl"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-sdl">15.3 sdl</a></h2>
+
+<p>SDL (Simple Directmedia Layer) output device.
+</p>
+<p>This output devices allows to show a video stream in an SDL
+window. Only one SDL window is allowed per application, so you can
+have only one instance of this output device in an application.
+</p>
+<p>To enable this output device you need libsdl installed on your system
+when configuring your build.
+</p>
+<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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>window_title</samp>&rsquo;</dt>
+<dd><p>Set the SDL window title, if not specified default to the filename
+specified for the output device.
+</p>
+</dd>
+<dt> &lsquo;<samp>icon_title</samp>&rsquo;</dt>
+<dd><p>Set the name of the iconified SDL window, if not specified it is set
+to the same value of <var>window_title</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>window_size</samp>&rsquo;</dt>
+<dd><p>Set the SDL window size, can be a string of the form
+<var>width</var>x<var>height</var> or a video size abbreviation.
+If not specified it defaults to the size of the input video.
+</p></dd>
+</dl>
+
+<a name="Examples-1"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Examples-1">15.3.2 Examples</a></h3>
+
+<p>The following command shows the &lsquo;<tt>ffmpeg</tt>&rsquo; output is an
+SDL window, forcing its size to the qcif format:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl &quot;SDL output&quot;
+</pre></td></tr></table>
+
+<a name="sndio"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-sndio">15.4 sndio</a></h2>
+
+<p>sndio audio output device.
+</p>
+<a name="Protocols"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Protocols">16. Protocols</a></h1>
+
+<p>Protocols are configured elements in FFmpeg which allow to access
+resources which require the use of a particular protocol.
+</p>
+<p>When you configure your FFmpeg build, all the supported protocols are
+enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-protocols&quot;.
+</p>
+<p>You can disable all the protocols using the configure option
+&quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
+option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
+particular protocol using the option
+&quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
+</p>
+<p>The option &quot;-protocols&quot; of the ff* tools will display the list of
+supported protocols.
+</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>
+
+<p>Read Apple HTTP Live Streaming compliant segmented stream as
+a uniform one. The M3U8 playlists describing the segments can be
+remote HTTP resources or local files, accessed using the standard
+file protocol.
+HTTP is default, specific protocol can be declared by specifying
+&quot;+<var>proto</var>&quot; after the applehttp URI scheme name, where <var>proto</var>
+is either &quot;file&quot; or &quot;http&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
+applehttp+http://host/path/to/remote/resource.m3u8
+applehttp+file://path/to/local/resource.m3u8
+</pre></td></tr></table>
+
+<a name="concat"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-concat">16.2 concat</a></h2>
+
+<p>Physical concatenation protocol.
+</p>
+<p>Allow to read and seek from many resource in sequence as if they were
+a unique resource.
+</p>
+<p>A URL accepted by this protocol has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
+</pre></td></tr></table>
+
+<p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
+resource to be concatenated, each one possibly specifying a distinct
+protocol.
+</p>
+<p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
+&lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with &lsquo;<tt>ffplay</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
+</pre></td></tr></table>
+
+<p>Note that you may need to escape the character &quot;|&quot; which is special for
+many shells.
+</p>
+<a name="file"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-file">16.3 file</a></h2>
+
+<p>File access protocol.
+</p>
+<p>Allow to read from or read to a file.
+</p>
+<p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with &lsquo;<tt>ffmpeg</tt>&rsquo;
+use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
+</pre></td></tr></table>
+
+<p>The ff* tools default to the file protocol, that is a resource
+specified with the name &quot;FILE.mpeg&quot; is interpreted as the URL
+&quot;file:FILE.mpeg&quot;.
+</p>
+<a name="gopher"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-gopher">16.4 gopher</a></h2>
+
+<p>Gopher protocol.
+</p>
+<a name="http"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-http">16.5 http</a></h2>
+
+<p>HTTP (Hyper Text Transfer Protocol).
+</p>
+<a name="mmst"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mmst">16.6 mmst</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over TCP.
+</p>
+<a name="mmsh"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mmsh">16.7 mmsh</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over HTTP.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<a name="md5"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-md5">16.8 md5</a></h2>
+
+<p>MD5 output protocol.
+</p>
+<p>Computes the MD5 hash of the data to be written, and on close writes
+this to the designated output or stdout if none is specified. It can
+be used to test muxers without writing an actual file.
+</p>
+<p>Some examples follow.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
+ffmpeg -i input.flv -f avi -y md5:output.avi.md5
+
+# Write the MD5 hash of the encoded AVI file to stdout.
+ffmpeg -i input.flv -f avi -y md5:
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV) require the output protocol to
+be seekable, so they will fail with the MD5 output protocol.
+</p>
+<a name="pipe"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-pipe">16.9 pipe</a></h2>
+
+<p>UNIX pipe access protocol.
+</p>
+<p>Allow to read and write from UNIX pipes.
+</p>
+<p>The accepted syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">pipe:[<var>number</var>]
+</pre></td></tr></table>
+
+<p><var>number</var> is the number corresponding to the file descriptor of the
+pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
+is not specified, by default the stdout file descriptor will be used
+for writing, stdin for reading.
+</p>
+<p>For example to read from stdin with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
+# ...this is the same as...
+cat test.wav | ffmpeg -i pipe:
+</pre></td></tr></table>
+
+<p>For writing to stdout with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
+# ...this is the same as...
+ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV), require the output protocol to
+be seekable, so they will fail with the pipe output protocol.
+</p>
+<a name="rtmp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-rtmp">16.10 rtmp</a></h2>
+
+<p>Real-Time Messaging Protocol.
+</p>
+<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
+dia content across a TCP/IP network.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<p>The accepted parameters are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>server</samp>&rsquo;</dt>
+<dd><p>The address of the RTMP server.
+</p>
+</dd>
+<dt> &lsquo;<samp>port</samp>&rsquo;</dt>
+<dd><p>The number of the TCP port to use (by default is 1935).
+</p>
+</dd>
+<dt> &lsquo;<samp>app</samp>&rsquo;</dt>
+<dd><p>It is the name of the application to access. It usually corresponds to
+the path where the application is installed on the RTMP server
+(e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.).
+</p>
+</dd>
+<dt> &lsquo;<samp>playpath</samp>&rsquo;</dt>
+<dd><p>It is the path or name of the resource to play with reference to the
+application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example to read with &lsquo;<tt>ffplay</tt>&rsquo; a multimedia resource named
+&quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtmp://myserver/vod/sample
+</pre></td></tr></table>
+
+<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">16.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
+
+<p>Real-Time Messaging Protocol and its variants supported through
+librtmp.
+</p>
+<p>Requires the presence of the librtmp headers and library during
+configuration. You need to explicitely configure the build with
+&quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
+protocol.
+</p>
+<p>This protocol provides most client functions and a few server
+functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
+encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
+variants of these encrypted types (RTMPTE, RTMPTS).
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
+</pre></td></tr></table>
+
+<p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
+&quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
+<var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
+meaning as specified for the RTMP native protocol.
+<var>options</var> contains a list of space-separated options of the form
+<var>key</var>=<var>val</var>.
+</p>
+<p>See the librtmp manual page (man 3 librtmp) for more information.
+</p>
+<p>For example, to stream a file in real-time to an RTMP server using
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
+</pre></td></tr></table>
+
+<p>To play the same stream using &lsquo;<tt>ffplay</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
+</pre></td></tr></table>
+
+<a name="rtp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-rtp">16.12 rtp</a></h2>
+
+<p>Real-Time Protocol.
+</p>
+<a name="rtsp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-rtsp">16.13 rtsp</a></h2>
+
+<p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
+and muxer. The demuxer supports both normal RTSP (with data transferred
+over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
+data transferred over RDT).
+</p>
+<p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
+supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
+<a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
+</p>
+<p>The required syntax for a RTSP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>udp</samp>&rsquo;</dt>
+<dd><p>Use UDP as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>tcp</samp>&rsquo;</dt>
+<dd><p>Use TCP (interleaving within the RTSP control channel) as lower
+transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>multicast</samp>&rsquo;</dt>
+<dd><p>Use UDP multicast as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>http</samp>&rsquo;</dt>
+<dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
+passing proxies.
+</p>
+</dd>
+<dt> &lsquo;<samp>filter_src</samp>&rsquo;</dt>
+<dd><p>Accept packets only from negotiated peer address and port.
+</p></dd>
+</dl>
+
+<p>Multiple lower transport protocols may be specified, in that case they are
+tried one at a time (if the setup of one fails, the next one is tried).
+For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
+</p>
+<p>When receiving data over UDP, the demuxer tries to reorder received packets
+(since they may arrive out of order, or packets may get lost totally). In
+order for this to be enabled, a maximum delay must be specified in the
+<code>max_delay</code> field of AVFormatContext.
+</p>
+<p>When watching multi-bitrate Real-RTSP streams with &lsquo;<tt>ffplay</tt>&rsquo;, the
+streams to display can be chosen with <code>-vst</code> <var>n</var> and
+<code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
+on the fly by pressing <code>v</code> and <code>a</code>.
+</p>
+<p>Example command lines:
+</p>
+<p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay -max_delay 500000 rtsp://server/video.mp4?udp
+</pre></td></tr></table>
+
+<p>To watch a stream tunneled over HTTP:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtsp://server/video.mp4?http
+</pre></td></tr></table>
+
+<p>To send a stream in realtime to a RTSP server, for others to watch:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
+</pre></td></tr></table>
+
+<a name="sap"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-sap">16.14 sap</a></h2>
+
+<p>Session Announcement Protocol (RFC 2974). This is not technically a
+protocol handler in libavformat, it is a muxer and demuxer.
+It is used for signalling of RTP streams, by announcing the SDP for the
+streams regularly on a separate port.
+</p>
+<a name="Muxer"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Muxer">16.14.1 Muxer</a></h3>
+
+<p>The syntax for a SAP url given to the muxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
+</pre></td></tr></table>
+
+<p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
+or to port 5004 if no port is specified.
+<var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
+<dd><p>Specify the destination IP address for sending the announcements to.
+If omitted, the announcements are sent to the commonly used SAP
+announcement multicast address 224.2.127.254 (sap.mcast.net), or
+ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
+</p>
+</dd>
+<dt> &lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
+<dd><p>Specify the port to send the announcements on, defaults to
+9875 if not specified.
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>Specify the time to live value for the announcements and RTP packets,
+defaults to 255.
+</p>
+</dd>
+<dt> &lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
+<dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
+default), all streams are sent on unique ports, with each stream on a
+port 2 numbers higher than the previous.
+VLC/Live555 requires this to be set to 1, to be able to receive the stream.
+The RTP stack in libavformat for receiving requires all streams to be sent
+on unique ports.
+</p></dd>
+</dl>
+
+<p>Example command lines follow.
+</p>
+<p>To broadcast a stream on the local subnet, for watching in VLC:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
+</pre></td></tr></table>
+
+<p>Similarly, for watching in ffplay:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
+</pre></td></tr></table>
+
+<p>And for watching in ffplay, over IPv6:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
+</pre></td></tr></table>
+
+<a name="Demuxer"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-Demuxer">16.14.2 Demuxer</a></h3>
+
+<p>The syntax for a SAP url given to the demuxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
+</pre></td></tr></table>
+
+<p><var>address</var> is the multicast address to listen for announcements on,
+if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
+is the port that is listened on, 9875 if omitted.
+</p>
+<p>The demuxers listens for announcements on the given address and port.
+Once an announcement is received, it tries to receive that particular stream.
+</p>
+<p>Example command lines follow.
+</p>
+<p>To play back the first stream announced on the normal SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://
+</pre></td></tr></table>
+
+<p>To play back the first stream announced on one the default IPv6 SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
+</pre></td></tr></table>
+
+<a name="tcp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-tcp">16.15 tcp</a></h2>
+
+<p>Trasmission Control Protocol.
+</p>
+<p>The required syntax for a TCP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>listen</samp>&rsquo;</dt>
+<dd><p>Listen for an incoming connection
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
+ffplay tcp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+</dd>
+</dl>
+
+<a name="udp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-udp">16.16 udp</a></h2>
+
+<p>User Datagram Protocol.
+</p>
+<p>The required syntax for a UDP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> contains a list of &amp;-seperated options of the form <var>key</var>=<var>val</var>.
+Follow the list of supported options.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the UDP buffer size in bytes
+</p>
+</dd>
+<dt> &lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
+<dd><p>override the local UDP port to bind with
+</p>
+</dd>
+<dt> &lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the size in bytes of UDP packets
+</p>
+</dd>
+<dt> &lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>explicitly allow or disallow reusing UDP sockets
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>set the time to live value (for multicast only)
+</p>
+</dd>
+<dt> &lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
+destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
+If the destination address isn&rsquo;t known at the start, this option can
+be specified in ff_udp_set_remote_url, too.
+This allows finding out the source address for the packets with getsockname,
+and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
+unreachable&quot; is received.
+For receiving, this gives the benefit of only receiving packets from
+the specified peer address/port.
+</p></dd>
+</dl>
+
+<p>Some usage examples of the udp protocol with &lsquo;<tt>ffmpeg</tt>&rsquo; follow.
+</p>
+<p>To stream over UDP to a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+<p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
+</pre></td></tr></table>
+
+<p>To receive over UDP from a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
+</pre></td></tr></table>
+
+<a name="Bitstream-Filters"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Bitstream-Filters">17. Bitstream Filters</a></h1>
+
+<p>When you configure your FFmpeg build, all the supported bitstream
+filters are enabled by default. You can list all available ones using
+the configure option <code>--list-bsfs</code>.
+</p>
+<p>You can disable all the bitstream filters using the configure option
+<code>--disable-bsfs</code>, and selectively enable any bitstream filter using
+the option <code>--enable-bsf=BSF</code>, or you can disable a particular
+bitstream filter using the option <code>--disable-bsf=BSF</code>.
+</p>
+<p>The option <code>-bsfs</code> of the ff* tools will display the list of
+all the supported bitstream filters included in your build.
+</p>
+<p>Below is a description of the currently available bitstream filters.
+</p>
+<a name="aac_005fadtstoasc"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-aac_005fadtstoasc">17.1 aac_adtstoasc</a></h2>
+
+<a name="chomp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-chomp">17.2 chomp</a></h2>
+
+<a name="dump_005fextradata"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-dump_005fextradata">17.3 dump_extradata</a></h2>
+
+<a name="h264_005fmp4toannexb"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-h264_005fmp4toannexb">17.4 h264_mp4toannexb</a></h2>
+
+<a name="imx_005fdump_005fheader"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-imx_005fdump_005fheader">17.5 imx_dump_header</a></h2>
+
+<a name="mjpeg2jpeg"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mjpeg2jpeg">17.6 mjpeg2jpeg</a></h2>
+
+<p>Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
+</p>
+<p>MJPEG is a video codec wherein each video frame is essentially a
+JPEG image. The individual frames can be extracted without loss,
+e.g. by
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg
+</pre></td></tr></table>
+
+<p>Unfortunately, these chunks are incomplete JPEG images, because
+they lack the DHT segment required for decoding. Quoting from
+<a href="http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml">http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml</a>:
+</p>
+<p>Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
+commented that &quot;MJPEG, or at least the MJPEG in AVIs having the
+MJPG fourcc, is restricted JPEG with a fixed &ndash; and *omitted* &ndash;
+Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
+and it must use basic Huffman encoding, not arithmetic or
+progressive. . . . You can indeed extract the MJPEG frames and
+decode them with a regular JPEG decoder, but you have to prepend
+the DHT segment to them, or else the decoder won&rsquo;t have any idea
+how to decompress the data. The exact table necessary is given in
+the OpenDML spec.&quot;
+</p>
+<p>This bitstream filter patches the header of frames extracted from an MJPEG
+stream (carrying the AVI1 header ID and lacking a DHT segment) to
+produce fully qualified JPEG images.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg
+exiftran -i -9 frame*.jpg
+ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi
+</pre></td></tr></table>
+
+<a name="mjpega_005fdump_005fheader"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mjpega_005fdump_005fheader">17.7 mjpega_dump_header</a></h2>
+
+<a name="movsub"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-movsub">17.8 movsub</a></h2>
+
+<a name="mp3_005fheader_005fcompress"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mp3_005fheader_005fcompress">17.9 mp3_header_compress</a></h2>
+
+<a name="mp3_005fheader_005fdecompress"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mp3_005fheader_005fdecompress">17.10 mp3_header_decompress</a></h2>
+
+<a name="noise"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-noise">17.11 noise</a></h2>
+
+<a name="remove_005fextradata"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-remove_005fextradata">17.12 remove_extradata</a></h2>
+
+<a name="Filtergraph-description"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Filtergraph-description">18. Filtergraph description</a></h1>
+
+<p>A filtergraph is a directed graph of connected filters. It can contain
+cycles, and there can be multiple links between a pair of
+filters. Each link has one input pad on one side connecting it to one
+filter from which it takes its input, and one output pad on the other
+side connecting it to the one filter accepting its output.
+</p>
+<p>Each filter in a filtergraph is an instance of a filter class
+registered in the application, which defines the features and the
+number of input and output pads of the filter.
+</p>
+<p>A filter with no input pads is called a &quot;source&quot;, a filter with no
+output pads is called a &quot;sink&quot;.
+</p>
+<a name="Filtergraph-syntax"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-Filtergraph-syntax">18.1 Filtergraph syntax</a></h2>
+
+<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
+&lsquo;<tt>libavfilter/avfiltergraph</tt>&rsquo;.
+</p>
+<p>A filterchain consists of a sequence of connected filters, each one
+connected to the previous one in the sequence. A filterchain is
+represented by a list of &quot;,&quot;-separated filter descriptions.
+</p>
+<p>A filtergraph consists of a sequence of filterchains. A sequence of
+filterchains is represented by a list of &quot;;&quot;-separated filterchain
+descriptions.
+</p>
+<p>A filter is represented by a string of the form:
+[<var>in_link_1</var>]...[<var>in_link_N</var>]<var>filter_name</var>=<var>arguments</var>[<var>out_link_1</var>]...[<var>out_link_M</var>]
+</p>
+<p><var>filter_name</var> is the name of the filter class of which the
+described filter is an instance of, and has to be the name of one of
+the filter classes registered in the program.
+The name of the filter class is optionally followed by a string
+&quot;=<var>arguments</var>&quot;.
+</p>
+<p><var>arguments</var> is a string which contains the parameters used to
+initialize the filter instance, and are described in the filter
+descriptions below.
+</p>
+<p>The list of arguments can be quoted using the character &quot;&rsquo;&quot; as initial
+and ending mark, and the character &rsquo;\&rsquo; for escaping the characters
+within the quoted text; otherwise the argument string is considered
+terminated when the next special character (belonging to the set
+&quot;[]=;,&quot;) is encountered.
+</p>
+<p>The name and arguments of the filter are optionally preceded and
+followed by a list of link labels.
+A link label allows to name a link and associate it to a filter output
+or input pad. The preceding labels <var>in_link_1</var>
+... <var>in_link_N</var>, are associated to the filter input pads,
+the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
+associated to the output pads.
+</p>
+<p>When two link labels with the same name are found in the
+filtergraph, a link between the corresponding input and output pad is
+created.
+</p>
+<p>If an output pad is not labelled, it is linked by default to the first
+unlabelled input pad of the next filter in the filterchain.
+For example in the filterchain:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
+</pre></td></tr></table>
+<p>the split filter instance has two output pads, and the overlay filter
+instance two input pads. The first output pad of split is labelled
+&quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
+output pad of split is linked to the second input pad of overlay,
+which are both unlabelled.
+</p>
+<p>In a complete filterchain all the unlabelled filter input and output
+pads must be connected. A filtergraph is considered valid if all the
+filter input and output pads of all the filterchains are connected.
+</p>
+<p>Follows a BNF description for the filtergraph syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>NAME</var>             ::= sequence of alphanumeric characters and '_'
+<var>LINKLABEL</var>        ::= &quot;[&quot; <var>NAME</var> &quot;]&quot;
+<var>LINKLABELS</var>       ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
+<var>FILTER_ARGUMENTS</var> ::= sequence of chars (eventually quoted)
+<var>FILTER</var>           ::= [<var>LINKNAMES</var>] <var>NAME</var> [&quot;=&quot; <var>ARGUMENTS</var>] [<var>LINKNAMES</var>]
+<var>FILTERCHAIN</var>      ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
+<var>FILTERGRAPH</var>      ::= <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
+</pre></td></tr></table>
+
+
+<a name="Audio-Filters"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Audio-Filters">19. Audio Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the audio filters included in your
+build.
+</p>
+<p>Below is a description of the currently available audio filters.
+</p>
+<a name="anull"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-anull">19.1 anull</a></h2>
+
+<p>Pass the audio source unchanged to the output.
+</p>
+
+<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="anullsrc"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-anullsrc">20.1 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>
+<p>It accepts as optional parameter a string of the form
+<var>sample_rate</var>:<var>channel_layout</var>.
+</p>
+<p><var>sample_rate</var> specify the sample rate, and defaults to 44100.
+</p>
+<p><var>channel_layout</var> specify the channel layout, and can be either an
+integer or a string representing a channel layout. The default value
+of <var>channel_layout</var> is 3, which corresponds to CH_LAYOUT_STEREO.
+</p>
+<p>Check the channel_layout_map definition in
+&lsquo;<tt>libavcodec/audioconvert.c</tt>&rsquo; for the mapping between strings and
+channel layout values.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">#  set the sample rate to 48000 Hz and the channel layout to CH_LAYOUT_MONO.
+anullsrc=48000:4
+
+# same as
+anullsrc=48000:mono
+</pre></td></tr></table>
+
+
+<a name="Audio-Sinks"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Audio-Sinks">21. Audio Sinks</a></h1>
+
+<p>Below is a description of the currently available audio sinks.
+</p>
+<a name="anullsink"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-anullsink">21.1 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
+tools.
+</p>
+
+<a name="Video-Filters"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Video-Filters">22. Video Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the video filters included in your
+build.
+</p>
+<p>Below is a description of the currently available video filters.
+</p>
+<a name="blackframe"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-blackframe">22.1 blackframe</a></h2>
+
+<p>Detect frames that are (almost) completely black. Can be useful to
+detect chapter transitions or commercials. Output lines consist of
+the frame number of the detected frame, the percentage of blackness,
+the position in the file if known or -1 and the timestamp in seconds.
+</p>
+<p>In order to display the output lines, you need to set the loglevel at
+least to the AV_LOG_INFO value.
+</p>
+<p>The filter accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">blackframe[=<var>amount</var>:[<var>threshold</var>]]
+</pre></td></tr></table>
+
+<p><var>amount</var> is the percentage of the pixels that have to be below the
+threshold, and defaults to 98.
+</p>
+<p><var>threshold</var> is the threshold below which a pixel value is
+considered black, and defaults to 32.
+</p>
+<a name="boxblur"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-boxblur">22.2 boxblur</a></h2>
+
+<p>Apply boxblur algorithm to the input video.
+</p>
+<p>This filter accepts the parameters:
+<var>luma_power</var>:<var>luma_radius</var>:<var>chroma_radius</var>:<var>chroma_power</var>:<var>alpha_radius</var>:<var>alpha_power</var>
+</p>
+<p>Chroma and alpha parameters are optional, if not specified they default
+to the corresponding values set for <var>luma_radius</var> and
+<var>luma_power</var>.
+</p>
+<p><var>luma_radius</var>, <var>chroma_radius</var>, and <var>alpha_radius</var> represent
+the radius in pixels of the box used for blurring the corresponding
+input plane. They are expressions, and can contain the following
+constants:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>cw, ch</samp>&rsquo;</dt>
+<dd><p>the input chroma image width and height in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>The radius must be a non-negative number, and must be not greater than
+the value of the expression <code>min(w,h)/2</code> for the luma and alpha planes,
+and of <code>min(cw,ch)/2</code> for the chroma planes.
+</p>
+<p><var>luma_power</var>, <var>chroma_power</var>, and <var>alpha_power</var> represent
+how many times the boxblur filter is applied to the corresponding
+plane.
+</p>
+<p>Some examples follow:
+</p>
+<ul>
+<li>
+Apply a boxblur filter with luma, chroma, and alpha radius
+set to 2:
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1
+</pre></td></tr></table>
+
+</li><li>
+Set luma radius to 2, alpha and chroma radius to 0
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1:0:0:0:0
+</pre></td></tr></table>
+
+</li><li>
+Set luma and chroma radius to a fraction of the video dimension
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
+</pre></td></tr></table>
+
+</li></ul>
+
+<a name="copy"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-copy">22.3 copy</a></h2>
+
+<p>Copy the input source unchanged to the output. Mainly useful for
+testing purposes.
+</p>
+<a name="crop"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-crop">22.4 crop</a></h2>
+
+<p>Crop the input video to <var>out_w</var>:<var>out_h</var>:<var>x</var>:<var>y</var>.
+</p>
+<p>The parameters are expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>the computed values for <var>x</var> and <var>y</var>. They are evaluated for
+each new frame.
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the number of input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the input frame, NAN if unknown
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
+</p>
+</dd>
+</dl>
+
+<p>The <var>out_w</var> and <var>out_h</var> parameters specify the expressions for
+the width and height of the output (cropped) video. They are
+evaluated just at the configuration of the filter.
+</p>
+<p>The default value of <var>out_w</var> is &quot;in_w&quot;, and the default value of
+<var>out_h</var> is &quot;in_h&quot;.
+</p>
+<p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
+and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
+cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
+evaluated after <var>out_w</var> and <var>out_h</var>.
+</p>
+<p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
+position of the top-left corner of the output (non-cropped) area. They
+are evaluated for each frame. If the evaluated value is not valid, it
+is approximated to the nearest valid value.
+</p>
+<p>The default value of <var>x</var> is &quot;(in_w-out_w)/2&quot;, and the default
+value for <var>y</var> is &quot;(in_h-out_h)/2&quot;, which set the cropped area at
+the center of the input image.
+</p>
+<p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
+for <var>y</var> may depend on <var>x</var>.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># crop the central input area with size 100x100
+crop=100:100
+
+# crop the central input area with size 2/3 of the input video
+&quot;crop=2/3*in_w:2/3*in_h&quot;
+
+# crop the input video central square
+crop=in_h
+
+# delimit the rectangle with the top-left corner placed at position
+# 100:100 and the right-bottom corner corresponding to the right-bottom
+# corner of the input image.
+crop=in_w-100:in_h-100:100:100
+
+# crop 10 pixels from the left and right borders, and 20 pixels from
+# the top and bottom borders
+&quot;crop=in_w-2*10:in_h-2*20&quot;
+
+# keep only the bottom right quarter of the input image
+&quot;crop=in_w/2:in_h/2:in_w/2:in_h/2&quot;
+
+# crop height for getting Greek harmony
+&quot;crop=in_w:1/PHI*in_w&quot;
+
+# trembling effect
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)&quot;
+
+# erratic camera effect depending on timestamp
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)&quot;
+
+# set x depending on the value of y
+&quot;crop=in_w/2:in_h/2:y:10+10*sin(n/10)&quot;
+</pre></td></tr></table>
+
+<a name="cropdetect"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-cropdetect">22.5 cropdetect</a></h2>
+
+<p>Auto-detect crop size.
+</p>
+<p>Calculate necessary cropping parameters and prints the recommended
+parameters through the logging system. The detected dimensions
+correspond to the non-black area of the input video.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cropdetect[=<var>limit</var>[:<var>round</var>[:<var>reset</var>]]]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>limit</samp>&rsquo;</dt>
+<dd><p>Threshold, which can be optionally specified from nothing (0) to
+everything (255), defaults to 24.
+</p>
+</dd>
+<dt> &lsquo;<samp>round</samp>&rsquo;</dt>
+<dd><p>Value which the width/height should be divisible by, defaults to
+16. The offset is automatically adjusted to center the video. Use 2 to
+get only even dimensions (needed for 4:2:2 video). 16 is best when
+encoding to most video codecs.
+</p>
+</dd>
+<dt> &lsquo;<samp>reset</samp>&rsquo;</dt>
+<dd><p>Counter that determines after how many frames cropdetect will reset
+the previously detected largest video area and start over to detect
+the current optimal crop area. Defaults to 0.
+</p>
+<p>This can be useful when channel logos distort the video area. 0
+indicates never reset and return the largest area encountered during
+playback.
+</p></dd>
+</dl>
+
+<a name="drawbox"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-drawbox">22.6 drawbox</a></h2>
+
+<p>Draw a colored box on the input image.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawbox=<var>x</var>:<var>y</var>:<var>width</var>:<var>height</var>:<var>color</var>
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>Specify the top left corner coordinates of the box. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the box, if 0 they are interpreted as
+the input width and height. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the box to write, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p></dd>
+</dl>
+
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw a black box around the edge of the input image
+drawbox
+
+# draw a box with color red and an opacity of 50%
+drawbox=10:20:200:60:red@0.5&quot;
+</pre></td></tr></table>
+
+<a name="drawtext"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-drawtext">22.7 drawtext</a></h2>
+
+<p>Draw text string or text from specified file on top of video using the
+libfreetype library.
+</p>
+<p>To enable compilation of this filter you need to configure FFmpeg with
+<code>--enable-libfreetype</code>.
+</p>
+<p>The filter also recognizes strftime() sequences in the provided text
+and expands them accordingly. Check the documentation of strftime().
+</p>
+<p>The filter accepts parameters as a list of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;.
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>fontfile</samp>&rsquo;</dt>
+<dd><p>The font file to be used for drawing text. Path must be included.
+This parameter is mandatory.
+</p>
+</dd>
+<dt> &lsquo;<samp>text</samp>&rsquo;</dt>
+<dd><p>The text string to be drawn. The text must be a sequence of UTF-8
+encoded characters.
+This parameter is mandatory if no file is specified with the parameter
+<var>textfile</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>textfile</samp>&rsquo;</dt>
+<dd><p>A text file containing text to be drawn. The text must be a sequence
+of UTF-8 encoded characters.
+</p>
+<p>This parameter is mandatory if no text string is specified with the
+parameter <var>text</var>.
+</p>
+<p>If both text and textfile are specified, an error is thrown.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>The offsets where text will be drawn within the video frame.
+Relative to the top/left border of the output image.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontsize</samp>&rsquo;</dt>
+<dd><p>The font size to be used for drawing text.
+The default value of <var>fontsize</var> is 16.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing fonts.
+Either a string (e.g. &quot;red&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff000033&quot;), possibly followed by an alpha specifier.
+The default value of <var>fontcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>boxcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing box around text.
+Either a string (e.g. &quot;yellow&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>boxcolor</var> is &quot;white&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>box</samp>&rsquo;</dt>
+<dd><p>Used to draw a box around text using background color.
+Value should be either 1 (enable) or 0 (disable).
+The default value of <var>box</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowx, shadowy</samp>&rsquo;</dt>
+<dd><p>The x and y offsets for the text shadow position with respect to the
+position of the text. They can be either positive or negative
+values. Default value for both is &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing a shadow behind the drawn text.  It
+can be a color name (e.g. &quot;yellow&quot;) or a string in the 0xRRGGBB[AA]
+form (e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>shadowcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>ft_load_flags</samp>&rsquo;</dt>
+<dd><p>Flags to be used for loading the fonts.
+</p>
+<p>The flags map the corresponding flags supported by libfreetype, and are
+a combination of the following values:
+</p><dl compact="compact">
+<dt> <var>default</var></dt>
+<dt> <var>no_scale</var></dt>
+<dt> <var>no_hinting</var></dt>
+<dt> <var>render</var></dt>
+<dt> <var>no_bitmap</var></dt>
+<dt> <var>vertical_layout</var></dt>
+<dt> <var>force_autohint</var></dt>
+<dt> <var>crop_bitmap</var></dt>
+<dt> <var>pedantic</var></dt>
+<dt> <var>ignore_global_advance_width</var></dt>
+<dt> <var>no_recurse</var></dt>
+<dt> <var>ignore_transform</var></dt>
+<dt> <var>monochrome</var></dt>
+<dt> <var>linear_design</var></dt>
+<dt> <var>no_autohint</var></dt>
+<dt> <var>end table</var></dt>
+</dl>
+
+<p>Default value is &quot;render&quot;.
+</p>
+<p>For more information consult the documentation for the FT_LOAD_*
+libfreetype flags.
+</p>
+</dd>
+<dt> &lsquo;<samp>tabsize</samp>&rsquo;</dt>
+<dd><p>The size in number of spaces to use for rendering the tab.
+Default value is 4.
+</p></dd>
+</dl>
+
+<p>For example the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
+</pre></td></tr></table>
+
+<p>will draw &quot;Test Text&quot; with font FreeSerif, using the default values
+for the optional parameters.
+</p>
+<p>The command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
+          x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
+</pre></td></tr></table>
+
+<p>will draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
+and y=50 (counting from the top-left corner of the screen), text is
+yellow with a red box around it. Both the text and the box have an
+opacity of 20%.
+</p>
+<p>Note that the double quotes are not necessary if spaces are not used
+within the parameter list.
+</p>
+<p>For more information about libfreetype, check:
+<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>
+
+<p>Apply fade-in/out effect to input video.
+</p>
+<p>It accepts the parameters:
+<var>type</var>:<var>start_frame</var>:<var>nb_frames</var>
+</p>
+<p><var>type</var> specifies if the effect type, can be either &quot;in&quot; for
+fade-in, or &quot;out&quot; for a fade-out effect.
+</p>
+<p><var>start_frame</var> specifies the number of the start frame for starting
+to apply the fade effect.
+</p>
+<p><var>nb_frames</var> specifies the number of frames for which the fade
+effect has to last. At the end of the fade-in effect the output video
+will have the same intensity as the input video, at the end of the
+fade-out transition the output video will be completely black.
+</p>
+<p>A few usage examples follow, usable too as test scenarios.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># fade in first 30 frames of video
+fade=in:0:30
+
+# fade out last 45 frames of a 200-frame video
+fade=out:155:45
+
+# fade in first 25 frames and fade out last 25 frames of a 1000-frame video
+fade=in:0:25, fade=out:975:25
+
+# make first 5 frames black, then fade in from frame 5-24
+fade=in:5:20
+</pre></td></tr></table>
+
+<a name="fieldorder"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-fieldorder">22.9 fieldorder</a></h2>
+
+<p>Transform the field order of the input video.
+</p>
+<p>It accepts one parameter which specifies the required field order that
+the input interlaced video will be transformed to. The parameter can
+assume one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0 or bff</samp>&rsquo;</dt>
+<dd><p>output bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1 or tff</samp>&rsquo;</dt>
+<dd><p>output top field first
+</p></dd>
+</dl>
+
+<p>Default value is &quot;tff&quot;.
+</p>
+<p>Transformation is achieved by shifting the picture content up or down
+by one line, and filling the remaining line with appropriate picture content.
+This method is consistent with most broadcast field order converters.
+</p>
+<p>If the input video is not flagged as being interlaced, or it is already
+flagged as being of the required output field order then this filter does
+not alter the incoming video.
+</p>
+<p>This filter is very useful when converting to or from PAL DV material,
+which is bottom field first.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
+</pre></td></tr></table>
+
+<a name="fifo"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-fifo">22.10 fifo</a></h2>
+
+<p>Buffer input images and send them when they are requested.
+</p>
+<p>This filter is mainly useful when auto-inserted by the libavfilter
+framework.
+</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>
+
+<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
+the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># convert the input video to the format &quot;yuv420p&quot;
+format=yuv420p
+
+# convert the input video to any of the formats in the list
+format=yuv420p:yuv444p:yuv410p
+</pre></td></tr></table>
+
+<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>
+
+<p>Apply a frei0r effect to the input video.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The filter supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>filter_name</var>[{:|=}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>filter_name</var> is the name to the frei0r effect to load. If the
+environment variable <code>FREI0R_PATH</code> is defined, the frei0r effect
+is searched in each one of the directories specified by the colon
+separated list in <code>FREIOR_PATH</code>, otherwise in the standard frei0r
+paths, which are in this order: &lsquo;<tt>HOME/.frei0r-1/lib/</tt>&rsquo;,
+&lsquo;<tt>/usr/local/lib/frei0r-1/</tt>&rsquo;, &lsquo;<tt>/usr/lib/frei0r-1/</tt>&rsquo;.
+</p>
+<p><var>param1</var>, <var>param2</var>, ... , <var>paramN</var> specify the parameters
+for the frei0r effect.
+</p>
+<p>A frei0r effect parameter can be a boolean (whose values are specified
+with &quot;y&quot; and &quot;n&quot;), a double, a color (specified by the syntax
+<var>R</var>/<var>G</var>/<var>B</var>, <var>R</var>, <var>G</var>, and <var>B</var> being float
+numbers from 0.0 to 1.0) or by an <code>av_parse_color()</code> color
+description), a position (specified by the syntax <var>X</var>/<var>Y</var>,
+<var>X</var> and <var>Y</var> being float numbers) and a string.
+</p>
+<p>The number and kind of parameters depend on the loaded effect. If an
+effect parameter is not specified the default value is set.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># apply the distort0r effect, set the first two double parameters
+frei0r=distort0r:0.5:0.01
+
+# apply the colordistance effect, takes a color as first parameter
+frei0r=colordistance:0.2/0.3/0.4
+frei0r=colordistance:violet
+frei0r=colordistance:0x112233
+
+# apply the perspective effect, specify the top left and top right
+# image positions
+frei0r=perspective:0.2/0.2:0.8/0.2
+</pre></td></tr></table>
+
+<p>For more information see:
+<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>
+
+<p>Fix the banding artifacts that are sometimes introduced into nearly flat
+regions by truncation to 8bit colordepth.
+Interpolate the gradients that should go where the bands are, and
+dither them.
+</p>
+<p>This filter is designed for playback only.  Do not use it prior to
+lossy compression, because compression tends to lose the dither and
+bring back the bands.
+</p>
+<p>The filter takes two optional parameters, separated by &rsquo;:&rsquo;:
+<var>strength</var>:<var>radius</var>
+</p>
+<p><var>strength</var> is the maximum amount by which the filter will change
+any one pixel. Also the threshold for detecting nearly flat
+regions. Acceptable values range from .51 to 255, default value is
+1.2, out-of-range values will be clipped to the valid range.
+</p>
+<p><var>radius</var> is the neighborhood to fit the gradient to. A larger
+radius makes for smoother gradients, but also prevents the filter from
+modifying the pixels near detailed regions. Acceptable values are
+8-32, default value is 16, out-of-range values will be clipped to the
+valid range.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># default parameters
+gradfun=1.2:16
+
+# omitting radius
+gradfun=1.2
+</pre></td></tr></table>
+
+<a name="hflip"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-hflip">22.14 hflip</a></h2>
+
+<p>Flip the input video horizontally.
+</p>
+<p>For example to horizontally flip the video in input with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="hqdn3d"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-hqdn3d">22.15 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
+still. It should enhance compressibility.
+</p>
+<p>It accepts the following optional parameters:
+<var>luma_spatial</var>:<var>chroma_spatial</var>:<var>luma_tmp</var>:<var>chroma_tmp</var>
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial luma strength,
+defaults to 4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial chroma strength,
+defaults to 3.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies luma temporal strength, defaults to
+6.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies chroma temporal strength, defaults to
+<var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>
+</p></dd>
+</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>
+
+<p>Compute a look-up table for binding each pixel component input value
+to an output value, and apply it to input video.
+</p>
+<p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
+to an RGB input video.
+</p>
+<p>These filters accept in input a &quot;:&quot;-separated list of options, which
+specify the expressions used for computing the lookup table for the
+corresponding pixel component values.
+</p>
+<p>The <var>lut</var> filter requires either YUV or RGB pixel formats in
+input, and accepts the options:
+</p><dl compact="compact">
+<dd><p><var>c0</var> (first  pixel component)
+<var>c1</var> (second pixel component)
+<var>c2</var> (third  pixel component)
+<var>c3</var> (fourth pixel component, corresponds to the alpha component)
+</p></dd>
+</dl>
+
+<p>The exact component associated to each option depends on the format in
+input.
+</p>
+<p>The <var>lutrgb</var> filter requires RGB pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>r</var> (red component)
+<var>g</var> (green component)
+<var>b</var> (blue component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The <var>lutyuv</var> filter requires YUV pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>y</var> (Y/luminance component)
+<var>u</var> (U/Cb component)
+<var>v</var> (V/Cr component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The expressions can contain the following constants and functions:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>val</samp>&rsquo;</dt>
+<dd><p>input value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>clipval</samp>&rsquo;</dt>
+<dd><p>the input value clipped in the <var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>maxval</samp>&rsquo;</dt>
+<dd><p>maximum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>minval</samp>&rsquo;</dt>
+<dd><p>minimum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>negval</samp>&rsquo;</dt>
+<dd><p>the negated value for the pixel component value clipped in the
+<var>minval</var>-<var>maxval</var> range , it corresponds to the expression
+&quot;maxval-clipval+minval&quot;
+</p>
+</dd>
+<dt> &lsquo;<samp>clip(val)</samp>&rsquo;</dt>
+<dd><p>the computed value in <var>val</var> clipped in the
+<var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>gammaval(gamma)</samp>&rsquo;</dt>
+<dd><p>the computed gamma correction value of the pixel component value
+clipped in the <var>minval</var>-<var>maxval</var> range, corresponds to the
+expression
+&quot;pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval&quot;
+</p>
+</dd>
+</dl>
+
+<p>All expressions default to &quot;val&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># negate input video
+lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
+lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
+
+# the above is the same as
+lutrgb=&quot;r=negval:g=negval:b=negval&quot;
+lutyuv=&quot;y=negval:u=negval:v=negval&quot;
+
+# negate luminance
+lutyuv=negval
+
+# remove chroma components, turns the video into a graytone image
+lutyuv=&quot;u=128:v=128&quot;
+
+# apply a luma burning effect
+lutyuv=&quot;y=2*val&quot;
+
+# remove green and blue components
+lutrgb=&quot;g=0:b=0&quot;
+
+# set a constant alpha channel value on input
+format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
+
+# correct luminance gamma by a 0.5 factor
+lutyuv=y=gammaval(0.5)
+</pre></td></tr></table>
+
+<a name="mp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-mp">22.17 mp</a></h2>
+
+<p>Apply an MPlayer filter to the input video.
+</p>
+<p>This filter provides a wrapper around most of the filters of
+MPlayer/MEncoder.
+</p>
+<p>This wrapper is considered experimental. Some of the wrapped filters
+may not work properly and we may drop support for them, as they will
+be implemented natively into FFmpeg. Thus you should avoid
+depending on them when writing portable scripts.
+</p>
+<p>The filters accepts the parameters:
+<var>filter_name</var>[:=]<var>filter_params</var>
+</p>
+<p><var>filter_name</var> is the name of a supported MPlayer filter,
+<var>filter_params</var> is a string containing the parameters accepted by
+the named filter.
+</p>
+<p>The list of the currently supported filters follows:
+</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>divtc</var></dt>
+<dt> <var>down3dright</var></dt>
+<dt> <var>dsize</var></dt>
+<dt> <var>eq2</var></dt>
+<dt> <var>eq</var></dt>
+<dt> <var>field</var></dt>
+<dt> <var>fil</var></dt>
+<dt> <var>fixpts</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>il</var></dt>
+<dt> <var>ilpack</var></dt>
+<dt> <var>ivtc</var></dt>
+<dt> <var>kerndeint</var></dt>
+<dt> <var>mcdeint</var></dt>
+<dt> <var>mirror</var></dt>
+<dt> <var>noise</var></dt>
+<dt> <var>ow</var></dt>
+<dt> <var>palette</var></dt>
+<dt> <var>perspective</var></dt>
+<dt> <var>phase</var></dt>
+<dt> <var>pp7</var></dt>
+<dt> <var>pullup</var></dt>
+<dt> <var>qp</var></dt>
+<dt> <var>rectangle</var></dt>
+<dt> <var>remove-logo</var></dt>
+<dt> <var>rotate</var></dt>
+<dt> <var>sab</var></dt>
+<dt> <var>screenshot</var></dt>
+<dt> <var>smartblur</var></dt>
+<dt> <var>softpulldown</var></dt>
+<dt> <var>softskip</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>
+<dt> <var>uspp</var></dt>
+<dt> <var>yuvcsp</var></dt>
+<dt> <var>yvu9</var></dt>
+</dl>
+
+<p>The parameter syntax and behavior for the listed filters are the same
+of the corresponding MPlayer filters. For detailed instructions check
+the &quot;VIDEO FILTERS&quot; section in the MPlayer manual.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># remove a logo by interpolating the surrounding pixels
+mp=delogo=200:200:80:20:1
+
+# adjust gamma, brightness, contrast
+mp=eq2=1.0:2:0.5
+
+# tweak hue and saturation
+mp=hue=100:-10
+</pre></td></tr></table>
+
+<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>
+
+<p>Negate input video.
+</p>
+<p>This filter accepts an integer in input, if non-zero it negates the
+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>
+
+<p>Force libavfilter not to use any of the specified pixel formats for the
+input to the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># force libavfilter to use a format different from &quot;yuv420p&quot; for the
+# input to the vflip filter
+noformat=yuv420p,vflip
+
+# convert the input video to any of the formats not contained in the list
+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>
+
+<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>
+
+<p>Apply video transform using libopencv.
+</p>
+<p>To enable this filter install libopencv library and headers and
+configure FFmpeg with &ndash;enable-libopencv.
+</p>
+<p>The filter takes the parameters: <var>filter_name</var>{:=}<var>filter_params</var>.
+</p>
+<p><var>filter_name</var> is the name of the libopencv filter to apply.
+</p>
+<p><var>filter_params</var> specifies the parameters to pass to the libopencv
+filter. If not specified the default values are assumed.
+</p>
+<p>Refer to the official libopencv documentation for more precise
+informations:
+<a href="http://opencv.willowgarage.com/documentation/c/image_filtering.html">http://opencv.willowgarage.com/documentation/c/image_filtering.html</a>
+</p>
+<p>Follows the list of supported libopencv filters.
+</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>
+
+<p>Dilate an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvDilate</code>.
+</p>
+<p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>.
+</p>
+<p><var>struct_el</var> represents a structuring element, and has the syntax:
+<var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
+</p>
+<p><var>cols</var> and <var>rows</var> represent the number of colums and rows of
+the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
+point, and <var>shape</var> the shape for the structuring element, and
+can be one of the values &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, &quot;custom&quot;.
+</p>
+<p>If the value for <var>shape</var> is &quot;custom&quot;, it must be followed by a
+string of the form &quot;=<var>filename</var>&quot;. The file with name
+<var>filename</var> is assumed to represent a binary image, with each
+printable character corresponding to a bright pixel. When a custom
+<var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
+or columns and rows of the read file are assumed instead.
+</p>
+<p>The default value for <var>struct_el</var> is &quot;3x3+0x0/rect&quot;.
+</p>
+<p><var>nb_iterations</var> specifies the number of times the transform is
+applied to the image, and defaults to 1.
+</p>
+<p>Follow some example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># use the default values
+ocv=dilate
+
+# dilate using a structuring element with a 5x5 cross, iterate two times
+ocv=dilate=5x5+2x2/cross:2
+
+# read the shape from the file diamond.shape, iterate two times
+# the file diamond.shape may contain a pattern of characters like this:
+#   *
+#  ***
+# *****
+#  ***
+#   *
+# the specified cols and rows are ignored (but not the anchor point coordinates)
+ocv=0x0+2x2/custom=diamond.shape:2
+</pre></td></tr></table>
+
+<a name="erode"></a>
+<h3 class="subsection"><a href="ffmpeg.html#toc-erode">22.21.2 erode</a></h3>
+
+<p>Erode an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvErode</code>.
+</p>
+<p>The filter accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
+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>
+
+<p>Smooth the input video.
+</p>
+<p>The filter takes the following parameters:
+<var>type</var>:<var>param1</var>:<var>param2</var>:<var>param3</var>:<var>param4</var>.
+</p>
+<p><var>type</var> is the type of smooth filter to apply, and can be one of
+the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
+&quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
+</p>
+<p><var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var> are
+parameters whose meanings depend on smooth type. <var>param1</var> and
+<var>param2</var> accept integer positive values or 0, <var>param3</var> and
+<var>param4</var> accept float values.
+</p>
+<p>The default value for <var>param1</var> is 3, the default value for the
+other parameters is 0.
+</p>
+<p>These parameters correspond to the parameters assigned to the
+libopencv function <code>cvSmooth</code>.
+</p>
+<a name="overlay"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-overlay">22.22 overlay</a></h2>
+
+<p>Overlay one video on top of another.
+</p>
+<p>It takes two inputs and one output, the first input is the &quot;main&quot;
+video on which the second input is overlayed.
+</p>
+<p>It accepts the parameters: <var>x</var>:<var>y</var>.
+</p>
+<p><var>x</var> is the x coordinate of the overlayed video on the main video,
+<var>y</var> is the y coordinate. The parameters are expressions containing
+the following parameters:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>main_w, main_h</samp>&rsquo;</dt>
+<dd><p>main input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>W, H</samp>&rsquo;</dt>
+<dd><p>same as <var>main_w</var> and <var>main_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>overlay_w, overlay_h</samp>&rsquo;</dt>
+<dd><p>overlay input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>same as <var>overlay_w</var> and <var>overlay_h</var>
+</p></dd>
+</dl>
+
+<p>Be aware that frames are taken from each input video in timestamp
+order, hence, if their initial timestamps differ, it is a a good idea
+to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
+have them begin in the same zero timestamp, as it does the example for
+the <var>movie</var> filter.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw the overlay at 10 pixels from the bottom right
+# corner of the main video.
+overlay=main_w-overlay_w-10:main_h-overlay_h-10
+
+# insert a transparent PNG logo in the bottom left corner of the input
+movie=logo.png [logo];
+[in][logo] overlay=10:main_h-overlay_h-10 [out]
+
+# insert 2 different transparent PNG logos (second logo on bottom
+# right corner):
+movie=logo1.png [logo1];
+movie=logo2.png [logo2];
+[in][logo1]       overlay=10:H-h-10 [in+logo1];
+[in+logo1][logo2] overlay=W-w-10:H-h-10 [out]
+
+# add a transparent color layer on top of the main video,
+# WxH specifies the size of the main input to the overlay filter
+color=red.3:WxH [over]; [in][over] overlay [out]
+</pre></td></tr></table>
+
+<p>You can chain togheter more overlays but the efficiency of such
+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>
+
+<p>Add paddings to the input image, and places the original input at the
+given coordinates <var>x</var>, <var>y</var>.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>x</var>:<var>y</var>:<var>color</var>.
+</p>
+<p>The parameters <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var> are
+expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input video width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output width and heigth, that is the size of the padded area as
+specified by the <var>width</var> and <var>height</var> expressions
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>x and y offsets as specified by the <var>x</var> and <var>y</var>
+expressions, or NAN if not yet specified
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd>
+<p>Specify the size of the output image with the paddings added. If the
+value for <var>width</var> or <var>height</var> is 0, the corresponding input size
+is used for the output.
+</p>
+<p>The <var>width</var> expression can reference the value set by the
+<var>height</var> expression, and viceversa.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd>
+<p>Specify the offsets where to place the input image in the padded area
+with respect to the top/left border of the output image.
+</p>
+<p>The <var>x</var> expression can reference the value set by the <var>y</var>
+expression, and viceversa.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd>
+<p>Specify the color of the padded area, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p>
+<p>The default value of <var>color</var> is &quot;black&quot;.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># Add paddings with color &quot;violet&quot; to the input video. Output video
+# size is 640x480, the top-left corner of the input video is placed at
+# column 0, row 40.
+pad=640:480:0:40:violet
+
+# pad the input to get an output with dimensions increased bt 3/2,
+# and put the input video at the center of the padded area
+pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a squared output with size equal to the maximum
+# value between the input width and height, and put the input video at
+# the center of the padded area
+pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a final w/h ratio of 16:9
+pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# double output size and put the input video in the bottom-right
+# corner of the output padded area
+pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
+</pre></td></tr></table>
+
+<a name="pixdesctest"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-pixdesctest">22.24 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>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">format=monow, pixdesctest
+</pre></td></tr></table>
+
+<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>
+
+<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
+</p>
+<p>The parameters <var>width</var> and <var>height</var> are expressions containing
+the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>If the input image format is different from the format requested by
+the next filter, the scale filter will convert the input to the
+requested format.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is 0, the respective input
+size is used for the output.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is -1, the scale filter will
+use, for the respective output size, a value that maintains the aspect
+ratio of the input image.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># scale the input video to a size of 200x100.
+scale=200:100
+
+# scale the input to 2x
+scale=2*iw:2*ih
+# the above is the same as
+scale=2*in_w:2*in_h
+
+# scale the input to half size
+scale=iw/2:ih/2
+
+# increase the width, and set the height to the same size
+scale=3/2*iw:ow
+
+# seek for Greek harmony
+scale=iw:1/PHI*iw
+scale=ih*PHI:ih
+
+# increase the height, and set the width to 3/2 of the height
+scale=3/2*oh:3/5*ih
+
+# increase the size, but make the size a multiple of the chroma
+scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
+
+# increase the width to a maximum of 500 pixels, keep the same input aspect ratio
+scale='min(500\, iw*3/2):-1'
+</pre></td></tr></table>
+
+<a name="select"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-select">22.26 select</a></h2>
+<p>Select frames to pass in output.
+</p>
+<p>It accepts in input an expression, which is evaluated for each input
+frame. If the expression is evaluated to a non-zero value, the frame
+is selected and passed to the output, otherwise it is discarded.
+</p>
+<p>The expression can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the filtered frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the selected frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the last selected frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>TB</samp>&rsquo;</dt>
+<dd><p>timebase of the input timestamps
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in <var>TB</var> units, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in seconds, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_t</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously selected video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_t</samp>&rsquo;</dt>
+<dd><p>the time of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>pict_type</samp>&rsquo;</dt>
+<dd><p>the picture type of the filtered frame, can assume one of the following
+values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>PICT_TYPE_I</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_P</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_B</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_S</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SI</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SP</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_BI</samp>&rsquo;</dt>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>interlace_type</samp>&rsquo;</dt>
+<dd><p>the frame interlace type, can assume one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>INTERLACE_TYPE_P</samp>&rsquo;</dt>
+<dd><p>the frame is progressive (not interlaced)
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_T</samp>&rsquo;</dt>
+<dd><p>the frame is top-field-first
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_B</samp>&rsquo;</dt>
+<dd><p>the frame is bottom-field-first
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>key</samp>&rsquo;</dt>
+<dd><p>1 if the filtered frame is a key-frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the filtered frame, -1 if the information
+is not available (e.g. for synthetic video)
+</p></dd>
+</dl>
+
+<p>The default value of the select expression is &quot;1&quot;.
+</p>
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># select all frames in input
+select
+
+# the above is the same as:
+select=1
+
+# skip all frames:
+select=0
+
+# select only I-frames
+select='eq(pict_type\,PICT_TYPE_I)'
+
+# select one frame every 100
+select='not(mod(n\,100))'
+
+# select only frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)'
+
+# select only I frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)*eq(pict_type\,PICT_TYPE_I)'
+
+# select frames with a minimum distance of 10 seconds
+select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Display Aspect Ratio for the filter output video.
+</p>
+<p>This is done by changing the specified Sample (aka Pixel) Aspect
+Ratio, according to the following equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that this filter does not modify the pixel dimensions of
+the video frame. Also the display aspect ratio set by this filter may
+be changed by later filters in the filterchain, e.g. in case of
+scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+display aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the display aspect ratio to 16:9, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setdar=16:9
+# the above is equivalent to
+setdar=1.77777
+</pre></td></tr></table>
+
+<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>
+
+<p>Change the PTS (presentation timestamp) of the input video frames.
+</p>
+<p>Accept in input an expression evaluated through the eval API, which
+can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PTS</samp>&rsquo;</dt>
+<dd><p>the presentation timestamp in input
+</p>
+</dd>
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>N</samp>&rsquo;</dt>
+<dd><p>the count of the input frame, starting from 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>STARTPTS</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame
+</p>
+</dd>
+<dt> &lsquo;<samp>INTERLACED</samp>&rsquo;</dt>
+<dd><p>tell if the current frame is interlaced
+</p>
+</dd>
+<dt> &lsquo;<samp>POS</samp>&rsquo;</dt>
+<dd><p>original position in the file of the frame, or undefined if undefined
+for the current frame
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_INPTS</samp>&rsquo;</dt>
+<dd><p>previous input PTS
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_OUTPTS</samp>&rsquo;</dt>
+<dd><p>previous output PTS
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># start counting PTS from zero
+setpts=PTS-STARTPTS
+
+# fast motion
+setpts=0.5*PTS
+
+# slow motion
+setpts=2.0*PTS
+
+# fixed rate 25 fps
+setpts=N/(25*TB)
+
+# fixed rate 25 fps with some jitter
+setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
+</p>
+<p>Note that as a consequence of the application of this filter, the
+output display aspect ratio will change according to the following
+equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that the sample aspect ratio set by this filter may be
+changed by later filters in the filterchain, e.g. if another &quot;setsar&quot;
+or a &quot;setdar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+sample aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the sample aspect ratio to 10:11, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setsar=10:11
+</pre></td></tr></table>
+
+<a name="settb"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-settb">22.30 settb</a></h2>
+
+<p>Set the timebase to use for the output frames timestamps.
+It is mainly useful for testing timebase configuration.
+</p>
+<p>It accepts in input an arithmetic expression representing a rational.
+The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;, &quot;AVTB&quot; (the
+default timebase), and &quot;intb&quot; (the input timebase).
+</p>
+<p>The default value for the input is &quot;intb&quot;.
+</p>
+<p>Follow some examples.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># set the timebase to 1/25
+settb=1/25
+
+# set the timebase to 1/10
+settb=0.1
+
+#set the timebase to 1001/1000
+settb=1+0.001
+
+#set the timebase to 2*intb
+settb=2*intb
+
+#set the default timebase value
+settb=AVTB
+</pre></td></tr></table>
+
+<a name="showinfo"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-showinfo">22.31 showinfo</a></h2>
+
+<p>Show a line containing various information for each input video frame.
+The input video 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> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</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.
+</p>
+</dd>
+<dt> &lsquo;<samp>pts_time</samp>&rsquo;</dt>
+<dd><p>Presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</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 video)
+</p>
+</dd>
+<dt> &lsquo;<samp>fmt</samp>&rsquo;</dt>
+<dd><p>pixel format name
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>sample aspect ratio of the input frame, expressed in the form
+<var>num</var>/<var>den</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>s</samp>&rsquo;</dt>
+<dd><p>size of the input frame, expressed in the form
+<var>width</var>x<var>height</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>i</samp>&rsquo;</dt>
+<dd><p>interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
+for bottom field first)
+</p>
+</dd>
+<dt> &lsquo;<samp>iskey</samp>&rsquo;</dt>
+<dd><p>1 if the frame is a key frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>type</samp>&rsquo;</dt>
+<dd><p>picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
+P-frame, &quot;B&quot; for a B-frame, &quot;?&quot; for unknown type).
+Check also the documentation of the <code>AVPictureType</code> enum and of
+the <code>av_get_picture_type_char</code> function defined in
+&lsquo;<tt>libavutil/avutil.h</tt>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> &lsquo;<samp>plane_checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of each plane of the input frame, expressed in the form
+&quot;[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]&quot;
+</p></dd>
+</dl>
+
+<a name="slicify"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-slicify">22.32 slicify</a></h2>
+
+<p>Pass the images of input video on to next video filter as multiple
+slices.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;slicify=32&quot; out.avi
+</pre></td></tr></table>
+
+<p>The filter accepts the slice height as parameter. If the parameter is
+not specified it will use the default value of 16.
+</p>
+<p>Adding this in the beginning of filter chains should make filtering
+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>
+
+<p>Pass on the input video to two outputs. Both outputs are identical to
+the input video.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[in] split [splitout1][splitout2];
+[splitout1] crop=100:100:0:0    [cropout];
+[splitout2] pad=200:200:100:100 [padout];
+</pre></td></tr></table>
+
+<p>will create two separate outputs from the same input, one cropped and
+one padded.
+</p>
+<a name="transpose"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-transpose">22.34 transpose</a></h2>
+
+<p>Transpose rows with columns in the input video and optionally flip it.
+</p>
+<p>It accepts a parameter representing an integer, which can assume the
+values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     L.l
+. . -&gt;  . .
+l.r     R.r
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     l.L
+. . -&gt;  . .
+l.r     r.R
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     R.r
+. . -&gt;  . .
+l.r     L.l
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     r.R
+. . -&gt;  . .
+l.r     l.L
+</pre></td></tr></table>
+</dd>
+</dl>
+
+<a name="unsharp"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-unsharp">22.35 unsharp</a></h2>
+
+<p>Sharpen or blur the input video.
+</p>
+<p>It accepts the following parameters:
+<var>luma_msize_x</var>:<var>luma_msize_y</var>:<var>luma_amount</var>:<var>chroma_msize_x</var>:<var>chroma_msize_y</var>:<var>chroma_amount</var>
+</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 &rsquo;5:5:1.0:0:0:0.0&rsquo;.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix horizontal size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix vertical size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</dt>
+<dd><p>Set the luma effect strength. It can be a float number between -2.0
+and 5.0, default value is 1.0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</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>
+</dd>
+</dl>
+
+<table><tr><td>&nbsp;</td><td><pre class="example"># Strong luma sharpen effect parameters
+unsharp=7:7:2.5
+
+# Strong blur of both luma and chroma parameters
+unsharp=7:7:-2:7:7:-2
+
+# Use the default values with <code>ffmpeg</code>
+./ffmpeg -i in.avi -vf &quot;unsharp&quot; out.mp4
+</pre></td></tr></table>
+
+<a name="vflip"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-vflip">22.36 vflip</a></h2>
+
+<p>Flip the input video vertically.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="yadif"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-yadif">22.37 yadif</a></h2>
+
+<p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
+filter&quot;).
+</p>
+<p>It accepts the optional parameters: <var>mode</var>:<var>parity</var>:<var>auto</var>.
+</p>
+<p><var>mode</var> specifies the interlacing mode to adopt, accepts one of the
+following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each frame
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each field
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>like 0 but skips spatial interlacing check
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>like 1 but skips spatial interlacing check
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+<p><var>parity</var> specifies the picture field parity assumed for the input
+interlaced video, accepts one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>assume bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>assume top field first
+</p></dd>
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>enable automatic detection
+</p></dd>
+</dl>
+
+<p>Default value is -1.
+If interlacing is unknown or decoder does not export this information,
+top field first will be assumed.
+</p>
+<p><var>auto</var> specifies if deinterlacer should trust the interlaced flag
+and only deinterlace frames marked as interlaced
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>deinterlace all frames
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>only deinterlace frames marked as interlaced
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+
+<a name="Video-Sources"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Video-Sources">23. Video Sources</a></h1>
+
+<p>Below is a description of the currently available video sources.
+</p>
+<a name="buffer"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-buffer">23.1 buffer</a></h2>
+
+<p>Buffer video 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 &lsquo;<tt>libavfilter/vsrc_buffer.h</tt>&rsquo;.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>pix_fmt_string</var>:<var>timebase_num</var>:<var>timebase_den</var>:<var>sample_aspect_ratio_num</var>:<var>sample_aspect_ratio.den</var>:<var>scale_params</var>
+</p>
+<p>All the parameters but <var>scale_params</var> need to be explicitely
+defined.
+</p>
+<p>Follows the list of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the buffered video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>pix_fmt_string</samp>&rsquo;</dt>
+<dd><p>A string representing the pixel format of the buffered video frames.
+It may be a number corresponding to a pixel format, or a pixel format
+name.
+</p>
+</dd>
+<dt> &lsquo;<samp>timebase_num, timebase_den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denomitor of the timebase assumed by the
+timestamps of the buffered frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_aspect_ratio.num, sample_aspect_ratio.den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denominator of the sample aspect ratio assumed
+by the video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>scale_params</samp>&rsquo;</dt>
+<dd><p>Specify the optional parameters to be used for the scale filter which
+is automatically inserted when an input change is detected in the
+input size or format.
+</p></dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:yuv410p:1:24:1:1
+</pre></td></tr></table>
+
+<p>will instruct the source to accept video frames with size 320x240 and
+with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
+square pixels (1:1 sample aspect ratio).
+Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
+(check the enum PixelFormat definition in &lsquo;<tt>libavutil/pixfmt.h</tt>&rsquo;),
+this example corresponds to:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:6:1:24:1:1
+</pre></td></tr></table>
+
+<a name="color"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-color">23.2 color</a></h2>
+
+<p>Provide an uniformly colored input.
+</p>
+<p>It accepts the following parameters:
+<var>color</var>:<var>frame_size</var>:<var>frame_rate</var>
+</p>
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the source. It can be the name of a color (case
+insensitive match) or a 0xRRGGBB[AA] sequence, possibly followed by an
+alpha specifier. The default value is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_size</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_rate</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example the following graph description will generate a red source
+with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
+frames per second, which will be overlayed over the source connected
+to the pad with identifier &quot;in&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">&quot;color=red@0.2:qcif:10 [color]; [in][color] overlay [out]&quot;
+</pre></td></tr></table>
+
+<a name="movie"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-movie">23.3 movie</a></h2>
+
+<p>Read a video 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 &quot;:&quot;.
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>format_name, f</samp>&rsquo;</dt>
+<dd><p>Specifies 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> &lsquo;<samp>seek_point, sp</samp>&rsquo;</dt>
+<dd><p>Specifies 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 &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>stream_index, si</samp>&rsquo;</dt>
+<dd><p>Specifies the index of the video stream to read. If the value is -1,
+the best suited video stream will be automatically selected. Default
+value is &quot;-1&quot;.
+</p>
+</dd>
+</dl>
+
+<p>This filter allows to overlay a second video on top of main input of
+a filtergraph as shown in this graph:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
+                                    ^
+                                    |
+movie --&gt; scale--&gt; deltapts1 -------+
+</pre></td></tr></table>
+
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># skip 3.2 seconds from the start of the avi file in.avi, and overlay it
+# on top of the input labelled as &quot;in&quot;.
+movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+# read from a video4linux2 device, and overlay it on top of the input
+# labelled as &quot;in&quot;
+movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+</pre></td></tr></table>
+
+<a name="nullsrc"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-nullsrc">23.4 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.
+</p>
+<p>It accepts as optional parameter a string of the form
+<var>width</var>:<var>height</var>:<var>timebase</var>.
+</p>
+<p><var>width</var> and <var>height</var> specify the size of the configured
+source. The default values of <var>width</var> and <var>height</var> are
+respectively 352 and 288 (corresponding to the CIF size format).
+</p>
+<p><var>timebase</var> specifies an arithmetic expression representing a
+timebase. The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;,
+&quot;AVTB&quot; (the default timebase), and defaults to the value &quot;AVTB&quot;.
+</p>
+<a name="frei0r_005fsrc"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-frei0r_005fsrc">23.5 frei0r_src</a></h2>
+
+<p>Provide a frei0r source.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The source supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>size</var>:<var>rate</var>:<var>src_name</var>[{=|:}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>size</var> is the size of the video to generate, may be a string of the
+form <var>width</var>x<var>height</var> or a frame size abbreviation.
+<var>rate</var> is the rate of the video to generate, may be a string of
+the form <var>num</var>/<var>den</var> or a frame rate abbreviation.
+<var>src_name</var> is the name to the frei0r source to load. For more
+information regarding frei0r and how to set the parameters read the
+section <a href="#frei0r">frei0r</a> in the description of the video filters.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># generate a frei0r partik0l source with size 200x200 and framerate 10
+# which is overlayed on the overlay filter main input
+frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
+</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>
+
+<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
+stripe from top to bottom.
+</p>
+<p>The <code>testsrc</code> source generates a test video pattern, showing a
+color pattern, a scrolling gradient and a timestamp. This is mainly
+intended for testing purposes.
+</p>
+<p>Both sources accept an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;. The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>size, s</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>rate, r</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>duration</samp>&rsquo;</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td>&nbsp;</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>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">testsrc=duration=5.3:size=qcif:rate=10
+</pre></td></tr></table>
+
+<p>will generate a video with a duration of 5.3 seconds, with size
+176x144 and a framerate of 10 frames per second.
+</p>
+
+<a name="Video-Sinks"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Video-Sinks">24. Video Sinks</a></h1>
+
+<p>Below is a description of the currently available video sinks.
+</p>
+<a name="buffersink"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-buffersink">24.1 buffersink</a></h2>
+
+<p>Buffer video frames, and make them available to the end of the filter
+graph.
+</p>
+<p>This sink is mainly intended for a programmatic use, in particular
+through the interface defined in &lsquo;<tt>libavfilter/vsink_buffer.h</tt>&rsquo;.
+</p>
+<p>It does not require a string parameter in input, but you need to
+specify a pointer to a list of supported pixel formats terminated by
+-1 in the opaque parameter provided to <code>avfilter_init_filter</code>
+when initializing this sink.
+</p>
+<a name="nullsink"></a>
+<h2 class="section"><a href="ffmpeg.html#toc-nullsink">24.2 nullsink</a></h2>
+
+<p>Null video sink, do absolutely nothing with the input video. It is
+mainly useful as a template and to be employed in analysis / debugging
+tools.
+</p>
+
+<a name="Metadata"></a>
+<h1 class="chapter"><a href="ffmpeg.html#toc-Metadata">25. Metadata</a></h1>
+
+<p>FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
+INI-like text file and then load it back using the metadata muxer/demuxer.
+</p>
+<p>The file format is as follows:
+</p><ol>
+<li>
+A file consists of a header and a number of metadata tags divided into sections,
+each on its own line.
+
+</li><li>
+The header is a &rsquo;;FFMETADATA&rsquo; string, followed by a version number (now 1).
+
+</li><li>
+Metadata tags are of the form &rsquo;key=value&rsquo;
+
+</li><li>
+Immediately after header follows global metadata
+
+</li><li>
+After global metadata there may be sections with per-stream/per-chapter
+metadata.
+
+</li><li>
+A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
+brackets (&rsquo;[&rsquo;, &rsquo;]&rsquo;) and ends with next section or end of file.
+
+</li><li>
+At the beginning of a chapter section there may be an optional timebase to be
+used for start/end values. It must be in form &rsquo;TIMEBASE=num/den&rsquo;, where num and
+den are integers. If the timebase is missing then start/end times are assumed to
+be in milliseconds.
+Next a chapter section must contain chapter start and end times in form
+&rsquo;START=num&rsquo;, &rsquo;END=num&rsquo;, where num is a positive integer.
+
+</li><li>
+Empty lines and lines starting with &rsquo;;&rsquo; or &rsquo;#&rsquo; are ignored.
+
+</li><li>
+Metadata keys or values containing special characters (&rsquo;=&rsquo;, &rsquo;;&rsquo;, &rsquo;#&rsquo;, &rsquo;\&rsquo; and a
+newline) must be escaped with a backslash &rsquo;\&rsquo;.
+
+</li><li>
+Note that whitespace in metadata (e.g. foo = bar) is considered to be a part of
+the tag (in the example above key is &rsquo;foo &rsquo;, value is &rsquo; bar&rsquo;).
+</li></ol>
+
+<p>A ffmetadata file might look like this:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">;FFMETADATA1
+title=bike\\shed
+;this is a comment
+artist=FFmpeg troll team
+
+[CHAPTER]
+TIMEBASE=1/1000
+START=0
+#chapter ends at 0:01:00
+END=60000
+title=chapter \#1
+[STREAM]
+title=multi\
+line
+</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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/ffplay.html b/ffmpeg 0.8/doc/ffplay.html
new file mode 100644 (file)
index 0000000..724ac0b
--- /dev/null
@@ -0,0 +1,4308 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>ffplay Documentation</title>
+
+<meta name="description" content="ffplay Documentation">
+<meta name="keywords" content="ffplay Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">ffplay Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<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>
+  <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>
+  </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>
+  <li><a name="toc-Video-Decoders" href="#Video-Decoders">6. Video Decoders</a>
+  <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>
+    </ul>
+</li>
+  </ul></li>
+  <li><a name="toc-Demuxers" href="#Demuxers">7. Demuxers</a>
+  <ul class="toc">
+    <li><a name="toc-image2-1" href="#image2-1">7.1 image2</a></li>
+    <li><a name="toc-applehttp" href="#applehttp">7.2 applehttp</a></li>
+  </ul></li>
+  <li><a name="toc-Muxers" href="#Muxers">8. Muxers</a>
+  <ul class="toc">
+    <li><a name="toc-crc-1" href="#crc-1">8.1 crc</a></li>
+    <li><a name="toc-framecrc-1" href="#framecrc-1">8.2 framecrc</a></li>
+    <li><a name="toc-image2" href="#image2">8.3 image2</a></li>
+    <li><a name="toc-mpegts" href="#mpegts">8.4 mpegts</a></li>
+    <li><a name="toc-null" href="#null">8.5 null</a></li>
+    <li><a name="toc-matroska" href="#matroska">8.6 matroska</a></li>
+  </ul></li>
+  <li><a name="toc-Input-Devices" href="#Input-Devices">9. Input Devices</a>
+  <ul class="toc">
+    <li><a name="toc-alsa-1" href="#alsa-1">9.1 alsa</a></li>
+    <li><a name="toc-bktr" href="#bktr">9.2 bktr</a></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>
+    <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>
+    </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>
+  </ul></li>
+  <li><a name="toc-Output-Devices" href="#Output-Devices">10. Output Devices</a>
+  <ul class="toc">
+    <li><a name="toc-alsa" href="#alsa">10.1 alsa</a></li>
+    <li><a name="toc-oss-1" href="#oss-1">10.2 oss</a></li>
+    <li><a name="toc-sdl" href="#sdl">10.3 sdl</a>
+    <ul class="toc">
+      <li><a name="toc-Options-2" href="#Options-2">10.3.1 Options</a></li>
+      <li><a name="toc-Examples-1" href="#Examples-1">10.3.2 Examples</a></li>
+    </ul></li>
+    <li><a name="toc-sndio" href="#sndio">10.4 sndio</a></li>
+  </ul></li>
+  <li><a name="toc-Protocols" href="#Protocols">11. Protocols</a>
+  <ul class="toc">
+    <li><a name="toc-applehttp-1" href="#applehttp-1">11.1 applehttp</a></li>
+    <li><a name="toc-concat" href="#concat">11.2 concat</a></li>
+    <li><a name="toc-file" href="#file">11.3 file</a></li>
+    <li><a name="toc-gopher" href="#gopher">11.4 gopher</a></li>
+    <li><a name="toc-http" href="#http">11.5 http</a></li>
+    <li><a name="toc-mmst" href="#mmst">11.6 mmst</a></li>
+    <li><a name="toc-mmsh" href="#mmsh">11.7 mmsh</a></li>
+    <li><a name="toc-md5" href="#md5">11.8 md5</a></li>
+    <li><a name="toc-pipe" href="#pipe">11.9 pipe</a></li>
+    <li><a name="toc-rtmp" href="#rtmp">11.10 rtmp</a></li>
+    <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">11.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
+    <li><a name="toc-rtp" href="#rtp">11.12 rtp</a></li>
+    <li><a name="toc-rtsp" href="#rtsp">11.13 rtsp</a></li>
+    <li><a name="toc-sap" href="#sap">11.14 sap</a>
+    <ul class="toc">
+      <li><a name="toc-Muxer" href="#Muxer">11.14.1 Muxer</a></li>
+      <li><a name="toc-Demuxer" href="#Demuxer">11.14.2 Demuxer</a></li>
+    </ul></li>
+    <li><a name="toc-tcp" href="#tcp">11.15 tcp</a></li>
+    <li><a name="toc-udp" href="#udp">11.16 udp</a></li>
+  </ul></li>
+  <li><a name="toc-Filtergraph-description" href="#Filtergraph-description">12. Filtergraph description</a>
+  <ul class="toc">
+    <li><a name="toc-Filtergraph-syntax" href="#Filtergraph-syntax">12.1 Filtergraph syntax</a></li>
+  </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>
+  </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Filters" href="#Video-Filters">16. Video Filters</a>
+  <ul class="toc">
+    <li><a name="toc-blackframe" href="#blackframe">16.1 blackframe</a></li>
+    <li><a name="toc-boxblur" href="#boxblur">16.2 boxblur</a></li>
+    <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>
+    <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>
+    </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Sinks" href="#Video-Sinks">18. Video Sinks</a>
+  <ul class="toc">
+    <li><a name="toc-buffersink" href="#buffersink">18.1 buffersink</a></li>
+    <li><a name="toc-nullsink" href="#nullsink">18.2 nullsink</a></li>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="Synopsis"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Synopsis">1. Synopsis</a></h1>
+
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay [options] [&lsquo;<tt>input_file</tt>&rsquo;]
+</pre></td></tr></table>
+
+<a name="Description"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Description">2. Description</a></h1>
+
+<p>FFplay is a very simple and portable media player using the FFmpeg
+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>
+
+<p>All the numerical options, if not specified otherwise, accept in input
+a string representing a number, which may contain one of the
+International System number postfixes, for example &rsquo;K&rsquo;, &rsquo;M&rsquo;, &rsquo;G&rsquo;.
+If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used instead of
+powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8, and can be
+appended after another postfix or used alone. This allows using for
+example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
+</p>
+<p>Options which do not take arguments are boolean options, and set the
+corresponding value to true. They can be set to false by prefixing
+with &quot;no&quot; the option name, for example using &quot;-nofoo&quot; in the
+commandline will set to false the boolean option with name &quot;foo&quot;.
+</p>
+<a name="Generic-options"></a>
+<h2 class="section"><a href="ffplay.html#toc-Generic-options">3.1 Generic options</a></h2>
+
+<p>These options are shared amongst the ff* tools.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-L</samp>&rsquo;</dt>
+<dd><p>Show license.
+</p>
+</dd>
+<dt> &lsquo;<samp>-h, -?, -help, --help</samp>&rsquo;</dt>
+<dd><p>Show help.
+</p>
+</dd>
+<dt> &lsquo;<samp>-version</samp>&rsquo;</dt>
+<dd><p>Show version.
+</p>
+</dd>
+<dt> &lsquo;<samp>-formats</samp>&rsquo;</dt>
+<dd><p>Show available formats.
+</p>
+<p>The fields preceding the format names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-codecs</samp>&rsquo;</dt>
+<dd><p>Show available codecs.
+</p>
+<p>The fields preceding the codec names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+<dt> &lsquo;<samp>V/A/S</samp>&rsquo;</dt>
+<dd><p>Video/audio/subtitle codec
+</p></dd>
+<dt> &lsquo;<samp>S</samp>&rsquo;</dt>
+<dd><p>Codec supports slices
+</p></dd>
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Codec supports direct rendering
+</p></dd>
+<dt> &lsquo;<samp>T</samp>&rsquo;</dt>
+<dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-bsfs</samp>&rsquo;</dt>
+<dd><p>Show available bitstream filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-protocols</samp>&rsquo;</dt>
+<dd><p>Show available protocols.
+</p>
+</dd>
+<dt> &lsquo;<samp>-filters</samp>&rsquo;</dt>
+<dd><p>Show available libavfilter filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-pix_fmts</samp>&rsquo;</dt>
+<dd><p>Show available pixel formats.
+</p>
+</dd>
+<dt> &lsquo;<samp>-loglevel <var>loglevel</var></samp>&rsquo;</dt>
+<dd><p>Set the logging level used by the library.
+<var>loglevel</var> is a number or a string containing one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>quiet</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>panic</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>fatal</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>error</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>warning</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>info</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>verbose</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>debug</samp>&rsquo;</dt>
+</dl>
+
+<p>By default the program logs to stderr, if coloring is supported by the
+terminal, colors are used to mark errors and warnings. Log coloring
+can be disabled setting the environment variable
+<code>FFMPEG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
+the environment variable <code>FFMPEG_FORCE_COLOR</code>.
+The use of the environment variable <code>NO_COLOR</code> is deprecated and
+will be dropped in a following FFmpeg version.
+</p>
+</dd>
+</dl>
+
+<a name="Main-options"></a>
+<h2 class="section"><a href="ffplay.html#toc-Main-options">3.2 Main options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-x <var>width</var></samp>&rsquo;</dt>
+<dd><p>Force displayed width.
+</p></dd>
+<dt> &lsquo;<samp>-y <var>height</var></samp>&rsquo;</dt>
+<dd><p>Force displayed height.
+</p></dd>
+<dt> &lsquo;<samp>-s <var>size</var></samp>&rsquo;</dt>
+<dd><p>This option has been removed. Use private format options for specifying the
+input video size.
+</p></dd>
+<dt> &lsquo;<samp>-an</samp>&rsquo;</dt>
+<dd><p>Disable audio.
+</p></dd>
+<dt> &lsquo;<samp>-vn</samp>&rsquo;</dt>
+<dd><p>Disable video.
+</p></dd>
+<dt> &lsquo;<samp>-ss <var>pos</var></samp>&rsquo;</dt>
+<dd><p>Seek to a given position in seconds.
+</p></dd>
+<dt> &lsquo;<samp>-t <var>duration</var></samp>&rsquo;</dt>
+<dd><p>play &lt;duration&gt; seconds of audio/video
+</p></dd>
+<dt> &lsquo;<samp>-bytes</samp>&rsquo;</dt>
+<dd><p>Seek by bytes.
+</p></dd>
+<dt> &lsquo;<samp>-nodisp</samp>&rsquo;</dt>
+<dd><p>Disable graphical display.
+</p></dd>
+<dt> &lsquo;<samp>-f <var>fmt</var></samp>&rsquo;</dt>
+<dd><p>Force format.
+</p></dd>
+<dt> &lsquo;<samp>-window_title <var>title</var></samp>&rsquo;</dt>
+<dd><p>Set window title (default is the input filename).
+</p></dd>
+<dt> &lsquo;<samp>-loop <var>number</var></samp>&rsquo;</dt>
+<dd><p>Loops movie playback &lt;number&gt; times. 0 means forever.
+</p></dd>
+<dt> &lsquo;<samp>-showmode <var>mode</var></samp>&rsquo;</dt>
+<dd><p>Set the show mode to use.
+Available values for <var>mode</var> are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>0, video</samp>&rsquo;</dt>
+<dd><p>show video
+</p></dd>
+<dt> &lsquo;<samp>1, waves</samp>&rsquo;</dt>
+<dd><p>show audio waves
+</p></dd>
+<dt> &lsquo;<samp>2, rdft</samp>&rsquo;</dt>
+<dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
+</p></dd>
+</dl>
+
+<p>Default value is &quot;video&quot;, if video is not present or cannot be played
+&quot;rdft&quot; is automatically selected.
+</p>
+<p>You can interactively cycle through the available show modes by
+pressing the key &lt;w&gt;.
+</p>
+</dd>
+<dt> &lsquo;<samp>-vf <var>filter_graph</var></samp>&rsquo;</dt>
+<dd><p><var>filter_graph</var> is a description of the filter graph to apply to
+the input video.
+Use the option &quot;-filters&quot; to show all the available filters (including
+also sources and sinks).
+</p>
+</dd>
+<dt> &lsquo;<samp>-i <var>input_file</var></samp>&rsquo;</dt>
+<dd><p>Read <var>input_file</var>.
+</p></dd>
+</dl>
+
+<a name="Advanced-options"></a>
+<h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.3 Advanced options</a></h2>
+<dl compact="compact">
+<dt> &lsquo;<samp>-pix_fmt <var>format</var></samp>&rsquo;</dt>
+<dd><p>This option has been removed. Use private options for specifying the
+input pixel format.
+</p></dd>
+<dt> &lsquo;<samp>-stats</samp>&rsquo;</dt>
+<dd><p>Show the stream duration, the codec parameters, the current position in
+the stream and the audio/video synchronisation drift.
+</p></dd>
+<dt> &lsquo;<samp>-bug</samp>&rsquo;</dt>
+<dd><p>Work around bugs.
+</p></dd>
+<dt> &lsquo;<samp>-fast</samp>&rsquo;</dt>
+<dd><p>Non-spec-compliant optimizations.
+</p></dd>
+<dt> &lsquo;<samp>-genpts</samp>&rsquo;</dt>
+<dd><p>Generate pts.
+</p></dd>
+<dt> &lsquo;<samp>-rtp_tcp</samp>&rsquo;</dt>
+<dd><p>Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful
+if you are streaming with the RTSP protocol.
+</p></dd>
+<dt> &lsquo;<samp>-sync <var>type</var></samp>&rsquo;</dt>
+<dd><p>Set the master clock to audio (<code>type=audio</code>), video
+(<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The
+master clock is used to control audio-video synchronization. Most media
+players use audio as master clock, but in some cases (streaming or high
+quality broadcast) it is necessary to change that. This option is mainly
+used for debugging purposes.
+</p></dd>
+<dt> &lsquo;<samp>-threads <var>count</var></samp>&rsquo;</dt>
+<dd><p>Set the thread count.
+</p></dd>
+<dt> &lsquo;<samp>-ast <var>audio_stream_number</var></samp>&rsquo;</dt>
+<dd><p>Select the desired audio stream number, counting from 0. The number
+refers to the list of all the input audio streams. If it is greater
+than the number of audio streams minus one, then the last one is
+selected, if it is negative the audio playback is disabled.
+</p></dd>
+<dt> &lsquo;<samp>-vst <var>video_stream_number</var></samp>&rsquo;</dt>
+<dd><p>Select the desired video stream number, counting from 0. The number
+refers to the list of all the input video streams. If it is greater
+than the number of video streams minus one, then the last one is
+selected, if it is negative the video playback is disabled.
+</p></dd>
+<dt> &lsquo;<samp>-sst <var>subtitle_stream_number</var></samp>&rsquo;</dt>
+<dd><p>Select the desired subtitle stream number, counting from 0. The number
+refers to the list of all the input subtitle streams. If it is greater
+than the number of subtitle streams minus one, then the last one is
+selected, if it is negative the subtitle rendering is disabled.
+</p></dd>
+<dt> &lsquo;<samp>-autoexit</samp>&rsquo;</dt>
+<dd><p>Exit when video is done playing.
+</p></dd>
+<dt> &lsquo;<samp>-exitonkeydown</samp>&rsquo;</dt>
+<dd><p>Exit if any key is pressed.
+</p></dd>
+<dt> &lsquo;<samp>-exitonmousedown</samp>&rsquo;</dt>
+<dd><p>Exit if any mouse button is pressed.
+</p></dd>
+</dl>
+
+<a name="While-playing"></a>
+<h2 class="section"><a href="ffplay.html#toc-While-playing">3.4 While playing</a></h2>
+
+<dl compact="compact">
+<dt> &lt;q, ESC&gt;</dt>
+<dd><p>Quit.
+</p>
+</dd>
+<dt> &lt;f&gt;</dt>
+<dd><p>Toggle full screen.
+</p>
+</dd>
+<dt> &lt;p, SPC&gt;</dt>
+<dd><p>Pause.
+</p>
+</dd>
+<dt> &lt;a&gt;</dt>
+<dd><p>Cycle audio channel.
+</p>
+</dd>
+<dt> &lt;v&gt;</dt>
+<dd><p>Cycle video channel.
+</p>
+</dd>
+<dt> &lt;t&gt;</dt>
+<dd><p>Cycle subtitle channel.
+</p>
+</dd>
+<dt> &lt;w&gt;</dt>
+<dd><p>Show audio waves.
+</p>
+</dd>
+<dt> &lt;left/right&gt;</dt>
+<dd><p>Seek backward/forward 10 seconds.
+</p>
+</dd>
+<dt> &lt;down/up&gt;</dt>
+<dd><p>Seek backward/forward 1 minute.
+</p>
+</dd>
+<dt> &lt;mouse click&gt;</dt>
+<dd><p>Seek to percentage in file corresponding to fraction of width.
+</p>
+</dd>
+</dl>
+
+
+<a name="Expression-Evaluation"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Expression-Evaluation">4. Expression Evaluation</a></h1>
+
+<p>When evaluating an arithemetic expression, FFmpeg uses an internal
+formula evaluator, implemented through the &lsquo;<tt>libavutil/eval.h</tt>&rsquo;
+interface.
+</p>
+<p>An expression may contain unary, binary operators, constants, and
+functions.
+</p>
+<p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
+another expression &quot;<var>expr1</var>;<var>expr2</var>&quot;.
+<var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
+expression evaluates to the value of <var>expr2</var>.
+</p>
+<p>The following binary operators are available: <code>+</code>, <code>-</code>,
+<code>*</code>, <code>/</code>, <code>^</code>.
+</p>
+<p>The following unary operators are available: <code>+</code>, <code>-</code>.
+</p>
+<p>The following functions are available:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>sinh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>cosh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>tanh(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>sin(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>cos(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>tan(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>atan(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>asin(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>acos(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>exp(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>log(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>abs(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>squish(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gauss(x)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>isnan(x)</samp>&rsquo;</dt>
+<dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
+</p>
+</dd>
+<dt> &lsquo;<samp>mod(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>max(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>min(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>eq(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gte(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>gt(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>lte(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>lt(x, y)</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>st(var, expr)</samp>&rsquo;</dt>
+<dd><p>Allow to store the value of the expression <var>expr</var> in an internal
+variable. <var>var</var> specifies the number of the variable where to
+store the value, and it is a value ranging from 0 to 9. The function
+returns the value stored in the internal variable.
+</p>
+</dd>
+<dt> &lsquo;<samp>ld(var)</samp>&rsquo;</dt>
+<dd><p>Allow to load the value of the internal variable with number
+<var>var</var>, which was previosly stored with st(<var>var</var>, <var>expr</var>).
+The function returns the loaded value.
+</p>
+</dd>
+<dt> &lsquo;<samp>while(cond, expr)</samp>&rsquo;</dt>
+<dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
+non-zero, and returns the value of the last <var>expr</var> evaluation, or
+NAN if <var>cond</var> was always false.
+</p>
+</dd>
+<dt> &lsquo;<samp>ceil(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> upwards to the nearest
+integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>floor(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> downwards to the nearest
+integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>trunc(expr)</samp>&rsquo;</dt>
+<dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
+integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sqrt(expr)</samp>&rsquo;</dt>
+<dd><p>Compute the square root of <var>expr</var>. This is equivalent to
+&quot;(<var>expr</var>)^.5&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>not(expr)</samp>&rsquo;</dt>
+<dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
+</p>
+</dd>
+<dt> &lsquo;<samp>pow(x, y)</samp>&rsquo;</dt>
+<dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
+&quot;(<var>x</var>)^(<var>y</var>)&quot;.
+</p></dd>
+</dl>
+
+<p>Note that:
+</p>
+<p><code>*</code> works like AND
+</p>
+<p><code>+</code> works like OR
+</p>
+<p>thus
+</p><table><tr><td>&nbsp;</td><td><pre class="example">if A then B else C
+</pre></td></tr></table>
+<p>is equivalent to
+</p><table><tr><td>&nbsp;</td><td><pre class="example">A*B + not(A)*C
+</pre></td></tr></table>
+
+<p>In your C code, you can extend the list of unary and binary functions,
+and define recognized constants, so that they are available for your
+expressions.
+</p>
+<p>The evaluator also recognizes the International System number
+postfixes. If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used
+instead of powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8,
+and can be appended after another postfix or used alone. This allows
+using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
+</p>
+<p>Follows the list of available International System postfixes, with
+indication of the corresponding powers of 10 and of 2.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>y</samp>&rsquo;</dt>
+<dd><p>-24 / -80
+</p></dd>
+<dt> &lsquo;<samp>z</samp>&rsquo;</dt>
+<dd><p>-21 / -70
+</p></dd>
+<dt> &lsquo;<samp>a</samp>&rsquo;</dt>
+<dd><p>-18 / -60
+</p></dd>
+<dt> &lsquo;<samp>f</samp>&rsquo;</dt>
+<dd><p>-15 / -50
+</p></dd>
+<dt> &lsquo;<samp>p</samp>&rsquo;</dt>
+<dd><p>-12 / -40
+</p></dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>-9 / -30
+</p></dd>
+<dt> &lsquo;<samp>u</samp>&rsquo;</dt>
+<dd><p>-6 / -20
+</p></dd>
+<dt> &lsquo;<samp>m</samp>&rsquo;</dt>
+<dd><p>-3 / -10
+</p></dd>
+<dt> &lsquo;<samp>c</samp>&rsquo;</dt>
+<dd><p>-2
+</p></dd>
+<dt> &lsquo;<samp>d</samp>&rsquo;</dt>
+<dd><p>-1
+</p></dd>
+<dt> &lsquo;<samp>h</samp>&rsquo;</dt>
+<dd><p>2
+</p></dd>
+<dt> &lsquo;<samp>k</samp>&rsquo;</dt>
+<dd><p>3 / 10
+</p></dd>
+<dt> &lsquo;<samp>K</samp>&rsquo;</dt>
+<dd><p>3 / 10
+</p></dd>
+<dt> &lsquo;<samp>M</samp>&rsquo;</dt>
+<dd><p>6 / 20
+</p></dd>
+<dt> &lsquo;<samp>G</samp>&rsquo;</dt>
+<dd><p>9 / 30
+</p></dd>
+<dt> &lsquo;<samp>T</samp>&rsquo;</dt>
+<dd><p>12 / 40
+</p></dd>
+<dt> &lsquo;<samp>P</samp>&rsquo;</dt>
+<dd><p>15 / 40
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>18 / 50
+</p></dd>
+<dt> &lsquo;<samp>Z</samp>&rsquo;</dt>
+<dd><p>21 / 60
+</p></dd>
+<dt> &lsquo;<samp>Y</samp>&rsquo;</dt>
+<dd><p>24 / 70
+</p></dd>
+</dl>
+
+<a name="Decoders"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Decoders">5. Decoders</a></h1>
+
+<p>Decoders are configured elements in FFmpeg which allow the decoding of
+multimedia streams.
+</p>
+<p>When you configure your FFmpeg build, all the supported native decoders
+are enabled by default. Decoders requiring an external library must be enabled
+manually via the corresponding <code>--enable-lib</code> option. You can list all
+available decoders using the configure option <code>--list-decoders</code>.
+</p>
+<p>You can disable all the decoders with the configure option
+<code>--disable-decoders</code> and selectively enable / disable single decoders
+with the options <code>--enable-decoder=<var>DECODER</var></code> /
+<code>--disable-decoder=<var>DECODER</var></code>.
+</p>
+<p>The option <code>-codecs</code> of the ff* tools will display the list of
+enabled decoders.
+</p>
+
+<a name="Video-Decoders"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Video-Decoders">6. Video Decoders</a></h1>
+
+<p>A description of some of the currently available video decoders
+follows.
+</p>
+<a name="rawvideo"></a>
+<h2 class="section"><a href="ffplay.html#toc-rawvideo">6.1 rawvideo</a></h2>
+
+<p>Rawvideo decoder.
+</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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
+<dd><p>Specify the assumed field type of the input video.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>the video is assumed to be progressive (default)
+</p></dd>
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>bottom-field-first is assumed
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>top-field-first is assumed
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Demuxers"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Demuxers">7. Demuxers</a></h1>
+
+<p>Demuxers are configured elements in FFmpeg which allow to read the
+multimedia streams from a particular type of file.
+</p>
+<p>When you configure your FFmpeg build, all the supported demuxers
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-demuxers&quot;.
+</p>
+<p>You can disable all the demuxers using the configure option
+&quot;&ndash;disable-demuxers&quot;, and selectively enable a single demuxer with
+the option &quot;&ndash;enable-demuxer=<var>DEMUXER</var>&quot;, or disable it
+with the option &quot;&ndash;disable-demuxer=<var>DEMUXER</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+enabled demuxers.
+</p>
+<p>The description of some of the currently available demuxers follows.
+</p>
+<a name="image2-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-image2-1">7.1 image2</a></h2>
+
+<p>Image file demuxer.
+</p>
+<p>This demuxer reads from a list of image files specified by a pattern.
+</p>
+<p>The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
+specifies the position of the characters representing a sequential
+number in each filename matched by the pattern. If the form
+&quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
+filename is 0-padded and <var>N</var> is the total number of 0-padded
+digits representing the number. The literal character &rsquo;%&rsquo; can be
+specified in the pattern with the string &quot;%%&quot;.
+</p>
+<p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
+the file list specified by the pattern must contain a number
+inclusively contained between 0 and 4, all the following numbers must
+be sequential. This limitation may be hopefully fixed.
+</p>
+<p>The pattern may contain a suffix which is used to automatically
+determine the format of the images contained in the files.
+</p>
+<p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
+filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
+&lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
+sequence of filenames of the form &lsquo;<tt>i%m%g-1.jpg</tt>&rsquo;,
+&lsquo;<tt>i%m%g-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>i%m%g-10.jpg</tt>&rsquo;, etc.
+</p>
+<p>The size, the pixel format, and the format of each image must be the
+same for all the files in the sequence.
+</p>
+<p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
+video from the images in the file sequence &lsquo;<tt>img-001.jpeg</tt>&rsquo;,
+&lsquo;<tt>img-002.jpeg</tt>&rsquo;, ..., assuming an input framerate of 10 frames per
+second:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
+</pre></td></tr></table>
+
+<p>Note that the pattern must not necessarily contain &quot;%d&quot; or
+&quot;%0<var>N</var>d&quot;, for example to convert a single image file
+&lsquo;<tt>img.jpeg</tt>&rsquo; you can employ the command:
+</p><table><tr><td>&nbsp;</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="ffplay.html#toc-applehttp">7.2 applehttp</a></h2>
+
+<p>Apple HTTP Live Streaming demuxer.
+</p>
+<p>This demuxer presents all AVStreams from all variant streams.
+The id field is set to the bitrate variant index number. By setting
+the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
+the caller can decide which variant streams to actually receive.
+The total bitrate of the variant that the stream belongs to is
+available in a metadata key named &quot;variant_bitrate&quot;.
+</p>
+<a name="Muxers"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Muxers">8. Muxers</a></h1>
+
+<p>Muxers are configured elements in FFmpeg which allow writing
+multimedia streams to a particular type of file.
+</p>
+<p>When you configure your FFmpeg build, all the supported muxers
+are enabled by default. You can list all available muxers using the
+configure option <code>--list-muxers</code>.
+</p>
+<p>You can disable all the muxers with the configure option
+<code>--disable-muxers</code> and selectively enable / disable single muxers
+with the options <code>--enable-muxer=<var>MUXER</var></code> /
+<code>--disable-muxer=<var>MUXER</var></code>.
+</p>
+<p>The option <code>-formats</code> of the ff* tools will display the list of
+enabled muxers.
+</p>
+<p>A description of some of the currently available muxers follows.
+</p>
+<p><a name="crc"></a>
+</p><a name="crc-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-crc-1">8.1 crc</a></h2>
+
+<p>CRC (Cyclic Redundancy Check) testing format.
+</p>
+<p>This muxer computes and prints the Adler-32 CRC of all the input audio
+and video frames. By default audio frames are converted to signed
+16-bit raw audio and video frames to raw video before computing the
+CRC.
+</p>
+<p>The output of the muxer consists of a single line of the form:
+CRC=0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal number 0-padded to
+8 digits containing the CRC for all the decoded input frames.
+</p>
+<p>For example to compute the CRC of the input, and store it in the file
+&lsquo;<tt>out.crc</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f crc out.crc
+</pre></td></tr></table>
+
+<p>You can print the CRC to stdout with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f crc -
+</pre></td></tr></table>
+
+<p>You can select the output format of each frame with &lsquo;<tt>ffmpeg</tt>&rsquo; by
+specifying the audio and video codec and format. For example to
+compute the CRC of the input audio converted to PCM unsigned 8-bit
+and the input video converted to MPEG-2 video, use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
+</pre></td></tr></table>
+
+<p>See also the <a href="#framecrc">framecrc</a> muxer.
+</p>
+<p><a name="framecrc"></a>
+</p><a name="framecrc-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-framecrc-1">8.2 framecrc</a></h2>
+
+<p>Per-frame CRC (Cyclic Redundancy Check) testing format.
+</p>
+<p>This muxer computes and prints the Adler-32 CRC for each decoded audio
+and video frame. By default audio frames are converted to signed
+16-bit raw audio and video frames to raw video before computing the
+CRC.
+</p>
+<p>The output of the muxer consists of a line for each audio and video
+frame of the form: <var>stream_index</var>, <var>frame_dts</var>,
+<var>frame_size</var>, 0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal
+number 0-padded to 8 digits containing the CRC of the decoded frame.
+</p>
+<p>For example to compute the CRC of each decoded frame in the input, and
+store it in the file &lsquo;<tt>out.crc</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f framecrc out.crc
+</pre></td></tr></table>
+
+<p>You can print the CRC of each decoded frame to stdout with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -f framecrc -
+</pre></td></tr></table>
+
+<p>You can select the output format of each frame with &lsquo;<tt>ffmpeg</tt>&rsquo; by
+specifying the audio and video codec and format. For example, to
+compute the CRC of each decoded input audio frame converted to PCM
+unsigned 8-bit and of each decoded input video frame converted to
+MPEG-2 video, use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
+</pre></td></tr></table>
+
+<p>See also the <a href="#crc">crc</a> muxer.
+</p>
+<a name="image2"></a>
+<h2 class="section"><a href="ffplay.html#toc-image2">8.3 image2</a></h2>
+
+<p>Image file muxer.
+</p>
+<p>The image file muxer writes video frames to image files.
+</p>
+<p>The output filenames are specified by a pattern, which can be used to
+produce sequentially numbered series of files.
+The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, this string
+specifies the position of the characters representing a numbering in
+the filenames. If the form &quot;%0<var>N</var>d&quot; is used, the string
+representing the number in each filename is 0-padded to <var>N</var>
+digits. The literal character &rsquo;%&rsquo; can be specified in the pattern with
+the string &quot;%%&quot;.
+</p>
+<p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
+the file list specified will contain the number 1, all the following
+numbers will be sequential.
+</p>
+<p>The pattern may contain a suffix which is used to automatically
+determine the format of the image files to write.
+</p>
+<p>For example the pattern &quot;img-%03d.bmp&quot; will specify a sequence of
+filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
+&lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.
+The pattern &quot;img%%-%d.jpg&quot; will specify a sequence of filenames of the
+form &lsquo;<tt>img%-1.jpg</tt>&rsquo;, &lsquo;<tt>img%-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>img%-10.jpg</tt>&rsquo;,
+etc.
+</p>
+<p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
+sequence of files &lsquo;<tt>img-001.jpeg</tt>&rsquo;, &lsquo;<tt>img-002.jpeg</tt>&rsquo;, ...,
+taking one image every second from the input video:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
+</pre></td></tr></table>
+
+<p>Note that with &lsquo;<tt>ffmpeg</tt>&rsquo;, if the format is not specified with the
+<code>-f</code> option and the output filename specifies an image file
+format, the image2 muxer is automatically selected, so the previous
+command can be written as:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
+</pre></td></tr></table>
+
+<p>Note also that the pattern must not necessarily contain &quot;%d&quot; or
+&quot;%0<var>N</var>d&quot;, for example to create a single image file
+&lsquo;<tt>img.jpeg</tt>&rsquo; from the input video you can employ the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
+</pre></td></tr></table>
+
+<p>The image muxer supports the .Y.U.V image file format. This format is
+special in that that each image frame consists of three files, for
+each of the YUV420P components. To read or write this image file format,
+specify the name of the &rsquo;.Y&rsquo; file. The muxer will automatically open the
+&rsquo;.U&rsquo; and &rsquo;.V&rsquo; files as required.
+</p>
+<a name="mpegts"></a>
+<h2 class="section"><a href="ffplay.html#toc-mpegts">8.4 mpegts</a></h2>
+
+<p>MPEG transport stream muxer.
+</p>
+<p>This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
+</p>
+<p>The muxer options are:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-mpegts_original_network_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the original_network_id (default 0x0001). This is unique identifier
+of a network in DVB. Its main use is in the unique identification of a
+service through the path Original_Network_ID, Transport_Stream_ID.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_transport_stream_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the transport_stream_id (default 0x0001). This identifies a
+transponder in DVB.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_service_id <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the service_id (default 0x0001) also known as program in DVB.
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_pmt_start_pid <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the first PID for PMT (default 0x1000, max 0x1f00).
+</p></dd>
+<dt> &lsquo;<samp>-mpegts_start_pid <var>number</var></samp>&rsquo;</dt>
+<dd><p>Set the first PID for data packets (default 0x0100, max 0x0f00).
+</p></dd>
+</dl>
+
+<p>The recognized metadata settings in mpegts muxer are <code>service_provider</code>
+and <code>service_name</code>. If they are not set the default for
+<code>service_provider</code> is &quot;FFmpeg&quot; and the default for
+<code>service_name</code> is &quot;Service01&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file.mpg -acodec copy -vcodec copy \
+     -mpegts_original_network_id 0x1122 \
+     -mpegts_transport_stream_id 0x3344 \
+     -mpegts_service_id 0x5566 \
+     -mpegts_pmt_start_pid 0x1500 \
+     -mpegts_start_pid 0x150 \
+     -metadata service_provider=&quot;Some provider&quot; \
+     -metadata service_name=&quot;Some Channel&quot; \
+     -y out.ts
+</pre></td></tr></table>
+
+<a name="null"></a>
+<h2 class="section"><a href="ffplay.html#toc-null">8.5 null</a></h2>
+
+<p>Null muxer.
+</p>
+<p>This muxer does not generate any output file, it is mainly useful for
+testing or benchmarking purposes.
+</p>
+<p>For example to benchmark decoding with &lsquo;<tt>ffmpeg</tt>&rsquo; you can use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null out.null
+</pre></td></tr></table>
+
+<p>Note that the above command does not read or write the &lsquo;<tt>out.null</tt>&rsquo;
+file, but specifying the output file is required by the &lsquo;<tt>ffmpeg</tt>&rsquo;
+syntax.
+</p>
+<p>Alternatively you can write the command as:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null -
+</pre></td></tr></table>
+
+<a name="matroska"></a>
+<h2 class="section"><a href="ffplay.html#toc-matroska">8.6 matroska</a></h2>
+
+<p>Matroska container muxer.
+</p>
+<p>This muxer implements the matroska and webm container specs.
+</p>
+<p>The recognized metadata settings in this muxer are:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>title=<var>title name</var></samp>&rsquo;</dt>
+<dd><p>Name provided to a single track
+</p></dd>
+</dl>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>language=<var>language name</var></samp>&rsquo;</dt>
+<dd><p>Specifies the language of the track in the Matroska languages form
+</p></dd>
+</dl>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>stereo_mode=<var>mode</var></samp>&rsquo;</dt>
+<dd><p>Stereo 3D video layout of two views in a single video track
+</p><dl compact="compact">
+<dt> &lsquo;<samp>mono</samp>&rsquo;</dt>
+<dd><p>video is not stereo
+</p></dd>
+<dt> &lsquo;<samp>left_right</samp>&rsquo;</dt>
+<dd><p>Both views are arranged side by side, Left-eye view is on the left
+</p></dd>
+<dt> &lsquo;<samp>bottom_top</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in top-bottom orientation, Left-eye view is at bottom
+</p></dd>
+<dt> &lsquo;<samp>top_bottom</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in top-bottom orientation, Left-eye view is on top
+</p></dd>
+<dt> &lsquo;<samp>checkerboard_rl</samp>&rsquo;</dt>
+<dd><p>Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
+</p></dd>
+<dt> &lsquo;<samp>checkerboard_lr</samp>&rsquo;</dt>
+<dd><p>Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
+</p></dd>
+<dt> &lsquo;<samp>row_interleaved_rl</samp>&rsquo;</dt>
+<dd><p>Each view is constituted by a row based interleaving, Right-eye view is first row
+</p></dd>
+<dt> &lsquo;<samp>row_interleaved_lr</samp>&rsquo;</dt>
+<dd><p>Each view is constituted by a row based interleaving, Left-eye view is first row
+</p></dd>
+<dt> &lsquo;<samp>col_interleaved_rl</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in a column based interleaving manner, Right-eye view is first column
+</p></dd>
+<dt> &lsquo;<samp>col_interleaved_lr</samp>&rsquo;</dt>
+<dd><p>Both views are arranged in a column based interleaving manner, Left-eye view is first column
+</p></dd>
+<dt> &lsquo;<samp>anaglyph_cyan_red</samp>&rsquo;</dt>
+<dd><p>All frames are in anaglyph format viewable through red-cyan filters
+</p></dd>
+<dt> &lsquo;<samp>right_left</samp>&rsquo;</dt>
+<dd><p>Both views are arranged side by side, Right-eye view is on the left
+</p></dd>
+<dt> &lsquo;<samp>anaglyph_green_magenta</samp>&rsquo;</dt>
+<dd><p>All frames are in anaglyph format viewable through green-magenta filters
+</p></dd>
+<dt> &lsquo;<samp>block_lr</samp>&rsquo;</dt>
+<dd><p>Both eyes laced in one Block, Left-eye view is first
+</p></dd>
+<dt> &lsquo;<samp>block_rl</samp>&rsquo;</dt>
+<dd><p>Both eyes laced in one Block, Right-eye view is first
+</p></dd>
+</dl>
+</dd>
+</dl>
+
+<p>For example a 3D WebM clip can be created using the following command line:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
+</pre></td></tr></table>
+
+<a name="Input-Devices"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Input-Devices">9. Input Devices</a></h1>
+
+<p>Input devices are configured elements in FFmpeg which allow to access
+the data coming from a multimedia device attached to your system.
+</p>
+<p>When you configure your FFmpeg build, all the supported input devices
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-indevs&quot;.
+</p>
+<p>You can disable all the input devices using the configure option
+&quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
+option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
+input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+supported input devices (amongst the demuxers).
+</p>
+<p>A description of the currently available input devices follows.
+</p>
+<a name="alsa-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-alsa-1">9.1 alsa</a></h2>
+
+<p>ALSA (Advanced Linux Sound Architecture) input device.
+</p>
+<p>To enable this input device during configuration you need libasound
+installed on your system.
+</p>
+<p>This device allows capturing from an ALSA device. The name of the
+device to capture has to be an ALSA card identifier.
+</p>
+<p>An ALSA identifier has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
+</pre></td></tr></table>
+
+<p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
+</p>
+<p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
+specify card number or identifier, device number and subdevice number
+(-1 means any).
+</p>
+<p>To see the list of cards currently recognized by your system check the
+files &lsquo;<tt>/proc/asound/cards</tt>&rsquo; and &lsquo;<tt>/proc/asound/devices</tt>&rsquo;.
+</p>
+<p>For example to capture with &lsquo;<tt>ffmpeg</tt>&rsquo; from an ALSA device with
+card id 0, you may run the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
+</pre></td></tr></table>
+
+<p>For more information see:
+<a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
+</p>
+<a name="bktr"></a>
+<h2 class="section"><a href="ffplay.html#toc-bktr">9.2 bktr</a></h2>
+
+<p>BSD video input device.
+</p>
+<a name="dv1394"></a>
+<h2 class="section"><a href="ffplay.html#toc-dv1394">9.3 dv1394</a></h2>
+
+<p>Linux DV 1394 input device.
+</p>
+<a name="fbdev"></a>
+<h2 class="section"><a href="ffplay.html#toc-fbdev">9.4 fbdev</a></h2>
+
+<p>Linux framebuffer input device.
+</p>
+<p>The Linux framebuffer is a graphic hardware-independent abstraction
+layer to show graphics on a computer monitor, typically on the
+console. It is accessed through a file device node, usually
+&lsquo;<tt>/dev/fb0</tt>&rsquo;.
+</p>
+<p>For more detailed information read the file
+Documentation/fb/framebuffer.txt included in the Linux source tree.
+</p>
+<p>To record from the framebuffer device &lsquo;<tt>/dev/fb0</tt>&rsquo; with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
+</pre></td></tr></table>
+
+<p>You can take a single screenshot image with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
+</pre></td></tr></table>
+
+<p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
+</p>
+<a name="jack"></a>
+<h2 class="section"><a href="ffplay.html#toc-jack">9.5 jack</a></h2>
+
+<p>JACK input device.
+</p>
+<p>To enable this input device during configuration you need libjack
+installed on your system.
+</p>
+<p>A JACK input device creates one or more JACK writable clients, one for
+each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
+<var>client_name</var> is the name provided by the application, and <var>N</var>
+is a number which identifies the channel.
+Each writable client will send the acquired data to the FFmpeg input
+device.
+</p>
+<p>Once you have created one or more JACK readable clients, you need to
+connect them to one or more JACK writable clients.
+</p>
+<p>To connect or disconnect JACK clients you can use the
+&lsquo;<tt>jack_connect</tt>&rsquo; and &lsquo;<tt>jack_disconnect</tt>&rsquo; programs, or do it
+through a graphical interface, for example with &lsquo;<tt>qjackctl</tt>&rsquo;.
+</p>
+<p>To list the JACK clients and their properties you can invoke the command
+&lsquo;<tt>jack_lsp</tt>&rsquo;.
+</p>
+<p>Follows an example which shows how to capture a JACK readable client
+with &lsquo;<tt>ffmpeg</tt>&rsquo;.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
+$ ffmpeg -f jack -i ffmpeg -y out.wav
+
+# Start the sample jack_metro readable client.
+$ jack_metro -b 120 -d 0.2 -f 4000
+
+# List the current JACK clients.
+$ jack_lsp -c
+system:capture_1
+system:capture_2
+system:playback_1
+system:playback_2
+ffmpeg:input_1
+metro:120_bpm
+
+# Connect metro to the ffmpeg writable client.
+$ jack_connect metro:120_bpm ffmpeg:input_1
+</pre></td></tr></table>
+
+<p>For more information read:
+<a href="http://jackaudio.org/">http://jackaudio.org/</a>
+</p>
+<a name="libdc1394"></a>
+<h2 class="section"><a href="ffplay.html#toc-libdc1394">9.6 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>
+
+<p>The OpenAL input device provides audio capture on all systems with a
+working OpenAL 1.1 implementation.
+</p>
+<p>To enable this input device during configuration, you need OpenAL
+headers and libraries installed on your system, and need to configure
+FFmpeg with <code>--enable-openal</code>.
+</p>
+<p>OpenAL headers and libraries should be provided as part of your OpenAL
+implementation, or as an additional download (an SDK). Depending on your
+installation you may need to specify additional flags via the
+<code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
+system to locate the OpenAL headers and libraries.
+</p>
+<p>An incomplete list of OpenAL implementations follows:
+</p>
+<dl compact="compact">
+<dt> <strong>Creative</strong></dt>
+<dd><p>The official Windows implementation, providing hardware acceleration
+with supported devices and software fallback.
+See <a href="http://openal.org/">http://openal.org/</a>.
+</p></dd>
+<dt> <strong>OpenAL Soft</strong></dt>
+<dd><p>Portable, open source (LGPL) software implementation. Includes
+backends for the most common sound APIs on the Windows, Linux,
+Solaris, and BSD operating systems.
+See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
+</p></dd>
+<dt> <strong>Apple</strong></dt>
+<dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
+See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
+</p></dd>
+</dl>
+
+<p>This device allows to capture from an audio input device handled
+through OpenAL.
+</p>
+<p>You need to specify the name of the device to capture in the provided
+filename. If the empty string is provided, the device will
+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>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>channels</samp>&rsquo;</dt>
+<dd><p>Set the number of channels in the captured audio. Only the values
+&lsquo;<samp>1</samp>&rsquo; (monaural) and &lsquo;<samp>2</samp>&rsquo; (stereo) are currently supported.
+Defaults to &lsquo;<samp>2</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_size</samp>&rsquo;</dt>
+<dd><p>Set the sample size (in bits) of the captured audio. Only the values
+&lsquo;<samp>8</samp>&rsquo; and &lsquo;<samp>16</samp>&rsquo; are currently supported. Defaults to
+&lsquo;<samp>16</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_rate</samp>&rsquo;</dt>
+<dd><p>Set the sample rate (in Hz) of the captured audio.
+Defaults to &lsquo;<samp>44.1k</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>list_devices</samp>&rsquo;</dt>
+<dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
+Defaults to &lsquo;<samp>false</samp>&rsquo;.
+</p>
+</dd>
+</dl>
+
+<a name="Examples"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Examples">9.7.2 Examples</a></h3>
+
+<p>Print the list of OpenAL supported devices and exit:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the OpenAL device &lsquo;<tt>DR-BT101 via PulseAudio</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the default device (note the empty string &rdquo; as filename):
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from two devices simultaneously, writing to two different files,
+within the same &lsquo;<tt>ffmpeg</tt>&rsquo; command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
+</pre></td></tr></table>
+<p>Note: not all OpenAL implementations support multiple simultaneous capture -
+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>
+
+<p>Open Sound System input device.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the OSS input device, and is usually set to
+&lsquo;<tt>/dev/dsp</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/dsp</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
+</pre></td></tr></table>
+
+<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="ffplay.html#toc-sndio-1">9.9 sndio</a></h2>
+
+<p>sndio input device.
+</p>
+<p>To enable this input device during configuration you need libsndio
+installed on your system.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the sndio input device, and is usually set to
+&lsquo;<tt>/dev/audio0</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/audio0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
+</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>
+
+<p>Video4Linux and Video4Linux2 input video devices.
+</p>
+<p>The name of the device to grab is a file device node, usually Linux
+systems tend to automatically create such nodes when the device
+(e.g. an USB webcam) is plugged into the system, and has a name of the
+kind &lsquo;<tt>/dev/video<var>N</var></tt>&rsquo;, where <var>N</var> is a number associated to
+the device.
+</p>
+<p>Video4Linux and Video4Linux2 devices only support a limited set of
+<var>width</var>x<var>height</var> sizes and framerates. You can check which are
+supported for example with the command &lsquo;<tt>dov4l</tt>&rsquo; for Video4Linux
+devices and the command &lsquo;<tt>v4l-info</tt>&rsquo; for Video4Linux2 devices.
+</p>
+<p>If the size for the device is set to 0x0, the input device will
+try to autodetect the size to use.
+Only for the video4linux2 device, if the frame rate is set to 0/0 the
+input device will use the frame rate value already set in the driver.
+</p>
+<p>Video4Linux support is deprecated since Linux 2.6.30, and will be
+dropped in later versions.
+</p>
+<p>Follow some usage examples of the video4linux devices with the ff*
+tools.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
+# to the default of 25/1.
+ffplay -s 320x240 -f video4linux /dev/video0
+
+# Grab and show the input of a video4linux2 device, autoadjust size.
+ffplay -f video4linux2 /dev/video0
+
+# Grab and record the input of a video4linux2 device, autoadjust size,
+# frame rate value defaults to 0/0 so it is read from the video4linux2
+# driver.
+ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
+</pre></td></tr></table>
+
+<a name="vfwcap"></a>
+<h2 class="section"><a href="ffplay.html#toc-vfwcap">9.11 vfwcap</a></h2>
+
+<p>VfW (Video for Windows) capture input device.
+</p>
+<p>The filename passed as input is the capture driver number, ranging from
+0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
+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>
+
+<p>X11 video input device.
+</p>
+<p>This device allows to capture a region of an X11 display.
+</p>
+<p>The filename passed as input has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
+</pre></td></tr></table>
+
+<p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
+X11 display name of the screen to grab from. <var>hostname</var> can be
+ommitted, and defaults to &quot;localhost&quot;. The environment variable
+<code>DISPLAY</code> contains the default display name.
+</p>
+<p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
+area with respect to the top-left border of the X11 screen. They
+default to 0.
+</p>
+<p>Check the X11 documentation (e.g. man X) for more detailed information.
+</p>
+<p>Use the &lsquo;<tt>dpyinfo</tt>&rsquo; program for getting basic information about the
+properties of your X11 display (e.g. grep for &quot;name&quot; or &quot;dimensions&quot;).
+</p>
+<p>For example to grab from &lsquo;<tt>:0.0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</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
+</pre></td></tr></table>
+
+<a name="Output-Devices"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Output-Devices">10. Output Devices</a></h1>
+
+<p>Output devices are configured elements in FFmpeg which allow to write
+multimedia data to an output device attached to your system.
+</p>
+<p>When you configure your FFmpeg build, all the supported output devices
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-outdevs&quot;.
+</p>
+<p>You can disable all the output devices using the configure option
+&quot;&ndash;disable-outdevs&quot;, and selectively enable an output device using the
+option &quot;&ndash;enable-outdev=<var>OUTDEV</var>&quot;, or you can disable a particular
+input device using the option &quot;&ndash;disable-outdev=<var>OUTDEV</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+enabled output devices (amongst the muxers).
+</p>
+<p>A description of the currently available output devices follows.
+</p>
+<a name="alsa"></a>
+<h2 class="section"><a href="ffplay.html#toc-alsa">10.1 alsa</a></h2>
+
+<p>ALSA (Advanced Linux Sound Architecture) output device.
+</p>
+<a name="oss-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-oss-1">10.2 oss</a></h2>
+
+<p>OSS (Open Sound System) output device.
+</p>
+<a name="sdl"></a>
+<h2 class="section"><a href="ffplay.html#toc-sdl">10.3 sdl</a></h2>
+
+<p>SDL (Simple Directmedia Layer) output device.
+</p>
+<p>This output devices allows to show a video stream in an SDL
+window. Only one SDL window is allowed per application, so you can
+have only one instance of this output device in an application.
+</p>
+<p>To enable this output device you need libsdl installed on your system
+when configuring your build.
+</p>
+<p>For more information about SDL, check:
+<a href="http://www.libsdl.org/">http://www.libsdl.org/</a>
+</p>
+<a name="Options-2"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Options-2">10.3.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>window_title</samp>&rsquo;</dt>
+<dd><p>Set the SDL window title, if not specified default to the filename
+specified for the output device.
+</p>
+</dd>
+<dt> &lsquo;<samp>icon_title</samp>&rsquo;</dt>
+<dd><p>Set the name of the iconified SDL window, if not specified it is set
+to the same value of <var>window_title</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>window_size</samp>&rsquo;</dt>
+<dd><p>Set the SDL window size, can be a string of the form
+<var>width</var>x<var>height</var> or a video size abbreviation.
+If not specified it defaults to the size of the input video.
+</p></dd>
+</dl>
+
+<a name="Examples-1"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Examples-1">10.3.2 Examples</a></h3>
+
+<p>The following command shows the &lsquo;<tt>ffmpeg</tt>&rsquo; output is an
+SDL window, forcing its size to the qcif format:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl &quot;SDL output&quot;
+</pre></td></tr></table>
+
+<a name="sndio"></a>
+<h2 class="section"><a href="ffplay.html#toc-sndio">10.4 sndio</a></h2>
+
+<p>sndio audio output device.
+</p>
+<a name="Protocols"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Protocols">11. Protocols</a></h1>
+
+<p>Protocols are configured elements in FFmpeg which allow to access
+resources which require the use of a particular protocol.
+</p>
+<p>When you configure your FFmpeg build, all the supported protocols are
+enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-protocols&quot;.
+</p>
+<p>You can disable all the protocols using the configure option
+&quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
+option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
+particular protocol using the option
+&quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
+</p>
+<p>The option &quot;-protocols&quot; of the ff* tools will display the list of
+supported protocols.
+</p>
+<p>A description of the currently available protocols follows.
+</p>
+<a name="applehttp-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-applehttp-1">11.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
+remote HTTP resources or local files, accessed using the standard
+file protocol.
+HTTP is default, specific protocol can be declared by specifying
+&quot;+<var>proto</var>&quot; after the applehttp URI scheme name, where <var>proto</var>
+is either &quot;file&quot; or &quot;http&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
+applehttp+http://host/path/to/remote/resource.m3u8
+applehttp+file://path/to/local/resource.m3u8
+</pre></td></tr></table>
+
+<a name="concat"></a>
+<h2 class="section"><a href="ffplay.html#toc-concat">11.2 concat</a></h2>
+
+<p>Physical concatenation protocol.
+</p>
+<p>Allow to read and seek from many resource in sequence as if they were
+a unique resource.
+</p>
+<p>A URL accepted by this protocol has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
+</pre></td></tr></table>
+
+<p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
+resource to be concatenated, each one possibly specifying a distinct
+protocol.
+</p>
+<p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
+&lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with &lsquo;<tt>ffplay</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
+</pre></td></tr></table>
+
+<p>Note that you may need to escape the character &quot;|&quot; which is special for
+many shells.
+</p>
+<a name="file"></a>
+<h2 class="section"><a href="ffplay.html#toc-file">11.3 file</a></h2>
+
+<p>File access protocol.
+</p>
+<p>Allow to read from or read to a file.
+</p>
+<p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with &lsquo;<tt>ffmpeg</tt>&rsquo;
+use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
+</pre></td></tr></table>
+
+<p>The ff* tools default to the file protocol, that is a resource
+specified with the name &quot;FILE.mpeg&quot; is interpreted as the URL
+&quot;file:FILE.mpeg&quot;.
+</p>
+<a name="gopher"></a>
+<h2 class="section"><a href="ffplay.html#toc-gopher">11.4 gopher</a></h2>
+
+<p>Gopher protocol.
+</p>
+<a name="http"></a>
+<h2 class="section"><a href="ffplay.html#toc-http">11.5 http</a></h2>
+
+<p>HTTP (Hyper Text Transfer Protocol).
+</p>
+<a name="mmst"></a>
+<h2 class="section"><a href="ffplay.html#toc-mmst">11.6 mmst</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over TCP.
+</p>
+<a name="mmsh"></a>
+<h2 class="section"><a href="ffplay.html#toc-mmsh">11.7 mmsh</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over HTTP.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<a name="md5"></a>
+<h2 class="section"><a href="ffplay.html#toc-md5">11.8 md5</a></h2>
+
+<p>MD5 output protocol.
+</p>
+<p>Computes the MD5 hash of the data to be written, and on close writes
+this to the designated output or stdout if none is specified. It can
+be used to test muxers without writing an actual file.
+</p>
+<p>Some examples follow.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
+ffmpeg -i input.flv -f avi -y md5:output.avi.md5
+
+# Write the MD5 hash of the encoded AVI file to stdout.
+ffmpeg -i input.flv -f avi -y md5:
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV) require the output protocol to
+be seekable, so they will fail with the MD5 output protocol.
+</p>
+<a name="pipe"></a>
+<h2 class="section"><a href="ffplay.html#toc-pipe">11.9 pipe</a></h2>
+
+<p>UNIX pipe access protocol.
+</p>
+<p>Allow to read and write from UNIX pipes.
+</p>
+<p>The accepted syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">pipe:[<var>number</var>]
+</pre></td></tr></table>
+
+<p><var>number</var> is the number corresponding to the file descriptor of the
+pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
+is not specified, by default the stdout file descriptor will be used
+for writing, stdin for reading.
+</p>
+<p>For example to read from stdin with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
+# ...this is the same as...
+cat test.wav | ffmpeg -i pipe:
+</pre></td></tr></table>
+
+<p>For writing to stdout with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
+# ...this is the same as...
+ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV), require the output protocol to
+be seekable, so they will fail with the pipe output protocol.
+</p>
+<a name="rtmp"></a>
+<h2 class="section"><a href="ffplay.html#toc-rtmp">11.10 rtmp</a></h2>
+
+<p>Real-Time Messaging Protocol.
+</p>
+<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
+dia content across a TCP/IP network.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<p>The accepted parameters are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>server</samp>&rsquo;</dt>
+<dd><p>The address of the RTMP server.
+</p>
+</dd>
+<dt> &lsquo;<samp>port</samp>&rsquo;</dt>
+<dd><p>The number of the TCP port to use (by default is 1935).
+</p>
+</dd>
+<dt> &lsquo;<samp>app</samp>&rsquo;</dt>
+<dd><p>It is the name of the application to access. It usually corresponds to
+the path where the application is installed on the RTMP server
+(e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.).
+</p>
+</dd>
+<dt> &lsquo;<samp>playpath</samp>&rsquo;</dt>
+<dd><p>It is the path or name of the resource to play with reference to the
+application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example to read with &lsquo;<tt>ffplay</tt>&rsquo; a multimedia resource named
+&quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtmp://myserver/vod/sample
+</pre></td></tr></table>
+
+<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
+<h2 class="section"><a href="ffplay.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">11.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
+
+<p>Real-Time Messaging Protocol and its variants supported through
+librtmp.
+</p>
+<p>Requires the presence of the librtmp headers and library during
+configuration. You need to explicitely configure the build with
+&quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
+protocol.
+</p>
+<p>This protocol provides most client functions and a few server
+functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
+encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
+variants of these encrypted types (RTMPTE, RTMPTS).
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
+</pre></td></tr></table>
+
+<p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
+&quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
+<var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
+meaning as specified for the RTMP native protocol.
+<var>options</var> contains a list of space-separated options of the form
+<var>key</var>=<var>val</var>.
+</p>
+<p>See the librtmp manual page (man 3 librtmp) for more information.
+</p>
+<p>For example, to stream a file in real-time to an RTMP server using
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
+</pre></td></tr></table>
+
+<p>To play the same stream using &lsquo;<tt>ffplay</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
+</pre></td></tr></table>
+
+<a name="rtp"></a>
+<h2 class="section"><a href="ffplay.html#toc-rtp">11.12 rtp</a></h2>
+
+<p>Real-Time Protocol.
+</p>
+<a name="rtsp"></a>
+<h2 class="section"><a href="ffplay.html#toc-rtsp">11.13 rtsp</a></h2>
+
+<p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
+and muxer. The demuxer supports both normal RTSP (with data transferred
+over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
+data transferred over RDT).
+</p>
+<p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
+supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
+<a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
+</p>
+<p>The required syntax for a RTSP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>udp</samp>&rsquo;</dt>
+<dd><p>Use UDP as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>tcp</samp>&rsquo;</dt>
+<dd><p>Use TCP (interleaving within the RTSP control channel) as lower
+transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>multicast</samp>&rsquo;</dt>
+<dd><p>Use UDP multicast as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>http</samp>&rsquo;</dt>
+<dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
+passing proxies.
+</p>
+</dd>
+<dt> &lsquo;<samp>filter_src</samp>&rsquo;</dt>
+<dd><p>Accept packets only from negotiated peer address and port.
+</p></dd>
+</dl>
+
+<p>Multiple lower transport protocols may be specified, in that case they are
+tried one at a time (if the setup of one fails, the next one is tried).
+For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
+</p>
+<p>When receiving data over UDP, the demuxer tries to reorder received packets
+(since they may arrive out of order, or packets may get lost totally). In
+order for this to be enabled, a maximum delay must be specified in the
+<code>max_delay</code> field of AVFormatContext.
+</p>
+<p>When watching multi-bitrate Real-RTSP streams with &lsquo;<tt>ffplay</tt>&rsquo;, the
+streams to display can be chosen with <code>-vst</code> <var>n</var> and
+<code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
+on the fly by pressing <code>v</code> and <code>a</code>.
+</p>
+<p>Example command lines:
+</p>
+<p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay -max_delay 500000 rtsp://server/video.mp4?udp
+</pre></td></tr></table>
+
+<p>To watch a stream tunneled over HTTP:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtsp://server/video.mp4?http
+</pre></td></tr></table>
+
+<p>To send a stream in realtime to a RTSP server, for others to watch:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
+</pre></td></tr></table>
+
+<a name="sap"></a>
+<h2 class="section"><a href="ffplay.html#toc-sap">11.14 sap</a></h2>
+
+<p>Session Announcement Protocol (RFC 2974). This is not technically a
+protocol handler in libavformat, it is a muxer and demuxer.
+It is used for signalling of RTP streams, by announcing the SDP for the
+streams regularly on a separate port.
+</p>
+<a name="Muxer"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Muxer">11.14.1 Muxer</a></h3>
+
+<p>The syntax for a SAP url given to the muxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
+</pre></td></tr></table>
+
+<p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
+or to port 5004 if no port is specified.
+<var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
+<dd><p>Specify the destination IP address for sending the announcements to.
+If omitted, the announcements are sent to the commonly used SAP
+announcement multicast address 224.2.127.254 (sap.mcast.net), or
+ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
+</p>
+</dd>
+<dt> &lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
+<dd><p>Specify the port to send the announcements on, defaults to
+9875 if not specified.
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>Specify the time to live value for the announcements and RTP packets,
+defaults to 255.
+</p>
+</dd>
+<dt> &lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
+<dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
+default), all streams are sent on unique ports, with each stream on a
+port 2 numbers higher than the previous.
+VLC/Live555 requires this to be set to 1, to be able to receive the stream.
+The RTP stack in libavformat for receiving requires all streams to be sent
+on unique ports.
+</p></dd>
+</dl>
+
+<p>Example command lines follow.
+</p>
+<p>To broadcast a stream on the local subnet, for watching in VLC:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
+</pre></td></tr></table>
+
+<p>Similarly, for watching in ffplay:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
+</pre></td></tr></table>
+
+<p>And for watching in ffplay, over IPv6:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
+</pre></td></tr></table>
+
+<a name="Demuxer"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-Demuxer">11.14.2 Demuxer</a></h3>
+
+<p>The syntax for a SAP url given to the demuxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
+</pre></td></tr></table>
+
+<p><var>address</var> is the multicast address to listen for announcements on,
+if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
+is the port that is listened on, 9875 if omitted.
+</p>
+<p>The demuxers listens for announcements on the given address and port.
+Once an announcement is received, it tries to receive that particular stream.
+</p>
+<p>Example command lines follow.
+</p>
+<p>To play back the first stream announced on the normal SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://
+</pre></td></tr></table>
+
+<p>To play back the first stream announced on one the default IPv6 SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
+</pre></td></tr></table>
+
+<a name="tcp"></a>
+<h2 class="section"><a href="ffplay.html#toc-tcp">11.15 tcp</a></h2>
+
+<p>Trasmission Control Protocol.
+</p>
+<p>The required syntax for a TCP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>listen</samp>&rsquo;</dt>
+<dd><p>Listen for an incoming connection
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
+ffplay tcp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+</dd>
+</dl>
+
+<a name="udp"></a>
+<h2 class="section"><a href="ffplay.html#toc-udp">11.16 udp</a></h2>
+
+<p>User Datagram Protocol.
+</p>
+<p>The required syntax for a UDP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> contains a list of &amp;-seperated options of the form <var>key</var>=<var>val</var>.
+Follow the list of supported options.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the UDP buffer size in bytes
+</p>
+</dd>
+<dt> &lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
+<dd><p>override the local UDP port to bind with
+</p>
+</dd>
+<dt> &lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the size in bytes of UDP packets
+</p>
+</dd>
+<dt> &lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>explicitly allow or disallow reusing UDP sockets
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>set the time to live value (for multicast only)
+</p>
+</dd>
+<dt> &lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
+destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
+If the destination address isn&rsquo;t known at the start, this option can
+be specified in ff_udp_set_remote_url, too.
+This allows finding out the source address for the packets with getsockname,
+and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
+unreachable&quot; is received.
+For receiving, this gives the benefit of only receiving packets from
+the specified peer address/port.
+</p></dd>
+</dl>
+
+<p>Some usage examples of the udp protocol with &lsquo;<tt>ffmpeg</tt>&rsquo; follow.
+</p>
+<p>To stream over UDP to a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+<p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
+</pre></td></tr></table>
+
+<p>To receive over UDP from a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
+</pre></td></tr></table>
+
+<a name="Filtergraph-description"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Filtergraph-description">12. Filtergraph description</a></h1>
+
+<p>A filtergraph is a directed graph of connected filters. It can contain
+cycles, and there can be multiple links between a pair of
+filters. Each link has one input pad on one side connecting it to one
+filter from which it takes its input, and one output pad on the other
+side connecting it to the one filter accepting its output.
+</p>
+<p>Each filter in a filtergraph is an instance of a filter class
+registered in the application, which defines the features and the
+number of input and output pads of the filter.
+</p>
+<p>A filter with no input pads is called a &quot;source&quot;, a filter with no
+output pads is called a &quot;sink&quot;.
+</p>
+<a name="Filtergraph-syntax"></a>
+<h2 class="section"><a href="ffplay.html#toc-Filtergraph-syntax">12.1 Filtergraph syntax</a></h2>
+
+<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
+&lsquo;<tt>libavfilter/avfiltergraph</tt>&rsquo;.
+</p>
+<p>A filterchain consists of a sequence of connected filters, each one
+connected to the previous one in the sequence. A filterchain is
+represented by a list of &quot;,&quot;-separated filter descriptions.
+</p>
+<p>A filtergraph consists of a sequence of filterchains. A sequence of
+filterchains is represented by a list of &quot;;&quot;-separated filterchain
+descriptions.
+</p>
+<p>A filter is represented by a string of the form:
+[<var>in_link_1</var>]...[<var>in_link_N</var>]<var>filter_name</var>=<var>arguments</var>[<var>out_link_1</var>]...[<var>out_link_M</var>]
+</p>
+<p><var>filter_name</var> is the name of the filter class of which the
+described filter is an instance of, and has to be the name of one of
+the filter classes registered in the program.
+The name of the filter class is optionally followed by a string
+&quot;=<var>arguments</var>&quot;.
+</p>
+<p><var>arguments</var> is a string which contains the parameters used to
+initialize the filter instance, and are described in the filter
+descriptions below.
+</p>
+<p>The list of arguments can be quoted using the character &quot;&rsquo;&quot; as initial
+and ending mark, and the character &rsquo;\&rsquo; for escaping the characters
+within the quoted text; otherwise the argument string is considered
+terminated when the next special character (belonging to the set
+&quot;[]=;,&quot;) is encountered.
+</p>
+<p>The name and arguments of the filter are optionally preceded and
+followed by a list of link labels.
+A link label allows to name a link and associate it to a filter output
+or input pad. The preceding labels <var>in_link_1</var>
+... <var>in_link_N</var>, are associated to the filter input pads,
+the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
+associated to the output pads.
+</p>
+<p>When two link labels with the same name are found in the
+filtergraph, a link between the corresponding input and output pad is
+created.
+</p>
+<p>If an output pad is not labelled, it is linked by default to the first
+unlabelled input pad of the next filter in the filterchain.
+For example in the filterchain:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
+</pre></td></tr></table>
+<p>the split filter instance has two output pads, and the overlay filter
+instance two input pads. The first output pad of split is labelled
+&quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
+output pad of split is linked to the second input pad of overlay,
+which are both unlabelled.
+</p>
+<p>In a complete filterchain all the unlabelled filter input and output
+pads must be connected. A filtergraph is considered valid if all the
+filter input and output pads of all the filterchains are connected.
+</p>
+<p>Follows a BNF description for the filtergraph syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>NAME</var>             ::= sequence of alphanumeric characters and '_'
+<var>LINKLABEL</var>        ::= &quot;[&quot; <var>NAME</var> &quot;]&quot;
+<var>LINKLABELS</var>       ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
+<var>FILTER_ARGUMENTS</var> ::= sequence of chars (eventually quoted)
+<var>FILTER</var>           ::= [<var>LINKNAMES</var>] <var>NAME</var> [&quot;=&quot; <var>ARGUMENTS</var>] [<var>LINKNAMES</var>]
+<var>FILTERCHAIN</var>      ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
+<var>FILTERGRAPH</var>      ::= <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
+</pre></td></tr></table>
+
+
+<a name="Audio-Filters"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Audio-Filters">13. Audio Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the audio filters included in your
+build.
+</p>
+<p>Below is a description of the currently available audio filters.
+</p>
+<a name="anull"></a>
+<h2 class="section"><a href="ffplay.html#toc-anull">13.1 anull</a></h2>
+
+<p>Pass the audio source unchanged to the output.
+</p>
+
+<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="anullsrc"></a>
+<h2 class="section"><a href="ffplay.html#toc-anullsrc">14.1 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>
+<p>It accepts as optional parameter a string of the form
+<var>sample_rate</var>:<var>channel_layout</var>.
+</p>
+<p><var>sample_rate</var> specify the sample rate, and defaults to 44100.
+</p>
+<p><var>channel_layout</var> specify the channel layout, and can be either an
+integer or a string representing a channel layout. The default value
+of <var>channel_layout</var> is 3, which corresponds to CH_LAYOUT_STEREO.
+</p>
+<p>Check the channel_layout_map definition in
+&lsquo;<tt>libavcodec/audioconvert.c</tt>&rsquo; for the mapping between strings and
+channel layout values.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">#  set the sample rate to 48000 Hz and the channel layout to CH_LAYOUT_MONO.
+anullsrc=48000:4
+
+# same as
+anullsrc=48000:mono
+</pre></td></tr></table>
+
+
+<a name="Audio-Sinks"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Audio-Sinks">15. Audio Sinks</a></h1>
+
+<p>Below is a description of the currently available audio sinks.
+</p>
+<a name="anullsink"></a>
+<h2 class="section"><a href="ffplay.html#toc-anullsink">15.1 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
+tools.
+</p>
+
+<a name="Video-Filters"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Video-Filters">16. Video Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the video filters included in your
+build.
+</p>
+<p>Below is a description of the currently available video filters.
+</p>
+<a name="blackframe"></a>
+<h2 class="section"><a href="ffplay.html#toc-blackframe">16.1 blackframe</a></h2>
+
+<p>Detect frames that are (almost) completely black. Can be useful to
+detect chapter transitions or commercials. Output lines consist of
+the frame number of the detected frame, the percentage of blackness,
+the position in the file if known or -1 and the timestamp in seconds.
+</p>
+<p>In order to display the output lines, you need to set the loglevel at
+least to the AV_LOG_INFO value.
+</p>
+<p>The filter accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">blackframe[=<var>amount</var>:[<var>threshold</var>]]
+</pre></td></tr></table>
+
+<p><var>amount</var> is the percentage of the pixels that have to be below the
+threshold, and defaults to 98.
+</p>
+<p><var>threshold</var> is the threshold below which a pixel value is
+considered black, and defaults to 32.
+</p>
+<a name="boxblur"></a>
+<h2 class="section"><a href="ffplay.html#toc-boxblur">16.2 boxblur</a></h2>
+
+<p>Apply boxblur algorithm to the input video.
+</p>
+<p>This filter accepts the parameters:
+<var>luma_power</var>:<var>luma_radius</var>:<var>chroma_radius</var>:<var>chroma_power</var>:<var>alpha_radius</var>:<var>alpha_power</var>
+</p>
+<p>Chroma and alpha parameters are optional, if not specified they default
+to the corresponding values set for <var>luma_radius</var> and
+<var>luma_power</var>.
+</p>
+<p><var>luma_radius</var>, <var>chroma_radius</var>, and <var>alpha_radius</var> represent
+the radius in pixels of the box used for blurring the corresponding
+input plane. They are expressions, and can contain the following
+constants:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>cw, ch</samp>&rsquo;</dt>
+<dd><p>the input chroma image width and height in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>The radius must be a non-negative number, and must be not greater than
+the value of the expression <code>min(w,h)/2</code> for the luma and alpha planes,
+and of <code>min(cw,ch)/2</code> for the chroma planes.
+</p>
+<p><var>luma_power</var>, <var>chroma_power</var>, and <var>alpha_power</var> represent
+how many times the boxblur filter is applied to the corresponding
+plane.
+</p>
+<p>Some examples follow:
+</p>
+<ul>
+<li>
+Apply a boxblur filter with luma, chroma, and alpha radius
+set to 2:
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1
+</pre></td></tr></table>
+
+</li><li>
+Set luma radius to 2, alpha and chroma radius to 0
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1:0:0:0:0
+</pre></td></tr></table>
+
+</li><li>
+Set luma and chroma radius to a fraction of the video dimension
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
+</pre></td></tr></table>
+
+</li></ul>
+
+<a name="copy"></a>
+<h2 class="section"><a href="ffplay.html#toc-copy">16.3 copy</a></h2>
+
+<p>Copy the input source unchanged to the output. Mainly useful for
+testing purposes.
+</p>
+<a name="crop"></a>
+<h2 class="section"><a href="ffplay.html#toc-crop">16.4 crop</a></h2>
+
+<p>Crop the input video to <var>out_w</var>:<var>out_h</var>:<var>x</var>:<var>y</var>.
+</p>
+<p>The parameters are expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>the computed values for <var>x</var> and <var>y</var>. They are evaluated for
+each new frame.
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the number of input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the input frame, NAN if unknown
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
+</p>
+</dd>
+</dl>
+
+<p>The <var>out_w</var> and <var>out_h</var> parameters specify the expressions for
+the width and height of the output (cropped) video. They are
+evaluated just at the configuration of the filter.
+</p>
+<p>The default value of <var>out_w</var> is &quot;in_w&quot;, and the default value of
+<var>out_h</var> is &quot;in_h&quot;.
+</p>
+<p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
+and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
+cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
+evaluated after <var>out_w</var> and <var>out_h</var>.
+</p>
+<p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
+position of the top-left corner of the output (non-cropped) area. They
+are evaluated for each frame. If the evaluated value is not valid, it
+is approximated to the nearest valid value.
+</p>
+<p>The default value of <var>x</var> is &quot;(in_w-out_w)/2&quot;, and the default
+value for <var>y</var> is &quot;(in_h-out_h)/2&quot;, which set the cropped area at
+the center of the input image.
+</p>
+<p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
+for <var>y</var> may depend on <var>x</var>.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># crop the central input area with size 100x100
+crop=100:100
+
+# crop the central input area with size 2/3 of the input video
+&quot;crop=2/3*in_w:2/3*in_h&quot;
+
+# crop the input video central square
+crop=in_h
+
+# delimit the rectangle with the top-left corner placed at position
+# 100:100 and the right-bottom corner corresponding to the right-bottom
+# corner of the input image.
+crop=in_w-100:in_h-100:100:100
+
+# crop 10 pixels from the left and right borders, and 20 pixels from
+# the top and bottom borders
+&quot;crop=in_w-2*10:in_h-2*20&quot;
+
+# keep only the bottom right quarter of the input image
+&quot;crop=in_w/2:in_h/2:in_w/2:in_h/2&quot;
+
+# crop height for getting Greek harmony
+&quot;crop=in_w:1/PHI*in_w&quot;
+
+# trembling effect
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)&quot;
+
+# erratic camera effect depending on timestamp
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)&quot;
+
+# set x depending on the value of y
+&quot;crop=in_w/2:in_h/2:y:10+10*sin(n/10)&quot;
+</pre></td></tr></table>
+
+<a name="cropdetect"></a>
+<h2 class="section"><a href="ffplay.html#toc-cropdetect">16.5 cropdetect</a></h2>
+
+<p>Auto-detect crop size.
+</p>
+<p>Calculate necessary cropping parameters and prints the recommended
+parameters through the logging system. The detected dimensions
+correspond to the non-black area of the input video.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cropdetect[=<var>limit</var>[:<var>round</var>[:<var>reset</var>]]]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>limit</samp>&rsquo;</dt>
+<dd><p>Threshold, which can be optionally specified from nothing (0) to
+everything (255), defaults to 24.
+</p>
+</dd>
+<dt> &lsquo;<samp>round</samp>&rsquo;</dt>
+<dd><p>Value which the width/height should be divisible by, defaults to
+16. The offset is automatically adjusted to center the video. Use 2 to
+get only even dimensions (needed for 4:2:2 video). 16 is best when
+encoding to most video codecs.
+</p>
+</dd>
+<dt> &lsquo;<samp>reset</samp>&rsquo;</dt>
+<dd><p>Counter that determines after how many frames cropdetect will reset
+the previously detected largest video area and start over to detect
+the current optimal crop area. Defaults to 0.
+</p>
+<p>This can be useful when channel logos distort the video area. 0
+indicates never reset and return the largest area encountered during
+playback.
+</p></dd>
+</dl>
+
+<a name="drawbox"></a>
+<h2 class="section"><a href="ffplay.html#toc-drawbox">16.6 drawbox</a></h2>
+
+<p>Draw a colored box on the input image.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawbox=<var>x</var>:<var>y</var>:<var>width</var>:<var>height</var>:<var>color</var>
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>Specify the top left corner coordinates of the box. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the box, if 0 they are interpreted as
+the input width and height. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the box to write, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p></dd>
+</dl>
+
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw a black box around the edge of the input image
+drawbox
+
+# draw a box with color red and an opacity of 50%
+drawbox=10:20:200:60:red@0.5&quot;
+</pre></td></tr></table>
+
+<a name="drawtext"></a>
+<h2 class="section"><a href="ffplay.html#toc-drawtext">16.7 drawtext</a></h2>
+
+<p>Draw text string or text from specified file on top of video using the
+libfreetype library.
+</p>
+<p>To enable compilation of this filter you need to configure FFmpeg with
+<code>--enable-libfreetype</code>.
+</p>
+<p>The filter also recognizes strftime() sequences in the provided text
+and expands them accordingly. Check the documentation of strftime().
+</p>
+<p>The filter accepts parameters as a list of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;.
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>fontfile</samp>&rsquo;</dt>
+<dd><p>The font file to be used for drawing text. Path must be included.
+This parameter is mandatory.
+</p>
+</dd>
+<dt> &lsquo;<samp>text</samp>&rsquo;</dt>
+<dd><p>The text string to be drawn. The text must be a sequence of UTF-8
+encoded characters.
+This parameter is mandatory if no file is specified with the parameter
+<var>textfile</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>textfile</samp>&rsquo;</dt>
+<dd><p>A text file containing text to be drawn. The text must be a sequence
+of UTF-8 encoded characters.
+</p>
+<p>This parameter is mandatory if no text string is specified with the
+parameter <var>text</var>.
+</p>
+<p>If both text and textfile are specified, an error is thrown.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>The offsets where text will be drawn within the video frame.
+Relative to the top/left border of the output image.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontsize</samp>&rsquo;</dt>
+<dd><p>The font size to be used for drawing text.
+The default value of <var>fontsize</var> is 16.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing fonts.
+Either a string (e.g. &quot;red&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff000033&quot;), possibly followed by an alpha specifier.
+The default value of <var>fontcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>boxcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing box around text.
+Either a string (e.g. &quot;yellow&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>boxcolor</var> is &quot;white&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>box</samp>&rsquo;</dt>
+<dd><p>Used to draw a box around text using background color.
+Value should be either 1 (enable) or 0 (disable).
+The default value of <var>box</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowx, shadowy</samp>&rsquo;</dt>
+<dd><p>The x and y offsets for the text shadow position with respect to the
+position of the text. They can be either positive or negative
+values. Default value for both is &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing a shadow behind the drawn text.  It
+can be a color name (e.g. &quot;yellow&quot;) or a string in the 0xRRGGBB[AA]
+form (e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>shadowcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>ft_load_flags</samp>&rsquo;</dt>
+<dd><p>Flags to be used for loading the fonts.
+</p>
+<p>The flags map the corresponding flags supported by libfreetype, and are
+a combination of the following values:
+</p><dl compact="compact">
+<dt> <var>default</var></dt>
+<dt> <var>no_scale</var></dt>
+<dt> <var>no_hinting</var></dt>
+<dt> <var>render</var></dt>
+<dt> <var>no_bitmap</var></dt>
+<dt> <var>vertical_layout</var></dt>
+<dt> <var>force_autohint</var></dt>
+<dt> <var>crop_bitmap</var></dt>
+<dt> <var>pedantic</var></dt>
+<dt> <var>ignore_global_advance_width</var></dt>
+<dt> <var>no_recurse</var></dt>
+<dt> <var>ignore_transform</var></dt>
+<dt> <var>monochrome</var></dt>
+<dt> <var>linear_design</var></dt>
+<dt> <var>no_autohint</var></dt>
+<dt> <var>end table</var></dt>
+</dl>
+
+<p>Default value is &quot;render&quot;.
+</p>
+<p>For more information consult the documentation for the FT_LOAD_*
+libfreetype flags.
+</p>
+</dd>
+<dt> &lsquo;<samp>tabsize</samp>&rsquo;</dt>
+<dd><p>The size in number of spaces to use for rendering the tab.
+Default value is 4.
+</p></dd>
+</dl>
+
+<p>For example the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
+</pre></td></tr></table>
+
+<p>will draw &quot;Test Text&quot; with font FreeSerif, using the default values
+for the optional parameters.
+</p>
+<p>The command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
+          x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
+</pre></td></tr></table>
+
+<p>will draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
+and y=50 (counting from the top-left corner of the screen), text is
+yellow with a red box around it. Both the text and the box have an
+opacity of 20%.
+</p>
+<p>Note that the double quotes are not necessary if spaces are not used
+within the parameter list.
+</p>
+<p>For more information about libfreetype, check:
+<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>
+
+<p>Apply fade-in/out effect to input video.
+</p>
+<p>It accepts the parameters:
+<var>type</var>:<var>start_frame</var>:<var>nb_frames</var>
+</p>
+<p><var>type</var> specifies if the effect type, can be either &quot;in&quot; for
+fade-in, or &quot;out&quot; for a fade-out effect.
+</p>
+<p><var>start_frame</var> specifies the number of the start frame for starting
+to apply the fade effect.
+</p>
+<p><var>nb_frames</var> specifies the number of frames for which the fade
+effect has to last. At the end of the fade-in effect the output video
+will have the same intensity as the input video, at the end of the
+fade-out transition the output video will be completely black.
+</p>
+<p>A few usage examples follow, usable too as test scenarios.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># fade in first 30 frames of video
+fade=in:0:30
+
+# fade out last 45 frames of a 200-frame video
+fade=out:155:45
+
+# fade in first 25 frames and fade out last 25 frames of a 1000-frame video
+fade=in:0:25, fade=out:975:25
+
+# make first 5 frames black, then fade in from frame 5-24
+fade=in:5:20
+</pre></td></tr></table>
+
+<a name="fieldorder"></a>
+<h2 class="section"><a href="ffplay.html#toc-fieldorder">16.9 fieldorder</a></h2>
+
+<p>Transform the field order of the input video.
+</p>
+<p>It accepts one parameter which specifies the required field order that
+the input interlaced video will be transformed to. The parameter can
+assume one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0 or bff</samp>&rsquo;</dt>
+<dd><p>output bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1 or tff</samp>&rsquo;</dt>
+<dd><p>output top field first
+</p></dd>
+</dl>
+
+<p>Default value is &quot;tff&quot;.
+</p>
+<p>Transformation is achieved by shifting the picture content up or down
+by one line, and filling the remaining line with appropriate picture content.
+This method is consistent with most broadcast field order converters.
+</p>
+<p>If the input video is not flagged as being interlaced, or it is already
+flagged as being of the required output field order then this filter does
+not alter the incoming video.
+</p>
+<p>This filter is very useful when converting to or from PAL DV material,
+which is bottom field first.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
+</pre></td></tr></table>
+
+<a name="fifo"></a>
+<h2 class="section"><a href="ffplay.html#toc-fifo">16.10 fifo</a></h2>
+
+<p>Buffer input images and send them when they are requested.
+</p>
+<p>This filter is mainly useful when auto-inserted by the libavfilter
+framework.
+</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>
+
+<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
+the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># convert the input video to the format &quot;yuv420p&quot;
+format=yuv420p
+
+# convert the input video to any of the formats in the list
+format=yuv420p:yuv444p:yuv410p
+</pre></td></tr></table>
+
+<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>
+
+<p>Apply a frei0r effect to the input video.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The filter supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>filter_name</var>[{:|=}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>filter_name</var> is the name to the frei0r effect to load. If the
+environment variable <code>FREI0R_PATH</code> is defined, the frei0r effect
+is searched in each one of the directories specified by the colon
+separated list in <code>FREIOR_PATH</code>, otherwise in the standard frei0r
+paths, which are in this order: &lsquo;<tt>HOME/.frei0r-1/lib/</tt>&rsquo;,
+&lsquo;<tt>/usr/local/lib/frei0r-1/</tt>&rsquo;, &lsquo;<tt>/usr/lib/frei0r-1/</tt>&rsquo;.
+</p>
+<p><var>param1</var>, <var>param2</var>, ... , <var>paramN</var> specify the parameters
+for the frei0r effect.
+</p>
+<p>A frei0r effect parameter can be a boolean (whose values are specified
+with &quot;y&quot; and &quot;n&quot;), a double, a color (specified by the syntax
+<var>R</var>/<var>G</var>/<var>B</var>, <var>R</var>, <var>G</var>, and <var>B</var> being float
+numbers from 0.0 to 1.0) or by an <code>av_parse_color()</code> color
+description), a position (specified by the syntax <var>X</var>/<var>Y</var>,
+<var>X</var> and <var>Y</var> being float numbers) and a string.
+</p>
+<p>The number and kind of parameters depend on the loaded effect. If an
+effect parameter is not specified the default value is set.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># apply the distort0r effect, set the first two double parameters
+frei0r=distort0r:0.5:0.01
+
+# apply the colordistance effect, takes a color as first parameter
+frei0r=colordistance:0.2/0.3/0.4
+frei0r=colordistance:violet
+frei0r=colordistance:0x112233
+
+# apply the perspective effect, specify the top left and top right
+# image positions
+frei0r=perspective:0.2/0.2:0.8/0.2
+</pre></td></tr></table>
+
+<p>For more information see:
+<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>
+
+<p>Fix the banding artifacts that are sometimes introduced into nearly flat
+regions by truncation to 8bit colordepth.
+Interpolate the gradients that should go where the bands are, and
+dither them.
+</p>
+<p>This filter is designed for playback only.  Do not use it prior to
+lossy compression, because compression tends to lose the dither and
+bring back the bands.
+</p>
+<p>The filter takes two optional parameters, separated by &rsquo;:&rsquo;:
+<var>strength</var>:<var>radius</var>
+</p>
+<p><var>strength</var> is the maximum amount by which the filter will change
+any one pixel. Also the threshold for detecting nearly flat
+regions. Acceptable values range from .51 to 255, default value is
+1.2, out-of-range values will be clipped to the valid range.
+</p>
+<p><var>radius</var> is the neighborhood to fit the gradient to. A larger
+radius makes for smoother gradients, but also prevents the filter from
+modifying the pixels near detailed regions. Acceptable values are
+8-32, default value is 16, out-of-range values will be clipped to the
+valid range.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># default parameters
+gradfun=1.2:16
+
+# omitting radius
+gradfun=1.2
+</pre></td></tr></table>
+
+<a name="hflip"></a>
+<h2 class="section"><a href="ffplay.html#toc-hflip">16.14 hflip</a></h2>
+
+<p>Flip the input video horizontally.
+</p>
+<p>For example to horizontally flip the video in input with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="hqdn3d"></a>
+<h2 class="section"><a href="ffplay.html#toc-hqdn3d">16.15 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
+still. It should enhance compressibility.
+</p>
+<p>It accepts the following optional parameters:
+<var>luma_spatial</var>:<var>chroma_spatial</var>:<var>luma_tmp</var>:<var>chroma_tmp</var>
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial luma strength,
+defaults to 4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial chroma strength,
+defaults to 3.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies luma temporal strength, defaults to
+6.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies chroma temporal strength, defaults to
+<var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>
+</p></dd>
+</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>
+
+<p>Compute a look-up table for binding each pixel component input value
+to an output value, and apply it to input video.
+</p>
+<p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
+to an RGB input video.
+</p>
+<p>These filters accept in input a &quot;:&quot;-separated list of options, which
+specify the expressions used for computing the lookup table for the
+corresponding pixel component values.
+</p>
+<p>The <var>lut</var> filter requires either YUV or RGB pixel formats in
+input, and accepts the options:
+</p><dl compact="compact">
+<dd><p><var>c0</var> (first  pixel component)
+<var>c1</var> (second pixel component)
+<var>c2</var> (third  pixel component)
+<var>c3</var> (fourth pixel component, corresponds to the alpha component)
+</p></dd>
+</dl>
+
+<p>The exact component associated to each option depends on the format in
+input.
+</p>
+<p>The <var>lutrgb</var> filter requires RGB pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>r</var> (red component)
+<var>g</var> (green component)
+<var>b</var> (blue component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The <var>lutyuv</var> filter requires YUV pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>y</var> (Y/luminance component)
+<var>u</var> (U/Cb component)
+<var>v</var> (V/Cr component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The expressions can contain the following constants and functions:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>val</samp>&rsquo;</dt>
+<dd><p>input value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>clipval</samp>&rsquo;</dt>
+<dd><p>the input value clipped in the <var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>maxval</samp>&rsquo;</dt>
+<dd><p>maximum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>minval</samp>&rsquo;</dt>
+<dd><p>minimum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>negval</samp>&rsquo;</dt>
+<dd><p>the negated value for the pixel component value clipped in the
+<var>minval</var>-<var>maxval</var> range , it corresponds to the expression
+&quot;maxval-clipval+minval&quot;
+</p>
+</dd>
+<dt> &lsquo;<samp>clip(val)</samp>&rsquo;</dt>
+<dd><p>the computed value in <var>val</var> clipped in the
+<var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>gammaval(gamma)</samp>&rsquo;</dt>
+<dd><p>the computed gamma correction value of the pixel component value
+clipped in the <var>minval</var>-<var>maxval</var> range, corresponds to the
+expression
+&quot;pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval&quot;
+</p>
+</dd>
+</dl>
+
+<p>All expressions default to &quot;val&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># negate input video
+lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
+lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
+
+# the above is the same as
+lutrgb=&quot;r=negval:g=negval:b=negval&quot;
+lutyuv=&quot;y=negval:u=negval:v=negval&quot;
+
+# negate luminance
+lutyuv=negval
+
+# remove chroma components, turns the video into a graytone image
+lutyuv=&quot;u=128:v=128&quot;
+
+# apply a luma burning effect
+lutyuv=&quot;y=2*val&quot;
+
+# remove green and blue components
+lutrgb=&quot;g=0:b=0&quot;
+
+# set a constant alpha channel value on input
+format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
+
+# correct luminance gamma by a 0.5 factor
+lutyuv=y=gammaval(0.5)
+</pre></td></tr></table>
+
+<a name="mp"></a>
+<h2 class="section"><a href="ffplay.html#toc-mp">16.17 mp</a></h2>
+
+<p>Apply an MPlayer filter to the input video.
+</p>
+<p>This filter provides a wrapper around most of the filters of
+MPlayer/MEncoder.
+</p>
+<p>This wrapper is considered experimental. Some of the wrapped filters
+may not work properly and we may drop support for them, as they will
+be implemented natively into FFmpeg. Thus you should avoid
+depending on them when writing portable scripts.
+</p>
+<p>The filters accepts the parameters:
+<var>filter_name</var>[:=]<var>filter_params</var>
+</p>
+<p><var>filter_name</var> is the name of a supported MPlayer filter,
+<var>filter_params</var> is a string containing the parameters accepted by
+the named filter.
+</p>
+<p>The list of the currently supported filters follows:
+</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>divtc</var></dt>
+<dt> <var>down3dright</var></dt>
+<dt> <var>dsize</var></dt>
+<dt> <var>eq2</var></dt>
+<dt> <var>eq</var></dt>
+<dt> <var>field</var></dt>
+<dt> <var>fil</var></dt>
+<dt> <var>fixpts</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>il</var></dt>
+<dt> <var>ilpack</var></dt>
+<dt> <var>ivtc</var></dt>
+<dt> <var>kerndeint</var></dt>
+<dt> <var>mcdeint</var></dt>
+<dt> <var>mirror</var></dt>
+<dt> <var>noise</var></dt>
+<dt> <var>ow</var></dt>
+<dt> <var>palette</var></dt>
+<dt> <var>perspective</var></dt>
+<dt> <var>phase</var></dt>
+<dt> <var>pp7</var></dt>
+<dt> <var>pullup</var></dt>
+<dt> <var>qp</var></dt>
+<dt> <var>rectangle</var></dt>
+<dt> <var>remove-logo</var></dt>
+<dt> <var>rotate</var></dt>
+<dt> <var>sab</var></dt>
+<dt> <var>screenshot</var></dt>
+<dt> <var>smartblur</var></dt>
+<dt> <var>softpulldown</var></dt>
+<dt> <var>softskip</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>
+<dt> <var>uspp</var></dt>
+<dt> <var>yuvcsp</var></dt>
+<dt> <var>yvu9</var></dt>
+</dl>
+
+<p>The parameter syntax and behavior for the listed filters are the same
+of the corresponding MPlayer filters. For detailed instructions check
+the &quot;VIDEO FILTERS&quot; section in the MPlayer manual.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># remove a logo by interpolating the surrounding pixels
+mp=delogo=200:200:80:20:1
+
+# adjust gamma, brightness, contrast
+mp=eq2=1.0:2:0.5
+
+# tweak hue and saturation
+mp=hue=100:-10
+</pre></td></tr></table>
+
+<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>
+
+<p>Negate input video.
+</p>
+<p>This filter accepts an integer in input, if non-zero it negates the
+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>
+
+<p>Force libavfilter not to use any of the specified pixel formats for the
+input to the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># force libavfilter to use a format different from &quot;yuv420p&quot; for the
+# input to the vflip filter
+noformat=yuv420p,vflip
+
+# convert the input video to any of the formats not contained in the list
+noformat=yuv420p:yuv444p:yuv410p
+</pre></td></tr></table>
+
+<a name="null-1"></a>
+<h2 class="section"><a href="ffplay.html#toc-null-1">16.20 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>
+
+<p>Apply video transform using libopencv.
+</p>
+<p>To enable this filter install libopencv library and headers and
+configure FFmpeg with &ndash;enable-libopencv.
+</p>
+<p>The filter takes the parameters: <var>filter_name</var>{:=}<var>filter_params</var>.
+</p>
+<p><var>filter_name</var> is the name of the libopencv filter to apply.
+</p>
+<p><var>filter_params</var> specifies the parameters to pass to the libopencv
+filter. If not specified the default values are assumed.
+</p>
+<p>Refer to the official libopencv documentation for more precise
+informations:
+<a href="http://opencv.willowgarage.com/documentation/c/image_filtering.html">http://opencv.willowgarage.com/documentation/c/image_filtering.html</a>
+</p>
+<p>Follows the list of supported libopencv filters.
+</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>
+
+<p>Dilate an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvDilate</code>.
+</p>
+<p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>.
+</p>
+<p><var>struct_el</var> represents a structuring element, and has the syntax:
+<var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
+</p>
+<p><var>cols</var> and <var>rows</var> represent the number of colums and rows of
+the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
+point, and <var>shape</var> the shape for the structuring element, and
+can be one of the values &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, &quot;custom&quot;.
+</p>
+<p>If the value for <var>shape</var> is &quot;custom&quot;, it must be followed by a
+string of the form &quot;=<var>filename</var>&quot;. The file with name
+<var>filename</var> is assumed to represent a binary image, with each
+printable character corresponding to a bright pixel. When a custom
+<var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
+or columns and rows of the read file are assumed instead.
+</p>
+<p>The default value for <var>struct_el</var> is &quot;3x3+0x0/rect&quot;.
+</p>
+<p><var>nb_iterations</var> specifies the number of times the transform is
+applied to the image, and defaults to 1.
+</p>
+<p>Follow some example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># use the default values
+ocv=dilate
+
+# dilate using a structuring element with a 5x5 cross, iterate two times
+ocv=dilate=5x5+2x2/cross:2
+
+# read the shape from the file diamond.shape, iterate two times
+# the file diamond.shape may contain a pattern of characters like this:
+#   *
+#  ***
+# *****
+#  ***
+#   *
+# the specified cols and rows are ignored (but not the anchor point coordinates)
+ocv=0x0+2x2/custom=diamond.shape:2
+</pre></td></tr></table>
+
+<a name="erode"></a>
+<h3 class="subsection"><a href="ffplay.html#toc-erode">16.21.2 erode</a></h3>
+
+<p>Erode an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvErode</code>.
+</p>
+<p>The filter accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
+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>
+
+<p>Smooth the input video.
+</p>
+<p>The filter takes the following parameters:
+<var>type</var>:<var>param1</var>:<var>param2</var>:<var>param3</var>:<var>param4</var>.
+</p>
+<p><var>type</var> is the type of smooth filter to apply, and can be one of
+the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
+&quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
+</p>
+<p><var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var> are
+parameters whose meanings depend on smooth type. <var>param1</var> and
+<var>param2</var> accept integer positive values or 0, <var>param3</var> and
+<var>param4</var> accept float values.
+</p>
+<p>The default value for <var>param1</var> is 3, the default value for the
+other parameters is 0.
+</p>
+<p>These parameters correspond to the parameters assigned to the
+libopencv function <code>cvSmooth</code>.
+</p>
+<a name="overlay"></a>
+<h2 class="section"><a href="ffplay.html#toc-overlay">16.22 overlay</a></h2>
+
+<p>Overlay one video on top of another.
+</p>
+<p>It takes two inputs and one output, the first input is the &quot;main&quot;
+video on which the second input is overlayed.
+</p>
+<p>It accepts the parameters: <var>x</var>:<var>y</var>.
+</p>
+<p><var>x</var> is the x coordinate of the overlayed video on the main video,
+<var>y</var> is the y coordinate. The parameters are expressions containing
+the following parameters:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>main_w, main_h</samp>&rsquo;</dt>
+<dd><p>main input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>W, H</samp>&rsquo;</dt>
+<dd><p>same as <var>main_w</var> and <var>main_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>overlay_w, overlay_h</samp>&rsquo;</dt>
+<dd><p>overlay input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>same as <var>overlay_w</var> and <var>overlay_h</var>
+</p></dd>
+</dl>
+
+<p>Be aware that frames are taken from each input video in timestamp
+order, hence, if their initial timestamps differ, it is a a good idea
+to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
+have them begin in the same zero timestamp, as it does the example for
+the <var>movie</var> filter.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw the overlay at 10 pixels from the bottom right
+# corner of the main video.
+overlay=main_w-overlay_w-10:main_h-overlay_h-10
+
+# insert a transparent PNG logo in the bottom left corner of the input
+movie=logo.png [logo];
+[in][logo] overlay=10:main_h-overlay_h-10 [out]
+
+# insert 2 different transparent PNG logos (second logo on bottom
+# right corner):
+movie=logo1.png [logo1];
+movie=logo2.png [logo2];
+[in][logo1]       overlay=10:H-h-10 [in+logo1];
+[in+logo1][logo2] overlay=W-w-10:H-h-10 [out]
+
+# add a transparent color layer on top of the main video,
+# WxH specifies the size of the main input to the overlay filter
+color=red.3:WxH [over]; [in][over] overlay [out]
+</pre></td></tr></table>
+
+<p>You can chain togheter more overlays but the efficiency of such
+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>
+
+<p>Add paddings to the input image, and places the original input at the
+given coordinates <var>x</var>, <var>y</var>.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>x</var>:<var>y</var>:<var>color</var>.
+</p>
+<p>The parameters <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var> are
+expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input video width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output width and heigth, that is the size of the padded area as
+specified by the <var>width</var> and <var>height</var> expressions
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>x and y offsets as specified by the <var>x</var> and <var>y</var>
+expressions, or NAN if not yet specified
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd>
+<p>Specify the size of the output image with the paddings added. If the
+value for <var>width</var> or <var>height</var> is 0, the corresponding input size
+is used for the output.
+</p>
+<p>The <var>width</var> expression can reference the value set by the
+<var>height</var> expression, and viceversa.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd>
+<p>Specify the offsets where to place the input image in the padded area
+with respect to the top/left border of the output image.
+</p>
+<p>The <var>x</var> expression can reference the value set by the <var>y</var>
+expression, and viceversa.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd>
+<p>Specify the color of the padded area, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p>
+<p>The default value of <var>color</var> is &quot;black&quot;.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># Add paddings with color &quot;violet&quot; to the input video. Output video
+# size is 640x480, the top-left corner of the input video is placed at
+# column 0, row 40.
+pad=640:480:0:40:violet
+
+# pad the input to get an output with dimensions increased bt 3/2,
+# and put the input video at the center of the padded area
+pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a squared output with size equal to the maximum
+# value between the input width and height, and put the input video at
+# the center of the padded area
+pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a final w/h ratio of 16:9
+pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# double output size and put the input video in the bottom-right
+# corner of the output padded area
+pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
+</pre></td></tr></table>
+
+<a name="pixdesctest"></a>
+<h2 class="section"><a href="ffplay.html#toc-pixdesctest">16.24 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>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">format=monow, pixdesctest
+</pre></td></tr></table>
+
+<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>
+
+<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
+</p>
+<p>The parameters <var>width</var> and <var>height</var> are expressions containing
+the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>If the input image format is different from the format requested by
+the next filter, the scale filter will convert the input to the
+requested format.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is 0, the respective input
+size is used for the output.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is -1, the scale filter will
+use, for the respective output size, a value that maintains the aspect
+ratio of the input image.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># scale the input video to a size of 200x100.
+scale=200:100
+
+# scale the input to 2x
+scale=2*iw:2*ih
+# the above is the same as
+scale=2*in_w:2*in_h
+
+# scale the input to half size
+scale=iw/2:ih/2
+
+# increase the width, and set the height to the same size
+scale=3/2*iw:ow
+
+# seek for Greek harmony
+scale=iw:1/PHI*iw
+scale=ih*PHI:ih
+
+# increase the height, and set the width to 3/2 of the height
+scale=3/2*oh:3/5*ih
+
+# increase the size, but make the size a multiple of the chroma
+scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
+
+# increase the width to a maximum of 500 pixels, keep the same input aspect ratio
+scale='min(500\, iw*3/2):-1'
+</pre></td></tr></table>
+
+<a name="select"></a>
+<h2 class="section"><a href="ffplay.html#toc-select">16.26 select</a></h2>
+<p>Select frames to pass in output.
+</p>
+<p>It accepts in input an expression, which is evaluated for each input
+frame. If the expression is evaluated to a non-zero value, the frame
+is selected and passed to the output, otherwise it is discarded.
+</p>
+<p>The expression can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the filtered frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the selected frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the last selected frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>TB</samp>&rsquo;</dt>
+<dd><p>timebase of the input timestamps
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in <var>TB</var> units, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in seconds, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_t</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously selected video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_t</samp>&rsquo;</dt>
+<dd><p>the time of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>pict_type</samp>&rsquo;</dt>
+<dd><p>the picture type of the filtered frame, can assume one of the following
+values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>PICT_TYPE_I</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_P</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_B</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_S</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SI</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SP</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_BI</samp>&rsquo;</dt>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>interlace_type</samp>&rsquo;</dt>
+<dd><p>the frame interlace type, can assume one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>INTERLACE_TYPE_P</samp>&rsquo;</dt>
+<dd><p>the frame is progressive (not interlaced)
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_T</samp>&rsquo;</dt>
+<dd><p>the frame is top-field-first
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_B</samp>&rsquo;</dt>
+<dd><p>the frame is bottom-field-first
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>key</samp>&rsquo;</dt>
+<dd><p>1 if the filtered frame is a key-frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the filtered frame, -1 if the information
+is not available (e.g. for synthetic video)
+</p></dd>
+</dl>
+
+<p>The default value of the select expression is &quot;1&quot;.
+</p>
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># select all frames in input
+select
+
+# the above is the same as:
+select=1
+
+# skip all frames:
+select=0
+
+# select only I-frames
+select='eq(pict_type\,PICT_TYPE_I)'
+
+# select one frame every 100
+select='not(mod(n\,100))'
+
+# select only frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)'
+
+# select only I frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)*eq(pict_type\,PICT_TYPE_I)'
+
+# select frames with a minimum distance of 10 seconds
+select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Display Aspect Ratio for the filter output video.
+</p>
+<p>This is done by changing the specified Sample (aka Pixel) Aspect
+Ratio, according to the following equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that this filter does not modify the pixel dimensions of
+the video frame. Also the display aspect ratio set by this filter may
+be changed by later filters in the filterchain, e.g. in case of
+scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+display aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the display aspect ratio to 16:9, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setdar=16:9
+# the above is equivalent to
+setdar=1.77777
+</pre></td></tr></table>
+
+<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>
+
+<p>Change the PTS (presentation timestamp) of the input video frames.
+</p>
+<p>Accept in input an expression evaluated through the eval API, which
+can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PTS</samp>&rsquo;</dt>
+<dd><p>the presentation timestamp in input
+</p>
+</dd>
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>N</samp>&rsquo;</dt>
+<dd><p>the count of the input frame, starting from 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>STARTPTS</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame
+</p>
+</dd>
+<dt> &lsquo;<samp>INTERLACED</samp>&rsquo;</dt>
+<dd><p>tell if the current frame is interlaced
+</p>
+</dd>
+<dt> &lsquo;<samp>POS</samp>&rsquo;</dt>
+<dd><p>original position in the file of the frame, or undefined if undefined
+for the current frame
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_INPTS</samp>&rsquo;</dt>
+<dd><p>previous input PTS
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_OUTPTS</samp>&rsquo;</dt>
+<dd><p>previous output PTS
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># start counting PTS from zero
+setpts=PTS-STARTPTS
+
+# fast motion
+setpts=0.5*PTS
+
+# slow motion
+setpts=2.0*PTS
+
+# fixed rate 25 fps
+setpts=N/(25*TB)
+
+# fixed rate 25 fps with some jitter
+setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
+</p>
+<p>Note that as a consequence of the application of this filter, the
+output display aspect ratio will change according to the following
+equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that the sample aspect ratio set by this filter may be
+changed by later filters in the filterchain, e.g. if another &quot;setsar&quot;
+or a &quot;setdar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+sample aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the sample aspect ratio to 10:11, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setsar=10:11
+</pre></td></tr></table>
+
+<a name="settb"></a>
+<h2 class="section"><a href="ffplay.html#toc-settb">16.30 settb</a></h2>
+
+<p>Set the timebase to use for the output frames timestamps.
+It is mainly useful for testing timebase configuration.
+</p>
+<p>It accepts in input an arithmetic expression representing a rational.
+The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;, &quot;AVTB&quot; (the
+default timebase), and &quot;intb&quot; (the input timebase).
+</p>
+<p>The default value for the input is &quot;intb&quot;.
+</p>
+<p>Follow some examples.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># set the timebase to 1/25
+settb=1/25
+
+# set the timebase to 1/10
+settb=0.1
+
+#set the timebase to 1001/1000
+settb=1+0.001
+
+#set the timebase to 2*intb
+settb=2*intb
+
+#set the default timebase value
+settb=AVTB
+</pre></td></tr></table>
+
+<a name="showinfo"></a>
+<h2 class="section"><a href="ffplay.html#toc-showinfo">16.31 showinfo</a></h2>
+
+<p>Show a line containing various information for each input video frame.
+The input video 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> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</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.
+</p>
+</dd>
+<dt> &lsquo;<samp>pts_time</samp>&rsquo;</dt>
+<dd><p>Presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</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 video)
+</p>
+</dd>
+<dt> &lsquo;<samp>fmt</samp>&rsquo;</dt>
+<dd><p>pixel format name
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>sample aspect ratio of the input frame, expressed in the form
+<var>num</var>/<var>den</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>s</samp>&rsquo;</dt>
+<dd><p>size of the input frame, expressed in the form
+<var>width</var>x<var>height</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>i</samp>&rsquo;</dt>
+<dd><p>interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
+for bottom field first)
+</p>
+</dd>
+<dt> &lsquo;<samp>iskey</samp>&rsquo;</dt>
+<dd><p>1 if the frame is a key frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>type</samp>&rsquo;</dt>
+<dd><p>picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
+P-frame, &quot;B&quot; for a B-frame, &quot;?&quot; for unknown type).
+Check also the documentation of the <code>AVPictureType</code> enum and of
+the <code>av_get_picture_type_char</code> function defined in
+&lsquo;<tt>libavutil/avutil.h</tt>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> &lsquo;<samp>plane_checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of each plane of the input frame, expressed in the form
+&quot;[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]&quot;
+</p></dd>
+</dl>
+
+<a name="slicify"></a>
+<h2 class="section"><a href="ffplay.html#toc-slicify">16.32 slicify</a></h2>
+
+<p>Pass the images of input video on to next video filter as multiple
+slices.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;slicify=32&quot; out.avi
+</pre></td></tr></table>
+
+<p>The filter accepts the slice height as parameter. If the parameter is
+not specified it will use the default value of 16.
+</p>
+<p>Adding this in the beginning of filter chains should make filtering
+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>
+
+<p>Pass on the input video to two outputs. Both outputs are identical to
+the input video.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[in] split [splitout1][splitout2];
+[splitout1] crop=100:100:0:0    [cropout];
+[splitout2] pad=200:200:100:100 [padout];
+</pre></td></tr></table>
+
+<p>will create two separate outputs from the same input, one cropped and
+one padded.
+</p>
+<a name="transpose"></a>
+<h2 class="section"><a href="ffplay.html#toc-transpose">16.34 transpose</a></h2>
+
+<p>Transpose rows with columns in the input video and optionally flip it.
+</p>
+<p>It accepts a parameter representing an integer, which can assume the
+values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     L.l
+. . -&gt;  . .
+l.r     R.r
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     l.L
+. . -&gt;  . .
+l.r     r.R
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     R.r
+. . -&gt;  . .
+l.r     L.l
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     r.R
+. . -&gt;  . .
+l.r     l.L
+</pre></td></tr></table>
+</dd>
+</dl>
+
+<a name="unsharp"></a>
+<h2 class="section"><a href="ffplay.html#toc-unsharp">16.35 unsharp</a></h2>
+
+<p>Sharpen or blur the input video.
+</p>
+<p>It accepts the following parameters:
+<var>luma_msize_x</var>:<var>luma_msize_y</var>:<var>luma_amount</var>:<var>chroma_msize_x</var>:<var>chroma_msize_y</var>:<var>chroma_amount</var>
+</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 &rsquo;5:5:1.0:0:0:0.0&rsquo;.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix horizontal size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix vertical size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</dt>
+<dd><p>Set the luma effect strength. It can be a float number between -2.0
+and 5.0, default value is 1.0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</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>
+</dd>
+</dl>
+
+<table><tr><td>&nbsp;</td><td><pre class="example"># Strong luma sharpen effect parameters
+unsharp=7:7:2.5
+
+# Strong blur of both luma and chroma parameters
+unsharp=7:7:-2:7:7:-2
+
+# Use the default values with <code>ffmpeg</code>
+./ffmpeg -i in.avi -vf &quot;unsharp&quot; out.mp4
+</pre></td></tr></table>
+
+<a name="vflip"></a>
+<h2 class="section"><a href="ffplay.html#toc-vflip">16.36 vflip</a></h2>
+
+<p>Flip the input video vertically.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="yadif"></a>
+<h2 class="section"><a href="ffplay.html#toc-yadif">16.37 yadif</a></h2>
+
+<p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
+filter&quot;).
+</p>
+<p>It accepts the optional parameters: <var>mode</var>:<var>parity</var>:<var>auto</var>.
+</p>
+<p><var>mode</var> specifies the interlacing mode to adopt, accepts one of the
+following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each frame
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each field
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>like 0 but skips spatial interlacing check
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>like 1 but skips spatial interlacing check
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+<p><var>parity</var> specifies the picture field parity assumed for the input
+interlaced video, accepts one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>assume bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>assume top field first
+</p></dd>
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>enable automatic detection
+</p></dd>
+</dl>
+
+<p>Default value is -1.
+If interlacing is unknown or decoder does not export this information,
+top field first will be assumed.
+</p>
+<p><var>auto</var> specifies if deinterlacer should trust the interlaced flag
+and only deinterlace frames marked as interlaced
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>deinterlace all frames
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>only deinterlace frames marked as interlaced
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+
+<a name="Video-Sources"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Video-Sources">17. Video Sources</a></h1>
+
+<p>Below is a description of the currently available video sources.
+</p>
+<a name="buffer"></a>
+<h2 class="section"><a href="ffplay.html#toc-buffer">17.1 buffer</a></h2>
+
+<p>Buffer video 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 &lsquo;<tt>libavfilter/vsrc_buffer.h</tt>&rsquo;.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>pix_fmt_string</var>:<var>timebase_num</var>:<var>timebase_den</var>:<var>sample_aspect_ratio_num</var>:<var>sample_aspect_ratio.den</var>:<var>scale_params</var>
+</p>
+<p>All the parameters but <var>scale_params</var> need to be explicitely
+defined.
+</p>
+<p>Follows the list of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the buffered video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>pix_fmt_string</samp>&rsquo;</dt>
+<dd><p>A string representing the pixel format of the buffered video frames.
+It may be a number corresponding to a pixel format, or a pixel format
+name.
+</p>
+</dd>
+<dt> &lsquo;<samp>timebase_num, timebase_den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denomitor of the timebase assumed by the
+timestamps of the buffered frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_aspect_ratio.num, sample_aspect_ratio.den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denominator of the sample aspect ratio assumed
+by the video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>scale_params</samp>&rsquo;</dt>
+<dd><p>Specify the optional parameters to be used for the scale filter which
+is automatically inserted when an input change is detected in the
+input size or format.
+</p></dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:yuv410p:1:24:1:1
+</pre></td></tr></table>
+
+<p>will instruct the source to accept video frames with size 320x240 and
+with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
+square pixels (1:1 sample aspect ratio).
+Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
+(check the enum PixelFormat definition in &lsquo;<tt>libavutil/pixfmt.h</tt>&rsquo;),
+this example corresponds to:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:6:1:24:1:1
+</pre></td></tr></table>
+
+<a name="color"></a>
+<h2 class="section"><a href="ffplay.html#toc-color">17.2 color</a></h2>
+
+<p>Provide an uniformly colored input.
+</p>
+<p>It accepts the following parameters:
+<var>color</var>:<var>frame_size</var>:<var>frame_rate</var>
+</p>
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the source. It can be the name of a color (case
+insensitive match) or a 0xRRGGBB[AA] sequence, possibly followed by an
+alpha specifier. The default value is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_size</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_rate</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example the following graph description will generate a red source
+with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
+frames per second, which will be overlayed over the source connected
+to the pad with identifier &quot;in&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">&quot;color=red@0.2:qcif:10 [color]; [in][color] overlay [out]&quot;
+</pre></td></tr></table>
+
+<a name="movie"></a>
+<h2 class="section"><a href="ffplay.html#toc-movie">17.3 movie</a></h2>
+
+<p>Read a video 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 &quot;:&quot;.
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>format_name, f</samp>&rsquo;</dt>
+<dd><p>Specifies 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> &lsquo;<samp>seek_point, sp</samp>&rsquo;</dt>
+<dd><p>Specifies 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 &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>stream_index, si</samp>&rsquo;</dt>
+<dd><p>Specifies the index of the video stream to read. If the value is -1,
+the best suited video stream will be automatically selected. Default
+value is &quot;-1&quot;.
+</p>
+</dd>
+</dl>
+
+<p>This filter allows to overlay a second video on top of main input of
+a filtergraph as shown in this graph:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
+                                    ^
+                                    |
+movie --&gt; scale--&gt; deltapts1 -------+
+</pre></td></tr></table>
+
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># skip 3.2 seconds from the start of the avi file in.avi, and overlay it
+# on top of the input labelled as &quot;in&quot;.
+movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+# read from a video4linux2 device, and overlay it on top of the input
+# labelled as &quot;in&quot;
+movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+</pre></td></tr></table>
+
+<a name="nullsrc"></a>
+<h2 class="section"><a href="ffplay.html#toc-nullsrc">17.4 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.
+</p>
+<p>It accepts as optional parameter a string of the form
+<var>width</var>:<var>height</var>:<var>timebase</var>.
+</p>
+<p><var>width</var> and <var>height</var> specify the size of the configured
+source. The default values of <var>width</var> and <var>height</var> are
+respectively 352 and 288 (corresponding to the CIF size format).
+</p>
+<p><var>timebase</var> specifies an arithmetic expression representing a
+timebase. The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;,
+&quot;AVTB&quot; (the default timebase), and defaults to the value &quot;AVTB&quot;.
+</p>
+<a name="frei0r_005fsrc"></a>
+<h2 class="section"><a href="ffplay.html#toc-frei0r_005fsrc">17.5 frei0r_src</a></h2>
+
+<p>Provide a frei0r source.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The source supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>size</var>:<var>rate</var>:<var>src_name</var>[{=|:}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>size</var> is the size of the video to generate, may be a string of the
+form <var>width</var>x<var>height</var> or a frame size abbreviation.
+<var>rate</var> is the rate of the video to generate, may be a string of
+the form <var>num</var>/<var>den</var> or a frame rate abbreviation.
+<var>src_name</var> is the name to the frei0r source to load. For more
+information regarding frei0r and how to set the parameters read the
+section <a href="#frei0r">frei0r</a> in the description of the video filters.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># generate a frei0r partik0l source with size 200x200 and framerate 10
+# which is overlayed on the overlay filter main input
+frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
+</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>
+
+<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
+stripe from top to bottom.
+</p>
+<p>The <code>testsrc</code> source generates a test video pattern, showing a
+color pattern, a scrolling gradient and a timestamp. This is mainly
+intended for testing purposes.
+</p>
+<p>Both sources accept an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;. The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>size, s</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>rate, r</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>duration</samp>&rsquo;</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td>&nbsp;</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>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">testsrc=duration=5.3:size=qcif:rate=10
+</pre></td></tr></table>
+
+<p>will generate a video with a duration of 5.3 seconds, with size
+176x144 and a framerate of 10 frames per second.
+</p>
+
+<a name="Video-Sinks"></a>
+<h1 class="chapter"><a href="ffplay.html#toc-Video-Sinks">18. Video Sinks</a></h1>
+
+<p>Below is a description of the currently available video sinks.
+</p>
+<a name="buffersink"></a>
+<h2 class="section"><a href="ffplay.html#toc-buffersink">18.1 buffersink</a></h2>
+
+<p>Buffer video frames, and make them available to the end of the filter
+graph.
+</p>
+<p>This sink is mainly intended for a programmatic use, in particular
+through the interface defined in &lsquo;<tt>libavfilter/vsink_buffer.h</tt>&rsquo;.
+</p>
+<p>It does not require a string parameter in input, but you need to
+specify a pointer to a list of supported pixel formats terminated by
+-1 in the opaque parameter provided to <code>avfilter_init_filter</code>
+when initializing this sink.
+</p>
+<a name="nullsink"></a>
+<h2 class="section"><a href="ffplay.html#toc-nullsink">18.2 nullsink</a></h2>
+
+<p>Null video sink, do absolutely nothing with the input video. It is
+mainly useful as a template and to be employed in analysis / debugging
+tools.
+</p>
+
+
+
+<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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/ffprobe.html b/ffmpeg 0.8/doc/ffprobe.html
new file mode 100644 (file)
index 0000000..2e17a65
--- /dev/null
@@ -0,0 +1,1311 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>ffprobe Documentation</title>
+
+<meta name="description" content="ffprobe Documentation">
+<meta name="keywords" content="ffprobe Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">ffprobe Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<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>
+  <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>
+  </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>
+  <ul class="toc">
+    <li><a name="toc-rawvideo" href="#rawvideo">5.1 rawvideo</a>
+    <ul class="toc">
+      <li><a name="toc-Options-2" href="#Options-2">5.1.1 Options</a></li>
+    </ul>
+</li>
+  </ul></li>
+  <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>
+  </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-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-http" href="#http">7.5 http</a></li>
+    <li><a name="toc-mmst" href="#mmst">7.6 mmst</a></li>
+    <li><a name="toc-mmsh" href="#mmsh">7.7 mmsh</a></li>
+    <li><a name="toc-md5" href="#md5">7.8 md5</a></li>
+    <li><a name="toc-pipe" href="#pipe">7.9 pipe</a></li>
+    <li><a name="toc-rtmp" href="#rtmp">7.10 rtmp</a></li>
+    <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">7.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
+    <li><a name="toc-rtp" href="#rtp">7.12 rtp</a></li>
+    <li><a name="toc-rtsp" href="#rtsp">7.13 rtsp</a></li>
+    <li><a name="toc-sap" href="#sap">7.14 sap</a>
+    <ul class="toc">
+      <li><a name="toc-Muxer" href="#Muxer">7.14.1 Muxer</a></li>
+      <li><a name="toc-Demuxer" href="#Demuxer">7.14.2 Demuxer</a></li>
+    </ul></li>
+    <li><a name="toc-tcp" href="#tcp">7.15 tcp</a></li>
+    <li><a name="toc-udp" href="#udp">7.16 udp</a></li>
+  </ul></li>
+  <li><a name="toc-Input-Devices" href="#Input-Devices">8. Input Devices</a>
+  <ul class="toc">
+    <li><a name="toc-alsa" href="#alsa">8.1 alsa</a></li>
+    <li><a name="toc-bktr" href="#bktr">8.2 bktr</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>
+    <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>
+    </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>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="Synopsis"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Synopsis">1. Synopsis</a></h1>
+
+<p>The generic syntax is:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffprobe [options] [&lsquo;<tt>input_file</tt>&rsquo;]
+</pre></td></tr></table>
+
+<a name="Description"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Description">2. Description</a></h1>
+
+<p>ffprobe gathers information from multimedia streams and prints it in
+human- and machine-readable fashion.
+</p>
+<p>For example it can be used to check the format of the container used
+by a multimedia stream and the format and type of each media stream
+contained in it.
+</p>
+<p>If a filename is specified in input, ffprobe will try to open and
+probe the file content. If the file cannot be opened or recognized as
+a multimedia file, a positive exit code is returned.
+</p>
+<p>ffprobe may be employed both as a standalone application or in
+combination with a textual filter, which may perform more
+sophisticated processing, e.g. statistical processing or plotting.
+</p>
+<p>Options are used to list some of the formats supported by ffprobe or
+for specifying which information to display, and for setting how
+ffprobe will show it.
+</p>
+<p>ffprobe output is designed to be easily parsable by a textual filter,
+and consists of one or more sections of the form:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[SECTION]
+key1=val1
+...
+keyN=valN
+[/SECTION]
+</pre></td></tr></table>
+
+<p>Metadata tags stored in the container or in the streams are recognized
+and printed in the corresponding &quot;FORMAT&quot; or &quot;STREAM&quot; section, and
+are prefixed by the string &quot;TAG:&quot;.
+</p>
+
+<a name="Options-1"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Options-1">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
+International System number postfixes, for example &rsquo;K&rsquo;, &rsquo;M&rsquo;, &rsquo;G&rsquo;.
+If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used instead of
+powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8, and can be
+appended after another postfix or used alone. This allows using for
+example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
+</p>
+<p>Options which do not take arguments are boolean options, and set the
+corresponding value to true. They can be set to false by prefixing
+with &quot;no&quot; the option name, for example using &quot;-nofoo&quot; in the
+commandline will set to false the boolean option with name &quot;foo&quot;.
+</p>
+<a name="Generic-options"></a>
+<h2 class="section"><a href="ffprobe.html#toc-Generic-options">3.1 Generic options</a></h2>
+
+<p>These options are shared amongst the ff* tools.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>-L</samp>&rsquo;</dt>
+<dd><p>Show license.
+</p>
+</dd>
+<dt> &lsquo;<samp>-h, -?, -help, --help</samp>&rsquo;</dt>
+<dd><p>Show help.
+</p>
+</dd>
+<dt> &lsquo;<samp>-version</samp>&rsquo;</dt>
+<dd><p>Show version.
+</p>
+</dd>
+<dt> &lsquo;<samp>-formats</samp>&rsquo;</dt>
+<dd><p>Show available formats.
+</p>
+<p>The fields preceding the format names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-codecs</samp>&rsquo;</dt>
+<dd><p>Show available codecs.
+</p>
+<p>The fields preceding the codec names have the following meanings:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Decoding available
+</p></dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Encoding available
+</p></dd>
+<dt> &lsquo;<samp>V/A/S</samp>&rsquo;</dt>
+<dd><p>Video/audio/subtitle codec
+</p></dd>
+<dt> &lsquo;<samp>S</samp>&rsquo;</dt>
+<dd><p>Codec supports slices
+</p></dd>
+<dt> &lsquo;<samp>D</samp>&rsquo;</dt>
+<dd><p>Codec supports direct rendering
+</p></dd>
+<dt> &lsquo;<samp>T</samp>&rsquo;</dt>
+<dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>-bsfs</samp>&rsquo;</dt>
+<dd><p>Show available bitstream filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-protocols</samp>&rsquo;</dt>
+<dd><p>Show available protocols.
+</p>
+</dd>
+<dt> &lsquo;<samp>-filters</samp>&rsquo;</dt>
+<dd><p>Show available libavfilter filters.
+</p>
+</dd>
+<dt> &lsquo;<samp>-pix_fmts</samp>&rsquo;</dt>
+<dd><p>Show available pixel formats.
+</p>
+</dd>
+<dt> &lsquo;<samp>-loglevel <var>loglevel</var></samp>&rsquo;</dt>
+<dd><p>Set the logging level used by the library.
+<var>loglevel</var> is a number or a string containing one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>quiet</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>panic</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>fatal</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>error</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>warning</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>info</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>verbose</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>debug</samp>&rsquo;</dt>
+</dl>
+
+<p>By default the program logs to stderr, if coloring is supported by the
+terminal, colors are used to mark errors and warnings. Log coloring
+can be disabled setting the environment variable
+<code>FFMPEG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
+the environment variable <code>FFMPEG_FORCE_COLOR</code>.
+The use of the environment variable <code>NO_COLOR</code> is deprecated and
+will be dropped in a following FFmpeg version.
+</p>
+</dd>
+</dl>
+
+<a name="Main-options"></a>
+<h2 class="section"><a href="ffprobe.html#toc-Main-options">3.2 Main options</a></h2>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>-f <var>format</var></samp>&rsquo;</dt>
+<dd><p>Force format to use.
+</p>
+</dd>
+<dt> &lsquo;<samp>-unit</samp>&rsquo;</dt>
+<dd><p>Show the unit of the displayed values.
+</p>
+</dd>
+<dt> &lsquo;<samp>-prefix</samp>&rsquo;</dt>
+<dd><p>Use SI prefixes for the displayed values.
+Unless the &quot;-byte_binary_prefix&quot; option is used all the prefixes
+are decimal.
+</p>
+</dd>
+<dt> &lsquo;<samp>-byte_binary_prefix</samp>&rsquo;</dt>
+<dd><p>Force the use of binary prefixes for byte values.
+</p>
+</dd>
+<dt> &lsquo;<samp>-sexagesimal</samp>&rsquo;</dt>
+<dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
+</p>
+</dd>
+<dt> &lsquo;<samp>-pretty</samp>&rsquo;</dt>
+<dd><p>Prettify the format of the displayed values, it corresponds to the
+options &quot;-unit -prefix -byte_binary_prefix -sexagesimal&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>-show_format</samp>&rsquo;</dt>
+<dd><p>Show information about the container format of the input multimedia
+stream.
+</p>
+<p>All the container format information is printed within a section with
+name &quot;FORMAT&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>-show_packets</samp>&rsquo;</dt>
+<dd><p>Show information about each packet contained in the input multimedia
+stream.
+</p>
+<p>The information for each single packet is printed within a dedicated
+section with name &quot;PACKET&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>-show_streams</samp>&rsquo;</dt>
+<dd><p>Show information about each media stream contained in the input
+multimedia stream.
+</p>
+<p>Each media stream information is printed within a dedicated section
+with name &quot;STREAM&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>-i <var>input_file</var></samp>&rsquo;</dt>
+<dd><p>Read <var>input_file</var>.
+</p>
+</dd>
+</dl>
+
+<a name="Decoders"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Decoders">4. Decoders</a></h1>
+
+<p>Decoders are configured elements in FFmpeg which allow the decoding of
+multimedia streams.
+</p>
+<p>When you configure your FFmpeg build, all the supported native decoders
+are enabled by default. Decoders requiring an external library must be enabled
+manually via the corresponding <code>--enable-lib</code> option. You can list all
+available decoders using the configure option <code>--list-decoders</code>.
+</p>
+<p>You can disable all the decoders with the configure option
+<code>--disable-decoders</code> and selectively enable / disable single decoders
+with the options <code>--enable-decoder=<var>DECODER</var></code> /
+<code>--disable-decoder=<var>DECODER</var></code>.
+</p>
+<p>The option <code>-codecs</code> of the ff* tools will display the list of
+enabled decoders.
+</p>
+
+<a name="Video-Decoders"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Video-Decoders">5. Video Decoders</a></h1>
+
+<p>A description of some of the currently available video decoders
+follows.
+</p>
+<a name="rawvideo"></a>
+<h2 class="section"><a href="ffprobe.html#toc-rawvideo">5.1 rawvideo</a></h2>
+
+<p>Rawvideo decoder.
+</p>
+<p>This decoder decodes rawvideo streams.
+</p>
+<a name="Options-2"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Options-2">5.1.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
+<dd><p>Specify the assumed field type of the input video.
+</p><dl compact="compact">
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>the video is assumed to be progressive (default)
+</p></dd>
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>bottom-field-first is assumed
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>top-field-first is assumed
+</p></dd>
+</dl>
+
+</dd>
+</dl>
+
+<a name="Demuxers"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Demuxers">6. Demuxers</a></h1>
+
+<p>Demuxers are configured elements in FFmpeg which allow to read the
+multimedia streams from a particular type of file.
+</p>
+<p>When you configure your FFmpeg build, all the supported demuxers
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-demuxers&quot;.
+</p>
+<p>You can disable all the demuxers using the configure option
+&quot;&ndash;disable-demuxers&quot;, and selectively enable a single demuxer with
+the option &quot;&ndash;enable-demuxer=<var>DEMUXER</var>&quot;, or disable it
+with the option &quot;&ndash;disable-demuxer=<var>DEMUXER</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+enabled demuxers.
+</p>
+<p>The description of some of the currently available demuxers follows.
+</p>
+<a name="image2"></a>
+<h2 class="section"><a href="ffprobe.html#toc-image2">6.1 image2</a></h2>
+
+<p>Image file demuxer.
+</p>
+<p>This demuxer reads from a list of image files specified by a pattern.
+</p>
+<p>The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
+specifies the position of the characters representing a sequential
+number in each filename matched by the pattern. If the form
+&quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
+filename is 0-padded and <var>N</var> is the total number of 0-padded
+digits representing the number. The literal character &rsquo;%&rsquo; can be
+specified in the pattern with the string &quot;%%&quot;.
+</p>
+<p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
+the file list specified by the pattern must contain a number
+inclusively contained between 0 and 4, all the following numbers must
+be sequential. This limitation may be hopefully fixed.
+</p>
+<p>The pattern may contain a suffix which is used to automatically
+determine the format of the images contained in the files.
+</p>
+<p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
+filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
+&lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
+sequence of filenames of the form &lsquo;<tt>i%m%g-1.jpg</tt>&rsquo;,
+&lsquo;<tt>i%m%g-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>i%m%g-10.jpg</tt>&rsquo;, etc.
+</p>
+<p>The size, the pixel format, and the format of each image must be the
+same for all the files in the sequence.
+</p>
+<p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
+video from the images in the file sequence &lsquo;<tt>img-001.jpeg</tt>&rsquo;,
+&lsquo;<tt>img-002.jpeg</tt>&rsquo;, ..., assuming an input framerate of 10 frames per
+second:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
+</pre></td></tr></table>
+
+<p>Note that the pattern must not necessarily contain &quot;%d&quot; or
+&quot;%0<var>N</var>d&quot;, for example to convert a single image file
+&lsquo;<tt>img.jpeg</tt>&rsquo; you can employ the command:
+</p><table><tr><td>&nbsp;</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>
+
+<p>Apple HTTP Live Streaming demuxer.
+</p>
+<p>This demuxer presents all AVStreams from all variant streams.
+The id field is set to the bitrate variant index number. By setting
+the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
+the caller can decide which variant streams to actually receive.
+The total bitrate of the variant that the stream belongs to is
+available in a metadata key named &quot;variant_bitrate&quot;.
+</p>
+<a name="Protocols"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Protocols">7. Protocols</a></h1>
+
+<p>Protocols are configured elements in FFmpeg which allow to access
+resources which require the use of a particular protocol.
+</p>
+<p>When you configure your FFmpeg build, all the supported protocols are
+enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-protocols&quot;.
+</p>
+<p>You can disable all the protocols using the configure option
+&quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
+option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
+particular protocol using the option
+&quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
+</p>
+<p>The option &quot;-protocols&quot; of the ff* tools will display the list of
+supported protocols.
+</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>
+
+<p>Read Apple HTTP Live Streaming compliant segmented stream as
+a uniform one. The M3U8 playlists describing the segments can be
+remote HTTP resources or local files, accessed using the standard
+file protocol.
+HTTP is default, specific protocol can be declared by specifying
+&quot;+<var>proto</var>&quot; after the applehttp URI scheme name, where <var>proto</var>
+is either &quot;file&quot; or &quot;http&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
+applehttp+http://host/path/to/remote/resource.m3u8
+applehttp+file://path/to/local/resource.m3u8
+</pre></td></tr></table>
+
+<a name="concat"></a>
+<h2 class="section"><a href="ffprobe.html#toc-concat">7.2 concat</a></h2>
+
+<p>Physical concatenation protocol.
+</p>
+<p>Allow to read and seek from many resource in sequence as if they were
+a unique resource.
+</p>
+<p>A URL accepted by this protocol has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
+</pre></td></tr></table>
+
+<p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
+resource to be concatenated, each one possibly specifying a distinct
+protocol.
+</p>
+<p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
+&lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with &lsquo;<tt>ffplay</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
+</pre></td></tr></table>
+
+<p>Note that you may need to escape the character &quot;|&quot; which is special for
+many shells.
+</p>
+<a name="file"></a>
+<h2 class="section"><a href="ffprobe.html#toc-file">7.3 file</a></h2>
+
+<p>File access protocol.
+</p>
+<p>Allow to read from or read to a file.
+</p>
+<p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with &lsquo;<tt>ffmpeg</tt>&rsquo;
+use the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
+</pre></td></tr></table>
+
+<p>The ff* tools default to the file protocol, that is a resource
+specified with the name &quot;FILE.mpeg&quot; is interpreted as the URL
+&quot;file:FILE.mpeg&quot;.
+</p>
+<a name="gopher"></a>
+<h2 class="section"><a href="ffprobe.html#toc-gopher">7.4 gopher</a></h2>
+
+<p>Gopher protocol.
+</p>
+<a name="http"></a>
+<h2 class="section"><a href="ffprobe.html#toc-http">7.5 http</a></h2>
+
+<p>HTTP (Hyper Text Transfer Protocol).
+</p>
+<a name="mmst"></a>
+<h2 class="section"><a href="ffprobe.html#toc-mmst">7.6 mmst</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over TCP.
+</p>
+<a name="mmsh"></a>
+<h2 class="section"><a href="ffprobe.html#toc-mmsh">7.7 mmsh</a></h2>
+
+<p>MMS (Microsoft Media Server) protocol over HTTP.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<a name="md5"></a>
+<h2 class="section"><a href="ffprobe.html#toc-md5">7.8 md5</a></h2>
+
+<p>MD5 output protocol.
+</p>
+<p>Computes the MD5 hash of the data to be written, and on close writes
+this to the designated output or stdout if none is specified. It can
+be used to test muxers without writing an actual file.
+</p>
+<p>Some examples follow.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
+ffmpeg -i input.flv -f avi -y md5:output.avi.md5
+
+# Write the MD5 hash of the encoded AVI file to stdout.
+ffmpeg -i input.flv -f avi -y md5:
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV) require the output protocol to
+be seekable, so they will fail with the MD5 output protocol.
+</p>
+<a name="pipe"></a>
+<h2 class="section"><a href="ffprobe.html#toc-pipe">7.9 pipe</a></h2>
+
+<p>UNIX pipe access protocol.
+</p>
+<p>Allow to read and write from UNIX pipes.
+</p>
+<p>The accepted syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">pipe:[<var>number</var>]
+</pre></td></tr></table>
+
+<p><var>number</var> is the number corresponding to the file descriptor of the
+pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
+is not specified, by default the stdout file descriptor will be used
+for writing, stdin for reading.
+</p>
+<p>For example to read from stdin with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
+# ...this is the same as...
+cat test.wav | ffmpeg -i pipe:
+</pre></td></tr></table>
+
+<p>For writing to stdout with &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
+# ...this is the same as...
+ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
+</pre></td></tr></table>
+
+<p>Note that some formats (typically MOV), require the output protocol to
+be seekable, so they will fail with the pipe output protocol.
+</p>
+<a name="rtmp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-rtmp">7.10 rtmp</a></h2>
+
+<p>Real-Time Messaging Protocol.
+</p>
+<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
+dia content across a TCP/IP network.
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
+</pre></td></tr></table>
+
+<p>The accepted parameters are:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>server</samp>&rsquo;</dt>
+<dd><p>The address of the RTMP server.
+</p>
+</dd>
+<dt> &lsquo;<samp>port</samp>&rsquo;</dt>
+<dd><p>The number of the TCP port to use (by default is 1935).
+</p>
+</dd>
+<dt> &lsquo;<samp>app</samp>&rsquo;</dt>
+<dd><p>It is the name of the application to access. It usually corresponds to
+the path where the application is installed on the RTMP server
+(e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.).
+</p>
+</dd>
+<dt> &lsquo;<samp>playpath</samp>&rsquo;</dt>
+<dd><p>It is the path or name of the resource to play with reference to the
+application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example to read with &lsquo;<tt>ffplay</tt>&rsquo; a multimedia resource named
+&quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtmp://myserver/vod/sample
+</pre></td></tr></table>
+
+<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
+<h2 class="section"><a href="ffprobe.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">7.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
+
+<p>Real-Time Messaging Protocol and its variants supported through
+librtmp.
+</p>
+<p>Requires the presence of the librtmp headers and library during
+configuration. You need to explicitely configure the build with
+&quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
+protocol.
+</p>
+<p>This protocol provides most client functions and a few server
+functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
+encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
+variants of these encrypted types (RTMPTE, RTMPTS).
+</p>
+<p>The required syntax is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
+</pre></td></tr></table>
+
+<p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
+&quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
+<var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
+meaning as specified for the RTMP native protocol.
+<var>options</var> contains a list of space-separated options of the form
+<var>key</var>=<var>val</var>.
+</p>
+<p>See the librtmp manual page (man 3 librtmp) for more information.
+</p>
+<p>For example, to stream a file in real-time to an RTMP server using
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
+</pre></td></tr></table>
+
+<p>To play the same stream using &lsquo;<tt>ffplay</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
+</pre></td></tr></table>
+
+<a name="rtp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-rtp">7.12 rtp</a></h2>
+
+<p>Real-Time Protocol.
+</p>
+<a name="rtsp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-rtsp">7.13 rtsp</a></h2>
+
+<p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
+and muxer. The demuxer supports both normal RTSP (with data transferred
+over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
+data transferred over RDT).
+</p>
+<p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
+supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
+<a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
+</p>
+<p>The required syntax for a RTSP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>udp</samp>&rsquo;</dt>
+<dd><p>Use UDP as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>tcp</samp>&rsquo;</dt>
+<dd><p>Use TCP (interleaving within the RTSP control channel) as lower
+transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>multicast</samp>&rsquo;</dt>
+<dd><p>Use UDP multicast as lower transport protocol.
+</p>
+</dd>
+<dt> &lsquo;<samp>http</samp>&rsquo;</dt>
+<dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
+passing proxies.
+</p>
+</dd>
+<dt> &lsquo;<samp>filter_src</samp>&rsquo;</dt>
+<dd><p>Accept packets only from negotiated peer address and port.
+</p></dd>
+</dl>
+
+<p>Multiple lower transport protocols may be specified, in that case they are
+tried one at a time (if the setup of one fails, the next one is tried).
+For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
+</p>
+<p>When receiving data over UDP, the demuxer tries to reorder received packets
+(since they may arrive out of order, or packets may get lost totally). In
+order for this to be enabled, a maximum delay must be specified in the
+<code>max_delay</code> field of AVFormatContext.
+</p>
+<p>When watching multi-bitrate Real-RTSP streams with &lsquo;<tt>ffplay</tt>&rsquo;, the
+streams to display can be chosen with <code>-vst</code> <var>n</var> and
+<code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
+on the fly by pressing <code>v</code> and <code>a</code>.
+</p>
+<p>Example command lines:
+</p>
+<p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay -max_delay 500000 rtsp://server/video.mp4?udp
+</pre></td></tr></table>
+
+<p>To watch a stream tunneled over HTTP:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtsp://server/video.mp4?http
+</pre></td></tr></table>
+
+<p>To send a stream in realtime to a RTSP server, for others to watch:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
+</pre></td></tr></table>
+
+<a name="sap"></a>
+<h2 class="section"><a href="ffprobe.html#toc-sap">7.14 sap</a></h2>
+
+<p>Session Announcement Protocol (RFC 2974). This is not technically a
+protocol handler in libavformat, it is a muxer and demuxer.
+It is used for signalling of RTP streams, by announcing the SDP for the
+streams regularly on a separate port.
+</p>
+<a name="Muxer"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Muxer">7.14.1 Muxer</a></h3>
+
+<p>The syntax for a SAP url given to the muxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
+</pre></td></tr></table>
+
+<p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
+or to port 5004 if no port is specified.
+<var>options</var> is a <code>&amp;</code>-separated list. The following options
+are supported:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
+<dd><p>Specify the destination IP address for sending the announcements to.
+If omitted, the announcements are sent to the commonly used SAP
+announcement multicast address 224.2.127.254 (sap.mcast.net), or
+ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
+</p>
+</dd>
+<dt> &lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
+<dd><p>Specify the port to send the announcements on, defaults to
+9875 if not specified.
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>Specify the time to live value for the announcements and RTP packets,
+defaults to 255.
+</p>
+</dd>
+<dt> &lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
+<dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
+default), all streams are sent on unique ports, with each stream on a
+port 2 numbers higher than the previous.
+VLC/Live555 requires this to be set to 1, to be able to receive the stream.
+The RTP stack in libavformat for receiving requires all streams to be sent
+on unique ports.
+</p></dd>
+</dl>
+
+<p>Example command lines follow.
+</p>
+<p>To broadcast a stream on the local subnet, for watching in VLC:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
+</pre></td></tr></table>
+
+<p>Similarly, for watching in ffplay:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
+</pre></td></tr></table>
+
+<p>And for watching in ffplay, over IPv6:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
+</pre></td></tr></table>
+
+<a name="Demuxer"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Demuxer">7.14.2 Demuxer</a></h3>
+
+<p>The syntax for a SAP url given to the demuxer is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
+</pre></td></tr></table>
+
+<p><var>address</var> is the multicast address to listen for announcements on,
+if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
+is the port that is listened on, 9875 if omitted.
+</p>
+<p>The demuxers listens for announcements on the given address and port.
+Once an announcement is received, it tries to receive that particular stream.
+</p>
+<p>Example command lines follow.
+</p>
+<p>To play back the first stream announced on the normal SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://
+</pre></td></tr></table>
+
+<p>To play back the first stream announced on one the default IPv6 SAP multicast address:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
+</pre></td></tr></table>
+
+<a name="tcp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-tcp">7.15 tcp</a></h2>
+
+<p>Trasmission Control Protocol.
+</p>
+<p>The required syntax for a TCP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>listen</samp>&rsquo;</dt>
+<dd><p>Listen for an incoming connection
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
+ffplay tcp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+</dd>
+</dl>
+
+<a name="udp"></a>
+<h2 class="section"><a href="ffprobe.html#toc-udp">7.16 udp</a></h2>
+
+<p>User Datagram Protocol.
+</p>
+<p>The required syntax for a UDP url is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
+</pre></td></tr></table>
+
+<p><var>options</var> contains a list of &amp;-seperated options of the form <var>key</var>=<var>val</var>.
+Follow the list of supported options.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the UDP buffer size in bytes
+</p>
+</dd>
+<dt> &lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
+<dd><p>override the local UDP port to bind with
+</p>
+</dd>
+<dt> &lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
+<dd><p>set the size in bytes of UDP packets
+</p>
+</dd>
+<dt> &lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>explicitly allow or disallow reusing UDP sockets
+</p>
+</dd>
+<dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
+<dd><p>set the time to live value (for multicast only)
+</p>
+</dd>
+<dt> &lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
+<dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
+destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
+If the destination address isn&rsquo;t known at the start, this option can
+be specified in ff_udp_set_remote_url, too.
+This allows finding out the source address for the packets with getsockname,
+and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
+unreachable&quot; is received.
+For receiving, this gives the benefit of only receiving packets from
+the specified peer address/port.
+</p></dd>
+</dl>
+
+<p>Some usage examples of the udp protocol with &lsquo;<tt>ffmpeg</tt>&rsquo; follow.
+</p>
+<p>To stream over UDP to a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
+</pre></td></tr></table>
+
+<p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
+</pre></td></tr></table>
+
+<p>To receive over UDP from a remote endpoint:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
+</pre></td></tr></table>
+
+<a name="Input-Devices"></a>
+<h1 class="chapter"><a href="ffprobe.html#toc-Input-Devices">8. Input Devices</a></h1>
+
+<p>Input devices are configured elements in FFmpeg which allow to access
+the data coming from a multimedia device attached to your system.
+</p>
+<p>When you configure your FFmpeg build, all the supported input devices
+are enabled by default. You can list all available ones using the
+configure option &quot;&ndash;list-indevs&quot;.
+</p>
+<p>You can disable all the input devices using the configure option
+&quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
+option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
+input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
+</p>
+<p>The option &quot;-formats&quot; of the ff* tools will display the list of
+supported input devices (amongst the demuxers).
+</p>
+<p>A description of the currently available input devices follows.
+</p>
+<a name="alsa"></a>
+<h2 class="section"><a href="ffprobe.html#toc-alsa">8.1 alsa</a></h2>
+
+<p>ALSA (Advanced Linux Sound Architecture) input device.
+</p>
+<p>To enable this input device during configuration you need libasound
+installed on your system.
+</p>
+<p>This device allows capturing from an ALSA device. The name of the
+device to capture has to be an ALSA card identifier.
+</p>
+<p>An ALSA identifier has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
+</pre></td></tr></table>
+
+<p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
+</p>
+<p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
+specify card number or identifier, device number and subdevice number
+(-1 means any).
+</p>
+<p>To see the list of cards currently recognized by your system check the
+files &lsquo;<tt>/proc/asound/cards</tt>&rsquo; and &lsquo;<tt>/proc/asound/devices</tt>&rsquo;.
+</p>
+<p>For example to capture with &lsquo;<tt>ffmpeg</tt>&rsquo; from an ALSA device with
+card id 0, you may run the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
+</pre></td></tr></table>
+
+<p>For more information see:
+<a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
+</p>
+<a name="bktr"></a>
+<h2 class="section"><a href="ffprobe.html#toc-bktr">8.2 bktr</a></h2>
+
+<p>BSD video input device.
+</p>
+<a name="dv1394"></a>
+<h2 class="section"><a href="ffprobe.html#toc-dv1394">8.3 dv1394</a></h2>
+
+<p>Linux DV 1394 input device.
+</p>
+<a name="fbdev"></a>
+<h2 class="section"><a href="ffprobe.html#toc-fbdev">8.4 fbdev</a></h2>
+
+<p>Linux framebuffer input device.
+</p>
+<p>The Linux framebuffer is a graphic hardware-independent abstraction
+layer to show graphics on a computer monitor, typically on the
+console. It is accessed through a file device node, usually
+&lsquo;<tt>/dev/fb0</tt>&rsquo;.
+</p>
+<p>For more detailed information read the file
+Documentation/fb/framebuffer.txt included in the Linux source tree.
+</p>
+<p>To record from the framebuffer device &lsquo;<tt>/dev/fb0</tt>&rsquo; with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
+</pre></td></tr></table>
+
+<p>You can take a single screenshot image with the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
+</pre></td></tr></table>
+
+<p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
+</p>
+<a name="jack"></a>
+<h2 class="section"><a href="ffprobe.html#toc-jack">8.5 jack</a></h2>
+
+<p>JACK input device.
+</p>
+<p>To enable this input device during configuration you need libjack
+installed on your system.
+</p>
+<p>A JACK input device creates one or more JACK writable clients, one for
+each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
+<var>client_name</var> is the name provided by the application, and <var>N</var>
+is a number which identifies the channel.
+Each writable client will send the acquired data to the FFmpeg input
+device.
+</p>
+<p>Once you have created one or more JACK readable clients, you need to
+connect them to one or more JACK writable clients.
+</p>
+<p>To connect or disconnect JACK clients you can use the
+&lsquo;<tt>jack_connect</tt>&rsquo; and &lsquo;<tt>jack_disconnect</tt>&rsquo; programs, or do it
+through a graphical interface, for example with &lsquo;<tt>qjackctl</tt>&rsquo;.
+</p>
+<p>To list the JACK clients and their properties you can invoke the command
+&lsquo;<tt>jack_lsp</tt>&rsquo;.
+</p>
+<p>Follows an example which shows how to capture a JACK readable client
+with &lsquo;<tt>ffmpeg</tt>&rsquo;.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
+$ ffmpeg -f jack -i ffmpeg -y out.wav
+
+# Start the sample jack_metro readable client.
+$ jack_metro -b 120 -d 0.2 -f 4000
+
+# List the current JACK clients.
+$ jack_lsp -c
+system:capture_1
+system:capture_2
+system:playback_1
+system:playback_2
+ffmpeg:input_1
+metro:120_bpm
+
+# Connect metro to the ffmpeg writable client.
+$ jack_connect metro:120_bpm ffmpeg:input_1
+</pre></td></tr></table>
+
+<p>For more information read:
+<a href="http://jackaudio.org/">http://jackaudio.org/</a>
+</p>
+<a name="libdc1394"></a>
+<h2 class="section"><a href="ffprobe.html#toc-libdc1394">8.6 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>
+
+<p>The OpenAL input device provides audio capture on all systems with a
+working OpenAL 1.1 implementation.
+</p>
+<p>To enable this input device during configuration, you need OpenAL
+headers and libraries installed on your system, and need to configure
+FFmpeg with <code>--enable-openal</code>.
+</p>
+<p>OpenAL headers and libraries should be provided as part of your OpenAL
+implementation, or as an additional download (an SDK). Depending on your
+installation you may need to specify additional flags via the
+<code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
+system to locate the OpenAL headers and libraries.
+</p>
+<p>An incomplete list of OpenAL implementations follows:
+</p>
+<dl compact="compact">
+<dt> <strong>Creative</strong></dt>
+<dd><p>The official Windows implementation, providing hardware acceleration
+with supported devices and software fallback.
+See <a href="http://openal.org/">http://openal.org/</a>.
+</p></dd>
+<dt> <strong>OpenAL Soft</strong></dt>
+<dd><p>Portable, open source (LGPL) software implementation. Includes
+backends for the most common sound APIs on the Windows, Linux,
+Solaris, and BSD operating systems.
+See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
+</p></dd>
+<dt> <strong>Apple</strong></dt>
+<dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
+See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
+</p></dd>
+</dl>
+
+<p>This device allows to capture from an audio input device handled
+through OpenAL.
+</p>
+<p>You need to specify the name of the device to capture in the provided
+filename. If the empty string is provided, the device will
+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="ffprobe.html#toc-Options">8.7.1 Options</a></h3>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>channels</samp>&rsquo;</dt>
+<dd><p>Set the number of channels in the captured audio. Only the values
+&lsquo;<samp>1</samp>&rsquo; (monaural) and &lsquo;<samp>2</samp>&rsquo; (stereo) are currently supported.
+Defaults to &lsquo;<samp>2</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_size</samp>&rsquo;</dt>
+<dd><p>Set the sample size (in bits) of the captured audio. Only the values
+&lsquo;<samp>8</samp>&rsquo; and &lsquo;<samp>16</samp>&rsquo; are currently supported. Defaults to
+&lsquo;<samp>16</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_rate</samp>&rsquo;</dt>
+<dd><p>Set the sample rate (in Hz) of the captured audio.
+Defaults to &lsquo;<samp>44.1k</samp>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>list_devices</samp>&rsquo;</dt>
+<dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
+Defaults to &lsquo;<samp>false</samp>&rsquo;.
+</p>
+</dd>
+</dl>
+
+<a name="Examples"></a>
+<h3 class="subsection"><a href="ffprobe.html#toc-Examples">8.7.2 Examples</a></h3>
+
+<p>Print the list of OpenAL supported devices and exit:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the OpenAL device &lsquo;<tt>DR-BT101 via PulseAudio</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from the default device (note the empty string &rdquo; as filename):
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
+</pre></td></tr></table>
+
+<p>Capture from two devices simultaneously, writing to two different files,
+within the same &lsquo;<tt>ffmpeg</tt>&rsquo; command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
+</pre></td></tr></table>
+<p>Note: not all OpenAL implementations support multiple simultaneous capture -
+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>
+
+<p>Open Sound System input device.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the OSS input device, and is usually set to
+&lsquo;<tt>/dev/dsp</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/dsp</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
+</pre></td></tr></table>
+
+<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"></a>
+<h2 class="section"><a href="ffprobe.html#toc-sndio">8.9 sndio</a></h2>
+
+<p>sndio input device.
+</p>
+<p>To enable this input device during configuration you need libsndio
+installed on your system.
+</p>
+<p>The filename to provide to the input device is the device node
+representing the sndio input device, and is usually set to
+&lsquo;<tt>/dev/audio0</tt>&rsquo;.
+</p>
+<p>For example to grab from &lsquo;<tt>/dev/audio0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
+command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
+</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>
+
+<p>Video4Linux and Video4Linux2 input video devices.
+</p>
+<p>The name of the device to grab is a file device node, usually Linux
+systems tend to automatically create such nodes when the device
+(e.g. an USB webcam) is plugged into the system, and has a name of the
+kind &lsquo;<tt>/dev/video<var>N</var></tt>&rsquo;, where <var>N</var> is a number associated to
+the device.
+</p>
+<p>Video4Linux and Video4Linux2 devices only support a limited set of
+<var>width</var>x<var>height</var> sizes and framerates. You can check which are
+supported for example with the command &lsquo;<tt>dov4l</tt>&rsquo; for Video4Linux
+devices and the command &lsquo;<tt>v4l-info</tt>&rsquo; for Video4Linux2 devices.
+</p>
+<p>If the size for the device is set to 0x0, the input device will
+try to autodetect the size to use.
+Only for the video4linux2 device, if the frame rate is set to 0/0 the
+input device will use the frame rate value already set in the driver.
+</p>
+<p>Video4Linux support is deprecated since Linux 2.6.30, and will be
+dropped in later versions.
+</p>
+<p>Follow some usage examples of the video4linux devices with the ff*
+tools.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
+# to the default of 25/1.
+ffplay -s 320x240 -f video4linux /dev/video0
+
+# Grab and show the input of a video4linux2 device, autoadjust size.
+ffplay -f video4linux2 /dev/video0
+
+# Grab and record the input of a video4linux2 device, autoadjust size,
+# frame rate value defaults to 0/0 so it is read from the video4linux2
+# driver.
+ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
+</pre></td></tr></table>
+
+<a name="vfwcap"></a>
+<h2 class="section"><a href="ffprobe.html#toc-vfwcap">8.11 vfwcap</a></h2>
+
+<p>VfW (Video for Windows) capture input device.
+</p>
+<p>The filename passed as input is the capture driver number, ranging from
+0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
+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>
+
+<p>X11 video input device.
+</p>
+<p>This device allows to capture a region of an X11 display.
+</p>
+<p>The filename passed as input has the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
+</pre></td></tr></table>
+
+<p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
+X11 display name of the screen to grab from. <var>hostname</var> can be
+ommitted, and defaults to &quot;localhost&quot;. The environment variable
+<code>DISPLAY</code> contains the default display name.
+</p>
+<p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
+area with respect to the top-left border of the X11 screen. They
+default to 0.
+</p>
+<p>Check the X11 documentation (e.g. man X) for more detailed information.
+</p>
+<p>Use the &lsquo;<tt>dpyinfo</tt>&rsquo; program for getting basic information about the
+properties of your X11 display (e.g. grep for &quot;name&quot; or &quot;dimensions&quot;).
+</p>
+<p>For example to grab from &lsquo;<tt>:0.0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</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
+</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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/general.html b/ffmpeg 0.8/doc/general.html
new file mode 100644 (file)
index 0000000..0d0e2d2
--- /dev/null
@@ -0,0 +1,1039 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>General Documentation</title>
+
+<meta name="description" content="General Documentation">
+<meta name="keywords" content="General Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">General Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<ul class="toc">
+  <li><a name="toc-external-libraries" href="#external-libraries">1. external libraries</a>
+  <ul class="toc">
+    <li><a name="toc-OpenCORE-AMR" href="#OpenCORE-AMR">1.1 OpenCORE AMR</a></li>
+  </ul></li>
+  <li><a name="toc-Supported-File-Formats-and-Codecs" href="#Supported-File-Formats-and-Codecs">2. Supported File Formats and Codecs</a>
+  <ul class="toc">
+    <li><a name="toc-File-Formats" href="#File-Formats">2.1 File Formats</a></li>
+    <li><a name="toc-Image-Formats" href="#Image-Formats">2.2 Image Formats</a></li>
+    <li><a name="toc-Video-Codecs" href="#Video-Codecs">2.3 Video Codecs</a></li>
+    <li><a name="toc-Audio-Codecs" href="#Audio-Codecs">2.4 Audio Codecs</a></li>
+    <li><a name="toc-Subtitle-Formats" href="#Subtitle-Formats">2.5 Subtitle Formats</a></li>
+    <li><a name="toc-Network-Protocols" href="#Network-Protocols">2.6 Network Protocols</a></li>
+    <li><a name="toc-Input_002fOutput-Devices" href="#Input_002fOutput-Devices">2.7 Input/Output Devices</a></li>
+  </ul></li>
+  <li><a name="toc-Platform-Specific-information" href="#Platform-Specific-information">3. Platform Specific information</a>
+  <ul class="toc">
+    <li><a name="toc-DOS" href="#DOS">3.1 DOS</a></li>
+    <li><a name="toc-OS_002f2" href="#OS_002f2">3.2 OS/2</a></li>
+    <li><a name="toc-Unix_002dlike" href="#Unix_002dlike">3.3 Unix-like</a>
+    <ul class="toc">
+      <li><a name="toc-BSD" href="#BSD">3.3.1 BSD</a></li>
+      <li><a name="toc-_0028Open_0029Solaris" href="#g_t_0028Open_0029Solaris">3.3.2 (Open)Solaris</a></li>
+      <li><a name="toc-Darwin-_0028MacOS-X_002c-iPhone_0029" href="#Darwin-_0028MacOS-X_002c-iPhone_0029">3.3.3 Darwin (MacOS X, iPhone)</a></li>
+    </ul></li>
+    <li><a name="toc-Windows" href="#Windows">3.4 Windows</a>
+    <ul class="toc">
+      <li><a name="toc-Native-Windows-compilation" href="#Native-Windows-compilation">3.4.1 Native Windows compilation</a></li>
+      <li><a name="toc-Microsoft-Visual-C_002b_002b-compatibility" href="#Microsoft-Visual-C_002b_002b-compatibility">3.4.2 Microsoft Visual C++ compatibility</a>
+      <ul class="toc">
+        <li><a name="toc-Using-static-libraries" href="#Using-static-libraries">3.4.2.1 Using static libraries</a></li>
+        <li><a name="toc-Using-shared-libraries" href="#Using-shared-libraries">3.4.2.2 Using shared libraries</a></li>
+      </ul></li>
+      <li><a name="toc-Cross-compilation-for-Windows-with-Linux-1" href="#Cross-compilation-for-Windows-with-Linux-1">3.4.3 Cross compilation for Windows with Linux</a></li>
+      <li><a name="toc-Compilation-under-Cygwin" href="#Compilation-under-Cygwin">3.4.4 Compilation under Cygwin</a></li>
+      <li><a name="toc-Crosscompilation-for-Windows-under-Cygwin" href="#Crosscompilation-for-Windows-under-Cygwin">3.4.5 Crosscompilation for Windows under Cygwin</a></li>
+    </ul>
+</li>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="external-libraries"></a>
+<h1 class="chapter"><a href="general.html#toc-external-libraries">1. external libraries</a></h1>
+
+<p>FFmpeg can be hooked up with a number of external libraries to add support
+for more formats. None of them are used by default, their use has to be
+explicitly requested by passing the appropriate flags to &lsquo;<tt>./configure</tt>&rsquo;.
+</p>
+<a name="OpenCORE-AMR"></a>
+<h2 class="section"><a href="general.html#toc-OpenCORE-AMR">1.1 OpenCORE AMR</a></h2>
+
+<p>FFmpeg can make use of the OpenCORE libraries for AMR-NB
+decoding/encoding and AMR-WB decoding.
+</p>
+<p>Go to <a href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the instructions for
+installing the libraries. Then pass <code>--enable-libopencore-amrnb</code> and/or
+<code>--enable-libopencore-amrwb</code> to configure to enable the libraries.
+</p>
+<p>Note that OpenCORE is under the Apache License 2.0 (see
+<a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> for details), which is
+incompatible with the LGPL version 2.1 and GPL version 2. You have to
+upgrade FFmpeg&rsquo;s license to LGPL version 3 (or if you have enabled
+GPL components, GPL version 3) to use it.
+</p>
+
+<a name="Supported-File-Formats-and-Codecs"></a>
+<h1 class="chapter"><a href="general.html#toc-Supported-File-Formats-and-Codecs">2. Supported File Formats and Codecs</a></h1>
+
+<p>You can use the <code>-formats</code> and <code>-codecs</code> options to have an exhaustive list.
+</p>
+<a name="File-Formats"></a>
+<h2 class="section"><a href="general.html#toc-File-Formats">2.1 File Formats</a></h2>
+
+<p>FFmpeg supports the following file formats through the <code>libavformat</code>
+library:
+</p>
+<table>
+<tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
+<tr><td width="40%">4xm</td><td width="10%"></td><td width="10%">X</td><td width="40%">4X Technologies format, used in some games.</td></tr>
+<tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Adobe Filmstrip</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Audio IFF (AIFF)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">American Laser Games MM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in games like Mad Dog McCree.</td></tr>
+<tr><td width="40%">3GPP AMR</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Apple HTTP Live Streaming</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ASF</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">AVI</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">AVISynth</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">AVS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by the Creature Shock game.</td></tr>
+<tr><td width="40%">Beam Software SIFF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio and video format used in some games by Beam Software.</td></tr>
+<tr><td width="40%">Bethesda Softworks VID</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some games from Bethesda Softworks.</td></tr>
+<tr><td width="40%">Bink</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by many games.</td></tr>
+<tr><td width="40%">Bitmap Brothers JV</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Z and Z95 games.</td></tr>
+<tr><td width="40%">Brute Force &amp; Ignorance</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Flash Traffic: City of Angels.</td></tr>
+<tr><td width="40%">BWF</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Interplay C93</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Cyberia from Interplay.</td></tr>
+<tr><td width="40%">Delphine Software International CIN</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by Delphine Software games.</td></tr>
+<tr><td width="40%">CD+G</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video format used by CD+G karaoke disks</td></tr>
+<tr><td width="40%">Core Audio Format</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Apple Core Audio Format</td></tr>
+<tr><td width="40%">CRC testing format</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">Creative Voice</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Created for the Sound Blaster Pro.</td></tr>
+<tr><td width="40%">CRYO APC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in some games by CRYO Interactive Entertainment.</td></tr>
+<tr><td width="40%">D-Cinema audio</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">DFA</td><td width="10%"></td><td width="10%">X</td><td width="40%">This format is used in Chronomaster game</td></tr>
+<tr><td width="40%">DV video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">DXA</td><td width="10%"></td><td width="10%">X</td><td width="40%">This format is used in the non-Windows version of the Feeble Files
+         game and different game cutscenes repacked for use with ScummVM.</td></tr>
+<tr><td width="40%">Electronic Arts cdata</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Electronic Arts Multimedia</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various EA games; files have extensions like WVE and UV2.</td></tr>
+<tr><td width="40%">FFM (FFserver live feed)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Flash (SWF)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Flash 9 (AVM2)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Only embedded audio is decoded.</td></tr>
+<tr><td width="40%">FLI/FLC/FLX animation</td><td width="10%"></td><td width="10%">X</td><td width="40%">.fli/.flc files</td></tr>
+<tr><td width="40%">Flash Video (FLV)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Macromedia Flash video files</td></tr>
+<tr><td width="40%">framecrc testing format</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">FunCom ISS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in various games from FunCom like The Longest Journey.</td></tr>
+<tr><td width="40%">GIF Animation</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">GXF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">General eXchange Format SMPTE 360M, used by Thomson Grass Valley
+         playout servers.</td></tr>
+<tr><td width="40%">id Quake II CIN video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">id RoQ</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2, other computer games.</td></tr>
+<tr><td width="40%">IEC61937 encapsulation</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">IFF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Interchange File Format</td></tr>
+<tr><td width="40%">Interplay MVE</td><td width="10%"></td><td width="10%">X</td><td width="40%">Format used in various Interplay computer games.</td></tr>
+<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%">LXF</td><td width="10%"></td><td width="10%">X</td><td width="40%">VR native stream format, used by Leitch/Harris&rsquo; 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%">FFmpeg metadata</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Metadata in text format.</td></tr>
+<tr><td width="40%">MAXIS XA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sim City 3000; file extension .xa.</td></tr>
+<tr><td width="40%">MD Studio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Mobotix .mxg</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Motion Pixels MVI</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MOV/QuickTime/MP4</td><td width="10%">X</td><td width="10%">X</td><td width="40%">3GP, 3GP2, PSP, iPod variants supported</td></tr>
+<tr><td width="40%">MP2</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MP3</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-1 System</td><td width="10%">X</td><td width="10%">X</td><td width="40%">muxed audio and video, VCD format supported</td></tr>
+<tr><td width="40%">MPEG-PS (program stream)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">also known as <code>VOB</code> file, SVCD and DVD format supported</td></tr>
+<tr><td width="40%">MPEG-TS (transport stream)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">also known as DVB Transport Stream</td></tr>
+<tr><td width="40%">MPEG-4</td><td width="10%">X</td><td width="10%">X</td><td width="40%">MPEG-4 is a variant of QuickTime.</td></tr>
+<tr><td width="40%">MIME multipart JPEG</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">MSN TCP webcam</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by MSN Messenger webcam streams.</td></tr>
+<tr><td width="40%">MTV</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Musepack</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Material eXchange Format (MXF)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SMPTE 377M, used by D-Cinema, broadcast industry.</td></tr>
+<tr><td width="40%">Material eXchange Format (MXF), D-10 Mapping</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SMPTE 386M, D-10/IMX Mapping.</td></tr>
+<tr><td width="40%">NC camera feed</td><td width="10%"></td><td width="10%">X</td><td width="40%">NC (AVIP NC4600) camera streams</td></tr>
+<tr><td width="40%">NTT TwinVQ (VQF)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Nippon Telegraph and Telephone Corporation TwinVQ.</td></tr>
+<tr><td width="40%">Nullsoft Streaming Video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">NuppelVideo</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">NUT</td><td width="10%">X</td><td width="10%">X</td><td width="40%">NUT Open Container Format</td></tr>
+<tr><td width="40%">Ogg</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Playstation Portable PMP</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">TechnoTrend PVA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by TechnoTrend DVB PCI boards.</td></tr>
+<tr><td width="40%">QCP</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw ADTS (AAC)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw Chinese AVS video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw CRI ADX</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw Dirac</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw DNxHD</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw DTS</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw E-AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw FLAC</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw GSM</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw H.263</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw H.264</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw Ingenient MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MLP</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MPEG</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MPEG-1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MPEG-2</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw MPEG-4</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw NULL</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">raw video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw id RoQ</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">raw Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw TrueHD</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw VC-1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM signed 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM unsigned 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM floating-point 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM floating-point 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM floating-point 64 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">raw PCM floating-point 64 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RDT</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">REDCODE R3D</td><td width="10%"></td><td width="10%">X</td><td width="40%">File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.</td></tr>
+<tr><td width="40%">RealMedia</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Redirector</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Renderware TeXture Dictionary</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">RL2</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio and video format used in some games by Entertainment Software Partners.</td></tr>
+<tr><td width="40%">RPL/ARMovie</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Lego Mindstorms RSO</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RTMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Output is performed by publishing stream to RTMP server</td></tr>
+<tr><td width="40%">RTP</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RTSP</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">SAP</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">SDP</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Sega FILM/CPK</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in many Sega Saturn console games.</td></tr>
+<tr><td width="40%">Sierra SOL</td><td width="10%"></td><td width="10%">X</td><td width="40%">.sol files used in Sierra Online games.</td></tr>
+<tr><td width="40%">Sierra VMD</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra CD-ROM games.</td></tr>
+<tr><td width="40%">Smacker</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by many games.</td></tr>
+<tr><td width="40%">Sony OpenMG (OMA)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in Sony Sonic Stage and Sony Vegas.</td></tr>
+<tr><td width="40%">Sony PlayStation STR</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Sony Wave64 (W64)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">SoX native format</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">SUN AU format</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Text files</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">THP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used on the Nintendo GameCube.</td></tr>
+<tr><td width="40%">Tiertex Limited SEQ</td><td width="10%"></td><td width="10%">X</td><td width="40%">Tiertex .seq files used in the DOS CD-ROM version of the game Flashback.</td></tr>
+<tr><td width="40%">True Audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">VC-1 test bitstream</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">WavPack</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">WebM</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Televison (WTV)</td><td width="10%"></td><td width="10%">X</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&rsquo;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%">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>
+</table>
+
+<p><code>X</code> means that encoding (resp. decoding) is supported.
+</p>
+<a name="Image-Formats"></a>
+<h2 class="section"><a href="general.html#toc-Image-Formats">2.2 Image Formats</a></h2>
+
+<p>FFmpeg can read and write images for each frame of a video sequence. The
+following image formats are supported:
+</p>
+<table>
+<tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
+<tr><td width="40%">.Y.U.V</td><td width="10%">X</td><td width="10%">X</td><td width="40%">one raw file per component</td></tr>
+<tr><td width="40%">animated GIF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Only uncompressed GIFs are generated.</td></tr>
+<tr><td width="40%">BMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft BMP image</td></tr>
+<tr><td width="40%">DPX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Digital Picture Exchange</td></tr>
+<tr><td width="40%">JPEG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Progressive JPEG is not supported.</td></tr>
+<tr><td width="40%">JPEG 2000</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">JPEG-LS</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">LJPEG</td><td width="10%">X</td><td width="10%"></td><td width="40%">Lossless JPEG</td></tr>
+<tr><td width="40%">PAM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PAM is a PNM extension with alpha support.</td></tr>
+<tr><td width="40%">PBM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable BitMap image</td></tr>
+<tr><td width="40%">PCX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PC Paintbrush</td></tr>
+<tr><td width="40%">PGM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable GrayMap image</td></tr>
+<tr><td width="40%">PGMYUV</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PGM with U and V components in YUV 4:2:0</td></tr>
+<tr><td width="40%">PIC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Pictor/PC Paint</td></tr>
+<tr><td width="40%">PNG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">2/4 bpp not supported yet</td></tr>
+<tr><td width="40%">PPM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable PixelMap image</td></tr>
+<tr><td width="40%">PTX</td><td width="10%"></td><td width="10%">X</td><td width="40%">V.Flash PTX format</td></tr>
+<tr><td width="40%">SGI</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SGI RGB image format</td></tr>
+<tr><td width="40%">Sun Rasterfile</td><td width="10%"></td><td width="10%">X</td><td width="40%">Sun RAS image format</td></tr>
+<tr><td width="40%">TIFF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">YUV, JPEG and some extension is not supported yet.</td></tr>
+<tr><td width="40%">Truevision Targa</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Targa (.TGA) image format</td></tr>
+</table>
+
+<p><code>X</code> means that encoding (resp. decoding) is supported.
+</p>
+<p><code>E</code> means that support is provided through an external library.
+</p>
+<a name="Video-Codecs"></a>
+<h2 class="section"><a href="general.html#toc-Video-Codecs">2.3 Video Codecs</a></h2>
+
+<table>
+<tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
+<tr><td width="40%">4X Movie</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in certain computer games.</td></tr>
+<tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">8SVX exponential</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">8SVX fibonacci</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">A64 multicolor</td><td width="10%">X</td><td width="10%"></td><td width="40%">Creates video suitable to be played on a commodore 64 (multicolor mode).</td></tr>
+<tr><td width="40%">American Laser Games MM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in games like Mad Dog McCree.</td></tr>
+<tr><td width="40%">AMV Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Chinese MP3 players.</td></tr>
+<tr><td width="40%">ANSI/ASCII art</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Apple MJPEG-B</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Apple QuickDraw</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: qdrw</td></tr>
+<tr><td width="40%">Asus v1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV1</td></tr>
+<tr><td width="40%">Asus v2</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV2</td></tr>
+<tr><td width="40%">ATI VCR1</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR1</td></tr>
+<tr><td width="40%">ATI VCR2</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR2</td></tr>
+<tr><td width="40%">Auravision Aura</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Auravision Aura 2</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Autodesk Animator Flic video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Autodesk RLE</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: AASC</td></tr>
+<tr><td width="40%">AVS (Audio Video Standard) video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used by the Creature Shock game.</td></tr>
+<tr><td width="40%">Beam Software VB</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Bethesda VID video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some games from Bethesda Softworks.</td></tr>
+<tr><td width="40%">Bink Video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Bitmap Brothers JV video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Brute Force &amp; Ignorance</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Flash Traffic: City of Angels.</td></tr>
+<tr><td width="40%">C93 video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Cyberia game.</td></tr>
+<tr><td width="40%">CamStudio</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: CSCD</td></tr>
+<tr><td width="40%">CD+G</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video codec for CD+G karaoke disks</td></tr>
+<tr><td width="40%">Chinese AVS video</td><td width="10%">E</td><td width="10%">X</td><td width="40%">AVS1-P2, JiZhun profile, encoding through external library libxavs</td></tr>
+<tr><td width="40%">Delphine Software International CIN video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Delphine Software International games.</td></tr>
+<tr><td width="40%">Cinepak</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Cirrus Logic AccuPak</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: CLJR</td></tr>
+<tr><td width="40%">Creative YUV (CYUV)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">DFA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Chronomaster game.</td></tr>
+<tr><td width="40%">Dirac</td><td width="10%">E</td><td width="10%">E</td><td width="40%">supported through external libdirac/libschroedinger libraries</td></tr>
+<tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">DNxHD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">aka SMPTE VC3</td></tr>
+<tr><td width="40%">Duck TrueMotion 1.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: DUCK</td></tr>
+<tr><td width="40%">Duck TrueMotion 2.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TM20</td></tr>
+<tr><td width="40%">DV (Digital Video)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Feeble Files/ScummVM DXA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec originally used in Feeble Files game.</td></tr>
+<tr><td width="40%">Electronic Arts CMV video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in NHL 95 game.</td></tr>
+<tr><td width="40%">Electronic Arts Madcow video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Electronic Arts TGV video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Electronic Arts TGQ video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Electronic Arts TQI video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Escape 124</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">FFmpeg video codec #1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental lossless codec (fourcc: FFV1)</td></tr>
+<tr><td width="40%">Flash Screen Video v1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: FSV1</td></tr>
+<tr><td width="40%">Flash Screen Video v2</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Flash Video (FLV)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Sorenson H.263 used in Flash</td></tr>
+<tr><td width="40%">Fraps</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">H.263 / H.263-1996</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">H.263+ / H.263-1998 / H.263 version 2</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libx264</td></tr>
+<tr><td width="40%">H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)</td><td width="10%">E</td><td width="10%">X</td></tr>
+<tr><td width="40%">HuffYUV</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">HuffYUV FFmpeg variant</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">IBM Ultimotion</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: ULTI</td></tr>
+<tr><td width="40%">id Cinematic video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Quake II.</td></tr>
+<tr><td width="40%">id RoQ video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2, other computer games.</td></tr>
+<tr><td width="40%">IFF ILBM</td><td width="10%"></td><td width="10%">X</td><td width="40%">IFF interlaved bitmap</td></tr>
+<tr><td width="40%">IFF ByteRun1</td><td width="10%"></td><td width="10%">X</td><td width="40%">IFF run length encoded bitmap</td></tr>
+<tr><td width="40%">Intel H.263</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Intel Indeo 2</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Intel Indeo 3</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Intel Indeo 5</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Interplay C93</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Cyberia from Interplay.</td></tr>
+<tr><td width="40%">Interplay MVE video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Interplay .MVE files.</td></tr>
+<tr><td width="40%">Karl Morton&rsquo;s video codec</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Worms games.</td></tr>
+<tr><td width="40%">Kega Game Video (KGV1)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Kega emulator screen capture codec.</td></tr>
+<tr><td width="40%">Lagarith</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">LCL (LossLess Codec Library) MSZH</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">LCL (LossLess Codec Library) ZLIB</td><td width="10%">E</td><td width="10%">E</td></tr>
+<tr><td width="40%">LOCO</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">lossless MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Microsoft RLE</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Microsoft Video 1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Mimic</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in MSN Messenger Webcam streams.</td></tr>
+<tr><td width="40%">Miro VideoXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VIXL</td></tr>
+<tr><td width="40%">MJPEG (Motion JPEG)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Mobotix MxPEG video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Motion Pixels video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-1 video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-1/2 video XvMC (X-Video Motion Compensation)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-1/2 video (VDPAU acceleration)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-2 video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-4 part 2</td><td width="10%">X</td><td width="10%">X
+    &nbsp;libxvidcore can be used alternatively for encoding.</td></tr>
+<tr><td width="40%">MPEG-4 part 2 Microsoft variant version 1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-4 part 2 Microsoft variant version 2</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MPEG-4 part 2 Microsoft variant version 3</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Nintendo Gamecube THP video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">NuppelVideo/RTjpeg</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used in NuppelVideo files.</td></tr>
+<tr><td width="40%">On2 VP3</td><td width="10%"></td><td width="10%">X</td><td width="40%">still experimental</td></tr>
+<tr><td width="40%">On2 VP5</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP50</td></tr>
+<tr><td width="40%">On2 VP6</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP60,VP61,VP62</td></tr>
+<tr><td width="40%">VP8</td><td width="10%">E</td><td width="10%">X</td><td width="40%">fourcc: VP80, encoding supported through external library libvpx</td></tr>
+<tr><td width="40%">planar RGB</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: 8BPS</td></tr>
+<tr><td width="40%">Q-team QPEG</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourccs: QPEG, Q1.0, Q1.1</td></tr>
+<tr><td width="40%">QuickTime 8BPS video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">QuickTime Animation (RLE) video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: &rsquo;rle &rsquo;</td></tr>
+<tr><td width="40%">QuickTime Graphics (SMC)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: &rsquo;smc &rsquo;</td></tr>
+<tr><td width="40%">QuickTime video (RPZA)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: rpza</td></tr>
+<tr><td width="40%">R10K AJA Kona 10-bit RGB Codec</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">R210 Quicktime Uncompressed RGB 10-bit</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Raw Video</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RealVideo 1.0</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RealVideo 2.0</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">RealVideo 3.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">still far from ideal</td></tr>
+<tr><td width="40%">RealVideo 4.0</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Renderware TXD (TeXture Dictionary)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Texture dictionaries used by the Renderware Engine.</td></tr>
+<tr><td width="40%">RL2 video</td><td width="10%"></td><td width="10%">X</td><td width="40%">used in some games by Entertainment Software Partners</td></tr>
+<tr><td width="40%">Sierra VMD video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra VMD files.</td></tr>
+<tr><td width="40%">Smacker video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used in Smacker.</td></tr>
+<tr><td width="40%">SMPTE VC-1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Snow</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental wavelet codec (fourcc: SNOW)</td></tr>
+<tr><td width="40%">Sony PlayStation MDEC (Motion DECoder)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Sorenson Vector Quantizer 1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: SVQ1</td></tr>
+<tr><td width="40%">Sorenson Vector Quantizer 3</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: SVQ3</td></tr>
+<tr><td width="40%">Sunplus JPEG (SP5X)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: SP5X</td></tr>
+<tr><td width="40%">TechSmith Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TSCC</td></tr>
+<tr><td width="40%">Theora</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libtheora</td></tr>
+<tr><td width="40%">Tiertex Limited SEQ video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in DOS CD-ROM FlashBack game.</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 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>
+<tr><td width="40%">Wing Commander III / Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Wing Commander III .MVE files.</td></tr>
+<tr><td width="40%">Wing Commander IV / Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Wing Commander IV.</td></tr>
+<tr><td width="40%">Winnov WNV1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">WMV7</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">YAMAHA SMAF</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Psygnosis YOP Video</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ZLIB</td><td width="10%">X</td><td width="10%">X</td><td width="40%">part of LCL, encoder experimental</td></tr>
+<tr><td width="40%">Zip Motion Blocks Video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Encoder works only in PAL8.</td></tr>
+</table>
+
+<p><code>X</code> means that encoding (resp. decoding) is supported.
+</p>
+<p><code>E</code> means that support is provided through an external library.
+</p>
+<a name="Audio-Codecs"></a>
+<h2 class="section"><a href="general.html#toc-Audio-Codecs">2.4 Audio Codecs</a></h2>
+
+<table>
+<tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
+<tr><td width="40%">8SVX audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">AAC</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libfaac and libvo-aacenc</td></tr>
+<tr><td width="40%">AC-3</td><td width="10%">IX</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM 4X Movie</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM CDROM XA</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Creative Technology</td><td width="10%"></td><td width="10%">X</td><td width="40%">16 -&gt; 4, 8 -&gt; 4, 8 -&gt; 3, 8 -&gt; 2</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various EA titles.</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts Maxis CDROM XS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sim City 3000.</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts R1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts R2</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts R3</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Electronic Arts XAS</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM G.722</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM G.726</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA AMV</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in AMV files</td></tr>
+<tr><td width="40%">ADPCM IMA Electronic Arts EACS</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA Electronic Arts SEAD</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA Funcom</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA QuickTime</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA Loki SDL MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM IMA Westwood</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM ISS IMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in FunCom games.</td></tr>
+<tr><td width="40%">ADPCM IMA Duck DK3</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some Sega Saturn console games.</td></tr>
+<tr><td width="40%">ADPCM IMA Duck DK4</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some Sega Saturn console games.</td></tr>
+<tr><td width="40%">ADPCM Microsoft</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM MS IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Nintendo Gamecube THP</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM QT IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM SEGA CRI ADX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Sega Dreamcast games.</td></tr>
+<tr><td width="40%">ADPCM Shockwave Flash</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM SMJPEG IMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in certain Loki game ports.</td></tr>
+<tr><td width="40%">ADPCM Sound Blaster Pro 2-bit</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Sound Blaster Pro 2.6-bit</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Sound Blaster Pro 4-bit</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">ADPCM Westwood Studios IMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Westwood Studios games like Command and Conquer.</td></tr>
+<tr><td width="40%">ADPCM Yamaha</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">AMR-NB</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libopencore-amrnb</td></tr>
+<tr><td width="40%">AMR-WB</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libvo-amrwbenc</td></tr>
+<tr><td width="40%">Apple lossless audio</td><td width="10%">X</td><td width="10%">X</td><td width="40%">QuickTime fourcc &rsquo;alac&rsquo;</td></tr>
+<tr><td width="40%">Atrac 1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Atrac 3</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Bink Audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Bink and Smacker files in many games.</td></tr>
+<tr><td width="40%">CELT (Opus)</td><td width="10%"></td><td width="10%">E</td><td width="40%">decoding supported through external library libcelt</td></tr>
+<tr><td width="40%">Delphine Software International CIN audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Delphine Software International games.</td></tr>
+<tr><td width="40%">COOK</td><td width="10%"></td><td width="10%">X</td><td width="40%">All versions except 5.1 are supported.</td></tr>
+<tr><td width="40%">DCA (DTS Coherent Acoustics)</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">DPCM id RoQ</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2, other computer games.</td></tr>
+<tr><td width="40%">DPCM Interplay</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various Interplay computer games.</td></tr>
+<tr><td width="40%">DPCM Sierra Online</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra Online game audio files.</td></tr>
+<tr><td width="40%">DPCM Sol</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">DPCM Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Origin&rsquo;s Wing Commander IV AVI files.</td></tr>
+<tr><td width="40%">DSP Group TrueSpeech</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">DV audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Enhanced AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">FLAC (Free Lossless Audio Codec)</td><td width="10%">X</td><td width="10%">IX</td></tr>
+<tr><td width="40%">GSM</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libgsm</td></tr>
+<tr><td width="40%">GSM Microsoft variant</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libgsm</td></tr>
+<tr><td width="40%">IMC (Intel Music Coder)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 3:1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 6:1</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">MLP (Meridian Lossless Packing)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in DVD-Audio discs.</td></tr>
+<tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Only versions 3.97-3.99 are supported.</td></tr>
+<tr><td width="40%">MP1 (MPEG audio layer 1)</td><td width="10%"></td><td width="10%">IX</td></tr>
+<tr><td width="40%">MP2 (MPEG audio layer 2)</td><td width="10%">IX</td><td width="10%">IX</td></tr>
+<tr><td width="40%">MP3 (MPEG audio layer 3)</td><td width="10%">E</td><td width="10%">IX</td><td width="40%">encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported</td></tr>
+<tr><td width="40%">MPEG-4 Audio Lossless Coding (ALS)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Musepack SV7</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Nellymoser Asao</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM 16-bit little-endian planar</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM 32-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM 32-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM 64-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM 64-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM D-Cinema audio signed 24-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM signed 16/20/24-bit big-endian in MPEG-TS</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM unsigned 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">PCM Zork</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">QCELP / PureVoice</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">QDesign Music Codec 2</td><td width="10%"></td><td width="10%">X</td><td width="40%">There are still some distortions.</td></tr>
+<tr><td width="40%">RealAudio 1.0 (14.4K)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Real 14400 bit/s codec</td></tr>
+<tr><td width="40%">RealAudio 2.0 (28.8K)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Real 28800 bit/s codec</td></tr>
+<tr><td width="40%">RealAudio 3.0 (dnet)</td><td width="10%">IX</td><td width="10%">X</td><td width="40%">Real low bitrate AC-3 codec</td></tr>
+<tr><td width="40%">RealAudio SIPR / ACELP.NET</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Sierra VMD audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra VMD files.</td></tr>
+<tr><td width="40%">Smacker audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">SMPTE 302M AES3 audio</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Sonic</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
+<tr><td width="40%">Sonic lossless</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
+<tr><td width="40%">Speex</td><td width="10%"></td><td width="10%">E</td><td width="40%">supported through external library libspeex</td></tr>
+<tr><td width="40%">True Audio (TTA)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">TrueHD</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in HD-DVD and Blu-Ray discs.</td></tr>
+<tr><td width="40%">TwinVQ (VQF flavor)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Vorbis</td><td width="10%">E</td><td width="10%">X</td><td width="40%">A native but very primitive encoder exists.</td></tr>
+<tr><td width="40%">WavPack</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Westwood Audio (SND1)</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Media Audio 1</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Media Audio 2</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Media Audio Pro</td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">Windows Media Audio Voice</td><td width="10%"></td><td width="10%">X</td></tr>
+</table>
+
+<p><code>X</code> means that encoding (resp. decoding) is supported.
+</p>
+<p><code>E</code> means that support is provided through an external library.
+</p>
+<p><code>I</code> means that an integer-only version is available, too (ensures high
+performance on systems without hardware floating point support).
+</p>
+<a name="Subtitle-Formats"></a>
+<h2 class="section"><a href="general.html#toc-Subtitle-Formats">2.5 Subtitle Formats</a></h2>
+
+<table>
+<tr><td width="40%">Name</td><td width="10%">Muxing</td><td width="10%">Demuxing</td><td width="10%">Encoding</td><td width="10%">Decoding</td></tr>
+<tr><td width="40%">SSA/ASS</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">DVB</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">DVD</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">MicroDVD</td><td width="10%">X</td><td width="10%">X</td><td width="10%"></td><td width="10%"></td></tr>
+<tr><td width="40%">PGS</td><td width="10%"></td><td width="10%"></td><td width="10%"></td><td width="10%">X</td></tr>
+<tr><td width="40%">SubRip (SRT)</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">XSUB</td><td width="10%"></td><td width="10%"></td><td width="10%">X</td><td width="10%">X</td></tr>
+</table>
+
+<p><code>X</code> means that the feature is supported.
+</p>
+<a name="Network-Protocols"></a>
+<h2 class="section"><a href="general.html#toc-Network-Protocols">2.6 Network Protocols</a></h2>
+
+<table>
+<tr><td width="40%">Name</td><td width="10%">Support</td></tr>
+<tr><td width="40%">Apple HTTP Live Streaming</td><td width="10%">X</td></tr>
+<tr><td width="40%">file</td><td width="10%">X</td></tr>
+<tr><td width="40%">Gopher</td><td width="10%">X</td></tr>
+<tr><td width="40%">HTTP</td><td width="10%">X</td></tr>
+<tr><td width="40%">MMS</td><td width="10%">X</td></tr>
+<tr><td width="40%">pipe</td><td width="10%">X</td></tr>
+<tr><td width="40%">RTP</td><td width="10%">X</td></tr>
+<tr><td width="40%">TCP</td><td width="10%">X</td></tr>
+<tr><td width="40%">UDP</td><td width="10%">X</td></tr>
+</table>
+
+<p><code>X</code> means that the protocol is supported.
+</p>
+
+<a name="Input_002fOutput-Devices"></a>
+<h2 class="section"><a href="general.html#toc-Input_002fOutput-Devices">2.7 Input/Output Devices</a></h2>
+
+<table>
+<tr><td width="40%">Name</td><td width="10%">Input</td><td width="10%">Output</td></tr>
+<tr><td width="40%">ALSA</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">BKTR</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">DV1394</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">JACK</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">LIBDC1394</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">OSS</td><td width="10%">X</td><td width="10%">X</td></tr>
+<tr><td width="40%">Video4Linux</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">Video4Linux2</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">VfW capture</td><td width="10%">X</td><td width="10%"></td></tr>
+<tr><td width="40%">X11 grabbing</td><td width="10%">X</td><td width="10%"></td></tr>
+</table>
+
+<p><code>X</code> means that input/output is supported.
+</p>
+
+<a name="Platform-Specific-information"></a>
+<h1 class="chapter"><a href="general.html#toc-Platform-Specific-information">3. Platform Specific information</a></h1>
+
+<a name="DOS"></a>
+<h2 class="section"><a href="general.html#toc-DOS">3.1 DOS</a></h2>
+
+<p>Using a cross-compiler is preferred for various reasons.
+</p>
+<a name="OS_002f2"></a>
+<h2 class="section"><a href="general.html#toc-OS_002f2">3.2 OS/2</a></h2>
+
+<p>For information about compiling FFmpeg on OS/2 see
+<a href="http://www.edm2.com/index.php/FFmpeg">http://www.edm2.com/index.php/FFmpeg</a>.
+</p>
+<a name="Unix_002dlike"></a>
+<h2 class="section"><a href="general.html#toc-Unix_002dlike">3.3 Unix-like</a></h2>
+
+<p>Some parts of FFmpeg cannot be built with version 2.15 of the GNU
+assembler which is still provided by a few AMD64 distributions. To
+make sure your compiler really uses the required version of gas
+after a binutils upgrade, run:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">$(gcc -print-prog-name=as) --version
+</pre></td></tr></table>
+
+<p>If not, then you should install a different compiler that has no
+hard-coded path to gas. In the worst case pass <code>--disable-asm</code>
+to configure.
+</p>
+<a name="BSD"></a>
+<h3 class="subsection"><a href="general.html#toc-BSD">3.3.1 BSD</a></h3>
+
+<p>BSD make will not build FFmpeg, you need to install and use GNU Make
+(&lsquo;<tt>gmake</tt>&rsquo;).
+</p>
+<a name="g_t_0028Open_0029Solaris"></a>
+<h3 class="subsection"><a href="general.html#toc-_0028Open_0029Solaris">3.3.2 (Open)Solaris</a></h3>
+
+<p>GNU Make is required to build FFmpeg, so you have to invoke (&lsquo;<tt>gmake</tt>&rsquo;),
+standard Solaris Make will not work. When building with a non-c99 front-end
+(gcc, generic suncc) add either <code>--extra-libs=/usr/lib/values-xpg6.o</code>
+or <code>--extra-libs=/usr/lib/64/values-xpg6.o</code> to the configure options
+since the libc is not c99-compliant by default. The probes performed by
+configure may raise an exception leading to the death of configure itself
+due to a bug in the system shell. Simply invoke a different shell such as
+bash directly to work around this:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">bash ./configure
+</pre></td></tr></table>
+
+<a name="Darwin-_0028MacOS-X_002c-iPhone_0029"></a>
+<h3 class="subsection"><a href="general.html#toc-Darwin-_0028MacOS-X_002c-iPhone_0029">3.3.3 Darwin (MacOS X, iPhone)</a></h3>
+
+<p>MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
+<a href="http://github.com/yuvi/gas-preprocessor">http://github.com/yuvi/gas-preprocessor</a> to build the optimized
+assembler functions. Just download the Perl script and put it somewhere
+in your PATH, FFmpeg&rsquo;s configure will pick it up automatically.
+</p>
+<a name="Windows"></a>
+<h2 class="section"><a href="general.html#toc-Windows">3.4 Windows</a></h2>
+
+<p>To get help and instructions for building FFmpeg under Windows, check out
+the FFmpeg Windows Help Forum at
+<a href="http://ffmpeg.arrozcru.org/">http://ffmpeg.arrozcru.org/</a>.
+</p>
+<a name="Native-Windows-compilation"></a>
+<h3 class="subsection"><a href="general.html#toc-Native-Windows-compilation">3.4.1 Native Windows compilation</a></h3>
+
+<p>FFmpeg can be built to run natively on Windows using the MinGW tools. Install
+the latest versions of MSYS and MinGW from <a href="http://www.mingw.org/">http://www.mingw.org/</a>.
+You can find detailed installation instructions in the download
+section and the FAQ.
+</p>
+<p>FFmpeg does not build out-of-the-box with the packages the automated MinGW
+installer provides. It also requires coreutils to be installed and many other
+packages updated to the latest version. The minimum version for some packages
+are listed below:
+</p>
+<ul>
+<li> bash 3.1
+</li><li> msys-make 3.81-2 (note: not mingw32-make)
+</li><li> w32api 3.13
+</li><li> mingw-runtime 3.15
+</li></ul>
+
+<p>FFmpeg automatically passes <code>-fno-common</code> to the compiler to work around
+a GCC bug (see <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216</a>).
+</p>
+<p>Notes:
+</p>
+<ul>
+<li> Building natively using MSYS can be sped up by disabling implicit rules
+in the Makefile by calling <code>make -r</code> instead of plain <code>make</code>. This
+speed up is close to non-existent for normal one-off builds and is only
+noticeable when running make for a second time (for example in
+<code>make install</code>).
+
+</li><li> In order to compile FFplay, you must have the MinGW development library
+of <a href="http://www.libsdl.org/">SDL</a>.
+Edit the &lsquo;<tt>bin/sdl-config</tt>&rsquo; script so that it points to the correct prefix
+where SDL was installed. Verify that &lsquo;<tt>sdl-config</tt>&rsquo; can be launched from
+the MSYS command line.
+
+</li><li> By using <code>./configure --enable-shared</code> when configuring FFmpeg,
+you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
+libavformat) as DLLs.
+
+</li></ul>
+
+<a name="Microsoft-Visual-C_002b_002b-compatibility"></a>
+<h3 class="subsection"><a href="general.html#toc-Microsoft-Visual-C_002b_002b-compatibility">3.4.2 Microsoft Visual C++ compatibility</a></h3>
+
+<p>As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
+want to use the libav* libraries in your own applications, you can still
+compile those applications using MSVC++. But the libav* libraries you link
+to <em>must</em> be built with MinGW. However, you will not be able to debug
+inside the libav* libraries, since MSVC++ does not recognize the debug
+symbols generated by GCC.
+We strongly recommend you to move over from MSVC++ to MinGW tools.
+</p>
+<p>This description of how to use the FFmpeg libraries with MSVC++ is based on
+Microsoft Visual C++ 2005 Express Edition. If you have a different version,
+you might have to modify the procedures slightly.
+</p>
+<a name="Using-static-libraries"></a>
+<h4 class="subsubsection"><a href="general.html#toc-Using-static-libraries">3.4.2.1 Using static libraries</a></h4>
+
+<p>Assuming you have just built and installed FFmpeg in &lsquo;<tt>/usr/local</tt>&rsquo;.
+</p>
+<ol>
+<li> Create a new console application (&quot;File / New / Project&quot;) and then
+select &quot;Win32 Console Application&quot;. On the appropriate page of the
+Application Wizard, uncheck the &quot;Precompiled headers&quot; option.
+
+</li><li> Write the source code for your application, or, for testing, just
+copy the code from an existing sample application into the source file
+that MSVC++ has already created for you. For example, you can copy
+&lsquo;<tt>libavformat/output-example.c</tt>&rsquo; from the FFmpeg distribution.
+
+</li><li> Open the &quot;Project / Properties&quot; dialog box. In the &quot;Configuration&quot;
+combo box, select &quot;All Configurations&quot; so that the changes you make will
+affect both debug and release builds. In the tree view on the left hand
+side, select &quot;C/C++ / General&quot;, then edit the &quot;Additional Include
+Directories&quot; setting to contain the path where the FFmpeg includes were
+installed (i.e. &lsquo;<tt>c:\msys\1.0\local\include</tt>&rsquo;).
+Do not add MinGW&rsquo;s include directory here, or the include files will
+conflict with MSVC&rsquo;s.
+
+</li><li> Still in the &quot;Project / Properties&quot; dialog box, select
+&quot;Linker / General&quot; from the tree view and edit the
+&quot;Additional Library Directories&quot; setting to contain the &lsquo;<tt>lib</tt>&rsquo;
+directory where FFmpeg was installed (i.e. &lsquo;<tt>c:\msys\1.0\local\lib</tt>&rsquo;),
+the directory where MinGW libs are installed (i.e. &lsquo;<tt>c:\mingw\lib</tt>&rsquo;),
+and the directory where MinGW&rsquo;s GCC libs are installed
+(i.e. &lsquo;<tt>C:\mingw\lib\gcc\mingw32\4.2.1-sjlj</tt>&rsquo;). Then select
+&quot;Linker / Input&quot; from the tree view, and add the files &lsquo;<tt>libavformat.a</tt>&rsquo;,
+&lsquo;<tt>libavcodec.a</tt>&rsquo;, &lsquo;<tt>libavutil.a</tt>&rsquo;, &lsquo;<tt>libmingwex.a</tt>&rsquo;,
+&lsquo;<tt>libgcc.a</tt>&rsquo;, and any other libraries you used (i.e. &lsquo;<tt>libz.a</tt>&rsquo;)
+to the end of &quot;Additional Dependencies&quot;.
+
+</li><li> Now, select &quot;C/C++ / Code Generation&quot; from the tree view. Select
+&quot;Debug&quot; in the &quot;Configuration&quot; combo box. Make sure that &quot;Runtime
+Library&quot; is set to &quot;Multi-threaded Debug DLL&quot;. Then, select &quot;Release&quot; in
+the &quot;Configuration&quot; combo box and make sure that &quot;Runtime Library&quot; is
+set to &quot;Multi-threaded DLL&quot;.
+
+</li><li> Click &quot;OK&quot; to close the &quot;Project / Properties&quot; dialog box.
+
+</li><li> MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
+Get msinttypes from <a href="http://code.google.com/p/msinttypes/downloads/list">http://code.google.com/p/msinttypes/downloads/list</a>
+and install it in MSVC++&rsquo;s include directory
+(i.e. &lsquo;<tt>C:\Program Files\Microsoft Visual Studio 8\VC\include</tt>&rsquo;).
+
+</li><li> MSVC++ also does not understand the <code>inline</code> keyword used by
+FFmpeg, so you must add this line before <code>#include</code>ing libav*:
+<table><tr><td>&nbsp;</td><td><pre class="example">#define inline _inline
+</pre></td></tr></table>
+
+</li><li> Build your application, everything should work.
+
+</li></ol>
+
+<a name="Using-shared-libraries"></a>
+<h4 class="subsubsection"><a href="general.html#toc-Using-shared-libraries">3.4.2.2 Using shared libraries</a></h4>
+
+<p>This is how to create DLL and LIB files that are compatible with MSVC++:
+</p>
+<ol>
+<li> Add a call to &lsquo;<tt>vcvars32.bat</tt>&rsquo; (which sets up the environment
+variables for the Visual C++ tools) as the first line of &lsquo;<tt>msys.bat</tt>&rsquo;.
+The standard location for &lsquo;<tt>vcvars32.bat</tt>&rsquo; is
+&lsquo;<tt>C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat</tt>&rsquo;,
+and the standard location for &lsquo;<tt>msys.bat</tt>&rsquo; is &lsquo;<tt>C:\msys\1.0\msys.bat</tt>&rsquo;.
+If this corresponds to your setup, add the following line as the first line
+of &lsquo;<tt>msys.bat</tt>&rsquo;:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">call &quot;C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat&quot;
+</pre></td></tr></table>
+
+<p>Alternatively, you may start the &lsquo;<tt>Visual Studio 2005 Command Prompt</tt>&rsquo;,
+and run &lsquo;<tt>c:\msys\1.0\msys.bat</tt>&rsquo; from there.
+</p>
+</li><li> Within the MSYS shell, run <code>lib.exe</code>. If you get a help message
+from &lsquo;<tt>Microsoft (R) Library Manager</tt>&rsquo;, this means your environment
+variables are set up correctly, the &lsquo;<tt>Microsoft (R) Library Manager</tt>&rsquo;
+is on the path and will be used by FFmpeg to create
+MSVC++-compatible import libraries.
+
+</li><li> Build FFmpeg with
+
+<table><tr><td>&nbsp;</td><td><pre class="example">./configure --enable-shared
+make
+make install
+</pre></td></tr></table>
+
+<p>Your install path (&lsquo;<tt>/usr/local/</tt>&rsquo; by default) should now have the
+necessary DLL and LIB files under the &lsquo;<tt>bin</tt>&rsquo; directory.
+</p>
+<p>Alternatively, build the libraries with a cross compiler, according to
+the instructions below in <a href="#Cross-compilation-for-Windows-with-Linux">Cross compilation for Windows with Linux</a>.
+</p>
+<p>To use those files with MSVC++, do the same as you would do with
+the static libraries, as described above. But in Step 4,
+you should only need to add the directory where the LIB files are installed
+(i.e. &lsquo;<tt>c:\msys\usr\local\bin</tt>&rsquo;). This is not a typo, the LIB files are
+installed in the &lsquo;<tt>bin</tt>&rsquo; directory. And instead of adding the static
+libraries (&lsquo;<tt>libxxx.a</tt>&rsquo; files) you should add the MSVC import libraries
+(&lsquo;<tt>avcodec.lib</tt>&rsquo;, &lsquo;<tt>avformat.lib</tt>&rsquo;, and
+&lsquo;<tt>avutil.lib</tt>&rsquo;). Note that you should not use the GCC import
+libraries (&lsquo;<tt>libxxx.dll.a</tt>&rsquo; files), as these will give you undefined
+reference errors. There should be no need for &lsquo;<tt>libmingwex.a</tt>&rsquo;,
+&lsquo;<tt>libgcc.a</tt>&rsquo;, and &lsquo;<tt>wsock32.lib</tt>&rsquo;, nor any other external library
+statically linked into the DLLs.
+</p>
+<p>FFmpeg headers do not declare global data for Windows DLLs through the usual
+dllexport/dllimport interface. Such data will be exported properly while
+building, but to use them in your MSVC++ code you will have to edit the
+appropriate headers and mark the data as dllimport. For example, in
+libavutil/pixdesc.h you should have:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
+</pre></td></tr></table>
+
+<p>Note that using import libraries created by dlltool requires
+the linker optimization option to be set to
+&quot;References: Keep Unreferenced Data (<code>/OPT:NOREF</code>)&quot;, otherwise
+the resulting binaries will fail during runtime. This isn&rsquo;t
+required when using import libraries generated by lib.exe.
+This issue is reported upstream at
+<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12633">http://sourceware.org/bugzilla/show_bug.cgi?id=12633</a>.
+</p>
+<p>To create import libraries that work with the <code>/OPT:REF</code> option
+(which is enabled by default in Release mode), follow these steps:
+</p>
+<ol>
+<li> Open &lsquo;<tt>Visual Studio 2005 Command Prompt</tt>&rsquo;.
+
+<p>Alternatively, in a normal command line prompt, call &lsquo;<tt>vcvars32.bat</tt>&rsquo;
+which sets up the environment variables for the Visual C++ tools
+(the standard location for this file is
+&lsquo;<tt>C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat</tt>&rsquo;).
+</p>
+</li><li> Enter the &lsquo;<tt>bin</tt>&rsquo; directory where the created LIB and DLL files
+are stored.
+
+</li><li> Generate new import libraries with &lsquo;<tt>lib.exe</tt>&rsquo;:
+
+<table><tr><td>&nbsp;</td><td><pre class="example">lib /machine:i386 /def:..\lib\avcodec-53.def  /out:avcodec.lib
+lib /machine:i386 /def:..\lib\avdevice-53.def /out:avdevice.lib
+lib /machine:i386 /def:..\lib\avfilter-2.def  /out:avfilter.lib
+lib /machine:i386 /def:..\lib\avformat-53.def /out:avformat.lib
+lib /machine:i386 /def:..\lib\avutil-51.def   /out:avutil.lib
+lib /machine:i386 /def:..\lib\swscale-2.def   /out:swscale.lib
+</pre></td></tr></table>
+
+</li></ol>
+
+<p><a name="Cross-compilation-for-Windows-with-Linux"></a>
+</p></li></ol>
+<a name="Cross-compilation-for-Windows-with-Linux-1"></a>
+<h3 class="subsection"><a href="general.html#toc-Cross-compilation-for-Windows-with-Linux-1">3.4.3 Cross compilation for Windows with Linux</a></h3>
+
+<p>You must use the MinGW cross compilation tools available at
+<a href="http://www.mingw.org/">http://www.mingw.org/</a>.
+</p>
+<p>Then configure FFmpeg with the following options:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
+</pre></td></tr></table>
+<p>(you can change the cross-prefix according to the prefix chosen for the
+MinGW tools).
+</p>
+<p>Then you can easily test FFmpeg with <a href="http://www.winehq.com/">Wine</a>.
+</p>
+<a name="Compilation-under-Cygwin"></a>
+<h3 class="subsection"><a href="general.html#toc-Compilation-under-Cygwin">3.4.4 Compilation under Cygwin</a></h3>
+
+<p>Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
+llrint() in its C library.
+</p>
+<p>Install your Cygwin with all the &quot;Base&quot; packages, plus the
+following &quot;Devel&quot; ones:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">binutils, gcc4-core, make, git, mingw-runtime, texi2html
+</pre></td></tr></table>
+
+<p>And the following &quot;Utils&quot; one:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">diffutils
+</pre></td></tr></table>
+
+<p>Then run
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./configure
+</pre></td></tr></table>
+
+<p>to make a static build.
+</p>
+<p>The current <code>gcc4-core</code> package is buggy and needs this flag to build
+shared libraries:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
+</pre></td></tr></table>
+
+<p>If you want to build FFmpeg with additional libraries, download Cygwin
+&quot;Devel&quot; packages for Ogg and Vorbis from any Cygwin packages repository:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">libogg-devel, libvorbis-devel
+</pre></td></tr></table>
+
+<p>These library packages are only available from
+<a href="http://sourceware.org/cygwinports/">Cygwin Ports</a>:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
+libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
+libxvidcore-devel
+</pre></td></tr></table>
+
+<p>The recommendation for libnut and x264 is to build them from source by
+yourself, as they evolve too quickly for Cygwin Ports to be up to date.
+</p>
+<p>Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
+of the <code>libgetaddrinfo-devel</code> package, available at Cygwin Ports.
+</p>
+<a name="Crosscompilation-for-Windows-under-Cygwin"></a>
+<h3 class="subsection"><a href="general.html#toc-Crosscompilation-for-Windows-under-Cygwin">3.4.5 Crosscompilation for Windows under Cygwin</a></h3>
+
+<p>With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
+</p>
+<p>Just install your Cygwin as explained before, plus these additional
+&quot;Devel&quot; packages:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">gcc-mingw-core, mingw-runtime, mingw-zlib
+</pre></td></tr></table>
+
+<p>and add some special flags to your configure invocation.
+</p>
+<p>For a static build run
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
+</pre></td></tr></table>
+
+<p>and for a build with shared libraries
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
+</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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/doc/libavfilter.html b/ffmpeg 0.8/doc/libavfilter.html
new file mode 100644 (file)
index 0000000..33bd898
--- /dev/null
@@ -0,0 +1,2487 @@
+<!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
+texi2html was written by: 
+            Lionel Cons <Lionel.Cons@cern.ch> (original author)
+            Karl Berry  <karl@freefriends.org>
+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <texi2html-bug@nongnu.org>
+-->
+<head>
+<title>Libavfilter Documentation</title>
+
+<meta name="description" content="Libavfilter Documentation">
+<meta name="keywords" content="Libavfilter Documentation">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html 1.82">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+<a name="SEC_Top"></a>
+<h1 class="settitle">Libavfilter Documentation</h1>
+
+<a name="SEC_Contents"></a>
+<h1>Table of Contents</h1>
+<div class="contents">
+
+<ul class="toc">
+  <li><a name="toc-Introduction" href="#Introduction">1. Introduction</a></li>
+  <li><a name="toc-Tutorial" href="#Tutorial">2. Tutorial</a></li>
+  <li><a name="toc-graph2dot" href="#graph2dot">3. graph2dot</a></li>
+  <li><a name="toc-Filtergraph-description" href="#Filtergraph-description">4. Filtergraph description</a>
+  <ul class="toc">
+    <li><a name="toc-Filtergraph-syntax" href="#Filtergraph-syntax">4.1 Filtergraph syntax</a></li>
+  </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>
+  </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Filters" href="#Video-Filters">8. Video Filters</a>
+  <ul class="toc">
+    <li><a name="toc-blackframe" href="#blackframe">8.1 blackframe</a></li>
+    <li><a name="toc-boxblur" href="#boxblur">8.2 boxblur</a></li>
+    <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>
+    <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>
+    </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>
+  </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>
+  </ul></li>
+  <li><a name="toc-Video-Sinks" href="#Video-Sinks">10. Video Sinks</a>
+  <ul class="toc">
+    <li><a name="toc-buffersink" href="#buffersink">10.1 buffersink</a></li>
+    <li><a name="toc-nullsink" href="#nullsink">10.2 nullsink</a></li>
+  </ul>
+</li>
+</ul>
+</div>
+
+<hr size="1">
+<a name="Introduction"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Introduction">1. Introduction</a></h1>
+
+<p>Libavfilter is the filtering API of FFmpeg. It is the substitute of the
+now deprecated &rsquo;vhooks&rsquo; and started as a Google Summer of Code project.
+</p>
+<p>Integrating libavfilter into the main FFmpeg repository is a work in
+progress. If you wish to try the unfinished development code of
+libavfilter then check it out from the libavfilter repository into
+some directory of your choice by:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">   svn checkout svn://svn.ffmpeg.org/soc/libavfilter
+</pre></td></tr></table>
+
+<p>And then read the README file in the top directory to learn how to
+integrate it into ffmpeg and ffplay.
+</p>
+<p>But note that there may still be serious bugs in the code and its API
+and ABI should not be considered stable yet!
+</p>
+<a name="Tutorial"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Tutorial">2. Tutorial</a></h1>
+
+<p>In libavfilter, it is possible for filters to have multiple inputs and
+multiple outputs.
+To illustrate the sorts of things that are possible, we can
+use a complex filter graph. For example, the following one:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">input --&gt; split --&gt; fifo -----------------------&gt; overlay --&gt; output
+            |                                        ^
+            |                                        |
+            +------&gt; fifo --&gt; crop --&gt; vflip --------+
+</pre></td></tr></table>
+
+<p>splits the stream in two streams, sends one stream through the crop filter
+and the vflip filter before merging it back with the other stream by
+overlaying it on top. You can use the following command to achieve this:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -s 240x320 -vf &quot;[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2]
+</pre></td></tr></table>
+
+<p>where input_video.avi has a vertical resolution of 480 pixels. The
+result will be that in output the top half of the video is mirrored
+onto the bottom half.
+</p>
+<p>Video filters are loaded using the <var>-vf</var> option passed to
+ffmpeg or to ffplay. Filters in the same linear chain are separated by
+commas. In our example, <var>split, fifo, overlay</var> are in one linear
+chain, and <var>fifo, crop, vflip</var> are in another. The points where
+the linear chains join are labeled by names enclosed in square
+brackets. In our example, that is <var>[T1]</var> and <var>[T2]</var>. The magic
+labels <var>[in]</var> and <var>[out]</var> are the points where video is input
+and output.
+</p>
+<p>Some filters take in input a list of parameters: they are specified
+after the filter name and an equal sign, and are separated each other
+by a semicolon.
+</p>
+<p>There exist so-called <var>source filters</var> that do not have a video
+input, and we expect in the future some <var>sink filters</var> that will
+not have video output.
+</p>
+<a name="graph2dot"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-graph2dot">3. graph2dot</a></h1>
+
+<p>The &lsquo;<tt>graph2dot</tt>&rsquo; program included in the FFmpeg &lsquo;<tt>tools</tt>&rsquo;
+directory can be used to parse a filter graph description and issue a
+corresponding textual representation in the dot language.
+</p>
+<p>Invoke the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">graph2dot -h
+</pre></td></tr></table>
+
+<p>to see how to use &lsquo;<tt>graph2dot</tt>&rsquo;.
+</p>
+<p>You can then pass the dot description to the &lsquo;<tt>dot</tt>&rsquo; program (from
+the graphviz suite of programs) and obtain a graphical representation
+of the filter graph.
+</p>
+<p>For example the sequence of commands:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">echo <var>GRAPH_DESCRIPTION</var> | \
+tools/graph2dot -o graph.tmp &amp;&amp; \
+dot -Tpng graph.tmp -o graph.png &amp;&amp; \
+display graph.png
+</pre></td></tr></table>
+
+<p>can be used to create and display an image representing the graph
+described by the <var>GRAPH_DESCRIPTION</var> string.
+</p>
+<a name="Filtergraph-description"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Filtergraph-description">4. Filtergraph description</a></h1>
+
+<p>A filtergraph is a directed graph of connected filters. It can contain
+cycles, and there can be multiple links between a pair of
+filters. Each link has one input pad on one side connecting it to one
+filter from which it takes its input, and one output pad on the other
+side connecting it to the one filter accepting its output.
+</p>
+<p>Each filter in a filtergraph is an instance of a filter class
+registered in the application, which defines the features and the
+number of input and output pads of the filter.
+</p>
+<p>A filter with no input pads is called a &quot;source&quot;, a filter with no
+output pads is called a &quot;sink&quot;.
+</p>
+<a name="Filtergraph-syntax"></a>
+<h2 class="section"><a href="libavfilter.html#toc-Filtergraph-syntax">4.1 Filtergraph syntax</a></h2>
+
+<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
+&lsquo;<tt>libavfilter/avfiltergraph</tt>&rsquo;.
+</p>
+<p>A filterchain consists of a sequence of connected filters, each one
+connected to the previous one in the sequence. A filterchain is
+represented by a list of &quot;,&quot;-separated filter descriptions.
+</p>
+<p>A filtergraph consists of a sequence of filterchains. A sequence of
+filterchains is represented by a list of &quot;;&quot;-separated filterchain
+descriptions.
+</p>
+<p>A filter is represented by a string of the form:
+[<var>in_link_1</var>]...[<var>in_link_N</var>]<var>filter_name</var>=<var>arguments</var>[<var>out_link_1</var>]...[<var>out_link_M</var>]
+</p>
+<p><var>filter_name</var> is the name of the filter class of which the
+described filter is an instance of, and has to be the name of one of
+the filter classes registered in the program.
+The name of the filter class is optionally followed by a string
+&quot;=<var>arguments</var>&quot;.
+</p>
+<p><var>arguments</var> is a string which contains the parameters used to
+initialize the filter instance, and are described in the filter
+descriptions below.
+</p>
+<p>The list of arguments can be quoted using the character &quot;&rsquo;&quot; as initial
+and ending mark, and the character &rsquo;\&rsquo; for escaping the characters
+within the quoted text; otherwise the argument string is considered
+terminated when the next special character (belonging to the set
+&quot;[]=;,&quot;) is encountered.
+</p>
+<p>The name and arguments of the filter are optionally preceded and
+followed by a list of link labels.
+A link label allows to name a link and associate it to a filter output
+or input pad. The preceding labels <var>in_link_1</var>
+... <var>in_link_N</var>, are associated to the filter input pads,
+the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
+associated to the output pads.
+</p>
+<p>When two link labels with the same name are found in the
+filtergraph, a link between the corresponding input and output pad is
+created.
+</p>
+<p>If an output pad is not labelled, it is linked by default to the first
+unlabelled input pad of the next filter in the filterchain.
+For example in the filterchain:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
+</pre></td></tr></table>
+<p>the split filter instance has two output pads, and the overlay filter
+instance two input pads. The first output pad of split is labelled
+&quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
+output pad of split is linked to the second input pad of overlay,
+which are both unlabelled.
+</p>
+<p>In a complete filterchain all the unlabelled filter input and output
+pads must be connected. A filtergraph is considered valid if all the
+filter input and output pads of all the filterchains are connected.
+</p>
+<p>Follows a BNF description for the filtergraph syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>NAME</var>             ::= sequence of alphanumeric characters and '_'
+<var>LINKLABEL</var>        ::= &quot;[&quot; <var>NAME</var> &quot;]&quot;
+<var>LINKLABELS</var>       ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
+<var>FILTER_ARGUMENTS</var> ::= sequence of chars (eventually quoted)
+<var>FILTER</var>           ::= [<var>LINKNAMES</var>] <var>NAME</var> [&quot;=&quot; <var>ARGUMENTS</var>] [<var>LINKNAMES</var>]
+<var>FILTERCHAIN</var>      ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
+<var>FILTERGRAPH</var>      ::= <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
+</pre></td></tr></table>
+
+
+<a name="Audio-Filters"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Audio-Filters">5. Audio Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the audio filters included in your
+build.
+</p>
+<p>Below is a description of the currently available audio filters.
+</p>
+<a name="anull"></a>
+<h2 class="section"><a href="libavfilter.html#toc-anull">5.1 anull</a></h2>
+
+<p>Pass the audio source unchanged to the output.
+</p>
+
+<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="anullsrc"></a>
+<h2 class="section"><a href="libavfilter.html#toc-anullsrc">6.1 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>
+<p>It accepts as optional parameter a string of the form
+<var>sample_rate</var>:<var>channel_layout</var>.
+</p>
+<p><var>sample_rate</var> specify the sample rate, and defaults to 44100.
+</p>
+<p><var>channel_layout</var> specify the channel layout, and can be either an
+integer or a string representing a channel layout. The default value
+of <var>channel_layout</var> is 3, which corresponds to CH_LAYOUT_STEREO.
+</p>
+<p>Check the channel_layout_map definition in
+&lsquo;<tt>libavcodec/audioconvert.c</tt>&rsquo; for the mapping between strings and
+channel layout values.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">#  set the sample rate to 48000 Hz and the channel layout to CH_LAYOUT_MONO.
+anullsrc=48000:4
+
+# same as
+anullsrc=48000:mono
+</pre></td></tr></table>
+
+
+<a name="Audio-Sinks"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Audio-Sinks">7. Audio Sinks</a></h1>
+
+<p>Below is a description of the currently available audio sinks.
+</p>
+<a name="anullsink"></a>
+<h2 class="section"><a href="libavfilter.html#toc-anullsink">7.1 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
+tools.
+</p>
+
+<a name="Video-Filters"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Video-Filters">8. Video Filters</a></h1>
+
+<p>When you configure your FFmpeg build, you can disable any of the
+existing filters using &ndash;disable-filters.
+The configure output will show the video filters included in your
+build.
+</p>
+<p>Below is a description of the currently available video filters.
+</p>
+<a name="blackframe"></a>
+<h2 class="section"><a href="libavfilter.html#toc-blackframe">8.1 blackframe</a></h2>
+
+<p>Detect frames that are (almost) completely black. Can be useful to
+detect chapter transitions or commercials. Output lines consist of
+the frame number of the detected frame, the percentage of blackness,
+the position in the file if known or -1 and the timestamp in seconds.
+</p>
+<p>In order to display the output lines, you need to set the loglevel at
+least to the AV_LOG_INFO value.
+</p>
+<p>The filter accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">blackframe[=<var>amount</var>:[<var>threshold</var>]]
+</pre></td></tr></table>
+
+<p><var>amount</var> is the percentage of the pixels that have to be below the
+threshold, and defaults to 98.
+</p>
+<p><var>threshold</var> is the threshold below which a pixel value is
+considered black, and defaults to 32.
+</p>
+<a name="boxblur"></a>
+<h2 class="section"><a href="libavfilter.html#toc-boxblur">8.2 boxblur</a></h2>
+
+<p>Apply boxblur algorithm to the input video.
+</p>
+<p>This filter accepts the parameters:
+<var>luma_power</var>:<var>luma_radius</var>:<var>chroma_radius</var>:<var>chroma_power</var>:<var>alpha_radius</var>:<var>alpha_power</var>
+</p>
+<p>Chroma and alpha parameters are optional, if not specified they default
+to the corresponding values set for <var>luma_radius</var> and
+<var>luma_power</var>.
+</p>
+<p><var>luma_radius</var>, <var>chroma_radius</var>, and <var>alpha_radius</var> represent
+the radius in pixels of the box used for blurring the corresponding
+input plane. They are expressions, and can contain the following
+constants:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>cw, ch</samp>&rsquo;</dt>
+<dd><p>the input chroma image width and height in pixels
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>The radius must be a non-negative number, and must be not greater than
+the value of the expression <code>min(w,h)/2</code> for the luma and alpha planes,
+and of <code>min(cw,ch)/2</code> for the chroma planes.
+</p>
+<p><var>luma_power</var>, <var>chroma_power</var>, and <var>alpha_power</var> represent
+how many times the boxblur filter is applied to the corresponding
+plane.
+</p>
+<p>Some examples follow:
+</p>
+<ul>
+<li>
+Apply a boxblur filter with luma, chroma, and alpha radius
+set to 2:
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1
+</pre></td></tr></table>
+
+</li><li>
+Set luma radius to 2, alpha and chroma radius to 0
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=2:1:0:0:0:0
+</pre></td></tr></table>
+
+</li><li>
+Set luma and chroma radius to a fraction of the video dimension
+<table><tr><td>&nbsp;</td><td><pre class="example">boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
+</pre></td></tr></table>
+
+</li></ul>
+
+<a name="copy"></a>
+<h2 class="section"><a href="libavfilter.html#toc-copy">8.3 copy</a></h2>
+
+<p>Copy the input source unchanged to the output. Mainly useful for
+testing purposes.
+</p>
+<a name="crop"></a>
+<h2 class="section"><a href="libavfilter.html#toc-crop">8.4 crop</a></h2>
+
+<p>Crop the input video to <var>out_w</var>:<var>out_h</var>:<var>x</var>:<var>y</var>.
+</p>
+<p>The parameters are expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>the computed values for <var>x</var> and <var>y</var>. They are evaluated for
+each new frame.
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the number of input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the input frame, NAN if unknown
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
+</p>
+</dd>
+</dl>
+
+<p>The <var>out_w</var> and <var>out_h</var> parameters specify the expressions for
+the width and height of the output (cropped) video. They are
+evaluated just at the configuration of the filter.
+</p>
+<p>The default value of <var>out_w</var> is &quot;in_w&quot;, and the default value of
+<var>out_h</var> is &quot;in_h&quot;.
+</p>
+<p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
+and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
+cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
+evaluated after <var>out_w</var> and <var>out_h</var>.
+</p>
+<p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
+position of the top-left corner of the output (non-cropped) area. They
+are evaluated for each frame. If the evaluated value is not valid, it
+is approximated to the nearest valid value.
+</p>
+<p>The default value of <var>x</var> is &quot;(in_w-out_w)/2&quot;, and the default
+value for <var>y</var> is &quot;(in_h-out_h)/2&quot;, which set the cropped area at
+the center of the input image.
+</p>
+<p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
+for <var>y</var> may depend on <var>x</var>.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># crop the central input area with size 100x100
+crop=100:100
+
+# crop the central input area with size 2/3 of the input video
+&quot;crop=2/3*in_w:2/3*in_h&quot;
+
+# crop the input video central square
+crop=in_h
+
+# delimit the rectangle with the top-left corner placed at position
+# 100:100 and the right-bottom corner corresponding to the right-bottom
+# corner of the input image.
+crop=in_w-100:in_h-100:100:100
+
+# crop 10 pixels from the left and right borders, and 20 pixels from
+# the top and bottom borders
+&quot;crop=in_w-2*10:in_h-2*20&quot;
+
+# keep only the bottom right quarter of the input image
+&quot;crop=in_w/2:in_h/2:in_w/2:in_h/2&quot;
+
+# crop height for getting Greek harmony
+&quot;crop=in_w:1/PHI*in_w&quot;
+
+# trembling effect
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)&quot;
+
+# erratic camera effect depending on timestamp
+&quot;crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)&quot;
+
+# set x depending on the value of y
+&quot;crop=in_w/2:in_h/2:y:10+10*sin(n/10)&quot;
+</pre></td></tr></table>
+
+<a name="cropdetect"></a>
+<h2 class="section"><a href="libavfilter.html#toc-cropdetect">8.5 cropdetect</a></h2>
+
+<p>Auto-detect crop size.
+</p>
+<p>Calculate necessary cropping parameters and prints the recommended
+parameters through the logging system. The detected dimensions
+correspond to the non-black area of the input video.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">cropdetect[=<var>limit</var>[:<var>round</var>[:<var>reset</var>]]]
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>limit</samp>&rsquo;</dt>
+<dd><p>Threshold, which can be optionally specified from nothing (0) to
+everything (255), defaults to 24.
+</p>
+</dd>
+<dt> &lsquo;<samp>round</samp>&rsquo;</dt>
+<dd><p>Value which the width/height should be divisible by, defaults to
+16. The offset is automatically adjusted to center the video. Use 2 to
+get only even dimensions (needed for 4:2:2 video). 16 is best when
+encoding to most video codecs.
+</p>
+</dd>
+<dt> &lsquo;<samp>reset</samp>&rsquo;</dt>
+<dd><p>Counter that determines after how many frames cropdetect will reset
+the previously detected largest video area and start over to detect
+the current optimal crop area. Defaults to 0.
+</p>
+<p>This can be useful when channel logos distort the video area. 0
+indicates never reset and return the largest area encountered during
+playback.
+</p></dd>
+</dl>
+
+<a name="drawbox"></a>
+<h2 class="section"><a href="libavfilter.html#toc-drawbox">8.6 drawbox</a></h2>
+
+<p>Draw a colored box on the input image.
+</p>
+<p>It accepts the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawbox=<var>x</var>:<var>y</var>:<var>width</var>:<var>height</var>:<var>color</var>
+</pre></td></tr></table>
+
+<dl compact="compact">
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>Specify the top left corner coordinates of the box. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the box, if 0 they are interpreted as
+the input width and height. Default to 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the box to write, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p></dd>
+</dl>
+
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw a black box around the edge of the input image
+drawbox
+
+# draw a box with color red and an opacity of 50%
+drawbox=10:20:200:60:red@0.5&quot;
+</pre></td></tr></table>
+
+<a name="drawtext"></a>
+<h2 class="section"><a href="libavfilter.html#toc-drawtext">8.7 drawtext</a></h2>
+
+<p>Draw text string or text from specified file on top of video using the
+libfreetype library.
+</p>
+<p>To enable compilation of this filter you need to configure FFmpeg with
+<code>--enable-libfreetype</code>.
+</p>
+<p>The filter also recognizes strftime() sequences in the provided text
+and expands them accordingly. Check the documentation of strftime().
+</p>
+<p>The filter accepts parameters as a list of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;.
+</p>
+<p>The description of the accepted parameters follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>fontfile</samp>&rsquo;</dt>
+<dd><p>The font file to be used for drawing text. Path must be included.
+This parameter is mandatory.
+</p>
+</dd>
+<dt> &lsquo;<samp>text</samp>&rsquo;</dt>
+<dd><p>The text string to be drawn. The text must be a sequence of UTF-8
+encoded characters.
+This parameter is mandatory if no file is specified with the parameter
+<var>textfile</var>.
+</p>
+</dd>
+<dt> &lsquo;<samp>textfile</samp>&rsquo;</dt>
+<dd><p>A text file containing text to be drawn. The text must be a sequence
+of UTF-8 encoded characters.
+</p>
+<p>This parameter is mandatory if no text string is specified with the
+parameter <var>text</var>.
+</p>
+<p>If both text and textfile are specified, an error is thrown.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>The offsets where text will be drawn within the video frame.
+Relative to the top/left border of the output image.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontsize</samp>&rsquo;</dt>
+<dd><p>The font size to be used for drawing text.
+The default value of <var>fontsize</var> is 16.
+</p>
+</dd>
+<dt> &lsquo;<samp>fontcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing fonts.
+Either a string (e.g. &quot;red&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff000033&quot;), possibly followed by an alpha specifier.
+The default value of <var>fontcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>boxcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing box around text.
+Either a string (e.g. &quot;yellow&quot;) or in 0xRRGGBB[AA] format
+(e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>boxcolor</var> is &quot;white&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>box</samp>&rsquo;</dt>
+<dd><p>Used to draw a box around text using background color.
+Value should be either 1 (enable) or 0 (disable).
+The default value of <var>box</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowx, shadowy</samp>&rsquo;</dt>
+<dd><p>The x and y offsets for the text shadow position with respect to the
+position of the text. They can be either positive or negative
+values. Default value for both is &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>shadowcolor</samp>&rsquo;</dt>
+<dd><p>The color to be used for drawing a shadow behind the drawn text.  It
+can be a color name (e.g. &quot;yellow&quot;) or a string in the 0xRRGGBB[AA]
+form (e.g. &quot;0xff00ff&quot;), possibly followed by an alpha specifier.
+The default value of <var>shadowcolor</var> is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>ft_load_flags</samp>&rsquo;</dt>
+<dd><p>Flags to be used for loading the fonts.
+</p>
+<p>The flags map the corresponding flags supported by libfreetype, and are
+a combination of the following values:
+</p><dl compact="compact">
+<dt> <var>default</var></dt>
+<dt> <var>no_scale</var></dt>
+<dt> <var>no_hinting</var></dt>
+<dt> <var>render</var></dt>
+<dt> <var>no_bitmap</var></dt>
+<dt> <var>vertical_layout</var></dt>
+<dt> <var>force_autohint</var></dt>
+<dt> <var>crop_bitmap</var></dt>
+<dt> <var>pedantic</var></dt>
+<dt> <var>ignore_global_advance_width</var></dt>
+<dt> <var>no_recurse</var></dt>
+<dt> <var>ignore_transform</var></dt>
+<dt> <var>monochrome</var></dt>
+<dt> <var>linear_design</var></dt>
+<dt> <var>no_autohint</var></dt>
+<dt> <var>end table</var></dt>
+</dl>
+
+<p>Default value is &quot;render&quot;.
+</p>
+<p>For more information consult the documentation for the FT_LOAD_*
+libfreetype flags.
+</p>
+</dd>
+<dt> &lsquo;<samp>tabsize</samp>&rsquo;</dt>
+<dd><p>The size in number of spaces to use for rendering the tab.
+Default value is 4.
+</p></dd>
+</dl>
+
+<p>For example the command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
+</pre></td></tr></table>
+
+<p>will draw &quot;Test Text&quot; with font FreeSerif, using the default values
+for the optional parameters.
+</p>
+<p>The command:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
+          x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
+</pre></td></tr></table>
+
+<p>will draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
+and y=50 (counting from the top-left corner of the screen), text is
+yellow with a red box around it. Both the text and the box have an
+opacity of 20%.
+</p>
+<p>Note that the double quotes are not necessary if spaces are not used
+within the parameter list.
+</p>
+<p>For more information about libfreetype, check:
+<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>
+
+<p>Apply fade-in/out effect to input video.
+</p>
+<p>It accepts the parameters:
+<var>type</var>:<var>start_frame</var>:<var>nb_frames</var>
+</p>
+<p><var>type</var> specifies if the effect type, can be either &quot;in&quot; for
+fade-in, or &quot;out&quot; for a fade-out effect.
+</p>
+<p><var>start_frame</var> specifies the number of the start frame for starting
+to apply the fade effect.
+</p>
+<p><var>nb_frames</var> specifies the number of frames for which the fade
+effect has to last. At the end of the fade-in effect the output video
+will have the same intensity as the input video, at the end of the
+fade-out transition the output video will be completely black.
+</p>
+<p>A few usage examples follow, usable too as test scenarios.
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># fade in first 30 frames of video
+fade=in:0:30
+
+# fade out last 45 frames of a 200-frame video
+fade=out:155:45
+
+# fade in first 25 frames and fade out last 25 frames of a 1000-frame video
+fade=in:0:25, fade=out:975:25
+
+# make first 5 frames black, then fade in from frame 5-24
+fade=in:5:20
+</pre></td></tr></table>
+
+<a name="fieldorder"></a>
+<h2 class="section"><a href="libavfilter.html#toc-fieldorder">8.9 fieldorder</a></h2>
+
+<p>Transform the field order of the input video.
+</p>
+<p>It accepts one parameter which specifies the required field order that
+the input interlaced video will be transformed to. The parameter can
+assume one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0 or bff</samp>&rsquo;</dt>
+<dd><p>output bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1 or tff</samp>&rsquo;</dt>
+<dd><p>output top field first
+</p></dd>
+</dl>
+
+<p>Default value is &quot;tff&quot;.
+</p>
+<p>Transformation is achieved by shifting the picture content up or down
+by one line, and filling the remaining line with appropriate picture content.
+This method is consistent with most broadcast field order converters.
+</p>
+<p>If the input video is not flagged as being interlaced, or it is already
+flagged as being of the required output field order then this filter does
+not alter the incoming video.
+</p>
+<p>This filter is very useful when converting to or from PAL DV material,
+which is bottom field first.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
+</pre></td></tr></table>
+
+<a name="fifo"></a>
+<h2 class="section"><a href="libavfilter.html#toc-fifo">8.10 fifo</a></h2>
+
+<p>Buffer input images and send them when they are requested.
+</p>
+<p>This filter is mainly useful when auto-inserted by the libavfilter
+framework.
+</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>
+
+<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
+the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># convert the input video to the format &quot;yuv420p&quot;
+format=yuv420p
+
+# convert the input video to any of the formats in the list
+format=yuv420p:yuv444p:yuv410p
+</pre></td></tr></table>
+
+<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>
+
+<p>Apply a frei0r effect to the input video.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The filter supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>filter_name</var>[{:|=}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>filter_name</var> is the name to the frei0r effect to load. If the
+environment variable <code>FREI0R_PATH</code> is defined, the frei0r effect
+is searched in each one of the directories specified by the colon
+separated list in <code>FREIOR_PATH</code>, otherwise in the standard frei0r
+paths, which are in this order: &lsquo;<tt>HOME/.frei0r-1/lib/</tt>&rsquo;,
+&lsquo;<tt>/usr/local/lib/frei0r-1/</tt>&rsquo;, &lsquo;<tt>/usr/lib/frei0r-1/</tt>&rsquo;.
+</p>
+<p><var>param1</var>, <var>param2</var>, ... , <var>paramN</var> specify the parameters
+for the frei0r effect.
+</p>
+<p>A frei0r effect parameter can be a boolean (whose values are specified
+with &quot;y&quot; and &quot;n&quot;), a double, a color (specified by the syntax
+<var>R</var>/<var>G</var>/<var>B</var>, <var>R</var>, <var>G</var>, and <var>B</var> being float
+numbers from 0.0 to 1.0) or by an <code>av_parse_color()</code> color
+description), a position (specified by the syntax <var>X</var>/<var>Y</var>,
+<var>X</var> and <var>Y</var> being float numbers) and a string.
+</p>
+<p>The number and kind of parameters depend on the loaded effect. If an
+effect parameter is not specified the default value is set.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># apply the distort0r effect, set the first two double parameters
+frei0r=distort0r:0.5:0.01
+
+# apply the colordistance effect, takes a color as first parameter
+frei0r=colordistance:0.2/0.3/0.4
+frei0r=colordistance:violet
+frei0r=colordistance:0x112233
+
+# apply the perspective effect, specify the top left and top right
+# image positions
+frei0r=perspective:0.2/0.2:0.8/0.2
+</pre></td></tr></table>
+
+<p>For more information see:
+<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>
+
+<p>Fix the banding artifacts that are sometimes introduced into nearly flat
+regions by truncation to 8bit colordepth.
+Interpolate the gradients that should go where the bands are, and
+dither them.
+</p>
+<p>This filter is designed for playback only.  Do not use it prior to
+lossy compression, because compression tends to lose the dither and
+bring back the bands.
+</p>
+<p>The filter takes two optional parameters, separated by &rsquo;:&rsquo;:
+<var>strength</var>:<var>radius</var>
+</p>
+<p><var>strength</var> is the maximum amount by which the filter will change
+any one pixel. Also the threshold for detecting nearly flat
+regions. Acceptable values range from .51 to 255, default value is
+1.2, out-of-range values will be clipped to the valid range.
+</p>
+<p><var>radius</var> is the neighborhood to fit the gradient to. A larger
+radius makes for smoother gradients, but also prevents the filter from
+modifying the pixels near detailed regions. Acceptable values are
+8-32, default value is 16, out-of-range values will be clipped to the
+valid range.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># default parameters
+gradfun=1.2:16
+
+# omitting radius
+gradfun=1.2
+</pre></td></tr></table>
+
+<a name="hflip"></a>
+<h2 class="section"><a href="libavfilter.html#toc-hflip">8.14 hflip</a></h2>
+
+<p>Flip the input video horizontally.
+</p>
+<p>For example to horizontally flip the video in input with
+&lsquo;<tt>ffmpeg</tt>&rsquo;:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="hqdn3d"></a>
+<h2 class="section"><a href="libavfilter.html#toc-hqdn3d">8.15 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
+still. It should enhance compressibility.
+</p>
+<p>It accepts the following optional parameters:
+<var>luma_spatial</var>:<var>chroma_spatial</var>:<var>luma_tmp</var>:<var>chroma_tmp</var>
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial luma strength,
+defaults to 4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_spatial</samp>&rsquo;</dt>
+<dd><p>a non-negative float number which specifies spatial chroma strength,
+defaults to 3.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies luma temporal strength, defaults to
+6.0*<var>luma_spatial</var>/4.0
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_tmp</samp>&rsquo;</dt>
+<dd><p>a float number which specifies chroma temporal strength, defaults to
+<var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>
+</p></dd>
+</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>
+
+<p>Compute a look-up table for binding each pixel component input value
+to an output value, and apply it to input video.
+</p>
+<p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
+to an RGB input video.
+</p>
+<p>These filters accept in input a &quot;:&quot;-separated list of options, which
+specify the expressions used for computing the lookup table for the
+corresponding pixel component values.
+</p>
+<p>The <var>lut</var> filter requires either YUV or RGB pixel formats in
+input, and accepts the options:
+</p><dl compact="compact">
+<dd><p><var>c0</var> (first  pixel component)
+<var>c1</var> (second pixel component)
+<var>c2</var> (third  pixel component)
+<var>c3</var> (fourth pixel component, corresponds to the alpha component)
+</p></dd>
+</dl>
+
+<p>The exact component associated to each option depends on the format in
+input.
+</p>
+<p>The <var>lutrgb</var> filter requires RGB pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>r</var> (red component)
+<var>g</var> (green component)
+<var>b</var> (blue component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The <var>lutyuv</var> filter requires YUV pixel formats in input, and
+accepts the options:
+</p><dl compact="compact">
+<dd><p><var>y</var> (Y/luminance component)
+<var>u</var> (U/Cb component)
+<var>v</var> (V/Cr component)
+<var>a</var> (alpha component)
+</p></dd>
+</dl>
+
+<p>The expressions can contain the following constants and functions:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), PHI (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>val</samp>&rsquo;</dt>
+<dd><p>input value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>clipval</samp>&rsquo;</dt>
+<dd><p>the input value clipped in the <var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>maxval</samp>&rsquo;</dt>
+<dd><p>maximum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>minval</samp>&rsquo;</dt>
+<dd><p>minimum value for the pixel component
+</p>
+</dd>
+<dt> &lsquo;<samp>negval</samp>&rsquo;</dt>
+<dd><p>the negated value for the pixel component value clipped in the
+<var>minval</var>-<var>maxval</var> range , it corresponds to the expression
+&quot;maxval-clipval+minval&quot;
+</p>
+</dd>
+<dt> &lsquo;<samp>clip(val)</samp>&rsquo;</dt>
+<dd><p>the computed value in <var>val</var> clipped in the
+<var>minval</var>-<var>maxval</var> range
+</p>
+</dd>
+<dt> &lsquo;<samp>gammaval(gamma)</samp>&rsquo;</dt>
+<dd><p>the computed gamma correction value of the pixel component value
+clipped in the <var>minval</var>-<var>maxval</var> range, corresponds to the
+expression
+&quot;pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval&quot;
+</p>
+</dd>
+</dl>
+
+<p>All expressions default to &quot;val&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># negate input video
+lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
+lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
+
+# the above is the same as
+lutrgb=&quot;r=negval:g=negval:b=negval&quot;
+lutyuv=&quot;y=negval:u=negval:v=negval&quot;
+
+# negate luminance
+lutyuv=negval
+
+# remove chroma components, turns the video into a graytone image
+lutyuv=&quot;u=128:v=128&quot;
+
+# apply a luma burning effect
+lutyuv=&quot;y=2*val&quot;
+
+# remove green and blue components
+lutrgb=&quot;g=0:b=0&quot;
+
+# set a constant alpha channel value on input
+format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
+
+# correct luminance gamma by a 0.5 factor
+lutyuv=y=gammaval(0.5)
+</pre></td></tr></table>
+
+<a name="mp"></a>
+<h2 class="section"><a href="libavfilter.html#toc-mp">8.17 mp</a></h2>
+
+<p>Apply an MPlayer filter to the input video.
+</p>
+<p>This filter provides a wrapper around most of the filters of
+MPlayer/MEncoder.
+</p>
+<p>This wrapper is considered experimental. Some of the wrapped filters
+may not work properly and we may drop support for them, as they will
+be implemented natively into FFmpeg. Thus you should avoid
+depending on them when writing portable scripts.
+</p>
+<p>The filters accepts the parameters:
+<var>filter_name</var>[:=]<var>filter_params</var>
+</p>
+<p><var>filter_name</var> is the name of a supported MPlayer filter,
+<var>filter_params</var> is a string containing the parameters accepted by
+the named filter.
+</p>
+<p>The list of the currently supported filters follows:
+</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>divtc</var></dt>
+<dt> <var>down3dright</var></dt>
+<dt> <var>dsize</var></dt>
+<dt> <var>eq2</var></dt>
+<dt> <var>eq</var></dt>
+<dt> <var>field</var></dt>
+<dt> <var>fil</var></dt>
+<dt> <var>fixpts</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>il</var></dt>
+<dt> <var>ilpack</var></dt>
+<dt> <var>ivtc</var></dt>
+<dt> <var>kerndeint</var></dt>
+<dt> <var>mcdeint</var></dt>
+<dt> <var>mirror</var></dt>
+<dt> <var>noise</var></dt>
+<dt> <var>ow</var></dt>
+<dt> <var>palette</var></dt>
+<dt> <var>perspective</var></dt>
+<dt> <var>phase</var></dt>
+<dt> <var>pp7</var></dt>
+<dt> <var>pullup</var></dt>
+<dt> <var>qp</var></dt>
+<dt> <var>rectangle</var></dt>
+<dt> <var>remove-logo</var></dt>
+<dt> <var>rotate</var></dt>
+<dt> <var>sab</var></dt>
+<dt> <var>screenshot</var></dt>
+<dt> <var>smartblur</var></dt>
+<dt> <var>softpulldown</var></dt>
+<dt> <var>softskip</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>
+<dt> <var>uspp</var></dt>
+<dt> <var>yuvcsp</var></dt>
+<dt> <var>yvu9</var></dt>
+</dl>
+
+<p>The parameter syntax and behavior for the listed filters are the same
+of the corresponding MPlayer filters. For detailed instructions check
+the &quot;VIDEO FILTERS&quot; section in the MPlayer manual.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># remove a logo by interpolating the surrounding pixels
+mp=delogo=200:200:80:20:1
+
+# adjust gamma, brightness, contrast
+mp=eq2=1.0:2:0.5
+
+# tweak hue and saturation
+mp=hue=100:-10
+</pre></td></tr></table>
+
+<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>
+
+<p>Negate input video.
+</p>
+<p>This filter accepts an integer in input, if non-zero it negates the
+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>
+
+<p>Force libavfilter not to use any of the specified pixel formats for the
+input to the next filter.
+</p>
+<p>The filter accepts a list of pixel format names, separated by &quot;:&quot;,
+for example &quot;yuv420p:monow:rgb24&quot;.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># force libavfilter to use a format different from &quot;yuv420p&quot; for the
+# input to the vflip filter
+noformat=yuv420p,vflip
+
+# convert the input video to any of the formats not contained in the list
+noformat=yuv420p:yuv444p:yuv410p
+</pre></td></tr></table>
+
+<a name="null"></a>
+<h2 class="section"><a href="libavfilter.html#toc-null">8.20 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>
+
+<p>Apply video transform using libopencv.
+</p>
+<p>To enable this filter install libopencv library and headers and
+configure FFmpeg with &ndash;enable-libopencv.
+</p>
+<p>The filter takes the parameters: <var>filter_name</var>{:=}<var>filter_params</var>.
+</p>
+<p><var>filter_name</var> is the name of the libopencv filter to apply.
+</p>
+<p><var>filter_params</var> specifies the parameters to pass to the libopencv
+filter. If not specified the default values are assumed.
+</p>
+<p>Refer to the official libopencv documentation for more precise
+informations:
+<a href="http://opencv.willowgarage.com/documentation/c/image_filtering.html">http://opencv.willowgarage.com/documentation/c/image_filtering.html</a>
+</p>
+<p>Follows the list of supported libopencv filters.
+</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>
+
+<p>Dilate an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvDilate</code>.
+</p>
+<p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>.
+</p>
+<p><var>struct_el</var> represents a structuring element, and has the syntax:
+<var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
+</p>
+<p><var>cols</var> and <var>rows</var> represent the number of colums and rows of
+the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
+point, and <var>shape</var> the shape for the structuring element, and
+can be one of the values &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, &quot;custom&quot;.
+</p>
+<p>If the value for <var>shape</var> is &quot;custom&quot;, it must be followed by a
+string of the form &quot;=<var>filename</var>&quot;. The file with name
+<var>filename</var> is assumed to represent a binary image, with each
+printable character corresponding to a bright pixel. When a custom
+<var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
+or columns and rows of the read file are assumed instead.
+</p>
+<p>The default value for <var>struct_el</var> is &quot;3x3+0x0/rect&quot;.
+</p>
+<p><var>nb_iterations</var> specifies the number of times the transform is
+applied to the image, and defaults to 1.
+</p>
+<p>Follow some example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># use the default values
+ocv=dilate
+
+# dilate using a structuring element with a 5x5 cross, iterate two times
+ocv=dilate=5x5+2x2/cross:2
+
+# read the shape from the file diamond.shape, iterate two times
+# the file diamond.shape may contain a pattern of characters like this:
+#   *
+#  ***
+# *****
+#  ***
+#   *
+# the specified cols and rows are ignored (but not the anchor point coordinates)
+ocv=0x0+2x2/custom=diamond.shape:2
+</pre></td></tr></table>
+
+<a name="erode"></a>
+<h3 class="subsection"><a href="libavfilter.html#toc-erode">8.21.2 erode</a></h3>
+
+<p>Erode an image by using a specific structuring element.
+This filter corresponds to the libopencv function <code>cvErode</code>.
+</p>
+<p>The filter accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
+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>
+
+<p>Smooth the input video.
+</p>
+<p>The filter takes the following parameters:
+<var>type</var>:<var>param1</var>:<var>param2</var>:<var>param3</var>:<var>param4</var>.
+</p>
+<p><var>type</var> is the type of smooth filter to apply, and can be one of
+the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
+&quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
+</p>
+<p><var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var> are
+parameters whose meanings depend on smooth type. <var>param1</var> and
+<var>param2</var> accept integer positive values or 0, <var>param3</var> and
+<var>param4</var> accept float values.
+</p>
+<p>The default value for <var>param1</var> is 3, the default value for the
+other parameters is 0.
+</p>
+<p>These parameters correspond to the parameters assigned to the
+libopencv function <code>cvSmooth</code>.
+</p>
+<a name="overlay"></a>
+<h2 class="section"><a href="libavfilter.html#toc-overlay">8.22 overlay</a></h2>
+
+<p>Overlay one video on top of another.
+</p>
+<p>It takes two inputs and one output, the first input is the &quot;main&quot;
+video on which the second input is overlayed.
+</p>
+<p>It accepts the parameters: <var>x</var>:<var>y</var>.
+</p>
+<p><var>x</var> is the x coordinate of the overlayed video on the main video,
+<var>y</var> is the y coordinate. The parameters are expressions containing
+the following parameters:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>main_w, main_h</samp>&rsquo;</dt>
+<dd><p>main input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>W, H</samp>&rsquo;</dt>
+<dd><p>same as <var>main_w</var> and <var>main_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>overlay_w, overlay_h</samp>&rsquo;</dt>
+<dd><p>overlay input width and height
+</p>
+</dd>
+<dt> &lsquo;<samp>w, h</samp>&rsquo;</dt>
+<dd><p>same as <var>overlay_w</var> and <var>overlay_h</var>
+</p></dd>
+</dl>
+
+<p>Be aware that frames are taken from each input video in timestamp
+order, hence, if their initial timestamps differ, it is a a good idea
+to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
+have them begin in the same zero timestamp, as it does the example for
+the <var>movie</var> filter.
+</p>
+<p>Follow some examples:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># draw the overlay at 10 pixels from the bottom right
+# corner of the main video.
+overlay=main_w-overlay_w-10:main_h-overlay_h-10
+
+# insert a transparent PNG logo in the bottom left corner of the input
+movie=logo.png [logo];
+[in][logo] overlay=10:main_h-overlay_h-10 [out]
+
+# insert 2 different transparent PNG logos (second logo on bottom
+# right corner):
+movie=logo1.png [logo1];
+movie=logo2.png [logo2];
+[in][logo1]       overlay=10:H-h-10 [in+logo1];
+[in+logo1][logo2] overlay=W-w-10:H-h-10 [out]
+
+# add a transparent color layer on top of the main video,
+# WxH specifies the size of the main input to the overlay filter
+color=red.3:WxH [over]; [in][over] overlay [out]
+</pre></td></tr></table>
+
+<p>You can chain togheter more overlays but the efficiency of such
+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>
+
+<p>Add paddings to the input image, and places the original input at the
+given coordinates <var>x</var>, <var>y</var>.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>x</var>:<var>y</var>:<var>color</var>.
+</p>
+<p>The parameters <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var> are
+expressions containing the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input video width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output width and heigth, that is the size of the padded area as
+specified by the <var>width</var> and <var>height</var> expressions
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd><p>x and y offsets as specified by the <var>x</var> and <var>y</var>
+expressions, or NAN if not yet specified
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd>
+<p>Specify the size of the output image with the paddings added. If the
+value for <var>width</var> or <var>height</var> is 0, the corresponding input size
+is used for the output.
+</p>
+<p>The <var>width</var> expression can reference the value set by the
+<var>height</var> expression, and viceversa.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>x, y</samp>&rsquo;</dt>
+<dd>
+<p>Specify the offsets where to place the input image in the padded area
+with respect to the top/left border of the output image.
+</p>
+<p>The <var>x</var> expression can reference the value set by the <var>y</var>
+expression, and viceversa.
+</p>
+<p>The default value of <var>x</var> and <var>y</var> is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd>
+<p>Specify the color of the padded area, it can be the name of a color
+(case insensitive match) or a 0xRRGGBB[AA] sequence.
+</p>
+<p>The default value of <var>color</var> is &quot;black&quot;.
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># Add paddings with color &quot;violet&quot; to the input video. Output video
+# size is 640x480, the top-left corner of the input video is placed at
+# column 0, row 40.
+pad=640:480:0:40:violet
+
+# pad the input to get an output with dimensions increased bt 3/2,
+# and put the input video at the center of the padded area
+pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a squared output with size equal to the maximum
+# value between the input width and height, and put the input video at
+# the center of the padded area
+pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
+
+# pad the input to get a final w/h ratio of 16:9
+pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
+
+# double output size and put the input video in the bottom-right
+# corner of the output padded area
+pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
+</pre></td></tr></table>
+
+<a name="pixdesctest"></a>
+<h2 class="section"><a href="libavfilter.html#toc-pixdesctest">8.24 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>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">format=monow, pixdesctest
+</pre></td></tr></table>
+
+<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>
+
+<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
+</p>
+<p>The parameters <var>width</var> and <var>height</var> are expressions containing
+the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
+<dd><p>the corresponding mathematical approximated values for e
+(euler number), pi (greek PI), phi (golden ratio)
+</p>
+</dd>
+<dt> &lsquo;<samp>in_w, in_h</samp>&rsquo;</dt>
+<dd><p>the input width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>iw, ih</samp>&rsquo;</dt>
+<dd><p>same as <var>in_w</var> and <var>in_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>out_w, out_h</samp>&rsquo;</dt>
+<dd><p>the output (cropped) width and heigth
+</p>
+</dd>
+<dt> &lsquo;<samp>ow, oh</samp>&rsquo;</dt>
+<dd><p>same as <var>out_w</var> and <var>out_h</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>dar, a</samp>&rsquo;</dt>
+<dd><p>input display aspect ratio, same as <var>iw</var> / <var>ih</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>input sample aspect ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
+<dd><p>horizontal and vertical chroma subsample values. For example for the
+pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
+</p></dd>
+</dl>
+
+<p>If the input image format is different from the format requested by
+the next filter, the scale filter will convert the input to the
+requested format.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is 0, the respective input
+size is used for the output.
+</p>
+<p>If the value for <var>width</var> or <var>height</var> is -1, the scale filter will
+use, for the respective output size, a value that maintains the aspect
+ratio of the input image.
+</p>
+<p>The default value of <var>width</var> and <var>height</var> is 0.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># scale the input video to a size of 200x100.
+scale=200:100
+
+# scale the input to 2x
+scale=2*iw:2*ih
+# the above is the same as
+scale=2*in_w:2*in_h
+
+# scale the input to half size
+scale=iw/2:ih/2
+
+# increase the width, and set the height to the same size
+scale=3/2*iw:ow
+
+# seek for Greek harmony
+scale=iw:1/PHI*iw
+scale=ih*PHI:ih
+
+# increase the height, and set the width to 3/2 of the height
+scale=3/2*oh:3/5*ih
+
+# increase the size, but make the size a multiple of the chroma
+scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
+
+# increase the width to a maximum of 500 pixels, keep the same input aspect ratio
+scale='min(500\, iw*3/2):-1'
+</pre></td></tr></table>
+
+<a name="select"></a>
+<h2 class="section"><a href="libavfilter.html#toc-select">8.26 select</a></h2>
+<p>Select frames to pass in output.
+</p>
+<p>It accepts in input an expression, which is evaluated for each input
+frame. If the expression is evaluated to a non-zero value, the frame
+is selected and passed to the output, otherwise it is discarded.
+</p>
+<p>The expression can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the filtered frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the selected frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_n</samp>&rsquo;</dt>
+<dd><p>the sequential number of the last selected frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>TB</samp>&rsquo;</dt>
+<dd><p>timebase of the input timestamps
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in <var>TB</var> units, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>t</samp>&rsquo;</dt>
+<dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
+expressed in seconds, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously filtered video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>prev_selected_t</samp>&rsquo;</dt>
+<dd><p>the PTS of the last previously selected video frame, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_pts</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>start_t</samp>&rsquo;</dt>
+<dd><p>the time of the first video frame in the video, NAN if undefined
+</p>
+</dd>
+<dt> &lsquo;<samp>pict_type</samp>&rsquo;</dt>
+<dd><p>the picture type of the filtered frame, can assume one of the following
+values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>PICT_TYPE_I</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_P</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_B</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_S</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SI</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_SP</samp>&rsquo;</dt>
+<dt> &lsquo;<samp>PICT_TYPE_BI</samp>&rsquo;</dt>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>interlace_type</samp>&rsquo;</dt>
+<dd><p>the frame interlace type, can assume one of the following values:
+</p><dl compact="compact">
+<dt> &lsquo;<samp>INTERLACE_TYPE_P</samp>&rsquo;</dt>
+<dd><p>the frame is progressive (not interlaced)
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_T</samp>&rsquo;</dt>
+<dd><p>the frame is top-field-first
+</p></dd>
+<dt> &lsquo;<samp>INTERLACE_TYPE_B</samp>&rsquo;</dt>
+<dd><p>the frame is bottom-field-first
+</p></dd>
+</dl>
+
+</dd>
+<dt> &lsquo;<samp>key</samp>&rsquo;</dt>
+<dd><p>1 if the filtered frame is a key-frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</dt>
+<dd><p>the position in the file of the filtered frame, -1 if the information
+is not available (e.g. for synthetic video)
+</p></dd>
+</dl>
+
+<p>The default value of the select expression is &quot;1&quot;.
+</p>
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># select all frames in input
+select
+
+# the above is the same as:
+select=1
+
+# skip all frames:
+select=0
+
+# select only I-frames
+select='eq(pict_type\,PICT_TYPE_I)'
+
+# select one frame every 100
+select='not(mod(n\,100))'
+
+# select only frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)'
+
+# select only I frames contained in the 10-20 time interval
+select='gte(t\,10)*lte(t\,20)*eq(pict_type\,PICT_TYPE_I)'
+
+# select frames with a minimum distance of 10 seconds
+select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Display Aspect Ratio for the filter output video.
+</p>
+<p>This is done by changing the specified Sample (aka Pixel) Aspect
+Ratio, according to the following equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that this filter does not modify the pixel dimensions of
+the video frame. Also the display aspect ratio set by this filter may
+be changed by later filters in the filterchain, e.g. in case of
+scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+display aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the display aspect ratio to 16:9, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setdar=16:9
+# the above is equivalent to
+setdar=1.77777
+</pre></td></tr></table>
+
+<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>
+
+<p>Change the PTS (presentation timestamp) of the input video frames.
+</p>
+<p>Accept in input an expression evaluated through the eval API, which
+can contain the following constants:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>PTS</samp>&rsquo;</dt>
+<dd><p>the presentation timestamp in input
+</p>
+</dd>
+<dt> &lsquo;<samp>PI</samp>&rsquo;</dt>
+<dd><p>Greek PI
+</p>
+</dd>
+<dt> &lsquo;<samp>PHI</samp>&rsquo;</dt>
+<dd><p>golden ratio
+</p>
+</dd>
+<dt> &lsquo;<samp>E</samp>&rsquo;</dt>
+<dd><p>Euler number
+</p>
+</dd>
+<dt> &lsquo;<samp>N</samp>&rsquo;</dt>
+<dd><p>the count of the input frame, starting from 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>STARTPTS</samp>&rsquo;</dt>
+<dd><p>the PTS of the first video frame
+</p>
+</dd>
+<dt> &lsquo;<samp>INTERLACED</samp>&rsquo;</dt>
+<dd><p>tell if the current frame is interlaced
+</p>
+</dd>
+<dt> &lsquo;<samp>POS</samp>&rsquo;</dt>
+<dd><p>original position in the file of the frame, or undefined if undefined
+for the current frame
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_INPTS</samp>&rsquo;</dt>
+<dd><p>previous input PTS
+</p>
+</dd>
+<dt> &lsquo;<samp>PREV_OUTPTS</samp>&rsquo;</dt>
+<dd><p>previous output PTS
+</p>
+</dd>
+</dl>
+
+<p>Some examples follow:
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># start counting PTS from zero
+setpts=PTS-STARTPTS
+
+# fast motion
+setpts=0.5*PTS
+
+# slow motion
+setpts=2.0*PTS
+
+# fixed rate 25 fps
+setpts=N/(25*TB)
+
+# fixed rate 25 fps with some jitter
+setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
+</pre></td></tr></table>
+
+<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>
+
+<p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
+</p>
+<p>Note that as a consequence of the application of this filter, the
+output display aspect ratio will change according to the following
+equation:
+<em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
+</p>
+<p>Keep in mind that the sample aspect ratio set by this filter may be
+changed by later filters in the filterchain, e.g. if another &quot;setsar&quot;
+or a &quot;setdar&quot; filter is applied.
+</p>
+<p>The filter accepts a parameter string which represents the wanted
+sample aspect ratio.
+The parameter can be a floating point number string, or an expression
+of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
+numerator and denominator of the aspect ratio.
+If the parameter is not specified, it is assumed the value &quot;0:1&quot;.
+</p>
+<p>For example to change the sample aspect ratio to 10:11, specify:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">setsar=10:11
+</pre></td></tr></table>
+
+<a name="settb"></a>
+<h2 class="section"><a href="libavfilter.html#toc-settb">8.30 settb</a></h2>
+
+<p>Set the timebase to use for the output frames timestamps.
+It is mainly useful for testing timebase configuration.
+</p>
+<p>It accepts in input an arithmetic expression representing a rational.
+The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;, &quot;AVTB&quot; (the
+default timebase), and &quot;intb&quot; (the input timebase).
+</p>
+<p>The default value for the input is &quot;intb&quot;.
+</p>
+<p>Follow some examples.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example"># set the timebase to 1/25
+settb=1/25
+
+# set the timebase to 1/10
+settb=0.1
+
+#set the timebase to 1001/1000
+settb=1+0.001
+
+#set the timebase to 2*intb
+settb=2*intb
+
+#set the default timebase value
+settb=AVTB
+</pre></td></tr></table>
+
+<a name="showinfo"></a>
+<h2 class="section"><a href="libavfilter.html#toc-showinfo">8.31 showinfo</a></h2>
+
+<p>Show a line containing various information for each input video frame.
+The input video 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> &lsquo;<samp>n</samp>&rsquo;</dt>
+<dd><p>sequential number of the input frame, starting from 0
+</p>
+</dd>
+<dt> &lsquo;<samp>pts</samp>&rsquo;</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.
+</p>
+</dd>
+<dt> &lsquo;<samp>pts_time</samp>&rsquo;</dt>
+<dd><p>Presentation TimeStamp of the input frame, expressed as a number of
+seconds
+</p>
+</dd>
+<dt> &lsquo;<samp>pos</samp>&rsquo;</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 video)
+</p>
+</dd>
+<dt> &lsquo;<samp>fmt</samp>&rsquo;</dt>
+<dd><p>pixel format name
+</p>
+</dd>
+<dt> &lsquo;<samp>sar</samp>&rsquo;</dt>
+<dd><p>sample aspect ratio of the input frame, expressed in the form
+<var>num</var>/<var>den</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>s</samp>&rsquo;</dt>
+<dd><p>size of the input frame, expressed in the form
+<var>width</var>x<var>height</var>
+</p>
+</dd>
+<dt> &lsquo;<samp>i</samp>&rsquo;</dt>
+<dd><p>interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
+for bottom field first)
+</p>
+</dd>
+<dt> &lsquo;<samp>iskey</samp>&rsquo;</dt>
+<dd><p>1 if the frame is a key frame, 0 otherwise
+</p>
+</dd>
+<dt> &lsquo;<samp>type</samp>&rsquo;</dt>
+<dd><p>picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
+P-frame, &quot;B&quot; for a B-frame, &quot;?&quot; for unknown type).
+Check also the documentation of the <code>AVPictureType</code> enum and of
+the <code>av_get_picture_type_char</code> function defined in
+&lsquo;<tt>libavutil/avutil.h</tt>&rsquo;.
+</p>
+</dd>
+<dt> &lsquo;<samp>checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of all the planes of the input frame
+</p>
+</dd>
+<dt> &lsquo;<samp>plane_checksum</samp>&rsquo;</dt>
+<dd><p>Adler-32 checksum of each plane of the input frame, expressed in the form
+&quot;[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]&quot;
+</p></dd>
+</dl>
+
+<a name="slicify"></a>
+<h2 class="section"><a href="libavfilter.html#toc-slicify">8.32 slicify</a></h2>
+
+<p>Pass the images of input video on to next video filter as multiple
+slices.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;slicify=32&quot; out.avi
+</pre></td></tr></table>
+
+<p>The filter accepts the slice height as parameter. If the parameter is
+not specified it will use the default value of 16.
+</p>
+<p>Adding this in the beginning of filter chains should make filtering
+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>
+
+<p>Pass on the input video to two outputs. Both outputs are identical to
+the input video.
+</p>
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">[in] split [splitout1][splitout2];
+[splitout1] crop=100:100:0:0    [cropout];
+[splitout2] pad=200:200:100:100 [padout];
+</pre></td></tr></table>
+
+<p>will create two separate outputs from the same input, one cropped and
+one padded.
+</p>
+<a name="transpose"></a>
+<h2 class="section"><a href="libavfilter.html#toc-transpose">8.34 transpose</a></h2>
+
+<p>Transpose rows with columns in the input video and optionally flip it.
+</p>
+<p>It accepts a parameter representing an integer, which can assume the
+values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     L.l
+. . -&gt;  . .
+l.r     R.r
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     l.L
+. . -&gt;  . .
+l.r     r.R
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees counterclockwise, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     R.r
+. . -&gt;  . .
+l.r     L.l
+</pre></td></tr></table>
+
+</dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">L.R     r.R
+. . -&gt;  . .
+l.r     l.L
+</pre></td></tr></table>
+</dd>
+</dl>
+
+<a name="unsharp"></a>
+<h2 class="section"><a href="libavfilter.html#toc-unsharp">8.35 unsharp</a></h2>
+
+<p>Sharpen or blur the input video.
+</p>
+<p>It accepts the following parameters:
+<var>luma_msize_x</var>:<var>luma_msize_y</var>:<var>luma_amount</var>:<var>chroma_msize_x</var>:<var>chroma_msize_y</var>:<var>chroma_amount</var>
+</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 &rsquo;5:5:1.0:0:0:0.0&rsquo;.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>luma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix horizontal size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the luma matrix vertical size. It can be an integer between 3
+and 13, default value is 5.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</dt>
+<dd><p>Set the luma effect strength. It can be a float number between -2.0
+and 5.0, default value is 1.0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_x</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>chroma_msize_y</samp>&rsquo;</dt>
+<dd><p>Set the chroma matrix vertical size. It can be an integer between 3
+and 13, default value is 0.
+</p>
+</dd>
+<dt> &lsquo;<samp>luma_amount</samp>&rsquo;</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>
+</dd>
+</dl>
+
+<table><tr><td>&nbsp;</td><td><pre class="example"># Strong luma sharpen effect parameters
+unsharp=7:7:2.5
+
+# Strong blur of both luma and chroma parameters
+unsharp=7:7:-2:7:7:-2
+
+# Use the default values with <code>ffmpeg</code>
+./ffmpeg -i in.avi -vf &quot;unsharp&quot; out.mp4
+</pre></td></tr></table>
+
+<a name="vflip"></a>
+<h2 class="section"><a href="libavfilter.html#toc-vflip">8.36 vflip</a></h2>
+
+<p>Flip the input video vertically.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
+</pre></td></tr></table>
+
+<a name="yadif"></a>
+<h2 class="section"><a href="libavfilter.html#toc-yadif">8.37 yadif</a></h2>
+
+<p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
+filter&quot;).
+</p>
+<p>It accepts the optional parameters: <var>mode</var>:<var>parity</var>:<var>auto</var>.
+</p>
+<p><var>mode</var> specifies the interlacing mode to adopt, accepts one of the
+following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each frame
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>output 1 frame for each field
+</p></dd>
+<dt> &lsquo;<samp>2</samp>&rsquo;</dt>
+<dd><p>like 0 but skips spatial interlacing check
+</p></dd>
+<dt> &lsquo;<samp>3</samp>&rsquo;</dt>
+<dd><p>like 1 but skips spatial interlacing check
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+<p><var>parity</var> specifies the picture field parity assumed for the input
+interlaced video, accepts one of the following values:
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>assume bottom field first
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>assume top field first
+</p></dd>
+<dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
+<dd><p>enable automatic detection
+</p></dd>
+</dl>
+
+<p>Default value is -1.
+If interlacing is unknown or decoder does not export this information,
+top field first will be assumed.
+</p>
+<p><var>auto</var> specifies if deinterlacer should trust the interlaced flag
+and only deinterlace frames marked as interlaced
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>0</samp>&rsquo;</dt>
+<dd><p>deinterlace all frames
+</p></dd>
+<dt> &lsquo;<samp>1</samp>&rsquo;</dt>
+<dd><p>only deinterlace frames marked as interlaced
+</p></dd>
+</dl>
+
+<p>Default value is 0.
+</p>
+
+<a name="Video-Sources"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Video-Sources">9. Video Sources</a></h1>
+
+<p>Below is a description of the currently available video sources.
+</p>
+<a name="buffer"></a>
+<h2 class="section"><a href="libavfilter.html#toc-buffer">9.1 buffer</a></h2>
+
+<p>Buffer video 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 &lsquo;<tt>libavfilter/vsrc_buffer.h</tt>&rsquo;.
+</p>
+<p>It accepts the following parameters:
+<var>width</var>:<var>height</var>:<var>pix_fmt_string</var>:<var>timebase_num</var>:<var>timebase_den</var>:<var>sample_aspect_ratio_num</var>:<var>sample_aspect_ratio.den</var>:<var>scale_params</var>
+</p>
+<p>All the parameters but <var>scale_params</var> need to be explicitely
+defined.
+</p>
+<p>Follows the list of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>width, height</samp>&rsquo;</dt>
+<dd><p>Specify the width and height of the buffered video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>pix_fmt_string</samp>&rsquo;</dt>
+<dd><p>A string representing the pixel format of the buffered video frames.
+It may be a number corresponding to a pixel format, or a pixel format
+name.
+</p>
+</dd>
+<dt> &lsquo;<samp>timebase_num, timebase_den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denomitor of the timebase assumed by the
+timestamps of the buffered frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>sample_aspect_ratio.num, sample_aspect_ratio.den</samp>&rsquo;</dt>
+<dd><p>Specify numerator and denominator of the sample aspect ratio assumed
+by the video frames.
+</p>
+</dd>
+<dt> &lsquo;<samp>scale_params</samp>&rsquo;</dt>
+<dd><p>Specify the optional parameters to be used for the scale filter which
+is automatically inserted when an input change is detected in the
+input size or format.
+</p></dd>
+</dl>
+
+<p>For example:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:yuv410p:1:24:1:1
+</pre></td></tr></table>
+
+<p>will instruct the source to accept video frames with size 320x240 and
+with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
+square pixels (1:1 sample aspect ratio).
+Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
+(check the enum PixelFormat definition in &lsquo;<tt>libavutil/pixfmt.h</tt>&rsquo;),
+this example corresponds to:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:6:1:24:1:1
+</pre></td></tr></table>
+
+<a name="color"></a>
+<h2 class="section"><a href="libavfilter.html#toc-color">9.2 color</a></h2>
+
+<p>Provide an uniformly colored input.
+</p>
+<p>It accepts the following parameters:
+<var>color</var>:<var>frame_size</var>:<var>frame_rate</var>
+</p>
+<p>Follows the description of the accepted parameters.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>color</samp>&rsquo;</dt>
+<dd><p>Specify the color of the source. It can be the name of a color (case
+insensitive match) or a 0xRRGGBB[AA] sequence, possibly followed by an
+alpha specifier. The default value is &quot;black&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_size</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>frame_rate</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+</dl>
+
+<p>For example the following graph description will generate a red source
+with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
+frames per second, which will be overlayed over the source connected
+to the pad with identifier &quot;in&quot;.
+</p>
+<table><tr><td>&nbsp;</td><td><pre class="example">&quot;color=red@0.2:qcif:10 [color]; [in][color] overlay [out]&quot;
+</pre></td></tr></table>
+
+<a name="movie"></a>
+<h2 class="section"><a href="libavfilter.html#toc-movie">9.3 movie</a></h2>
+
+<p>Read a video 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 &quot;:&quot;.
+</p>
+<p>The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>format_name, f</samp>&rsquo;</dt>
+<dd><p>Specifies 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> &lsquo;<samp>seek_point, sp</samp>&rsquo;</dt>
+<dd><p>Specifies 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 &quot;0&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>stream_index, si</samp>&rsquo;</dt>
+<dd><p>Specifies the index of the video stream to read. If the value is -1,
+the best suited video stream will be automatically selected. Default
+value is &quot;-1&quot;.
+</p>
+</dd>
+</dl>
+
+<p>This filter allows to overlay a second video on top of main input of
+a filtergraph as shown in this graph:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
+                                    ^
+                                    |
+movie --&gt; scale--&gt; deltapts1 -------+
+</pre></td></tr></table>
+
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># skip 3.2 seconds from the start of the avi file in.avi, and overlay it
+# on top of the input labelled as &quot;in&quot;.
+movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+# read from a video4linux2 device, and overlay it on top of the input
+# labelled as &quot;in&quot;
+movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
+[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
+
+</pre></td></tr></table>
+
+<a name="nullsrc"></a>
+<h2 class="section"><a href="libavfilter.html#toc-nullsrc">9.4 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.
+</p>
+<p>It accepts as optional parameter a string of the form
+<var>width</var>:<var>height</var>:<var>timebase</var>.
+</p>
+<p><var>width</var> and <var>height</var> specify the size of the configured
+source. The default values of <var>width</var> and <var>height</var> are
+respectively 352 and 288 (corresponding to the CIF size format).
+</p>
+<p><var>timebase</var> specifies an arithmetic expression representing a
+timebase. The expression can contain the constants &quot;PI&quot;, &quot;E&quot;, &quot;PHI&quot;,
+&quot;AVTB&quot; (the default timebase), and defaults to the value &quot;AVTB&quot;.
+</p>
+<a name="frei0r_005fsrc"></a>
+<h2 class="section"><a href="libavfilter.html#toc-frei0r_005fsrc">9.5 frei0r_src</a></h2>
+
+<p>Provide a frei0r source.
+</p>
+<p>To enable compilation of this filter you need to install the frei0r
+header and configure FFmpeg with &ndash;enable-frei0r.
+</p>
+<p>The source supports the syntax:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"><var>size</var>:<var>rate</var>:<var>src_name</var>[{=|:}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
+</pre></td></tr></table>
+
+<p><var>size</var> is the size of the video to generate, may be a string of the
+form <var>width</var>x<var>height</var> or a frame size abbreviation.
+<var>rate</var> is the rate of the video to generate, may be a string of
+the form <var>num</var>/<var>den</var> or a frame rate abbreviation.
+<var>src_name</var> is the name to the frei0r source to load. For more
+information regarding frei0r and how to set the parameters read the
+section <a href="#frei0r">frei0r</a> in the description of the video filters.
+</p>
+<p>Some examples follow:
+</p><table><tr><td>&nbsp;</td><td><pre class="example"># generate a frei0r partik0l source with size 200x200 and framerate 10
+# which is overlayed on the overlay filter main input
+frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
+</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>
+
+<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
+stripe from top to bottom.
+</p>
+<p>The <code>testsrc</code> source generates a test video pattern, showing a
+color pattern, a scrolling gradient and a timestamp. This is mainly
+intended for testing purposes.
+</p>
+<p>Both sources accept an optional sequence of <var>key</var>=<var>value</var> pairs,
+separated by &quot;:&quot;. The description of the accepted options follows.
+</p>
+<dl compact="compact">
+<dt> &lsquo;<samp>size, s</samp>&rsquo;</dt>
+<dd><p>Specify the size of the sourced video, it may be a string of the form
+<var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
+default value is &quot;320x240&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>rate, r</samp>&rsquo;</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
+&quot;25&quot;.
+</p>
+</dd>
+<dt> &lsquo;<samp>duration</samp>&rsquo;</dt>
+<dd><p>Set the video duration of the sourced video. The accepted syntax is:
+</p><table><tr><td>&nbsp;</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>
+</dl>
+
+<p>For example the following:
+</p><table><tr><td>&nbsp;</td><td><pre class="example">testsrc=duration=5.3:size=qcif:rate=10
+</pre></td></tr></table>
+
+<p>will generate a video with a duration of 5.3 seconds, with size
+176x144 and a framerate of 10 frames per second.
+</p>
+
+<a name="Video-Sinks"></a>
+<h1 class="chapter"><a href="libavfilter.html#toc-Video-Sinks">10. Video Sinks</a></h1>
+
+<p>Below is a description of the currently available video sinks.
+</p>
+<a name="buffersink"></a>
+<h2 class="section"><a href="libavfilter.html#toc-buffersink">10.1 buffersink</a></h2>
+
+<p>Buffer video frames, and make them available to the end of the filter
+graph.
+</p>
+<p>This sink is mainly intended for a programmatic use, in particular
+through the interface defined in &lsquo;<tt>libavfilter/vsink_buffer.h</tt>&rsquo;.
+</p>
+<p>It does not require a string parameter in input, but you need to
+specify a pointer to a list of supported pixel formats terminated by
+-1 in the opaque parameter provided to <code>avfilter_init_filter</code>
+when initializing this sink.
+</p>
+<a name="nullsink"></a>
+<h2 class="section"><a href="libavfilter.html#toc-nullsink">10.2 nullsink</a></h2>
+
+<p>Null video sink, do absolutely nothing with the input video. It is
+mainly useful as a template and to be employed in analysis / debugging
+tools.
+</p>
+
+
+<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>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>
diff --git a/ffmpeg 0.8/include/libavcodec/avcodec.h b/ffmpeg 0.8/include/libavcodec/avcodec.h
new file mode 100644 (file)
index 0000000..c854958
--- /dev/null
@@ -0,0 +1,4335 @@
+/*
+ * copyright (c) 2001 Fabrice Bellard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_AVCODEC_H
+#define AVCODEC_AVCODEC_H
+
+/**
+ * @file
+ * external API header
+ */
+
+#include <errno.h>
+#include "libavutil/samplefmt.h"
+#include "libavutil/avutil.h"
+#include "libavutil/cpu.h"
+#include "libavutil/dict.h"
+#include "libavutil/log.h"
+#include "libavutil/pixfmt.h"
+#include "libavutil/rational.h"
+
+#include "libavcodec/version.h"
+
+/**
+ * Identify the syntax and semantics of the bitstream.
+ * The principle is roughly:
+ * Two decoders with the same ID can decode the same streams.
+ * Two encoders with the same ID can encode compatible streams.
+ * There may be slight deviations from the principle due to implementation
+ * details.
+ *
+ * If you add a codec ID to this list, add it so that
+ * 1. no value of a existing codec ID changes (that would break ABI),
+ * 2. it is as close as possible to similar codecs.
+ */
+enum CodecID {
+    CODEC_ID_NONE,
+
+    /* video codecs */
+    CODEC_ID_MPEG1VIDEO,
+    CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
+    CODEC_ID_MPEG2VIDEO_XVMC,
+    CODEC_ID_H261,
+    CODEC_ID_H263,
+    CODEC_ID_RV10,
+    CODEC_ID_RV20,
+    CODEC_ID_MJPEG,
+    CODEC_ID_MJPEGB,
+    CODEC_ID_LJPEG,
+    CODEC_ID_SP5X,
+    CODEC_ID_JPEGLS,
+    CODEC_ID_MPEG4,
+    CODEC_ID_RAWVIDEO,
+    CODEC_ID_MSMPEG4V1,
+    CODEC_ID_MSMPEG4V2,
+    CODEC_ID_MSMPEG4V3,
+    CODEC_ID_WMV1,
+    CODEC_ID_WMV2,
+    CODEC_ID_H263P,
+    CODEC_ID_H263I,
+    CODEC_ID_FLV1,
+    CODEC_ID_SVQ1,
+    CODEC_ID_SVQ3,
+    CODEC_ID_DVVIDEO,
+    CODEC_ID_HUFFYUV,
+    CODEC_ID_CYUV,
+    CODEC_ID_H264,
+    CODEC_ID_INDEO3,
+    CODEC_ID_VP3,
+    CODEC_ID_THEORA,
+    CODEC_ID_ASV1,
+    CODEC_ID_ASV2,
+    CODEC_ID_FFV1,
+    CODEC_ID_4XM,
+    CODEC_ID_VCR1,
+    CODEC_ID_CLJR,
+    CODEC_ID_MDEC,
+    CODEC_ID_ROQ,
+    CODEC_ID_INTERPLAY_VIDEO,
+    CODEC_ID_XAN_WC3,
+    CODEC_ID_XAN_WC4,
+    CODEC_ID_RPZA,
+    CODEC_ID_CINEPAK,
+    CODEC_ID_WS_VQA,
+    CODEC_ID_MSRLE,
+    CODEC_ID_MSVIDEO1,
+    CODEC_ID_IDCIN,
+    CODEC_ID_8BPS,
+    CODEC_ID_SMC,
+    CODEC_ID_FLIC,
+    CODEC_ID_TRUEMOTION1,
+    CODEC_ID_VMDVIDEO,
+    CODEC_ID_MSZH,
+    CODEC_ID_ZLIB,
+    CODEC_ID_QTRLE,
+    CODEC_ID_SNOW,
+    CODEC_ID_TSCC,
+    CODEC_ID_ULTI,
+    CODEC_ID_QDRAW,
+    CODEC_ID_VIXL,
+    CODEC_ID_QPEG,
+    CODEC_ID_PNG,
+    CODEC_ID_PPM,
+    CODEC_ID_PBM,
+    CODEC_ID_PGM,
+    CODEC_ID_PGMYUV,
+    CODEC_ID_PAM,
+    CODEC_ID_FFVHUFF,
+    CODEC_ID_RV30,
+    CODEC_ID_RV40,
+    CODEC_ID_VC1,
+    CODEC_ID_WMV3,
+    CODEC_ID_LOCO,
+    CODEC_ID_WNV1,
+    CODEC_ID_AASC,
+    CODEC_ID_INDEO2,
+    CODEC_ID_FRAPS,
+    CODEC_ID_TRUEMOTION2,
+    CODEC_ID_BMP,
+    CODEC_ID_CSCD,
+    CODEC_ID_MMVIDEO,
+    CODEC_ID_ZMBV,
+    CODEC_ID_AVS,
+    CODEC_ID_SMACKVIDEO,
+    CODEC_ID_NUV,
+    CODEC_ID_KMVC,
+    CODEC_ID_FLASHSV,
+    CODEC_ID_CAVS,
+    CODEC_ID_JPEG2000,
+    CODEC_ID_VMNC,
+    CODEC_ID_VP5,
+    CODEC_ID_VP6,
+    CODEC_ID_VP6F,
+    CODEC_ID_TARGA,
+    CODEC_ID_DSICINVIDEO,
+    CODEC_ID_TIERTEXSEQVIDEO,
+    CODEC_ID_TIFF,
+    CODEC_ID_GIF,
+    CODEC_ID_FFH264,
+    CODEC_ID_DXA,
+    CODEC_ID_DNXHD,
+    CODEC_ID_THP,
+    CODEC_ID_SGI,
+    CODEC_ID_C93,
+    CODEC_ID_BETHSOFTVID,
+    CODEC_ID_PTX,
+    CODEC_ID_TXD,
+    CODEC_ID_VP6A,
+    CODEC_ID_AMV,
+    CODEC_ID_VB,
+    CODEC_ID_PCX,
+    CODEC_ID_SUNRAST,
+    CODEC_ID_INDEO4,
+    CODEC_ID_INDEO5,
+    CODEC_ID_MIMIC,
+    CODEC_ID_RL2,
+    CODEC_ID_8SVX_EXP,
+    CODEC_ID_8SVX_FIB,
+    CODEC_ID_ESCAPE124,
+    CODEC_ID_DIRAC,
+    CODEC_ID_BFI,
+    CODEC_ID_CMV,
+    CODEC_ID_MOTIONPIXELS,
+    CODEC_ID_TGV,
+    CODEC_ID_TGQ,
+    CODEC_ID_TQI,
+    CODEC_ID_AURA,
+    CODEC_ID_AURA2,
+    CODEC_ID_V210X,
+    CODEC_ID_TMV,
+    CODEC_ID_V210,
+    CODEC_ID_DPX,
+    CODEC_ID_MAD,
+    CODEC_ID_FRWU,
+    CODEC_ID_FLASHSV2,
+    CODEC_ID_CDGRAPHICS,
+    CODEC_ID_R210,
+    CODEC_ID_ANM,
+    CODEC_ID_BINKVIDEO,
+    CODEC_ID_IFF_ILBM,
+    CODEC_ID_IFF_BYTERUN1,
+    CODEC_ID_KGV1,
+    CODEC_ID_YOP,
+    CODEC_ID_VP8,
+    CODEC_ID_PICTOR,
+    CODEC_ID_ANSI,
+    CODEC_ID_A64_MULTI,
+    CODEC_ID_A64_MULTI5,
+    CODEC_ID_R10K,
+    CODEC_ID_MXPEG,
+    CODEC_ID_LAGARITH,
+    CODEC_ID_PRORES,
+    CODEC_ID_JV,
+    CODEC_ID_DFA,
+    CODEC_ID_8SVX_RAW,
+
+    /* various PCM "codecs" */
+    CODEC_ID_PCM_S16LE= 0x10000,
+    CODEC_ID_PCM_S16BE,
+    CODEC_ID_PCM_U16LE,
+    CODEC_ID_PCM_U16BE,
+    CODEC_ID_PCM_S8,
+    CODEC_ID_PCM_U8,
+    CODEC_ID_PCM_MULAW,
+    CODEC_ID_PCM_ALAW,
+    CODEC_ID_PCM_S32LE,
+    CODEC_ID_PCM_S32BE,
+    CODEC_ID_PCM_U32LE,
+    CODEC_ID_PCM_U32BE,
+    CODEC_ID_PCM_S24LE,
+    CODEC_ID_PCM_S24BE,
+    CODEC_ID_PCM_U24LE,
+    CODEC_ID_PCM_U24BE,
+    CODEC_ID_PCM_S24DAUD,
+    CODEC_ID_PCM_ZORK,
+    CODEC_ID_PCM_S16LE_PLANAR,
+    CODEC_ID_PCM_DVD,
+    CODEC_ID_PCM_F32BE,
+    CODEC_ID_PCM_F32LE,
+    CODEC_ID_PCM_F64BE,
+    CODEC_ID_PCM_F64LE,
+    CODEC_ID_PCM_BLURAY,
+    CODEC_ID_PCM_LXF,
+    CODEC_ID_S302M,
+
+    /* various ADPCM codecs */
+    CODEC_ID_ADPCM_IMA_QT= 0x11000,
+    CODEC_ID_ADPCM_IMA_WAV,
+    CODEC_ID_ADPCM_IMA_DK3,
+    CODEC_ID_ADPCM_IMA_DK4,
+    CODEC_ID_ADPCM_IMA_WS,
+    CODEC_ID_ADPCM_IMA_SMJPEG,
+    CODEC_ID_ADPCM_MS,
+    CODEC_ID_ADPCM_4XM,
+    CODEC_ID_ADPCM_XA,
+    CODEC_ID_ADPCM_ADX,
+    CODEC_ID_ADPCM_EA,
+    CODEC_ID_ADPCM_G726,
+    CODEC_ID_ADPCM_CT,
+    CODEC_ID_ADPCM_SWF,
+    CODEC_ID_ADPCM_YAMAHA,
+    CODEC_ID_ADPCM_SBPRO_4,
+    CODEC_ID_ADPCM_SBPRO_3,
+    CODEC_ID_ADPCM_SBPRO_2,
+    CODEC_ID_ADPCM_THP,
+    CODEC_ID_ADPCM_IMA_AMV,
+    CODEC_ID_ADPCM_EA_R1,
+    CODEC_ID_ADPCM_EA_R3,
+    CODEC_ID_ADPCM_EA_R2,
+    CODEC_ID_ADPCM_IMA_EA_SEAD,
+    CODEC_ID_ADPCM_IMA_EA_EACS,
+    CODEC_ID_ADPCM_EA_XAS,
+    CODEC_ID_ADPCM_EA_MAXIS_XA,
+    CODEC_ID_ADPCM_IMA_ISS,
+    CODEC_ID_ADPCM_G722,
+
+    /* AMR */
+    CODEC_ID_AMR_NB= 0x12000,
+    CODEC_ID_AMR_WB,
+
+    /* RealAudio codecs*/
+    CODEC_ID_RA_144= 0x13000,
+    CODEC_ID_RA_288,
+
+    /* various DPCM codecs */
+    CODEC_ID_ROQ_DPCM= 0x14000,
+    CODEC_ID_INTERPLAY_DPCM,
+    CODEC_ID_XAN_DPCM,
+    CODEC_ID_SOL_DPCM,
+
+    /* audio codecs */
+    CODEC_ID_MP2= 0x15000,
+    CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
+    CODEC_ID_AAC,
+    CODEC_ID_AC3,
+    CODEC_ID_DTS,
+    CODEC_ID_VORBIS,
+    CODEC_ID_DVAUDIO,
+    CODEC_ID_WMAV1,
+    CODEC_ID_WMAV2,
+    CODEC_ID_MACE3,
+    CODEC_ID_MACE6,
+    CODEC_ID_VMDAUDIO,
+    CODEC_ID_SONIC,
+    CODEC_ID_SONIC_LS,
+    CODEC_ID_FLAC,
+    CODEC_ID_MP3ADU,
+    CODEC_ID_MP3ON4,
+    CODEC_ID_SHORTEN,
+    CODEC_ID_ALAC,
+    CODEC_ID_WESTWOOD_SND1,
+    CODEC_ID_GSM, ///< as in Berlin toast format
+    CODEC_ID_QDM2,
+    CODEC_ID_COOK,
+    CODEC_ID_TRUESPEECH,
+    CODEC_ID_TTA,
+    CODEC_ID_SMACKAUDIO,
+    CODEC_ID_QCELP,
+    CODEC_ID_WAVPACK,
+    CODEC_ID_DSICINAUDIO,
+    CODEC_ID_IMC,
+    CODEC_ID_MUSEPACK7,
+    CODEC_ID_MLP,
+    CODEC_ID_GSM_MS, /* as found in WAV */
+    CODEC_ID_ATRAC3,
+    CODEC_ID_VOXWARE,
+    CODEC_ID_APE,
+    CODEC_ID_NELLYMOSER,
+    CODEC_ID_MUSEPACK8,
+    CODEC_ID_SPEEX,
+    CODEC_ID_WMAVOICE,
+    CODEC_ID_WMAPRO,
+    CODEC_ID_WMALOSSLESS,
+    CODEC_ID_ATRAC3P,
+    CODEC_ID_EAC3,
+    CODEC_ID_SIPR,
+    CODEC_ID_MP1,
+    CODEC_ID_TWINVQ,
+    CODEC_ID_TRUEHD,
+    CODEC_ID_MP4ALS,
+    CODEC_ID_ATRAC1,
+    CODEC_ID_BINKAUDIO_RDFT,
+    CODEC_ID_BINKAUDIO_DCT,
+    CODEC_ID_AAC_LATM,
+    CODEC_ID_QDMC,
+    CODEC_ID_CELT,
+
+    /* subtitle codecs */
+    CODEC_ID_DVD_SUBTITLE= 0x17000,
+    CODEC_ID_DVB_SUBTITLE,
+    CODEC_ID_TEXT,  ///< raw UTF-8 text
+    CODEC_ID_XSUB,
+    CODEC_ID_SSA,
+    CODEC_ID_MOV_TEXT,
+    CODEC_ID_HDMV_PGS_SUBTITLE,
+    CODEC_ID_DVB_TELETEXT,
+    CODEC_ID_SRT,
+    CODEC_ID_MICRODVD,
+
+    /* other specific kind of codecs (generally used for attachments) */
+    CODEC_ID_TTF= 0x18000,
+
+    CODEC_ID_PROBE= 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it
+
+    CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
+                                * stream (only used by libavformat) */
+    CODEC_ID_FFMETADATA=0x21000,   ///< Dummy codec for streams containing only metadata information.
+};
+
+#if FF_API_OLD_SAMPLE_FMT
+#define SampleFormat AVSampleFormat
+
+#define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
+#define SAMPLE_FMT_U8   AV_SAMPLE_FMT_U8
+#define SAMPLE_FMT_S16  AV_SAMPLE_FMT_S16
+#define SAMPLE_FMT_S32  AV_SAMPLE_FMT_S32
+#define SAMPLE_FMT_FLT  AV_SAMPLE_FMT_FLT
+#define SAMPLE_FMT_DBL  AV_SAMPLE_FMT_DBL
+#define SAMPLE_FMT_NB   AV_SAMPLE_FMT_NB
+#endif
+
+#if FF_API_OLD_AUDIOCONVERT
+#include "libavutil/audioconvert.h"
+
+/* Audio channel masks */
+#define CH_FRONT_LEFT            AV_CH_FRONT_LEFT
+#define CH_FRONT_RIGHT           AV_CH_FRONT_RIGHT
+#define CH_FRONT_CENTER          AV_CH_FRONT_CENTER
+#define CH_LOW_FREQUENCY         AV_CH_LOW_FREQUENCY
+#define CH_BACK_LEFT             AV_CH_BACK_LEFT
+#define CH_BACK_RIGHT            AV_CH_BACK_RIGHT
+#define CH_FRONT_LEFT_OF_CENTER  AV_CH_FRONT_LEFT_OF_CENTER
+#define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
+#define CH_BACK_CENTER           AV_CH_BACK_CENTER
+#define CH_SIDE_LEFT             AV_CH_SIDE_LEFT
+#define CH_SIDE_RIGHT            AV_CH_SIDE_RIGHT
+#define CH_TOP_CENTER            AV_CH_TOP_CENTER
+#define CH_TOP_FRONT_LEFT        AV_CH_TOP_FRONT_LEFT
+#define CH_TOP_FRONT_CENTER      AV_CH_TOP_FRONT_CENTER
+#define CH_TOP_FRONT_RIGHT       AV_CH_TOP_FRONT_RIGHT
+#define CH_TOP_BACK_LEFT         AV_CH_TOP_BACK_LEFT
+#define CH_TOP_BACK_CENTER       AV_CH_TOP_BACK_CENTER
+#define CH_TOP_BACK_RIGHT        AV_CH_TOP_BACK_RIGHT
+#define CH_STEREO_LEFT           AV_CH_STEREO_LEFT
+#define CH_STEREO_RIGHT          AV_CH_STEREO_RIGHT
+
+/** Channel mask value used for AVCodecContext.request_channel_layout
+    to indicate that the user requests the channel order of the decoder output
+    to be the native codec channel order. */
+#define CH_LAYOUT_NATIVE         AV_CH_LAYOUT_NATIVE
+
+/* Audio channel convenience macros */
+#define CH_LAYOUT_MONO           AV_CH_LAYOUT_MONO
+#define CH_LAYOUT_STEREO         AV_CH_LAYOUT_STEREO
+#define CH_LAYOUT_2_1            AV_CH_LAYOUT_2_1
+#define CH_LAYOUT_SURROUND       AV_CH_LAYOUT_SURROUND
+#define CH_LAYOUT_4POINT0        AV_CH_LAYOUT_4POINT0
+#define CH_LAYOUT_2_2            AV_CH_LAYOUT_2_2
+#define CH_LAYOUT_QUAD           AV_CH_LAYOUT_QUAD
+#define CH_LAYOUT_5POINT0        AV_CH_LAYOUT_5POINT0
+#define CH_LAYOUT_5POINT1        AV_CH_LAYOUT_5POINT1
+#define CH_LAYOUT_5POINT0_BACK   AV_CH_LAYOUT_5POINT0_BACK
+#define CH_LAYOUT_5POINT1_BACK   AV_CH_LAYOUT_5POINT1_BACK
+#define CH_LAYOUT_7POINT0        AV_CH_LAYOUT_7POINT0
+#define CH_LAYOUT_7POINT1        AV_CH_LAYOUT_7POINT1
+#define CH_LAYOUT_7POINT1_WIDE   AV_CH_LAYOUT_7POINT1_WIDE
+#define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
+#endif
+
+/* in bytes */
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
+
+/**
+ * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
+ * This is mainly needed because some optimized bitstream readers read
+ * 32 or 64 bit at once and could read over the end.<br>
+ * Note: If the first 23 bits of the additional bytes are not 0, then damaged
+ * MPEG bitstreams could cause overread and segfault.
+ */
+#define FF_INPUT_BUFFER_PADDING_SIZE 16
+
+/**
+ * minimum encoding buffer size
+ * Used to avoid some checks during header writing.
+ */
+#define FF_MIN_BUFFER_SIZE 16384
+
+
+/**
+ * motion estimation type.
+ */
+enum Motion_Est_ID {
+    ME_ZERO = 1,    ///< no search, that is use 0,0 vector whenever one is needed
+    ME_FULL,
+    ME_LOG,
+    ME_PHODS,
+    ME_EPZS,        ///< enhanced predictive zonal search
+    ME_X1,          ///< reserved for experiments
+    ME_HEX,         ///< hexagon based search
+    ME_UMH,         ///< uneven multi-hexagon search
+    ME_ITER,        ///< iterative search
+    ME_TESA,        ///< transformed exhaustive search algorithm
+};
+
+enum AVDiscard{
+    /* We leave some space between them for extensions (drop some
+     * keyframes for intra-only or drop just some bidir frames). */
+    AVDISCARD_NONE   =-16, ///< discard nothing
+    AVDISCARD_DEFAULT=  0, ///< discard useless packets like 0 size packets in avi
+    AVDISCARD_NONREF =  8, ///< discard all non reference
+    AVDISCARD_BIDIR  = 16, ///< discard all bidirectional frames
+    AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
+    AVDISCARD_ALL    = 48, ///< discard all
+};
+
+enum AVColorPrimaries{
+    AVCOL_PRI_BT709      =1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
+    AVCOL_PRI_UNSPECIFIED=2,
+    AVCOL_PRI_BT470M     =4,
+    AVCOL_PRI_BT470BG    =5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
+    AVCOL_PRI_SMPTE170M  =6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
+    AVCOL_PRI_SMPTE240M  =7, ///< functionally identical to above
+    AVCOL_PRI_FILM       =8,
+    AVCOL_PRI_NB           , ///< Not part of ABI
+};
+
+enum AVColorTransferCharacteristic{
+    AVCOL_TRC_BT709      =1, ///< also ITU-R BT1361
+    AVCOL_TRC_UNSPECIFIED=2,
+    AVCOL_TRC_GAMMA22    =4, ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
+    AVCOL_TRC_GAMMA28    =5, ///< also ITU-R BT470BG
+    AVCOL_TRC_NB           , ///< Not part of ABI
+};
+
+enum AVColorSpace{
+    AVCOL_SPC_RGB        =0,
+    AVCOL_SPC_BT709      =1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
+    AVCOL_SPC_UNSPECIFIED=2,
+    AVCOL_SPC_FCC        =4,
+    AVCOL_SPC_BT470BG    =5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
+    AVCOL_SPC_SMPTE170M  =6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
+    AVCOL_SPC_SMPTE240M  =7,
+    AVCOL_SPC_NB           , ///< Not part of ABI
+};
+
+enum AVColorRange{
+    AVCOL_RANGE_UNSPECIFIED=0,
+    AVCOL_RANGE_MPEG       =1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges
+    AVCOL_RANGE_JPEG       =2, ///< the normal     2^n-1   "JPEG" YUV ranges
+    AVCOL_RANGE_NB           , ///< Not part of ABI
+};
+
+/**
+ *  X   X      3 4 X      X are luma samples,
+ *             1 2        1-6 are possible chroma positions
+ *  X   X      5 6 X      0 is undefined/unknown position
+ */
+enum AVChromaLocation{
+    AVCHROMA_LOC_UNSPECIFIED=0,
+    AVCHROMA_LOC_LEFT       =1, ///< mpeg2/4, h264 default
+    AVCHROMA_LOC_CENTER     =2, ///< mpeg1, jpeg, h263
+    AVCHROMA_LOC_TOPLEFT    =3, ///< DV
+    AVCHROMA_LOC_TOP        =4,
+    AVCHROMA_LOC_BOTTOMLEFT =5,
+    AVCHROMA_LOC_BOTTOM     =6,
+    AVCHROMA_LOC_NB           , ///< Not part of ABI
+};
+
+#if FF_API_FLAC_GLOBAL_OPTS
+/**
+ * LPC analysis type
+ */
+attribute_deprecated enum AVLPCType {
+    AV_LPC_TYPE_DEFAULT     = -1, ///< use the codec default LPC type
+    AV_LPC_TYPE_NONE        =  0, ///< do not use LPC prediction or use all zero coefficients
+    AV_LPC_TYPE_FIXED       =  1, ///< fixed LPC coefficients
+    AV_LPC_TYPE_LEVINSON    =  2, ///< Levinson-Durbin recursion
+    AV_LPC_TYPE_CHOLESKY    =  3, ///< Cholesky factorization
+    AV_LPC_TYPE_NB              , ///< Not part of ABI
+};
+#endif
+
+enum AVAudioServiceType {
+    AV_AUDIO_SERVICE_TYPE_MAIN              = 0,
+    AV_AUDIO_SERVICE_TYPE_EFFECTS           = 1,
+    AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
+    AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED  = 3,
+    AV_AUDIO_SERVICE_TYPE_DIALOGUE          = 4,
+    AV_AUDIO_SERVICE_TYPE_COMMENTARY        = 5,
+    AV_AUDIO_SERVICE_TYPE_EMERGENCY         = 6,
+    AV_AUDIO_SERVICE_TYPE_VOICE_OVER        = 7,
+    AV_AUDIO_SERVICE_TYPE_KARAOKE           = 8,
+    AV_AUDIO_SERVICE_TYPE_NB                   , ///< Not part of ABI
+};
+
+typedef struct RcOverride{
+    int start_frame;
+    int end_frame;
+    int qscale; // If this is 0 then quality_factor will be used instead.
+    float quality_factor;
+} RcOverride;
+
+#define FF_MAX_B_FRAMES 16
+
+/* encoding support
+   These flags can be passed in AVCodecContext.flags before initialization.
+   Note: Not everything is supported yet.
+*/
+
+#define CODEC_FLAG_QSCALE 0x0002  ///< Use fixed qscale.
+#define CODEC_FLAG_4MV    0x0004  ///< 4 MV per MB allowed / advanced prediction for H.263.
+#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
+ * this is not set the input will be copied.
+ */
+#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_TRUNCATED       0x00010000 /** Input bitstream might be truncated at a random
+                                                  location instead of only at frame boundaries. */
+#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_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_8X8DCT        0x00000080 ///< H.264 high profile 8x8 transform
+#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.
+
+/* Unsupported options :
+ *              Syntax Arithmetic coding (SAC)
+ *              Reference Picture Selection
+ *              Independent Segment Decoding */
+/* /Fx */
+/* codec capabilities */
+
+#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< Decoder can use draw_horiz_band callback.
+/**
+ * Codec uses get_buffer() for allocating buffers and supports custom allocators.
+ * If not set, it might not use get_buffer() at all or use operations that
+ * assume the buffer was allocated by avcodec_default_get_buffer.
+ */
+#define CODEC_CAP_DR1             0x0002
+/* If 'parse_only' field is true, then avcodec_parse_frame() can be used. */
+#define CODEC_CAP_PARSE_ONLY      0x0004
+#define CODEC_CAP_TRUNCATED       0x0008
+/* Codec can export data for HW decoding (XvMC). */
+#define CODEC_CAP_HWACCEL         0x0010
+/**
+ * Codec has a nonzero delay and needs to be fed with NULL at the end to get the delayed data.
+ * If this is not set, the codec is guaranteed to never be fed with NULL data.
+ */
+#define CODEC_CAP_DELAY           0x0020
+/**
+ * Codec can be fed a final frame with a smaller size.
+ * This can be used to prevent truncation of the last audio samples.
+ */
+#define CODEC_CAP_SMALL_LAST_FRAME 0x0040
+/**
+ * Codec can export data for HW decoding (VDPAU).
+ */
+#define CODEC_CAP_HWACCEL_VDPAU    0x0080
+/**
+ * Codec can output multiple frames per AVPacket
+ * Normally demuxers return one frame at a time, demuxers which do not do
+ * are connected to a parser to split what they return into proper frames.
+ * This flag is reserved to the very rare category of codecs which have a
+ * bitstream that cannot be split into frames without timeconsuming
+ * operations like full decoding. Demuxers carring such bitstreams thus
+ * may return multiple frames in a packet. This has many disadvantages like
+ * prohibiting stream copy in many cases thus it should only be considered
+ * as a last resort.
+ */
+#define CODEC_CAP_SUBFRAMES        0x0100
+/**
+ * Codec is experimental and is thus avoided in favor of non experimental
+ * encoders
+ */
+#define CODEC_CAP_EXPERIMENTAL     0x0200
+/**
+ * Codec should fill in channel configuration and samplerate instead of container
+ */
+#define CODEC_CAP_CHANNEL_CONF     0x0400
+
+/**
+ * Codec is able to deal with negative linesizes
+ */
+#define CODEC_CAP_NEG_LINESIZES    0x0800
+
+/**
+ * Codec supports frame-level multithreading.
+ */
+#define CODEC_CAP_FRAME_THREADS    0x1000
+/**
+ * Codec supports slice-based (or partition-based) multithreading.
+ */
+#define CODEC_CAP_SLICE_THREADS    0x2000
+/**
+ * Codec is lossless.
+ */
+#define CODEC_CAP_LOSSLESS         0x80000000
+
+//The following defines may change, don't expect compatibility if you use them.
+#define MB_TYPE_INTRA4x4   0x0001
+#define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
+#define MB_TYPE_INTRA_PCM  0x0004 //FIXME H.264-specific
+#define MB_TYPE_16x16      0x0008
+#define MB_TYPE_16x8       0x0010
+#define MB_TYPE_8x16       0x0020
+#define MB_TYPE_8x8        0x0040
+#define MB_TYPE_INTERLACED 0x0080
+#define MB_TYPE_DIRECT2    0x0100 //FIXME
+#define MB_TYPE_ACPRED     0x0200
+#define MB_TYPE_GMC        0x0400
+#define MB_TYPE_SKIP       0x0800
+#define MB_TYPE_P0L0       0x1000
+#define MB_TYPE_P1L0       0x2000
+#define MB_TYPE_P0L1       0x4000
+#define MB_TYPE_P1L1       0x8000
+#define MB_TYPE_L0         (MB_TYPE_P0L0 | MB_TYPE_P1L0)
+#define MB_TYPE_L1         (MB_TYPE_P0L1 | MB_TYPE_P1L1)
+#define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
+#define MB_TYPE_QUANT      0x00010000
+#define MB_TYPE_CBP        0x00020000
+//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
+
+/**
+ * Pan Scan area.
+ * This specifies the area which should be displayed.
+ * Note there may be multiple such areas for one frame.
+ */
+typedef struct AVPanScan{
+    /**
+     * id
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int id;
+
+    /**
+     * width and height in 1/16 pel
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int width;
+    int height;
+
+    /**
+     * position of the top left corner in 1/16 pel for up to 3 fields/frames
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int16_t position[3][2];
+}AVPanScan;
+
+#define FF_QSCALE_TYPE_MPEG1 0
+#define FF_QSCALE_TYPE_MPEG2 1
+#define FF_QSCALE_TYPE_H264  2
+#define FF_QSCALE_TYPE_VP56  3
+
+#define FF_BUFFER_TYPE_INTERNAL 1
+#define FF_BUFFER_TYPE_USER     2 ///< direct rendering buffers (image is (de)allocated by user)
+#define FF_BUFFER_TYPE_SHARED   4 ///< Buffer from somewhere else; don't deallocate image (data/base), all other tables are not shared.
+#define FF_BUFFER_TYPE_COPY     8 ///< Just a (modified) copy of some other buffer, don't deallocate anything.
+
+#if FF_API_OLD_FF_PICT_TYPES
+/* DEPRECATED, directly use the AV_PICTURE_TYPE_* enum values */
+#define FF_I_TYPE  AV_PICTURE_TYPE_I  ///< Intra
+#define FF_P_TYPE  AV_PICTURE_TYPE_P  ///< Predicted
+#define FF_B_TYPE  AV_PICTURE_TYPE_B  ///< Bi-dir predicted
+#define FF_S_TYPE  AV_PICTURE_TYPE_S  ///< S(GMC)-VOP MPEG4
+#define FF_SI_TYPE AV_PICTURE_TYPE_SI ///< Switching Intra
+#define FF_SP_TYPE AV_PICTURE_TYPE_SP ///< Switching Predicted
+#define FF_BI_TYPE AV_PICTURE_TYPE_BI
+#endif
+
+#define FF_BUFFER_HINTS_VALID    0x01 // Buffer hints value is meaningful (if 0 ignore).
+#define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
+#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
+#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
+
+enum AVPacketSideDataType {
+    AV_PKT_DATA_PALETTE,
+};
+
+typedef struct AVPacket {
+    /**
+     * Presentation timestamp in AVStream->time_base units; the time at which
+     * the decompressed packet will be presented to the user.
+     * Can be AV_NOPTS_VALUE if it is not stored in the file.
+     * pts MUST be larger or equal to dts as presentation cannot happen before
+     * decompression, unless one wants to view hex dumps. Some formats misuse
+     * the terms dts and pts/cts to mean something different. Such timestamps
+     * must be converted to true pts/dts before they are stored in AVPacket.
+     */
+    int64_t pts;
+    /**
+     * Decompression timestamp in AVStream->time_base units; the time at which
+     * the packet is decompressed.
+     * Can be AV_NOPTS_VALUE if it is not stored in the file.
+     */
+    int64_t dts;
+    uint8_t *data;
+    int   size;
+    int   stream_index;
+    int   flags;
+    /**
+     * Additional packet data that can be provided by the container.
+     * Packet can contain several types of side information.
+     */
+    struct {
+        uint8_t *data;
+        int      size;
+        enum AVPacketSideDataType type;
+    } *side_data;
+    int side_data_elems;
+
+    /**
+     * Duration of this packet in AVStream->time_base units, 0 if unknown.
+     * Equals next_pts - this_pts in presentation order.
+     */
+    int   duration;
+    void  (*destruct)(struct AVPacket *);
+    void  *priv;
+    int64_t pos;                            ///< byte position in stream, -1 if unknown
+
+    /**
+     * Time difference in AVStream->time_base units from the pts of this
+     * packet to the point at which the output from the decoder has converged
+     * independent from the availability of previous frames. That is, the
+     * frames are virtually identical no matter if decoding started from
+     * the very first frame or from this keyframe.
+     * Is AV_NOPTS_VALUE if unknown.
+     * This field is not the display duration of the current packet.
+     * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY
+     * set.
+     *
+     * The purpose of this field is to allow seeking in streams that have no
+     * keyframes in the conventional sense. It corresponds to the
+     * recovery point SEI in H.264 and match_time_delta in NUT. It is also
+     * essential for some types of subtitle streams to ensure that all
+     * subtitles are correctly displayed after seeking.
+     */
+    int64_t convergence_duration;
+} AVPacket;
+#define AV_PKT_FLAG_KEY   0x0001
+
+/**
+ * Audio Video Frame.
+ * New fields can be added to the end of AVFRAME with minor version
+ * bumps. Removal, reordering and changes to existing fields require
+ * a major version bump.
+ * sizeof(AVFrame) must not be used outside libav*.
+ */
+typedef struct AVFrame {
+    /**
+     * pointer to the picture planes.
+     * This might be different from the first allocated byte
+     * - encoding:
+     * - decoding:
+     */
+    uint8_t *data[4];
+    int linesize[4];
+    /**
+     * pointer to the first allocated byte of the picture. Can be used in get_buffer/release_buffer.
+     * This isn't used by libavcodec unless the default get/release_buffer() is used.
+     * - encoding:
+     * - decoding:
+     */
+    uint8_t *base[4];
+    /**
+     * 1 -> keyframe, 0-> not
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    int key_frame;
+
+    /**
+     * Picture type of the frame, see ?_TYPE below.
+     * - encoding: Set by libavcodec. for coded_picture (and set by user for input).
+     * - decoding: Set by libavcodec.
+     */
+    enum AVPictureType pict_type;
+
+    /**
+     * presentation timestamp in time_base units (time when frame should be shown to user)
+     * If AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed.
+     * - encoding: MUST be set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int64_t pts;
+
+    /**
+     * picture number in bitstream order
+     * - encoding: set by
+     * - decoding: Set by libavcodec.
+     */
+    int coded_picture_number;
+    /**
+     * picture number in display order
+     * - encoding: set by
+     * - decoding: Set by libavcodec.
+     */
+    int display_picture_number;
+
+    /**
+     * quality (between 1 (good) and FF_LAMBDA_MAX (bad))
+     * - encoding: Set by libavcodec. for coded_picture (and set by user for input).
+     * - decoding: Set by libavcodec.
+     */
+    int quality;
+
+    /**
+     * buffer age (1->was last buffer and dint change, 2->..., ...).
+     * Set to INT_MAX if the buffer has not been used yet.
+     * - encoding: unused
+     * - decoding: MUST be set by get_buffer().
+     */
+    int age;
+
+    /**
+     * is this picture used as reference
+     * The values for this are the same as the MpegEncContext.picture_structure
+     * variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
+     * Set to 4 for delayed, non-reference frames.
+     * - encoding: unused
+     * - decoding: Set by libavcodec. (before get_buffer() call)).
+     */
+    int reference;
+
+    /**
+     * QP table
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    int8_t *qscale_table;
+    /**
+     * QP store stride
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    int qstride;
+
+    /**
+     * mbskip_table[mb]>=1 if MB didn't change
+     * stride= mb_width = (width+15)>>4
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    uint8_t *mbskip_table;
+
+    /**
+     * motion vector table
+     * @code
+     * example:
+     * int mv_sample_log2= 4 - motion_subsample_log2;
+     * int mb_width= (width+15)>>4;
+     * int mv_stride= (mb_width << mv_sample_log2) + 1;
+     * motion_val[direction][x + y*mv_stride][0->mv_x, 1->mv_y];
+     * @endcode
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int16_t (*motion_val[2])[2];
+
+    /**
+     * macroblock type table
+     * mb_type_base + mb_width + 2
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    uint32_t *mb_type;
+
+    /**
+     * log2 of the size of the block which a single vector in motion_val represents:
+     * (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    uint8_t motion_subsample_log2;
+
+    /**
+     * for some private data of the user
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    void *opaque;
+
+    /**
+     * error
+     * - encoding: Set by libavcodec. if flags&CODEC_FLAG_PSNR.
+     * - decoding: unused
+     */
+    uint64_t error[4];
+
+    /**
+     * type of the buffer (to keep track of who has to deallocate data[*])
+     * - encoding: Set by the one who allocates it.
+     * - decoding: Set by the one who allocates it.
+     * Note: User allocated (direct rendering) & internal buffers cannot coexist currently.
+     */
+    int type;
+
+    /**
+     * When decoding, this signals how much the picture must be delayed.
+     * extra_delay = repeat_pict / (2*fps)
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    int repeat_pict;
+
+    /**
+     *
+     */
+    int qscale_type;
+
+    /**
+     * The content of the picture is interlaced.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec. (default 0)
+     */
+    int interlaced_frame;
+
+    /**
+     * If the content is interlaced, is top field displayed first.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int top_field_first;
+
+    /**
+     * Pan scan.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    AVPanScan *pan_scan;
+
+    /**
+     * Tell user application that palette has changed from previous frame.
+     * - encoding: ??? (no palette-enabled encoder yet)
+     * - decoding: Set by libavcodec. (default 0).
+     */
+    int palette_has_changed;
+
+    /**
+     * codec suggestion on buffer type if != 0
+     * - encoding: unused
+     * - decoding: Set by libavcodec. (before get_buffer() call)).
+     */
+    int buffer_hints;
+
+    /**
+     * DCT coefficients
+     * - encoding: unused
+     * - decoding: Set by libavcodec.
+     */
+    short *dct_coeff;
+
+    /**
+     * motion reference frame index
+     * the order in which these are stored can depend on the codec.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    int8_t *ref_index[2];
+
+    /**
+     * reordered opaque 64bit (generally an integer or a double precision float
+     * PTS but can be anything).
+     * The user sets AVCodecContext.reordered_opaque to represent the input at
+     * that time,
+     * the decoder reorders values as needed and sets AVFrame.reordered_opaque
+     * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque
+     * @deprecated in favor of pkt_pts
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int64_t reordered_opaque;
+
+    /**
+     * hardware accelerator private data (FFmpeg-allocated)
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    void *hwaccel_picture_private;
+
+    /**
+     * reordered pts from the last AVPacket that has been input into the decoder
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int64_t pkt_pts;
+
+    /**
+     * dts from the last AVPacket that has been input into the decoder
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int64_t pkt_dts;
+
+    /**
+     * the AVCodecContext which ff_thread_get_buffer() was last called on
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    struct AVCodecContext *owner;
+
+    /**
+     * used by multithreading to store frame-specific info
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    void *thread_opaque;
+
+    /**
+     * frame timestamp estimated using various heuristics, in stream time base
+     * - encoding: unused
+     * - decoding: set by libavcodec, read by user.
+     */
+    int64_t best_effort_timestamp;
+
+    /**
+     * reordered pos from the last AVPacket that has been input into the decoder
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int64_t pkt_pos;
+
+    /**
+     * reordered sample aspect ratio for the video frame, 0/1 if unknown\unspecified
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    AVRational sample_aspect_ratio;
+
+    /**
+     * width and height of the video frame
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int width, height;
+
+    /**
+     * format of the frame, -1 if unknown or unset
+     * It should be cast to the corresponding enum (enum PixelFormat
+     * for video, enum AVSampleFormat for audio)
+     * - encoding: unused
+     * - decoding: Read by user.
+     */
+    int format;
+
+} AVFrame;
+
+/**
+ * main external API structure.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVCodecContext) must not be used outside libav*.
+ */
+typedef struct AVCodecContext {
+    /**
+     * information on struct for av_log
+     * - set by avcodec_alloc_context
+     */
+    const AVClass *av_class;
+    /**
+     * the average bitrate
+     * - encoding: Set by user; unused for constant quantizer encoding.
+     * - decoding: Set by libavcodec. 0 or some bitrate if this info is available in the stream.
+     */
+    int bit_rate;
+
+    /**
+     * number of bits the bitstream is allowed to diverge from the reference.
+     *           the reference can be CBR (for CBR pass1) or VBR (for pass2)
+     * - encoding: Set by user; unused for constant quantizer encoding.
+     * - decoding: unused
+     */
+    int bit_rate_tolerance;
+
+    /**
+     * CODEC_FLAG_*.
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int flags;
+
+    /**
+     * Some codecs need additional format info. It is stored here.
+     * If any muxer uses this then ALL demuxers/parsers AND encoders for the
+     * specific codec MUST set it correctly otherwise stream copy breaks.
+     * In general use of this field by muxers is not recommanded.
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec. (FIXME: Is this OK?)
+     */
+    int sub_id;
+
+    /**
+     * Motion estimation algorithm used for video coding.
+     * 1 (zero), 2 (full), 3 (log), 4 (phods), 5 (epzs), 6 (x1), 7 (hex),
+     * 8 (umh), 9 (iter), 10 (tesa) [7, 8, 10 are x264 specific, 9 is snow specific]
+     * - encoding: MUST be set by user.
+     * - decoding: unused
+     */
+    int me_method;
+
+    /**
+     * some codecs need / can use extradata like Huffman tables.
+     * mjpeg: Huffman tables
+     * rv10: additional flags
+     * mpeg4: global headers (they can be in the bitstream or here)
+     * The allocated memory should be FF_INPUT_BUFFER_PADDING_SIZE bytes larger
+     * than extradata_size to avoid prolems if it is read with the bitstream reader.
+     * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
+     * - encoding: Set/allocated/freed by libavcodec.
+     * - decoding: Set/allocated/freed by user.
+     */
+    uint8_t *extradata;
+    int extradata_size;
+
+    /**
+     * This is the fundamental unit of time (in seconds) in terms
+     * of which frame timestamps are represented. For fixed-fps content,
+     * timebase should be 1/framerate and timestamp increments should be
+     * identically 1.
+     * - encoding: MUST be set by user.
+     * - decoding: Set by libavcodec.
+     */
+    AVRational time_base;
+
+    /* video only */
+    /**
+     * picture width / height.
+     * - encoding: MUST be set by user.
+     * - decoding: Set by libavcodec.
+     * Note: For compatibility it is possible to set this instead of
+     * coded_width/height before decoding.
+     */
+    int width, height;
+
+#define FF_ASPECT_EXTENDED 15
+
+    /**
+     * the number of pictures in a group of pictures, or 0 for intra_only
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int gop_size;
+
+    /**
+     * Pixel format, see PIX_FMT_xxx.
+     * May be set by the demuxer if known from headers.
+     * May be overriden by the decoder if it knows better.
+     * - encoding: Set by user.
+     * - decoding: Set by user if known, overridden by libavcodec if known
+     */
+    enum PixelFormat pix_fmt;
+
+    /**
+     * If non NULL, 'draw_horiz_band' is called by the libavcodec
+     * decoder to draw a horizontal band. It improves cache usage. Not
+     * all codecs can do that. You must check the codec capabilities
+     * beforehand.
+     * When multithreading is used, it may be called from multiple threads
+     * at the same time; threads might draw different parts of the same AVFrame,
+     * or multiple AVFrames, and there is no guarantee that slices will be drawn
+     * in order.
+     * The function is also used by hardware acceleration APIs.
+     * It is called at least once during frame decoding to pass
+     * the data needed for hardware render.
+     * In that mode instead of pixel data, AVFrame points to
+     * a structure specific to the acceleration API. The application
+     * reads the structure and can change some fields to indicate progress
+     * or mark state.
+     * - encoding: unused
+     * - decoding: Set by user.
+     * @param height the height of the slice
+     * @param y the y position of the slice
+     * @param type 1->top field, 2->bottom field, 3->frame
+     * @param offset offset into the AVFrame.data from which the slice should be read
+     */
+    void (*draw_horiz_band)(struct AVCodecContext *s,
+                            const AVFrame *src, int offset[4],
+                            int y, int type, int height);
+
+    /* audio only */
+    int sample_rate; ///< samples per second
+    int channels;    ///< number of audio channels
+
+    /**
+     * audio sample format
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    enum AVSampleFormat sample_fmt;  ///< sample format
+
+    /* The following data should not be initialized. */
+    /**
+     * Samples per packet, initialized when calling 'init'.
+     */
+    int frame_size;
+    int frame_number;   ///< audio or video frame number
+
+    /**
+     * Number of frames the decoded output will be delayed relative to
+     * the encoded input.
+     * - encoding: Set by libavcodec.
+     * - decoding: unused
+     */
+    int delay;
+
+    /* - encoding parameters */
+    float qcompress;  ///< amount of qscale change between easy & hard scenes (0.0-1.0)
+    float qblur;      ///< amount of qscale smoothing over time (0.0-1.0)
+
+    /**
+     * minimum quantizer
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int qmin;
+
+    /**
+     * maximum quantizer
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int qmax;
+
+    /**
+     * maximum quantizer difference between frames
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int max_qdiff;
+
+    /**
+     * maximum number of B-frames between non-B-frames
+     * Note: The output will be delayed by max_b_frames+1 relative to the input.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int max_b_frames;
+
+    /**
+     * qscale factor between IP and B-frames
+     * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset).
+     * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float b_quant_factor;
+
+    /** obsolete FIXME remove */
+    int rc_strategy;
+#define FF_RC_STRATEGY_XVID 1
+
+    int b_frame_strategy;
+
+    struct AVCodec *codec;
+
+    void *priv_data;
+
+    int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
+                            /* do its best to deliver a chunk with size     */
+                            /* below rtp_payload_size, the chunk will start */
+                            /* with a start code on some codecs like H.263. */
+                            /* This doesn't take account of any particular  */
+                            /* headers inside the transmitted RTP payload.  */
+
+
+    /* The RTP callback: This function is called    */
+    /* every time the encoder has a packet to send. */
+    /* It depends on the encoder if the data starts */
+    /* with a Start Code (it should). H.263 does.   */
+    /* mb_nb contains the number of macroblocks     */
+    /* encoded in the RTP payload.                  */
+    void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
+
+    /* statistics, used for 2-pass encoding */
+    int mv_bits;
+    int header_bits;
+    int i_tex_bits;
+    int p_tex_bits;
+    int i_count;
+    int p_count;
+    int skip_count;
+    int misc_bits;
+
+    /**
+     * number of bits used for the previously encoded frame
+     * - encoding: Set by libavcodec.
+     * - decoding: unused
+     */
+    int frame_bits;
+
+    /**
+     * Private data of the user, can be used to carry app specific stuff.
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    void *opaque;
+
+    char codec_name[32];
+    enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
+    enum CodecID codec_id; /* see CODEC_ID_xxx */
+
+    /**
+     * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
+     * This is used to work around some encoder bugs.
+     * A demuxer should set this to what is stored in the field used to identify the codec.
+     * If there are multiple such fields in a container then the demuxer should choose the one
+     * which maximizes the information about the used codec.
+     * If the codec tag field in a container is larger than 32 bits then the demuxer should
+     * remap the longer ID to 32 bits with a table or other structure. Alternatively a new
+     * extra_codec_tag + size could be added but for this a clear advantage must be demonstrated
+     * first.
+     * - encoding: Set by user, if not then the default based on codec_id will be used.
+     * - decoding: Set by user, will be converted to uppercase by libavcodec during init.
+     */
+    unsigned int codec_tag;
+
+    /**
+     * Work around bugs in encoders which sometimes cannot be detected automatically.
+     * - encoding: Set by user
+     * - decoding: Set by user
+     */
+    int workaround_bugs;
+#define FF_BUG_AUTODETECT       1  ///< autodetection
+#define FF_BUG_OLD_MSMPEG4      2
+#define FF_BUG_XVID_ILACE       4
+#define FF_BUG_UMP4             8
+#define FF_BUG_NO_PADDING       16
+#define FF_BUG_AMV              32
+#define FF_BUG_AC_VLC           0  ///< Will be removed, libavcodec can now handle these non-compliant files by default.
+#define FF_BUG_QPEL_CHROMA      64
+#define FF_BUG_STD_QPEL         128
+#define FF_BUG_QPEL_CHROMA2     256
+#define FF_BUG_DIRECT_BLOCKSIZE 512
+#define FF_BUG_EDGE             1024
+#define FF_BUG_HPEL_CHROMA      2048
+#define FF_BUG_DC_CLIP          4096
+#define FF_BUG_MS               8192 ///< Work around various bugs in Microsoft's broken decoders.
+#define FF_BUG_TRUNCATED       16384
+//#define FF_BUG_FAKE_SCALABILITY 16 //Autodetection should work 100%.
+
+    /**
+     * luma single coefficient elimination threshold
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int luma_elim_threshold;
+
+    /**
+     * chroma single coeff elimination threshold
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int chroma_elim_threshold;
+
+    /**
+     * strictly follow the standard (MPEG4, ...).
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     * Setting this to STRICT or higher means the encoder and decoder will
+     * generally do stupid things, whereas setting it to unofficial or lower
+     * will mean the encoder might produce output that is not supported by all
+     * spec-compliant decoders. Decoders don't differentiate between normal,
+     * unofficial and experimental (that is, they always try to decode things
+     * when they can) unless they are explicitly asked to behave stupidly
+     * (=strictly conform to the specs)
+     */
+    int strict_std_compliance;
+#define FF_COMPLIANCE_VERY_STRICT   2 ///< Strictly conform to an older more strict version of the spec or reference software.
+#define FF_COMPLIANCE_STRICT        1 ///< Strictly conform to all the things in the spec no matter what consequences.
+#define FF_COMPLIANCE_NORMAL        0
+#define FF_COMPLIANCE_UNOFFICIAL   -1 ///< Allow unofficial extensions
+#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
+
+    /**
+     * qscale offset between IP and B-frames
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float b_quant_offset;
+
+    /**
+     * Error recognization; 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;
+#define FF_ER_CAREFUL         1
+#define FF_ER_COMPLIANT       2
+#define FF_ER_AGGRESSIVE      3
+#define FF_ER_VERY_AGGRESSIVE 4
+
+    /**
+     * Called at the beginning of each frame to get a buffer for it.
+     * If pic.reference is set then the frame will be read later by libavcodec.
+     * avcodec_align_dimensions2() should be used to find the required width and
+     * height, as they normally need to be rounded up to the next multiple of 16.
+     * if CODEC_CAP_DR1 is not set then get_buffer() must call
+     * avcodec_default_get_buffer() instead of providing buffers allocated by
+     * some other means.
+     * If frame multithreading is used and thread_safe_callbacks is set,
+     * it may be called from a different thread, but not from more than one at once.
+     * Does not need to be reentrant.
+     * - encoding: unused
+     * - decoding: Set by libavcodec, user can override.
+     */
+    int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
+
+    /**
+     * Called to release buffers which were allocated with get_buffer.
+     * A released buffer can be reused in get_buffer().
+     * pic.data[*] must be set to NULL.
+     * May be called from a different thread if frame multithreading is used,
+     * but not by more than one thread at once, so does not need to be reentrant.
+     * - encoding: unused
+     * - decoding: Set by libavcodec, user can override.
+     */
+    void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
+
+    /**
+     * Size of the frame reordering buffer in the decoder.
+     * For MPEG-2 it is 1 IPB or 0 low delay IP.
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    int has_b_frames;
+
+    /**
+     * number of bytes per packet if constant and known or 0
+     * Used by some WAV based audio codecs.
+     */
+    int block_align;
+
+    int parse_only; /* - decoding only: If true, only parsing is done
+                       (function avcodec_parse_frame()). The frame
+                       data is returned. Only MPEG codecs support this now. */
+
+    /**
+     * 0-> h263 quant 1-> mpeg quant
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mpeg_quant;
+
+    /**
+     * pass1 encoding statistics output buffer
+     * - encoding: Set by libavcodec.
+     * - decoding: unused
+     */
+    char *stats_out;
+
+    /**
+     * pass2 encoding statistics input buffer
+     * Concatenated stuff from stats_out of pass1 should be placed here.
+     * - encoding: Allocated/set/freed by user.
+     * - decoding: unused
+     */
+    char *stats_in;
+
+    /**
+     * ratecontrol qmin qmax limiting method
+     * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float rc_qsquish;
+
+    float rc_qmod_amp;
+    int rc_qmod_freq;
+
+    /**
+     * ratecontrol override, see RcOverride
+     * - encoding: Allocated/set/freed by user.
+     * - decoding: unused
+     */
+    RcOverride *rc_override;
+    int rc_override_count;
+
+    /**
+     * rate control equation
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    const char *rc_eq;
+
+    /**
+     * maximum bitrate
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int rc_max_rate;
+
+    /**
+     * minimum bitrate
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int rc_min_rate;
+
+    /**
+     * decoder bitstream buffer size
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int rc_buffer_size;
+    float rc_buffer_aggressivity;
+
+    /**
+     * qscale factor between P and I-frames
+     * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset).
+     * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float i_quant_factor;
+
+    /**
+     * qscale offset between P and I-frames
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float i_quant_offset;
+
+    /**
+     * initial complexity for pass1 ratecontrol
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float rc_initial_cplx;
+
+    /**
+     * DCT algorithm, see FF_DCT_* below
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int dct_algo;
+#define FF_DCT_AUTO    0
+#define FF_DCT_FASTINT 1
+#define FF_DCT_INT     2
+#define FF_DCT_MMX     3
+#define FF_DCT_MLIB    4
+#define FF_DCT_ALTIVEC 5
+#define FF_DCT_FAAN    6
+
+    /**
+     * luminance masking (0-> disabled)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float lumi_masking;
+
+    /**
+     * temporary complexity masking (0-> disabled)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float temporal_cplx_masking;
+
+    /**
+     * spatial complexity masking (0-> disabled)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float spatial_cplx_masking;
+
+    /**
+     * p block masking (0-> disabled)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float p_masking;
+
+    /**
+     * darkness masking (0-> disabled)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float dark_masking;
+
+    /**
+     * IDCT algorithm, see FF_IDCT_* below.
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int idct_algo;
+#define FF_IDCT_AUTO          0
+#define FF_IDCT_INT           1
+#define FF_IDCT_SIMPLE        2
+#define FF_IDCT_SIMPLEMMX     3
+#define FF_IDCT_LIBMPEG2MMX   4
+#define FF_IDCT_PS2           5
+#define FF_IDCT_MLIB          6
+#define FF_IDCT_ARM           7
+#define FF_IDCT_ALTIVEC       8
+#define FF_IDCT_SH4           9
+#define FF_IDCT_SIMPLEARM     10
+#define FF_IDCT_H264          11
+#define FF_IDCT_VP3           12
+#define FF_IDCT_IPP           13
+#define FF_IDCT_XVIDMMX       14
+#define FF_IDCT_CAVS          15
+#define FF_IDCT_SIMPLEARMV5TE 16
+#define FF_IDCT_SIMPLEARMV6   17
+#define FF_IDCT_SIMPLEVIS     18
+#define FF_IDCT_WMV2          19
+#define FF_IDCT_FAAN          20
+#define FF_IDCT_EA            21
+#define FF_IDCT_SIMPLENEON    22
+#define FF_IDCT_SIMPLEALPHA   23
+#define FF_IDCT_BINK          24
+
+    /**
+     * slice count
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by user (or 0).
+     */
+    int slice_count;
+    /**
+     * slice offsets in the frame in bytes
+     * - encoding: Set/allocated by libavcodec.
+     * - decoding: Set/allocated by user (or NULL).
+     */
+    int *slice_offset;
+
+    /**
+     * error concealment flags
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    int error_concealment;
+#define FF_EC_GUESS_MVS   1
+#define FF_EC_DEBLOCK     2
+
+    /**
+     * dsp_mask could be add used to disable unwanted CPU features
+     * CPU features (i.e. MMX, SSE. ...)
+     *
+     * With the FORCE flag you may instead enable given CPU features.
+     * (Dangerous: Usable in case of misdetection, improper usage however will
+     * result into program crash.)
+     */
+    unsigned dsp_mask;
+
+    /**
+     * bits per sample/pixel from the demuxer (needed for huffyuv).
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by user.
+     */
+     int bits_per_coded_sample;
+
+    /**
+     * prediction method (needed for huffyuv)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+     int prediction_method;
+#define FF_PRED_LEFT   0
+#define FF_PRED_PLANE  1
+#define FF_PRED_MEDIAN 2
+
+    /**
+     * sample aspect ratio (0 if unknown)
+     * That is the width of a pixel divided by the height of the pixel.
+     * Numerator and denominator must be relatively prime and smaller than 256 for some video standards.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    AVRational sample_aspect_ratio;
+
+    /**
+     * the picture in the bitstream
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    AVFrame *coded_frame;
+
+    /**
+     * debug
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int debug;
+#define FF_DEBUG_PICT_INFO   1
+#define FF_DEBUG_RC          2
+#define FF_DEBUG_BITSTREAM   4
+#define FF_DEBUG_MB_TYPE     8
+#define FF_DEBUG_QP          16
+#define FF_DEBUG_MV          32
+#define FF_DEBUG_DCT_COEFF   0x00000040
+#define FF_DEBUG_SKIP        0x00000080
+#define FF_DEBUG_STARTCODE   0x00000100
+#define FF_DEBUG_PTS         0x00000200
+#define FF_DEBUG_ER          0x00000400
+#define FF_DEBUG_MMCO        0x00000800
+#define FF_DEBUG_BUGS        0x00001000
+#define FF_DEBUG_VIS_QP      0x00002000
+#define FF_DEBUG_VIS_MB_TYPE 0x00004000
+#define FF_DEBUG_BUFFERS     0x00008000
+#define FF_DEBUG_THREADS     0x00010000
+
+    /**
+     * debug
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int debug_mv;
+#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
+#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
+#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
+
+    /**
+     * error
+     * - encoding: Set by libavcodec if flags&CODEC_FLAG_PSNR.
+     * - decoding: unused
+     */
+    uint64_t error[4];
+
+    /**
+     * motion estimation comparison function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_cmp;
+    /**
+     * subpixel motion estimation comparison function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_sub_cmp;
+    /**
+     * macroblock comparison function (not supported yet)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mb_cmp;
+    /**
+     * interlaced DCT comparison function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int ildct_cmp;
+#define FF_CMP_SAD    0
+#define FF_CMP_SSE    1
+#define FF_CMP_SATD   2
+#define FF_CMP_DCT    3
+#define FF_CMP_PSNR   4
+#define FF_CMP_BIT    5
+#define FF_CMP_RD     6
+#define FF_CMP_ZERO   7
+#define FF_CMP_VSAD   8
+#define FF_CMP_VSSE   9
+#define FF_CMP_NSSE   10
+#define FF_CMP_W53    11
+#define FF_CMP_W97    12
+#define FF_CMP_DCTMAX 13
+#define FF_CMP_DCT264 14
+#define FF_CMP_CHROMA 256
+
+    /**
+     * ME diamond size & shape
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int dia_size;
+
+    /**
+     * amount of previous MV predictors (2a+1 x 2a+1 square)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int last_predictor_count;
+
+    /**
+     * prepass for motion estimation
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int pre_me;
+
+    /**
+     * motion estimation prepass comparison function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_pre_cmp;
+
+    /**
+     * ME prepass diamond size & shape
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int pre_dia_size;
+
+    /**
+     * subpel ME quality
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_subpel_quality;
+
+    /**
+     * callback to negotiate the pixelFormat
+     * @param fmt is the list of formats which are supported by the codec,
+     * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality.
+     * The first is always the native one.
+     * @return the chosen format
+     * - encoding: unused
+     * - decoding: Set by user, if not set the native format will be chosen.
+     */
+    enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
+
+    /**
+     * DTG active format information (additional aspect ratio
+     * information only used in DVB MPEG-2 transport streams)
+     * 0 if not set.
+     *
+     * - encoding: unused
+     * - decoding: Set by decoder.
+     */
+    int dtg_active_format;
+#define FF_DTG_AFD_SAME         8
+#define FF_DTG_AFD_4_3          9
+#define FF_DTG_AFD_16_9         10
+#define FF_DTG_AFD_14_9         11
+#define FF_DTG_AFD_4_3_SP_14_9  13
+#define FF_DTG_AFD_16_9_SP_14_9 14
+#define FF_DTG_AFD_SP_4_3       15
+
+    /**
+     * maximum motion estimation search range in subpel units
+     * If 0 then no limit.
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_range;
+
+    /**
+     * intra quantizer bias
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int intra_quant_bias;
+#define FF_DEFAULT_QUANT_BIAS 999999
+
+    /**
+     * inter quantizer bias
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int inter_quant_bias;
+
+    /**
+     * color table ID
+     * - encoding: unused
+     * - decoding: Which clrtable should be used for 8bit RGB images.
+     *             Tables have to be stored somewhere. FIXME
+     */
+    int color_table_id;
+
+    /**
+     * internal_buffer count
+     * Don't touch, used by libavcodec default_get_buffer().
+     */
+    int internal_buffer_count;
+
+    /**
+     * internal_buffers
+     * Don't touch, used by libavcodec default_get_buffer().
+     */
+    void *internal_buffer;
+
+    /**
+     * Global quality for codecs which cannot change it per frame.
+     * This should be proportional to MPEG-1/2/4 qscale.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int global_quality;
+
+#define FF_CODER_TYPE_VLC       0
+#define FF_CODER_TYPE_AC        1
+#define FF_CODER_TYPE_RAW       2
+#define FF_CODER_TYPE_RLE       3
+#define FF_CODER_TYPE_DEFLATE   4
+    /**
+     * coder type
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int coder_type;
+
+    /**
+     * context model
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int context_model;
+#if 0
+    /**
+     *
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
+#endif
+
+    /**
+     * slice flags
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    int slice_flags;
+#define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display
+#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)
+#define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
+
+    /**
+     * XVideo Motion Acceleration
+     * - encoding: forbidden
+     * - decoding: set by decoder
+     */
+    int xvmc_acceleration;
+
+    /**
+     * macroblock decision mode
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mb_decision;
+#define FF_MB_DECISION_SIMPLE 0        ///< uses mb_cmp
+#define FF_MB_DECISION_BITS   1        ///< chooses the one which needs the fewest bits
+#define FF_MB_DECISION_RD     2        ///< rate distortion
+
+    /**
+     * custom intra quantization matrix
+     * - encoding: Set by user, can be NULL.
+     * - decoding: Set by libavcodec.
+     */
+    uint16_t *intra_matrix;
+
+    /**
+     * custom inter quantization matrix
+     * - encoding: Set by user, can be NULL.
+     * - decoding: Set by libavcodec.
+     */
+    uint16_t *inter_matrix;
+
+    /**
+     * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
+     * This is used to work around some encoder bugs.
+     * - encoding: unused
+     * - decoding: Set by user, will be converted to uppercase by libavcodec during init.
+     */
+    unsigned int stream_codec_tag;
+
+    /**
+     * scene change detection threshold
+     * 0 is default, larger means fewer detected scene changes.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int scenechange_threshold;
+
+    /**
+     * minimum Lagrange multipler
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int lmin;
+
+    /**
+     * maximum Lagrange multipler
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int lmax;
+
+#if FF_API_PALETTE_CONTROL
+    /**
+     * palette control structure
+     * - encoding: ??? (no palette-enabled encoder yet)
+     * - decoding: Set by user.
+     */
+    struct AVPaletteControl *palctrl;
+#endif
+
+    /**
+     * noise reduction strength
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int noise_reduction;
+
+    /**
+     * Called at the beginning of a frame to get cr buffer for it.
+     * Buffer type (size, hints) must be the same. libavcodec won't check it.
+     * libavcodec will pass previous buffer in pic, function should return
+     * same buffer or new buffer with old frame "painted" into it.
+     * If pic.data[0] == NULL must behave like get_buffer().
+     * if CODEC_CAP_DR1 is not set then reget_buffer() must call
+     * avcodec_default_reget_buffer() instead of providing buffers allocated by
+     * some other means.
+     * - encoding: unused
+     * - decoding: Set by libavcodec, user can override.
+     */
+    int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
+
+    /**
+     * Number of bits which should be loaded into the rc buffer before decoding starts.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int rc_initial_buffer_occupancy;
+
+    /**
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int inter_threshold;
+
+    /**
+     * CODEC_FLAG2_*
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int flags2;
+
+    /**
+     * Simulates errors in the bitstream to test error concealment.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int error_rate;
+
+#if FF_API_ANTIALIAS_ALGO
+    /**
+     * MP3 antialias algorithm, see FF_AA_* below.
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    attribute_deprecated int antialias_algo;
+#define FF_AA_AUTO    0
+#define FF_AA_FASTINT 1 //not implemented yet
+#define FF_AA_INT     2
+#define FF_AA_FLOAT   3
+#endif
+
+    /**
+     * quantizer noise shaping
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int quantizer_noise_shaping;
+
+    /**
+     * thread count
+     * is used to decide how many independent tasks should be passed to execute()
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int thread_count;
+
+    /**
+     * The codec may call this to execute several independent things.
+     * It will return only after finishing all tasks.
+     * The user may replace this with some multithreaded implementation,
+     * the default implementation will execute the parts serially.
+     * @param count the number of things to execute
+     * - encoding: Set by libavcodec, user can override.
+     * - decoding: Set by libavcodec, user can override.
+     */
+    int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
+
+    /**
+     * thread opaque
+     * Can be used by execute() to store some per AVCodecContext stuff.
+     * - encoding: set by execute()
+     * - decoding: set by execute()
+     */
+    void *thread_opaque;
+
+    /**
+     * Motion estimation threshold below which no motion estimation is
+     * performed, but instead the user specified motion vectors are used.
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+     int me_threshold;
+
+    /**
+     * Macroblock threshold below which the user specified macroblock types will be used.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+     int mb_threshold;
+
+    /**
+     * precision of the intra DC coefficient - 8
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+     int intra_dc_precision;
+
+    /**
+     * noise vs. sse weight for the nsse comparsion function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+     int nsse_weight;
+
+    /**
+     * Number of macroblock rows at the top which are skipped.
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+     int skip_top;
+
+    /**
+     * Number of macroblock rows at the bottom which are skipped.
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+     int skip_bottom;
+
+    /**
+     * profile
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+     int profile;
+#define FF_PROFILE_UNKNOWN -99
+#define FF_PROFILE_RESERVED -100
+
+#define FF_PROFILE_AAC_MAIN 0
+#define FF_PROFILE_AAC_LOW  1
+#define FF_PROFILE_AAC_SSR  2
+#define FF_PROFILE_AAC_LTP  3
+
+#define FF_PROFILE_DTS         20
+#define FF_PROFILE_DTS_ES      30
+#define FF_PROFILE_DTS_96_24   40
+#define FF_PROFILE_DTS_HD_HRA  50
+#define FF_PROFILE_DTS_HD_MA   60
+
+#define FF_PROFILE_MPEG2_422    0
+#define FF_PROFILE_MPEG2_HIGH   1
+#define FF_PROFILE_MPEG2_SS     2
+#define FF_PROFILE_MPEG2_SNR_SCALABLE  3
+#define FF_PROFILE_MPEG2_MAIN   4
+#define FF_PROFILE_MPEG2_SIMPLE 5
+
+#define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag
+#define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag
+
+#define FF_PROFILE_H264_BASELINE             66
+#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
+#define FF_PROFILE_H264_MAIN                 77
+#define FF_PROFILE_H264_EXTENDED             88
+#define FF_PROFILE_H264_HIGH                 100
+#define FF_PROFILE_H264_HIGH_10              110
+#define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_422             122
+#define FF_PROFILE_H264_HIGH_422_INTRA       (122|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_444             144
+#define FF_PROFILE_H264_HIGH_444_PREDICTIVE  244
+#define FF_PROFILE_H264_HIGH_444_INTRA       (244|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_CAVLC_444            44
+
+#define FF_PROFILE_VC1_SIMPLE   0
+#define FF_PROFILE_VC1_MAIN     1
+#define FF_PROFILE_VC1_COMPLEX  2
+#define FF_PROFILE_VC1_ADVANCED 3
+
+#define FF_PROFILE_MPEG4_SIMPLE                     0
+#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE            1
+#define FF_PROFILE_MPEG4_CORE                       2
+#define FF_PROFILE_MPEG4_MAIN                       3
+#define FF_PROFILE_MPEG4_N_BIT                      4
+#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE           5
+#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION      6
+#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE     7
+#define FF_PROFILE_MPEG4_HYBRID                     8
+#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME         9
+#define FF_PROFILE_MPEG4_CORE_SCALABLE             10
+#define FF_PROFILE_MPEG4_ADVANCED_CODING           11
+#define FF_PROFILE_MPEG4_ADVANCED_CORE             12
+#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
+#define FF_PROFILE_MPEG4_SIMPLE_STUDIO             14
+#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE           15
+
+    /**
+     * level
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+     int level;
+#define FF_LEVEL_UNKNOWN -99
+
+    /**
+     * low resolution decoding, 1-> 1/2 size, 2->1/4 size
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+     int lowres;
+
+    /**
+     * Bitstream width / height, may be different from width/height if lowres
+     * or other things are used.
+     * - encoding: unused
+     * - decoding: Set by user before init if known. Codec should override / dynamically change if needed.
+     */
+    int coded_width, coded_height;
+
+    /**
+     * frame skip threshold
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int frame_skip_threshold;
+
+    /**
+     * frame skip factor
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int frame_skip_factor;
+
+    /**
+     * frame skip exponent
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int frame_skip_exp;
+
+    /**
+     * frame skip comparison function
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int frame_skip_cmp;
+
+    /**
+     * Border processing masking, raises the quantizer for mbs on the borders
+     * of the picture.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float border_masking;
+
+    /**
+     * minimum MB lagrange multipler
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mb_lmin;
+
+    /**
+     * maximum MB lagrange multipler
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mb_lmax;
+
+    /**
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int me_penalty_compensation;
+
+    /**
+     *
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    enum AVDiscard skip_loop_filter;
+
+    /**
+     *
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    enum AVDiscard skip_idct;
+
+    /**
+     *
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    enum AVDiscard skip_frame;
+
+    /**
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int bidir_refine;
+
+    /**
+     *
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int brd_scale;
+
+    /**
+     * constant rate factor - quality-based VBR - values ~correspond to qps
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float crf;
+
+    /**
+     * constant quantization parameter rate control method
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int cqp;
+
+    /**
+     * minimum GOP size
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int keyint_min;
+
+    /**
+     * number of reference frames
+     * - encoding: Set by user.
+     * - decoding: Set by lavc.
+     */
+    int refs;
+
+    /**
+     * chroma qp offset from luma
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int chromaoffset;
+
+    /**
+     * Influences how often B-frames are used.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int bframebias;
+
+    /**
+     * trellis RD quantization
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int trellis;
+
+    /**
+     * Reduce fluctuations in qp (before curve compression).
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float complexityblur;
+
+    /**
+     * in-loop deblocking filter alphac0 parameter
+     * alpha is in the range -6...6
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int deblockalpha;
+
+    /**
+     * in-loop deblocking filter beta parameter
+     * beta is in the range -6...6
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int deblockbeta;
+
+    /**
+     * macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int partitions;
+#define X264_PART_I4X4 0x001  /* Analyze i4x4 */
+#define X264_PART_I8X8 0x002  /* Analyze i8x8 (requires 8x8 transform) */
+#define X264_PART_P8X8 0x010  /* Analyze p16x8, p8x16 and p8x8 */
+#define X264_PART_P4X4 0x020  /* Analyze p8x4, p4x8, p4x4 */
+#define X264_PART_B8X8 0x100  /* Analyze b16x8, b8x16 and b8x8 */
+
+    /**
+     * direct MV prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int directpred;
+
+    /**
+     * Audio cutoff bandwidth (0 means "automatic")
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int cutoff;
+
+    /**
+     * Multiplied by qscale for each frame and added to scene_change_score.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int scenechange_factor;
+
+    /**
+     *
+     * Note: Value depends upon the compare function used for fullpel ME.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int mv0_threshold;
+
+    /**
+     * Adjusts sensitivity of b_frame_strategy 1.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int b_sensitivity;
+
+    /**
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int compression_level;
+#define FF_COMPRESSION_DEFAULT -1
+
+    /**
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int min_prediction_order;
+
+    /**
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int max_prediction_order;
+
+#if FF_API_FLAC_GLOBAL_OPTS
+    /**
+     * @name FLAC options
+     * @deprecated Use FLAC encoder private options instead.
+     * @{
+     */
+
+    /**
+     * LPC coefficient precision - used by FLAC encoder
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    attribute_deprecated int lpc_coeff_precision;
+
+    /**
+     * search method for selecting prediction order
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    attribute_deprecated int prediction_order_method;
+
+    /**
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    attribute_deprecated int min_partition_order;
+
+    /**
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    attribute_deprecated int max_partition_order;
+    /**
+     * @}
+     */
+#endif
+
+    /**
+     * GOP timecode frame start number, in non drop frame format
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int64_t timecode_frame_start;
+
+#if FF_API_REQUEST_CHANNELS
+    /**
+     * Decoder should decode to this many channels if it can (0 for default)
+     * - encoding: unused
+     * - decoding: Set by user.
+     * @deprecated Deprecated in favor of request_channel_layout.
+     */
+    int request_channels;
+#endif
+
+#if FF_API_DRC_SCALE
+    /**
+     * Percentage of dynamic range compression to be applied by the decoder.
+     * The default value is 1.0, corresponding to full compression.
+     * - encoding: unused
+     * - decoding: Set by user.
+     * @deprecated use AC3 decoder private option instead.
+     */
+    attribute_deprecated float drc_scale;
+#endif
+
+    /**
+     * opaque 64bit number (generally a PTS) that will be reordered and
+     * output in AVFrame.reordered_opaque
+     * @deprecated in favor of pkt_pts
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    int64_t reordered_opaque;
+
+    /**
+     * 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 bits_per_raw_sample;
+
+    /**
+     * Audio channel layout.
+     * - encoding: set by user.
+     * - decoding: set by user, may be overwritten by libavcodec.
+     */
+    int64_t channel_layout;
+
+    /**
+     * Request decoder to use this channel layout if it can (0 for default)
+     * - encoding: unused
+     * - decoding: Set by user.
+     */
+    int64_t request_channel_layout;
+
+    /**
+     * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
+     * - encoding: Set by user.
+     * - decoding: unused.
+     */
+    float rc_max_available_vbv_use;
+
+    /**
+     * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
+     * - encoding: Set by user.
+     * - decoding: unused.
+     */
+    float rc_min_vbv_overflow_use;
+
+    /**
+     * Hardware accelerator in use
+     * - encoding: unused.
+     * - decoding: Set by libavcodec
+     */
+    struct AVHWAccel *hwaccel;
+
+    /**
+     * For some codecs, the time base is closer to the field rate than the frame rate.
+     * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
+     * if no telecine is used ...
+     *
+     * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
+     */
+    int ticks_per_frame;
+
+    /**
+     * Hardware accelerator context.
+     * For some hardware accelerators, a global context needs to be
+     * provided by the user. In that case, this holds display-dependent
+     * data FFmpeg cannot instantiate itself. Please refer to the
+     * FFmpeg HW accelerator documentation to know how to fill this
+     * is. e.g. for VA API, this is a struct vaapi_context.
+     * - encoding: unused
+     * - decoding: Set by user
+     */
+    void *hwaccel_context;
+
+    /**
+     * Chromaticity coordinates of the source primaries.
+     * - encoding: Set by user
+     * - decoding: Set by libavcodec
+     */
+    enum AVColorPrimaries color_primaries;
+
+    /**
+     * Color Transfer Characteristic.
+     * - encoding: Set by user
+     * - decoding: Set by libavcodec
+     */
+    enum AVColorTransferCharacteristic color_trc;
+
+    /**
+     * YUV colorspace type.
+     * - encoding: Set by user
+     * - decoding: Set by libavcodec
+     */
+    enum AVColorSpace colorspace;
+
+    /**
+     * MPEG vs JPEG YUV range.
+     * - encoding: Set by user
+     * - decoding: Set by libavcodec
+     */
+    enum AVColorRange color_range;
+
+    /**
+     * This defines the location of chroma samples.
+     * - encoding: Set by user
+     * - decoding: Set by libavcodec
+     */
+    enum AVChromaLocation chroma_sample_location;
+
+    /**
+     * The codec may call this to execute several independent things.
+     * It will return only after finishing all tasks.
+     * The user may replace this with some multithreaded implementation,
+     * the default implementation will execute the parts serially.
+     * Also see avcodec_thread_init and e.g. the --enable-pthread configure option.
+     * @param c context passed also to func
+     * @param count the number of things to execute
+     * @param arg2 argument passed unchanged to func
+     * @param ret return values of executed functions, must have space for "count" values. May be NULL.
+     * @param func function that will be called count times, with jobnr from 0 to count-1.
+     *             threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
+     *             two instances of func executing at the same time will have the same threadnr.
+     * @return always 0 currently, but code should handle a future improvement where when any call to func
+     *         returns < 0 no further calls to func may be done and < 0 is returned.
+     * - encoding: Set by libavcodec, user can override.
+     * - decoding: Set by libavcodec, user can override.
+     */
+    int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
+
+    /**
+     * explicit P-frame weighted prediction analysis method
+     * 0: off
+     * 1: fast blind weighting (one reference duplicate with -1 offset)
+     * 2: smart weighting (full fade detection analysis)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int weighted_p_pred;
+
+    /**
+     * AQ mode
+     * 0: Disabled
+     * 1: Variance AQ (complexity mask)
+     * 2: Auto-variance AQ (experimental)
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    int aq_mode;
+
+    /**
+     * AQ strength
+     * Reduces blocking and blurring in flat and textured areas.
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    float aq_strength;
+
+    /**
+     * PSY RD
+     * Strength of psychovisual optimization
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    float psy_rd;
+
+    /**
+     * PSY trellis
+     * Strength of psychovisual optimization
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    float psy_trellis;
+
+    /**
+     * RC lookahead
+     * Number of frames for frametype and ratecontrol lookahead
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    int rc_lookahead;
+
+    /**
+     * Constant rate factor maximum
+     * With CRF encoding mode and VBV restrictions enabled, prevents quality from being worse
+     * than crf_max, even if doing so would violate VBV restrictions.
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    float crf_max;
+
+    int log_level_offset;
+
+#if FF_API_FLAC_GLOBAL_OPTS
+    /**
+     * Determines which LPC analysis algorithm to use.
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    attribute_deprecated enum AVLPCType lpc_type;
+
+    /**
+     * Number of passes to use for Cholesky factorization during LPC analysis
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    attribute_deprecated int lpc_passes;
+#endif
+
+    /**
+     * Number of slices.
+     * Indicates number of picture subdivisions. Used for parallelized
+     * decoding.
+     * - encoding: Set by user
+     * - decoding: unused
+     */
+    int slices;
+
+    /**
+     * Header containing style information for text subtitles.
+     * For SUBTITLE_ASS subtitle type, it should contain the whole ASS
+     * [Script Info] and [V4+ Styles] section, plus the [Events] line and
+     * the Format line following. It shouldn't include any Dialogue line.
+     * - encoding: Set/allocated/freed by user (before avcodec_open())
+     * - decoding: Set/allocated/freed by libavcodec (by avcodec_open())
+     */
+    uint8_t *subtitle_header;
+    int subtitle_header_size;
+
+    /**
+     * Current packet as passed into the decoder, to avoid having
+     * to pass the packet into every function. Currently only valid
+     * inside lavc and get/release_buffer callbacks.
+     * - decoding: set by avcodec_decode_*, read by get_buffer() for setting pkt_pts
+     * - encoding: unused
+     */
+    AVPacket *pkt;
+
+    /**
+     * Whether this is a copy of the context which had init() called on it.
+     * This is used by multithreading - shared tables and picture pointers
+     * should be freed from the original context only.
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    int is_copy;
+
+    /**
+     * Which multithreading methods to use.
+     * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
+     * so clients which cannot provide future frames should not use it.
+     *
+     * - encoding: Set by user, otherwise the default is used.
+     * - 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
+
+    /**
+     * Which multithreading methods are in use by the codec.
+     * - encoding: Set by libavcodec.
+     * - decoding: Set by libavcodec.
+     */
+    int active_thread_type;
+
+    /**
+     * Set by the client if its custom get_buffer() callback can be called
+     * from another thread, which allows faster multithreaded decoding.
+     * draw_horiz_band() will be called from other threads regardless of this setting.
+     * Ignored if the default get_buffer() is used.
+     * - encoding: Set by user.
+     * - decoding: Set by user.
+     */
+    int thread_safe_callbacks;
+
+    /**
+     * VBV delay coded in the last frame (in periods of a 27 MHz clock).
+     * Used for compliant TS muxing.
+     * - encoding: Set by libavcodec.
+     * - decoding: unused.
+     */
+    uint64_t vbv_delay;
+
+    /**
+     * Type of service that the audio stream conveys.
+     * - encoding: Set by user.
+     * - decoding: Set by libavcodec.
+     */
+    enum AVAudioServiceType audio_service_type;
+
+    /**
+     * desired sample format
+     * - encoding: Not used.
+     * - decoding: Set by user.
+     * Decoder will decode to this format if it can.
+     */
+    enum AVSampleFormat request_sample_fmt;
+
+    /**
+     * Current statistics for PTS correction.
+     * - decoding: maintained and used by libavcodec, not intended to be used by user apps
+     * - encoding: unused
+     */
+    int64_t pts_correction_num_faulty_pts; /// Number of incorrect PTS values so far
+    int64_t pts_correction_num_faulty_dts; /// Number of incorrect DTS values so far
+    int64_t pts_correction_last_pts;       /// PTS of the last frame
+    int64_t pts_correction_last_dts;       /// DTS of the last frame
+
+
+} AVCodecContext;
+
+/**
+ * AVProfile.
+ */
+typedef struct AVProfile {
+    int profile;
+    const char *name; ///< short name for the profile
+} AVProfile;
+
+typedef struct AVCodecDefault AVCodecDefault;
+
+/**
+ * AVCodec.
+ */
+typedef struct AVCodec {
+    /**
+     * Name of the codec implementation.
+     * The name is globally unique among encoders and among decoders (but an
+     * encoder and a decoder can share the same name).
+     * This is the primary way to find a codec from the user perspective.
+     */
+    const char *name;
+    enum AVMediaType type;
+    enum CodecID id;
+    int priv_data_size;
+    int (*init)(AVCodecContext *);
+    int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
+    int (*close)(AVCodecContext *);
+    int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
+    /**
+     * Codec capabilities.
+     * see CODEC_CAP_*
+     */
+    int capabilities;
+    struct AVCodec *next;
+    /**
+     * Flush buffers.
+     * Will be called when seeking
+     */
+    void (*flush)(AVCodecContext *);
+    const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
+    const enum PixelFormat *pix_fmts;       ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
+    /**
+     * Descriptive name for the codec, meant to be more human readable than name.
+     * You should use the NULL_IF_CONFIG_SMALL() macro to define it.
+     */
+    const char *long_name;
+    const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
+    const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
+    const int64_t *channel_layouts;         ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
+    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder
+    const AVClass *priv_class;              ///< AVClass for the private context
+    const AVProfile *profiles;              ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
+
+    /**
+     * @name Frame-level threading support functions
+     * @{
+     */
+    /**
+     * If defined, called on thread contexts when they are created.
+     * If the codec allocates writable tables in init(), re-allocate them here.
+     * priv_data will be set to a copy of the original.
+     */
+    int (*init_thread_copy)(AVCodecContext *);
+    /**
+     * Copy necessary context variables from a previous thread context to the current one.
+     * If not defined, the next thread will start automatically; otherwise, the codec
+     * must call ff_thread_finish_setup().
+     *
+     * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
+     */
+    int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
+    /** @} */
+
+    /**
+     * Private codec-specific defaults.
+     */
+    const AVCodecDefault *defaults;
+} AVCodec;
+
+/**
+ * AVHWAccel.
+ */
+typedef struct AVHWAccel {
+    /**
+     * Name of the hardware accelerated codec.
+     * The name is globally unique among encoders and among decoders (but an
+     * encoder and a decoder can share the same name).
+     */
+    const char *name;
+
+    /**
+     * Type of codec implemented by the hardware accelerator.
+     *
+     * See AVMEDIA_TYPE_xxx
+     */
+    enum AVMediaType type;
+
+    /**
+     * Codec implemented by the hardware accelerator.
+     *
+     * See CODEC_ID_xxx
+     */
+    enum CodecID id;
+
+    /**
+     * Supported pixel format.
+     *
+     * Only hardware accelerated formats are supported here.
+     */
+    enum PixelFormat pix_fmt;
+
+    /**
+     * Hardware accelerated codec capabilities.
+     * see FF_HWACCEL_CODEC_CAP_*
+     */
+    int capabilities;
+
+    struct AVHWAccel *next;
+
+    /**
+     * Called at the beginning of each frame or field picture.
+     *
+     * Meaningful frame information (codec specific) is guaranteed to
+     * be parsed at this point. This function is mandatory.
+     *
+     * Note that buf can be NULL along with buf_size set to 0.
+     * Otherwise, this means the whole frame is available at this point.
+     *
+     * @param avctx the codec context
+     * @param buf the frame data buffer base
+     * @param buf_size the size of the frame in bytes
+     * @return zero if successful, a negative value otherwise
+     */
+    int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
+
+    /**
+     * Callback for each slice.
+     *
+     * Meaningful slice information (codec specific) is guaranteed to
+     * be parsed at this point. This function is mandatory.
+     *
+     * @param avctx the codec context
+     * @param buf the slice data buffer base
+     * @param buf_size the size of the slice in bytes
+     * @return zero if successful, a negative value otherwise
+     */
+    int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
+
+    /**
+     * Called at the end of each frame or field picture.
+     *
+     * The whole picture is parsed at this point and can now be sent
+     * to the hardware accelerator. This function is mandatory.
+     *
+     * @param avctx the codec context
+     * @return zero if successful, a negative value otherwise
+     */
+    int (*end_frame)(AVCodecContext *avctx);
+
+    /**
+     * Size of HW accelerator private data.
+     *
+     * Private data is allocated with av_mallocz() before
+     * AVCodecContext.get_buffer() and deallocated after
+     * AVCodecContext.release_buffer().
+     */
+    int priv_data_size;
+} AVHWAccel;
+
+/**
+ * four components are given, that's all.
+ * the last component is alpha
+ */
+typedef struct AVPicture {
+    uint8_t *data[4];
+    int linesize[4];       ///< number of bytes per line
+} AVPicture;
+
+#if FF_API_PALETTE_CONTROL
+/**
+ * AVPaletteControl
+ * This structure defines a method for communicating palette changes
+ * between and demuxer and a decoder.
+ *
+ * @deprecated Use AVPacket to send palette changes instead.
+ * This is totally broken.
+ */
+#define AVPALETTE_SIZE 1024
+#define AVPALETTE_COUNT 256
+typedef struct AVPaletteControl {
+
+    /* Demuxer sets this to 1 to indicate the palette has changed;
+     * decoder resets to 0. */
+    int palette_changed;
+
+    /* 4-byte ARGB palette entries, stored in native byte order; note that
+     * the individual palette components should be on a 8-bit scale; if
+     * the palette data comes from an IBM VGA native format, the component
+     * data is probably 6 bits in size and needs to be scaled. */
+    unsigned int palette[AVPALETTE_COUNT];
+
+} AVPaletteControl attribute_deprecated;
+#endif
+
+enum AVSubtitleType {
+    SUBTITLE_NONE,
+
+    SUBTITLE_BITMAP,                ///< A bitmap, pict will be set
+
+    /**
+     * Plain text, the text field must be set by the decoder and is
+     * authoritative. ass and pict fields may contain approximations.
+     */
+    SUBTITLE_TEXT,
+
+    /**
+     * Formatted text, the ass field must be set by the decoder and is
+     * authoritative. pict and text fields may contain approximations.
+     */
+    SUBTITLE_ASS,
+};
+
+typedef struct AVSubtitleRect {
+    int x;         ///< top left corner  of pict, undefined when pict is not set
+    int y;         ///< top left corner  of pict, undefined when pict is not set
+    int w;         ///< width            of pict, undefined when pict is not set
+    int h;         ///< height           of pict, undefined when pict is not set
+    int nb_colors; ///< number of colors in pict, undefined when pict is not set
+
+    /**
+     * data+linesize for the bitmap of this subtitle.
+     * can be set for text/ass as well once they where rendered
+     */
+    AVPicture pict;
+    enum AVSubtitleType type;
+
+    char *text;                     ///< 0 terminated plain UTF-8 text
+
+    /**
+     * 0 terminated ASS/SSA compatible event line.
+     * The pressentation of this is unaffected by the other values in this
+     * struct.
+     */
+    char *ass;
+} AVSubtitleRect;
+
+typedef struct AVSubtitle {
+    uint16_t format; /* 0 = graphics */
+    uint32_t start_display_time; /* relative to packet pts, in ms */
+    uint32_t end_display_time; /* relative to packet pts, in ms */
+    unsigned num_rects;
+    AVSubtitleRect **rects;
+    int64_t pts;    ///< Same as packet pts, in AV_TIME_BASE
+} AVSubtitle;
+
+/* packet functions */
+
+/**
+ * @deprecated use NULL instead
+ */
+attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
+
+/**
+ * Default packet destructor.
+ */
+void av_destruct_packet(AVPacket *pkt);
+
+/**
+ * Initialize optional fields of a packet with default values.
+ *
+ * @param pkt packet
+ */
+void av_init_packet(AVPacket *pkt);
+
+/**
+ * Allocate the payload of a packet and initialize its fields with
+ * default values.
+ *
+ * @param pkt packet
+ * @param size wanted payload size
+ * @return 0 if OK, AVERROR_xxx otherwise
+ */
+int av_new_packet(AVPacket *pkt, int size);
+
+/**
+ * Reduce packet size, correctly zeroing padding
+ *
+ * @param pkt packet
+ * @param size new size
+ */
+void av_shrink_packet(AVPacket *pkt, int size);
+
+/**
+ * Increase packet size, correctly zeroing padding
+ *
+ * @param pkt packet
+ * @param grow_by number of bytes by which to increase the size of the packet
+ */
+int av_grow_packet(AVPacket *pkt, int grow_by);
+
+/**
+ * @warning This is a hack - the packet memory allocation stuff is broken. The
+ * packet is allocated if it was not really allocated.
+ */
+int av_dup_packet(AVPacket *pkt);
+
+/**
+ * Free a packet.
+ *
+ * @param pkt packet to free
+ */
+void av_free_packet(AVPacket *pkt);
+
+/**
+ * Allocate new information of a packet.
+ *
+ * @param pkt packet
+ * @param type side information type
+ * @param size side information size
+ * @return pointer to fresh allocated data or NULL otherwise
+ */
+uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+                                 int size);
+
+/**
+ * Get side information from packet.
+ *
+ * @param pkt packet
+ * @param type desired side information type
+ * @param size pointer for side information size to store (optional)
+ * @return pointer to data if present or NULL otherwise
+ */
+uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+                                 int *size);
+
+int av_packet_merge_side_data(AVPacket *pkt);
+
+int av_packet_split_side_data(AVPacket *pkt);
+
+
+/* resample.c */
+
+struct ReSampleContext;
+struct AVResampleContext;
+
+typedef struct ReSampleContext ReSampleContext;
+
+/**
+ *  Initialize audio resampling context.
+ *
+ * @param output_channels  number of output channels
+ * @param input_channels   number of input channels
+ * @param output_rate      output sample rate
+ * @param input_rate       input sample rate
+ * @param sample_fmt_out   requested output sample format
+ * @param sample_fmt_in    input sample format
+ * @param filter_length    length of each FIR filter in the filterbank relative to the cutoff frequency
+ * @param log2_phase_count log2 of the number of entries in the polyphase filterbank
+ * @param linear           if 1 then the used FIR filter will be linearly interpolated
+                           between the 2 closest, if 0 the closest will be used
+ * @param cutoff           cutoff frequency, 1.0 corresponds to half the output sampling rate
+ * @return allocated ReSampleContext, NULL if error occured
+ */
+ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
+                                        int output_rate, int input_rate,
+                                        enum AVSampleFormat sample_fmt_out,
+                                        enum AVSampleFormat sample_fmt_in,
+                                        int filter_length, int log2_phase_count,
+                                        int linear, double cutoff);
+
+int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
+
+/**
+ * Free resample context.
+ *
+ * @param s a non-NULL pointer to a resample context previously
+ *          created with av_audio_resample_init()
+ */
+void audio_resample_close(ReSampleContext *s);
+
+
+/**
+ * Initialize an audio resampler.
+ * Note, if either rate is not an integer then simply scale both rates up so they are.
+ * @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq
+ * @param log2_phase_count log2 of the number of entries in the polyphase filterbank
+ * @param linear If 1 then the used FIR filter will be linearly interpolated
+                 between the 2 closest, if 0 the closest will be used
+ * @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate
+ */
+struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
+
+/**
+ * Resample an array of samples using a previously configured context.
+ * @param src an array of unconsumed samples
+ * @param consumed the number of samples of src which have been consumed are returned here
+ * @param src_size the number of unconsumed samples available
+ * @param dst_size the amount of space in samples available in dst
+ * @param update_ctx If this is 0 then the context will not be modified, that way several channels can be resampled with the same context.
+ * @return the number of samples written in dst or -1 if an error occurred
+ */
+int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
+
+
+/**
+ * Compensate samplerate/timestamp drift. The compensation is done by changing
+ * the resampler parameters, so no audible clicks or similar distortions occur
+ * @param compensation_distance distance in output samples over which the compensation should be performed
+ * @param sample_delta number of output samples which should be output less
+ *
+ * example: av_resample_compensate(c, 10, 500)
+ * here instead of 510 samples only 500 samples would be output
+ *
+ * note, due to rounding the actual compensation might be slightly different,
+ * especially if the compensation_distance is large and the in_rate used during init is small
+ */
+void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
+void av_resample_close(struct AVResampleContext *c);
+
+/**
+ * Allocate memory for a picture.  Call avpicture_free() to free it.
+ *
+ * @see avpicture_fill()
+ *
+ * @param picture the picture to be filled in
+ * @param pix_fmt the format of the picture
+ * @param width the width of the picture
+ * @param height the height of the picture
+ * @return zero if successful, a negative value if not
+ */
+int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
+
+/**
+ * Free a picture previously allocated by avpicture_alloc().
+ * The data buffer used by the AVPicture is freed, but the AVPicture structure
+ * itself is not.
+ *
+ * @param picture the AVPicture to be freed
+ */
+void avpicture_free(AVPicture *picture);
+
+/**
+ * Fill in the AVPicture fields.
+ * The fields of the given AVPicture are filled in by using the 'ptr' address
+ * which points to the image data buffer. Depending on the specified picture
+ * format, one or multiple image data pointers and line sizes will be set.
+ * If a planar format is specified, several pointers will be set pointing to
+ * the different picture planes and the line sizes of the different planes
+ * will be stored in the lines_sizes array.
+ * Call with ptr == NULL to get the required size for the ptr buffer.
+ *
+ * To allocate the buffer and fill in the AVPicture fields in one call,
+ * use avpicture_alloc().
+ *
+ * @param picture AVPicture whose fields are to be filled in
+ * @param ptr Buffer which will contain or contains the actual image data
+ * @param pix_fmt The format in which the picture data is stored.
+ * @param width the width of the image in pixels
+ * @param height the height of the image in pixels
+ * @return size of the image data in bytes
+ */
+int avpicture_fill(AVPicture *picture, uint8_t *ptr,
+                   enum PixelFormat pix_fmt, int width, int height);
+
+/**
+ * Copy pixel data from an AVPicture into a buffer.
+ * The data is stored compactly, without any gaps for alignment or padding
+ * which may be applied by avpicture_fill().
+ *
+ * @see avpicture_get_size()
+ *
+ * @param[in] src AVPicture containing image data
+ * @param[in] pix_fmt The format in which the picture data is stored.
+ * @param[in] width the width of the image in pixels.
+ * @param[in] height the height of the image in pixels.
+ * @param[out] dest A buffer into which picture data will be copied.
+ * @param[in] dest_size The size of 'dest'.
+ * @return The number of bytes written to dest, or a negative value (error code) on error.
+ */
+int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
+                     unsigned char *dest, int dest_size);
+
+/**
+ * Calculate the size in bytes that a picture of the given width and height
+ * would occupy if stored in the given picture format.
+ * Note that this returns the size of a compact representation as generated
+ * by avpicture_layout(), which can be smaller than the size required for e.g.
+ * avpicture_fill().
+ *
+ * @param pix_fmt the given picture format
+ * @param width the width of the image
+ * @param height the height of the image
+ * @return Image data size in bytes or -1 on error (e.g. too large dimensions).
+ */
+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);
+
+#if FF_API_GET_PIX_FMT_NAME
+/**
+ * Return the short name for a pixel format.
+ *
+ * \see av_get_pix_fmt(), av_get_pix_fmt_string().
+ * @deprecated Deprecated in favor of av_get_pix_fmt_name().
+ */
+attribute_deprecated
+const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
+#endif
+
+void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
+
+/**
+ * Return a value representing the fourCC code associated to the
+ * pixel format pix_fmt, or 0 if no associated fourCC code can be
+ * found.
+ */
+unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
+
+/**
+ * Put a string representing the codec tag codec_tag in buf.
+ *
+ * @param buf_size size in bytes of buf
+ * @return the length of the string that would have been generated if
+ * enough space had been available, excluding the trailing null
+ */
+size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
+
+#define FF_LOSS_RESOLUTION  0x0001 /**< loss due to resolution change */
+#define FF_LOSS_DEPTH       0x0002 /**< loss due to color depth change */
+#define FF_LOSS_COLORSPACE  0x0004 /**< loss due to color space conversion */
+#define FF_LOSS_ALPHA       0x0008 /**< loss of alpha bits */
+#define FF_LOSS_COLORQUANT  0x0010 /**< loss due to color quantization */
+#define FF_LOSS_CHROMA      0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */
+
+/**
+ * Compute what kind of losses will occur when converting from one specific
+ * pixel format to another.
+ * 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. These losses can involve loss of chroma, but also loss of
+ * resolution, loss of color depth, loss due to the color space conversion, loss
+ * of the alpha bits or loss due to color quantization.
+ * avcodec_get_fix_fmt_loss() informs you about the various types of losses
+ * which will occur when converting from one pixel format to another.
+ *
+ * @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.
+ */
+int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
+                             int has_alpha);
+
+/**
+ * Find the best pixel format to convert to given a certain source pixel
+ * format.  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_fmt() searches which of
+ * the given pixel formats should be used to suffer the least amount of loss.
+ * The pixel formats from which it chooses one, are determined by the
+ * pix_fmt_mask parameter.
+ *
+ * @code
+ * src_pix_fmt = PIX_FMT_YUV420P;
+ * 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
+ *
+ * @param[in] pix_fmt_mask bitmask determining which pixel format 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[out] loss_ptr Combination of flags informing you what kind of losses will occur.
+ * @return The best pixel format to convert to or -1 if none was found.
+ */
+enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, 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 */
+
+/**
+ * Tell if an image really has transparent alpha values.
+ * @return ored mask of FF_ALPHA_xxx constants
+ */
+int img_get_alpha_info(const AVPicture *src,
+                       enum PixelFormat pix_fmt, int width, int height);
+
+/* deinterlace a picture */
+/* deinterlace - if not supported return -1 */
+int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
+                          enum PixelFormat pix_fmt, int width, int height);
+
+/* external high level API */
+
+/**
+ * If c is NULL, returns the first registered codec,
+ * if c is non-NULL, returns the next registered codec after c,
+ * or NULL if c is the last one.
+ */
+AVCodec *av_codec_next(AVCodec *c);
+
+/**
+ * Return the LIBAVCODEC_VERSION_INT constant.
+ */
+unsigned avcodec_version(void);
+
+/**
+ * Return the libavcodec build-time configuration.
+ */
+const char *avcodec_configuration(void);
+
+/**
+ * Return the libavcodec license.
+ */
+const char *avcodec_license(void);
+
+/**
+ * Initialize libavcodec.
+ * If called more than once, does nothing.
+ *
+ * @warning This function must be called before any other libavcodec
+ * function.
+ *
+ * @warning This function is not thread-safe.
+ */
+void avcodec_init(void);
+
+/**
+ * Register the codec codec and initialize libavcodec.
+ *
+ * @see avcodec_init(), avcodec_register_all()
+ */
+void avcodec_register(AVCodec *codec);
+
+/**
+ * Find a registered encoder with a matching codec ID.
+ *
+ * @param id CodecID of the requested encoder
+ * @return An encoder if one was found, NULL otherwise.
+ */
+AVCodec *avcodec_find_encoder(enum CodecID id);
+
+/**
+ * Find a registered encoder with the specified name.
+ *
+ * @param name name of the requested encoder
+ * @return An encoder if one was found, NULL otherwise.
+ */
+AVCodec *avcodec_find_encoder_by_name(const char *name);
+
+/**
+ * Find a registered decoder with a matching codec ID.
+ *
+ * @param id CodecID of the requested decoder
+ * @return A decoder if one was found, NULL otherwise.
+ */
+AVCodec *avcodec_find_decoder(enum CodecID id);
+
+/**
+ * Find a registered decoder with the specified name.
+ *
+ * @param name name of the requested decoder
+ * @return A decoder if one was found, NULL otherwise.
+ */
+AVCodec *avcodec_find_decoder_by_name(const char *name);
+void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
+
+/**
+ * Return a name for the specified profile, if available.
+ *
+ * @param codec the codec that is searched for the given profile
+ * @param profile the profile value for which a name is requested
+ * @return A name for the profile if found, NULL otherwise.
+ */
+const char *av_get_profile_name(const AVCodec *codec, int profile);
+
+/**
+ * Set the fields of the given AVCodecContext to default values.
+ *
+ * @param s The AVCodecContext of which the fields should be set to default values.
+ */
+void avcodec_get_context_defaults(AVCodecContext *s);
+
+/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
+ *  we WILL change its arguments and name a few times! */
+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
+
+/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
+ *  we WILL change its arguments and name a few times! */
+int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
+
+#if FF_API_ALLOC_CONTEXT
+/**
+ * Allocate an AVCodecContext and set its fields to default values.  The
+ * resulting struct can be deallocated by simply calling av_free().
+ *
+ * @return An AVCodecContext filled with default values or NULL on failure.
+ * @see avcodec_get_context_defaults
+ *
+ * @deprecated use avcodec_alloc_context3()
+ */
+attribute_deprecated
+AVCodecContext *avcodec_alloc_context(void);
+
+/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
+ *  we WILL change its arguments and name a few times! */
+attribute_deprecated
+AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
+#endif
+
+/**
+ * Allocate an AVCodecContext and set its fields to default values.  The
+ * resulting struct can be deallocated by simply calling av_free().
+ *
+ * @param codec if non-NULL, allocate private data and initialize defaults
+ *              for the given codec. It is illegal to then call avcodec_open()
+ *              with a different codec.
+ *
+ * @return An AVCodecContext filled with default values or NULL on failure.
+ * @see avcodec_get_context_defaults
+ *
+ * @deprecated use avcodec_alloc_context3()
+ */
+AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
+
+/**
+ * Copy the settings of the source AVCodecContext into the destination
+ * AVCodecContext. The resulting destination codec context will be
+ * unopened, i.e. you are required to call avcodec_open() before you
+ * can use this AVCodecContext to decode/encode video/audio data.
+ *
+ * @param dest target codec context, should be initialized with
+ *             avcodec_alloc_context3(), but otherwise uninitialized
+ * @param src source codec context
+ * @return AVERROR() on error (e.g. memory allocation error), 0 on success
+ */
+int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
+
+/**
+ * Set the fields of the given AVFrame to default values.
+ *
+ * @param pic The AVFrame of which the fields should be set to default values.
+ */
+void avcodec_get_frame_defaults(AVFrame *pic);
+
+/**
+ * Allocate an AVFrame and set its fields to default values.  The resulting
+ * struct can be deallocated by simply calling av_free().
+ *
+ * @return An AVFrame filled with default values or NULL on failure.
+ * @see avcodec_get_frame_defaults
+ */
+AVFrame *avcodec_alloc_frame(void);
+
+int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
+void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
+int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
+
+/**
+ * Return the amount of padding in pixels which the get_buffer callback must
+ * provide around the edge of the image for codecs which do not have the
+ * CODEC_FLAG_EMU_EDGE flag.
+ *
+ * @return Required padding in pixels.
+ */
+unsigned avcodec_get_edge_width(void);
+/**
+ * Modify width and height values so that they will result in a memory
+ * buffer that is acceptable for the codec if you do not use any horizontal
+ * padding.
+ *
+ * May only be used if a codec with CODEC_CAP_DR1 has been opened.
+ * If CODEC_FLAG_EMU_EDGE is not set, the dimensions must have been increased
+ * according to avcodec_get_edge_width() before.
+ */
+void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
+/**
+ * Modify width and height values so that they will result in a memory
+ * buffer that is acceptable for the codec if you also ensure that all
+ * line sizes are a multiple of the respective linesize_align[i].
+ *
+ * May only be used if a codec with CODEC_CAP_DR1 has been opened.
+ * If CODEC_FLAG_EMU_EDGE is not set, the dimensions must have been increased
+ * according to avcodec_get_edge_width() before.
+ */
+void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
+                               int linesize_align[4]);
+
+enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
+
+#if FF_API_THREAD_INIT
+/**
+ * @deprecated Set s->thread_count before calling avcodec_open() instead of calling this.
+ */
+attribute_deprecated
+int avcodec_thread_init(AVCodecContext *s, int thread_count);
+#endif
+
+int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
+int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
+//FIXME func typedef
+
+#if FF_API_AVCODEC_OPEN
+/**
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
+ * function the context has to be allocated.
+ *
+ * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
+ * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
+ * retrieving a codec.
+ *
+ * @warning This function is not thread safe!
+ *
+ * @code
+ * avcodec_register_all();
+ * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * if (!codec)
+ *     exit(1);
+ *
+ * context = avcodec_alloc_context3(codec);
+ *
+ * if (avcodec_open(context, codec) < 0)
+ *     exit(1);
+ * @endcode
+ *
+ * @param avctx The context which will be set up to use the given codec.
+ * @param codec The codec to use within the context.
+ * @return zero on success, a negative value on error
+ * @see avcodec_alloc_context3, avcodec_find_decoder, avcodec_find_encoder, avcodec_close
+ *
+ * @deprecated use avcodec_open2
+ */
+attribute_deprecated
+int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
+#endif
+
+/**
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
+ * function the context has to be allocated with avcodec_alloc_context().
+ *
+ * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
+ * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
+ * retrieving a codec.
+ *
+ * @warning This function is not thread safe!
+ *
+ * @code
+ * avcodec_register_all();
+ * av_dict_set(&opts, "b", "2.5M", 0);
+ * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * if (!codec)
+ *     exit(1);
+ *
+ * context = avcodec_alloc_context();
+ *
+ * if (avcodec_open(context, codec, opts) < 0)
+ *     exit(1);
+ * @endcode
+ *
+ * @param avctx The context to initialize.
+ * @param options A dictionary filled with AVCodecContext and codec-private options.
+ *                On return this object will be filled with options that were not found.
+ *
+ * @return zero on success, a negative value on error
+ * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),
+ *      av_dict_set(), av_opt_find().
+ */
+int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options);
+
+/**
+ * Decode the audio frame of size avpkt->size from avpkt->data into samples.
+ * Some decoders may support multiple frames in a single AVPacket, such
+ * decoders would then just decode the first frame. In this case,
+ * avcodec_decode_audio3 has to be called again with an AVPacket that contains
+ * the remaining data in order to decode the second frame etc.
+ * If no frame
+ * could be outputted, frame_size_ptr is zero. Otherwise, it is the
+ * decompressed frame size in bytes.
+ *
+ * @warning You must set frame_size_ptr to the allocated size of the
+ * output buffer before calling avcodec_decode_audio3().
+ *
+ * @warning The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than
+ * the actual read bytes because some optimized bitstream readers read 32 or 64
+ * bits at once and could read over the end.
+ *
+ * @warning The end of the input buffer avpkt->data should be set to 0 to ensure that
+ * no overreading happens for damaged MPEG streams.
+ *
+ * @note You might have to align the input buffer avpkt->data and output buffer
+ * samples. The alignment requirements depend on the CPU: On some CPUs it isn't
+ * necessary at all, on others it won't work at all if not aligned and on others
+ * it will work but it will have an impact on performance.
+ *
+ * In practice, avpkt->data should have 4 byte alignment at minimum and
+ * samples should be 16 byte aligned unless the CPU doesn't need it
+ * (AltiVec and SSE do).
+ *
+ * @param avctx the codec context
+ * @param[out] samples the output buffer, sample type in avctx->sample_fmt
+ * @param[in,out] frame_size_ptr the output buffer size in bytes
+ * @param[in] avpkt The input AVPacket containing the input buffer.
+ *            You can create such packet with av_init_packet() and by then setting
+ *            data and size, some decoders might in addition need other fields.
+ *            All decoders are designed to use the least fields possible though.
+ * @return On error a negative value is returned, otherwise the number of bytes
+ * used or zero if no frame data was decompressed (used) from the input AVPacket.
+ */
+int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
+                         int *frame_size_ptr,
+                         AVPacket *avpkt);
+
+/**
+ * Decode the video frame of size avpkt->size from avpkt->data into picture.
+ * Some decoders may support multiple frames in a single AVPacket, such
+ * decoders would then just decode the first frame.
+ *
+ * @warning The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than
+ * the actual read bytes because some optimized bitstream readers read 32 or 64
+ * bits at once and could read over the end.
+ *
+ * @warning The end of the input buffer buf should be set to 0 to ensure that
+ * no overreading happens for damaged MPEG streams.
+ *
+ * @note You might have to align the input buffer avpkt->data.
+ * The alignment requirements depend on the CPU: on some CPUs it isn't
+ * necessary at all, on others it won't work at all if not aligned and on others
+ * it will work but it will have an impact on performance.
+ *
+ * In practice, avpkt->data should have 4 byte alignment at minimum.
+ *
+ * @note Some codecs have a delay between input and output, these need to be
+ * fed with avpkt->data=NULL, avpkt->size=0 at the end to return the remaining frames.
+ *
+ * @param avctx the codec context
+ * @param[out] picture The AVFrame in which the decoded video frame will be stored.
+ *             Use avcodec_alloc_frame to get an AVFrame, the codec will
+ *             allocate memory for the actual bitmap.
+ *             with default get/release_buffer(), the decoder frees/reuses the bitmap as it sees fit.
+ *             with overridden get/release_buffer() (needs CODEC_CAP_DR1) the user decides into what buffer the decoder
+ *                   decodes and the decoder tells the user once it does not need the data anymore,
+ *                   the user app can at this point free/reuse/keep the memory as it sees fit.
+ *
+ * @param[in] avpkt The input AVpacket containing the input buffer.
+ *            You can create such packet with av_init_packet() and by then setting
+ *            data and size, some decoders might in addition need other fields like
+ *            flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least
+ *            fields possible.
+ * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
+ * @return On error a negative value is returned, otherwise the number of bytes
+ * used or zero if no frame could be decompressed.
+ */
+int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
+                         int *got_picture_ptr,
+                         AVPacket *avpkt);
+
+/**
+ * Decode a subtitle message.
+ * Return a negative value on error, otherwise return the number of bytes used.
+ * If no subtitle could be decompressed, got_sub_ptr is zero.
+ * Otherwise, the subtitle is stored in *sub.
+ * Note that CODEC_CAP_DR1 is not available for subtitle codecs. This is for
+ * simplicity, because the performance difference is expect to be negligible
+ * and reusing a get_buffer written for video codecs would probably perform badly
+ * due to a potentially very different allocation pattern.
+ *
+ * @param avctx the codec context
+ * @param[out] sub The AVSubtitle in which the decoded subtitle will be stored, must be
+                   freed with avsubtitle_free if *got_sub_ptr is set.
+ * @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.
+ * @param[in] avpkt The input AVPacket containing the input buffer.
+ */
+int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
+                            int *got_sub_ptr,
+                            AVPacket *avpkt);
+
+/**
+ * Frees all allocated data in the given subtitle struct.
+ *
+ * @param sub AVSubtitle to free.
+ */
+void avsubtitle_free(AVSubtitle *sub);
+
+int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
+                        int *data_size_ptr,
+                        uint8_t *buf, int buf_size);
+
+/**
+ * Encode an audio frame from samples into buf.
+ *
+ * @note The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large.
+ * However, for PCM audio the user will know how much space is needed
+ * because it depends on the value passed in buf_size as described
+ * below. In that case a lower value can be used.
+ *
+ * @param avctx the codec context
+ * @param[out] buf the output buffer
+ * @param[in] buf_size the output buffer size
+ * @param[in] samples the input buffer containing the samples
+ * The number of samples read from this buffer is frame_size*channels,
+ * both of which are defined in avctx.
+ * For PCM audio the number of samples read from samples is equal to
+ * buf_size * input_sample_size / output_sample_size.
+ * @return On error a negative value is returned, on success zero or the number
+ * of bytes used to encode the data read from the input buffer.
+ */
+int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
+                         const short *samples);
+
+/**
+ * Encode a video frame from pict into buf.
+ * The input picture should be
+ * stored using a specific format, namely avctx.pix_fmt.
+ *
+ * @param avctx the codec context
+ * @param[out] buf the output buffer for the bitstream of encoded frame
+ * @param[in] buf_size the size of the output buffer in bytes
+ * @param[in] pict the input picture to encode
+ * @return On error a negative value is returned, on success zero or the number
+ * of bytes used from the output buffer.
+ */
+int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
+                         const AVFrame *pict);
+int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
+                            const AVSubtitle *sub);
+
+int avcodec_close(AVCodecContext *avctx);
+
+/**
+ * Register all the codecs, parsers and bitstream filters which were enabled at
+ * configuration time. If you do not call this function you can select exactly
+ * which formats you want to support, by using the individual registration
+ * functions.
+ *
+ * @see avcodec_register
+ * @see av_register_codec_parser
+ * @see av_register_bitstream_filter
+ */
+void avcodec_register_all(void);
+
+/**
+ * Flush buffers, should be called when seeking or when switching to a different stream.
+ */
+void avcodec_flush_buffers(AVCodecContext *avctx);
+
+void avcodec_default_free_buffers(AVCodecContext *s);
+
+/* misc useful functions */
+
+#if FF_API_OLD_FF_PICT_TYPES
+/**
+ * Return a single letter to describe the given picture type pict_type.
+ *
+ * @param[in] pict_type the picture type
+ * @return A single character representing the picture type.
+ * @deprecated Use av_get_picture_type_char() instead.
+ */
+attribute_deprecated
+char av_get_pict_type_char(int pict_type);
+#endif
+
+/**
+ * Return codec bits per sample.
+ *
+ * @param[in] codec_id the codec
+ * @return Number of bits per sample or zero if unknown for the given codec.
+ */
+int av_get_bits_per_sample(enum CodecID codec_id);
+
+#if FF_API_OLD_SAMPLE_FMT
+/**
+ * @deprecated Use av_get_bytes_per_sample() instead.
+ */
+attribute_deprecated
+int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
+#endif
+
+/* frame parsing */
+typedef struct AVCodecParserContext {
+    void *priv_data;
+    struct AVCodecParser *parser;
+    int64_t frame_offset; /* offset of the current frame */
+    int64_t cur_offset; /* current offset
+                           (incremented by each av_parser_parse()) */
+    int64_t next_frame_offset; /* offset of the next frame */
+    /* video info */
+    int pict_type; /* XXX: Put it back in AVCodecContext. */
+    /**
+     * This field is used for proper frame duration computation in lavf.
+     * It signals, how much longer the frame duration of the current frame
+     * is compared to normal frame duration.
+     *
+     * frame_duration = (1 + repeat_pict) * time_base
+     *
+     * It is used by codecs like H.264 to display telecined material.
+     */
+    int repeat_pict; /* XXX: Put it back in AVCodecContext. */
+    int64_t pts;     /* pts of the current frame */
+    int64_t dts;     /* dts of the current frame */
+
+    /* private data */
+    int64_t last_pts;
+    int64_t last_dts;
+    int fetch_timestamp;
+
+#define AV_PARSER_PTS_NB 4
+    int cur_frame_start_index;
+    int64_t cur_frame_offset[AV_PARSER_PTS_NB];
+    int64_t cur_frame_pts[AV_PARSER_PTS_NB];
+    int64_t cur_frame_dts[AV_PARSER_PTS_NB];
+
+    int flags;
+#define PARSER_FLAG_COMPLETE_FRAMES           0x0001
+#define PARSER_FLAG_ONCE                      0x0002
+/// Set if the parser has a valid file offset
+#define PARSER_FLAG_FETCHED_OFFSET            0x0004
+
+    int64_t offset;      ///< byte offset from starting packet start
+    int64_t cur_frame_end[AV_PARSER_PTS_NB];
+
+    /**
+     * Set by parser to 1 for key frames and 0 for non-key frames.
+     * It is initialized to -1, so if the parser doesn't set this flag,
+     * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames
+     * will be used.
+     */
+    int key_frame;
+
+    /**
+     * Time difference in stream time base units from the pts of this
+     * packet to the point at which the output from the decoder has converged
+     * independent from the availability of previous frames. That is, the
+     * frames are virtually identical no matter if decoding started from
+     * the very first frame or from this keyframe.
+     * Is AV_NOPTS_VALUE if unknown.
+     * This field is not the display duration of the current frame.
+     * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY
+     * set.
+     *
+     * The purpose of this field is to allow seeking in streams that have no
+     * keyframes in the conventional sense. It corresponds to the
+     * recovery point SEI in H.264 and match_time_delta in NUT. It is also
+     * essential for some types of subtitle streams to ensure that all
+     * subtitles are correctly displayed after seeking.
+     */
+    int64_t convergence_duration;
+
+    // Timestamp generation support:
+    /**
+     * Synchronization point for start of timestamp generation.
+     *
+     * Set to >0 for sync point, 0 for no sync point and <0 for undefined
+     * (default).
+     *
+     * For example, this corresponds to presence of H.264 buffering period
+     * SEI message.
+     */
+    int dts_sync_point;
+
+    /**
+     * Offset of the current timestamp against last timestamp sync point in
+     * units of AVCodecContext.time_base.
+     *
+     * Set to INT_MIN when dts_sync_point unused. Otherwise, it must
+     * contain a valid timestamp offset.
+     *
+     * Note that the timestamp of sync point has usually a nonzero
+     * dts_ref_dts_delta, which refers to the previous sync point. Offset of
+     * the next frame after timestamp sync point will be usually 1.
+     *
+     * For example, this corresponds to H.264 cpb_removal_delay.
+     */
+    int dts_ref_dts_delta;
+
+    /**
+     * Presentation delay of current frame in units of AVCodecContext.time_base.
+     *
+     * Set to INT_MIN when dts_sync_point unused. Otherwise, it must
+     * contain valid non-negative timestamp delta (presentation time of a frame
+     * must not lie in the past).
+     *
+     * This delay represents the difference between decoding and presentation
+     * time of the frame.
+     *
+     * For example, this corresponds to H.264 dpb_output_delay.
+     */
+    int pts_dts_delta;
+
+    /**
+     * Position of the packet in file.
+     *
+     * Analogous to cur_frame_pts/dts
+     */
+    int64_t cur_frame_pos[AV_PARSER_PTS_NB];
+
+    /**
+     * Byte position of currently parsed frame in stream.
+     */
+    int64_t pos;
+
+    /**
+     * Previous frame byte position.
+     */
+    int64_t last_pos;
+} AVCodecParserContext;
+
+typedef struct AVCodecParser {
+    int codec_ids[5]; /* several codec IDs are permitted */
+    int priv_data_size;
+    int (*parser_init)(AVCodecParserContext *s);
+    int (*parser_parse)(AVCodecParserContext *s,
+                        AVCodecContext *avctx,
+                        const uint8_t **poutbuf, int *poutbuf_size,
+                        const uint8_t *buf, int buf_size);
+    void (*parser_close)(AVCodecParserContext *s);
+    int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
+    struct AVCodecParser *next;
+} AVCodecParser;
+
+AVCodecParser *av_parser_next(AVCodecParser *c);
+
+void av_register_codec_parser(AVCodecParser *parser);
+AVCodecParserContext *av_parser_init(int codec_id);
+
+/**
+ * Parse a packet.
+ *
+ * @param s             parser context.
+ * @param avctx         codec context.
+ * @param poutbuf       set to pointer to parsed buffer or NULL if not yet finished.
+ * @param poutbuf_size  set to size of parsed buffer or zero if not yet finished.
+ * @param buf           input buffer.
+ * @param buf_size      input length, to signal EOF, this should be 0 (so that the last frame can be output).
+ * @param pts           input presentation timestamp.
+ * @param dts           input decoding timestamp.
+ * @param pos           input byte position in stream.
+ * @return the number of bytes of the input bitstream used.
+ *
+ * Example:
+ * @code
+ *   while(in_len){
+ *       len = av_parser_parse2(myparser, AVCodecContext, &data, &size,
+ *                                        in_data, in_len,
+ *                                        pts, dts, pos);
+ *       in_data += len;
+ *       in_len  -= len;
+ *
+ *       if(size)
+ *          decode_frame(data, size);
+ *   }
+ * @endcode
+ */
+int av_parser_parse2(AVCodecParserContext *s,
+                     AVCodecContext *avctx,
+                     uint8_t **poutbuf, int *poutbuf_size,
+                     const uint8_t *buf, int buf_size,
+                     int64_t pts, int64_t dts,
+                     int64_t pos);
+
+int av_parser_change(AVCodecParserContext *s,
+                     AVCodecContext *avctx,
+                     uint8_t **poutbuf, int *poutbuf_size,
+                     const uint8_t *buf, int buf_size, int keyframe);
+void av_parser_close(AVCodecParserContext *s);
+
+
+typedef struct AVBitStreamFilterContext {
+    void *priv_data;
+    struct AVBitStreamFilter *filter;
+    AVCodecParserContext *parser;
+    struct AVBitStreamFilterContext *next;
+} AVBitStreamFilterContext;
+
+
+typedef struct AVBitStreamFilter {
+    const char *name;
+    int priv_data_size;
+    int (*filter)(AVBitStreamFilterContext *bsfc,
+                  AVCodecContext *avctx, const char *args,
+                  uint8_t **poutbuf, int *poutbuf_size,
+                  const uint8_t *buf, int buf_size, int keyframe);
+    void (*close)(AVBitStreamFilterContext *bsfc);
+    struct AVBitStreamFilter *next;
+} AVBitStreamFilter;
+
+void av_register_bitstream_filter(AVBitStreamFilter *bsf);
+AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
+int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
+                               AVCodecContext *avctx, const char *args,
+                               uint8_t **poutbuf, int *poutbuf_size,
+                               const uint8_t *buf, int buf_size, int keyframe);
+void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
+
+AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
+
+/* memory */
+
+/**
+ * Reallocate the given block if it is not large enough, otherwise do nothing.
+ *
+ * @see av_realloc
+ */
+void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
+
+/**
+ * Allocate a buffer, reusing the given one if large enough.
+ *
+ * Contrary to av_fast_realloc the current buffer contents might not be
+ * preserved and on error the old buffer is freed, thus no special
+ * handling to avoid memleaks is necessary.
+ *
+ * @param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer
+ * @param size size of the buffer *ptr points to
+ * @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and
+ *                 *size 0 if an error occurred.
+ */
+void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
+
+/**
+ * Copy image src to dst. Wraps av_picture_data_copy() above.
+ */
+void av_picture_copy(AVPicture *dst, const AVPicture *src,
+                     enum PixelFormat pix_fmt, int width, int height);
+
+/**
+ * Crop image top and left side.
+ */
+int av_picture_crop(AVPicture *dst, const AVPicture *src,
+                    enum PixelFormat pix_fmt, int top_band, int left_band);
+
+/**
+ * Pad image.
+ */
+int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
+            int padtop, int padbottom, int padleft, int padright, int *color);
+
+/**
+ * Encode extradata length to a buffer. Used by xiph codecs.
+ *
+ * @param s buffer to write to; must be at least (v/255+1) bytes long
+ * @param v size of extradata in bytes
+ * @return number of bytes written to the buffer.
+ */
+unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
+
+/**
+ * Logs a generic warning message about a missing feature. This function is
+ * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
+ * only, and would normally not be used by applications.
+ * @param[in] avc a pointer to an arbitrary struct of which the first field is
+ * a pointer to an AVClass struct
+ * @param[in] feature string containing the name of the missing feature
+ * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
+ * If want_sample is non-zero, additional verbage will be added to the log
+ * message which tells the user how to report samples to the development
+ * mailing list.
+ */
+void av_log_missing_feature(void *avc, const char *feature, int want_sample);
+
+/**
+ * Log a generic warning message asking for a sample. This function is
+ * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
+ * only, and would normally not be used by applications.
+ * @param[in] avc a pointer to an arbitrary struct of which the first field is
+ * a pointer to an AVClass struct
+ * @param[in] msg string containing an optional message, or NULL if no message
+ */
+void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
+
+/**
+ * Register the hardware accelerator hwaccel.
+ */
+void av_register_hwaccel(AVHWAccel *hwaccel);
+
+/**
+ * If hwaccel is NULL, returns the first registered hardware accelerator,
+ * if hwaccel is non-NULL, returns the next registered hardware accelerator
+ * after hwaccel, or NULL if hwaccel is the last one.
+ */
+AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
+
+
+/**
+ * Lock operation used by lockmgr
+ */
+enum AVLockOp {
+  AV_LOCK_CREATE,  ///< Create a mutex
+  AV_LOCK_OBTAIN,  ///< Lock the mutex
+  AV_LOCK_RELEASE, ///< Unlock the mutex
+  AV_LOCK_DESTROY, ///< Free mutex resources
+};
+
+/**
+ * Register a user provided lock manager supporting the operations
+ * specified by AVLockOp. mutex points to a (void *) where the
+ * lockmgr should store/get a pointer to a user allocated mutex. It's
+ * NULL upon AV_LOCK_CREATE and != NULL for all other ops.
+ *
+ * @param cb User defined callback. Note: FFmpeg may invoke calls to this
+ *           callback during the call to av_lockmgr_register().
+ *           Thus, the application must be prepared to handle that.
+ *           If cb is set to NULL the lockmgr will be unregistered.
+ *           Also note that during unregistration the previously registered
+ *           lockmgr callback may also be invoked.
+ */
+int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
+
+#endif /* AVCODEC_AVCODEC_H */
diff --git a/ffmpeg 0.8/include/libavcodec/avfft.h b/ffmpeg 0.8/include/libavcodec/avfft.h
new file mode 100644 (file)
index 0000000..be2d9c7
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_AVFFT_H
+#define AVCODEC_AVFFT_H
+
+typedef float FFTSample;
+
+typedef struct FFTComplex {
+    FFTSample re, im;
+} FFTComplex;
+
+typedef struct FFTContext FFTContext;
+
+/**
+ * Set up a complex FFT.
+ * @param nbits           log2 of the length of the input array
+ * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
+ */
+FFTContext *av_fft_init(int nbits, int inverse);
+
+/**
+ * Do the permutation needed BEFORE calling ff_fft_calc().
+ */
+void av_fft_permute(FFTContext *s, FFTComplex *z);
+
+/**
+ * Do a complex FFT with the parameters defined in av_fft_init(). The
+ * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
+ */
+void av_fft_calc(FFTContext *s, FFTComplex *z);
+
+void av_fft_end(FFTContext *s);
+
+FFTContext *av_mdct_init(int nbits, int inverse, double scale);
+void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_mdct_end(FFTContext *s);
+
+/* Real Discrete Fourier Transform */
+
+enum RDFTransformType {
+    DFT_R2C,
+    IDFT_C2R,
+    IDFT_R2C,
+    DFT_C2R,
+};
+
+typedef struct RDFTContext RDFTContext;
+
+/**
+ * Set up a real FFT.
+ * @param nbits           log2 of the length of the input array
+ * @param trans           the type of transform
+ */
+RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
+void av_rdft_calc(RDFTContext *s, FFTSample *data);
+void av_rdft_end(RDFTContext *s);
+
+/* Discrete Cosine Transform */
+
+typedef struct DCTContext DCTContext;
+
+enum DCTTransformType {
+    DCT_II = 0,
+    DCT_III,
+    DCT_I,
+    DST_I,
+};
+
+/**
+ * Set up DCT.
+ * @param nbits           size of the input array:
+ *                        (1 << nbits)     for DCT-II, DCT-III and DST-I
+ *                        (1 << nbits) + 1 for DCT-I
+ *
+ * @note the first element of the input of DST-I is ignored
+ */
+DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
+void av_dct_calc(DCTContext *s, FFTSample *data);
+void av_dct_end (DCTContext *s);
+
+#endif /* AVCODEC_AVFFT_H */
diff --git a/ffmpeg 0.8/include/libavcodec/dxva2.h b/ffmpeg 0.8/include/libavcodec/dxva2.h
new file mode 100644 (file)
index 0000000..6eb494b
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * DXVA2 HW acceleration
+ *
+ * copyright (c) 2009 Laurent Aimar
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_DXVA_H
+#define AVCODEC_DXVA_H
+
+#include <stdint.h>
+
+#include <dxva2api.h>
+
+#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
+
+/**
+ * This structure is used to provides the necessary configurations and data
+ * to the DXVA2 FFmpeg HWAccel implementation.
+ *
+ * The application must make it available as AVCodecContext.hwaccel_context.
+ */
+struct dxva_context {
+    /**
+     * DXVA2 decoder object
+     */
+    IDirectXVideoDecoder *decoder;
+
+    /**
+     * DXVA2 configuration used to create the decoder
+     */
+    const DXVA2_ConfigPictureDecode *cfg;
+
+    /**
+     * The number of surface in the surface array
+     */
+    unsigned surface_count;
+
+    /**
+     * The array of Direct3D surfaces used to create the decoder
+     */
+    LPDIRECT3DSURFACE9 *surface;
+
+    /**
+     * A bit field configuring the workarounds needed for using the decoder
+     */
+    uint64_t workaround;
+
+    /**
+     * Private to the FFmpeg AVHWAccel implementation
+     */
+    unsigned report_id;
+};
+
+#endif /* AVCODEC_DXVA_H */
diff --git a/ffmpeg 0.8/include/libavcodec/opt.h b/ffmpeg 0.8/include/libavcodec/opt.h
new file mode 100644 (file)
index 0000000..2380e74
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * This header is provided for compatibility only and will be removed
+ * on next major bump
+ */
+
+#ifndef AVCODEC_OPT_H
+#define AVCODEC_OPT_H
+
+#include "libavcodec/version.h"
+
+#if FF_API_OPT_H
+#include "libavutil/opt.h"
+#endif
+
+#endif /* AVCODEC_OPT_H */
diff --git a/ffmpeg 0.8/include/libavcodec/vaapi.h b/ffmpeg 0.8/include/libavcodec/vaapi.h
new file mode 100644 (file)
index 0000000..4c3bb9b
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Video Acceleration API (shared data between FFmpeg and the video player)
+ * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
+ *
+ * Copyright (C) 2008-2009 Splitted-Desktop Systems
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_VAAPI_H
+#define AVCODEC_VAAPI_H
+
+#include <stdint.h>
+
+/**
+ * @defgroup VAAPI_Decoding VA API Decoding
+ * @ingroup Decoder
+ * @{
+ */
+
+/**
+ * This structure is used to share data between the FFmpeg library and
+ * the client video application.
+ * This shall be zero-allocated and available as
+ * AVCodecContext.hwaccel_context. All user members can be set once
+ * during initialization or through each AVCodecContext.get_buffer()
+ * function call. In any case, they must be valid prior to calling
+ * decoding functions.
+ */
+struct vaapi_context {
+    /**
+     * Window system dependent data
+     *
+     * - encoding: unused
+     * - decoding: Set by user
+     */
+    void *display;
+
+    /**
+     * Configuration ID
+     *
+     * - encoding: unused
+     * - decoding: Set by user
+     */
+    uint32_t config_id;
+
+    /**
+     * Context ID (video decode pipeline)
+     *
+     * - encoding: unused
+     * - decoding: Set by user
+     */
+    uint32_t context_id;
+
+    /**
+     * VAPictureParameterBuffer ID
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    uint32_t pic_param_buf_id;
+
+    /**
+     * VAIQMatrixBuffer ID
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    uint32_t iq_matrix_buf_id;
+
+    /**
+     * VABitPlaneBuffer ID (for VC-1 decoding)
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    uint32_t bitplane_buf_id;
+
+    /**
+     * Slice parameter/data buffer IDs
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    uint32_t *slice_buf_ids;
+
+    /**
+     * Number of effective slice buffer IDs to send to the HW
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    unsigned int n_slice_buf_ids;
+
+    /**
+     * Size of pre-allocated slice_buf_ids
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    unsigned int slice_buf_ids_alloc;
+
+    /**
+     * Pointer to VASliceParameterBuffers
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    void *slice_params;
+
+    /**
+     * Size of a VASliceParameterBuffer element
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    unsigned int slice_param_size;
+
+    /**
+     * Size of pre-allocated slice_params
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    unsigned int slice_params_alloc;
+
+    /**
+     * Number of slices currently filled in
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    unsigned int slice_count;
+
+    /**
+     * Pointer to slice data buffer base
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    const uint8_t *slice_data;
+
+    /**
+     * Current size of slice data
+     *
+     * - encoding: unused
+     * - decoding: Set by libavcodec
+     */
+    uint32_t slice_data_size;
+};
+
+/* @} */
+
+#endif /* AVCODEC_VAAPI_H */
diff --git a/ffmpeg 0.8/include/libavcodec/vdpau.h b/ffmpeg 0.8/include/libavcodec/vdpau.h
new file mode 100644 (file)
index 0000000..f3a5471
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * The Video Decode and Presentation API for UNIX (VDPAU) is used for
+ * hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1.
+ *
+ * Copyright (C) 2008 NVIDIA
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_VDPAU_H
+#define AVCODEC_VDPAU_H
+
+/**
+ * @defgroup Decoder VDPAU Decoder and Renderer
+ *
+ * VDPAU hardware acceleration has two modules
+ * - VDPAU decoding
+ * - VDPAU presentation
+ *
+ * The VDPAU decoding module parses all headers using FFmpeg
+ * parsing mechanisms and uses VDPAU for the actual decoding.
+ *
+ * As per the current implementation, the actual decoding
+ * and rendering (API calls) are done as part of the VDPAU
+ * presentation (vo_vdpau.c) module.
+ *
+ * @defgroup  VDPAU_Decoding VDPAU Decoding
+ * @ingroup Decoder
+ * @{
+ */
+
+#include <vdpau/vdpau.h>
+#include <vdpau/vdpau_x11.h>
+
+/** @brief The videoSurface is used for rendering. */
+#define FF_VDPAU_STATE_USED_FOR_RENDER 1
+
+/**
+ * @brief The videoSurface is needed for reference/prediction.
+ * The codec manipulates this.
+ */
+#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
+
+/**
+ * @brief This structure is used as a callback between the FFmpeg
+ * decoder (vd_) and presentation (vo_) module.
+ * This is used for defining a video frame containing surface,
+ * picture parameter, bitstream information etc which are passed
+ * between the FFmpeg decoder and its clients.
+ */
+struct vdpau_render_state {
+    VdpVideoSurface surface; ///< Used as rendered surface, never changed.
+
+    int state; ///< Holds FF_VDPAU_STATE_* values.
+
+    /** Describe size/location of the compressed video data.
+        Set to 0 when freeing bitstream_buffers. */
+    int bitstream_buffers_allocated;
+    int bitstream_buffers_used;
+    /** The user is responsible for freeing this buffer using av_freep(). */
+    VdpBitstreamBuffer *bitstream_buffers;
+
+    /** picture parameter information for all supported codecs */
+    union VdpPictureInfo {
+        VdpPictureInfoH264        h264;
+        VdpPictureInfoMPEG1Or2    mpeg;
+        VdpPictureInfoVC1          vc1;
+        VdpPictureInfoMPEG4Part2 mpeg4;
+    } info;
+};
+
+/* @}*/
+
+#endif /* AVCODEC_VDPAU_H */
diff --git a/ffmpeg 0.8/include/libavcodec/version.h b/ffmpeg 0.8/include/libavcodec/version.h
new file mode 100644 (file)
index 0000000..1883768
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_VERSION_H
+#define AVCODEC_VERSION_H
+
+#define LIBAVCODEC_VERSION_MAJOR 53
+#define LIBAVCODEC_VERSION_MINOR  9
+#define LIBAVCODEC_VERSION_MICRO  0
+
+#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
+                                               LIBAVCODEC_VERSION_MINOR, \
+                                               LIBAVCODEC_VERSION_MICRO)
+#define LIBAVCODEC_VERSION      AV_VERSION(LIBAVCODEC_VERSION_MAJOR,    \
+                                           LIBAVCODEC_VERSION_MINOR,    \
+                                           LIBAVCODEC_VERSION_MICRO)
+#define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT
+
+#define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
+
+/**
+ * Those FF_API_* defines are not part of public API.
+ * They may change, break or disappear at any time.
+ */
+#ifndef FF_API_PALETTE_CONTROL
+#define FF_API_PALETTE_CONTROL  (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_OLD_SAMPLE_FMT
+#define FF_API_OLD_SAMPLE_FMT   (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_OLD_AUDIOCONVERT
+#define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_ANTIALIAS_ALGO
+#define FF_API_ANTIALIAS_ALGO   (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_REQUEST_CHANNELS
+#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_OPT_H
+#define FF_API_OPT_H            (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_THREAD_INIT
+#define FF_API_THREAD_INIT      (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_OLD_FF_PICT_TYPES
+#define FF_API_OLD_FF_PICT_TYPES (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_FLAC_GLOBAL_OPTS
+#define FF_API_FLAC_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_GET_PIX_FMT_NAME
+#define FF_API_GET_PIX_FMT_NAME (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_ALLOC_CONTEXT
+#define FF_API_ALLOC_CONTEXT    (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_AVCODEC_OPEN
+#define FF_API_AVCODEC_OPEN     (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_DRC_SCALE
+#define FF_API_DRC_SCALE        (LIBAVCODEC_VERSION_MAJOR < 54)
+#endif
+
+#endif /* AVCODEC_VERSION_H */
diff --git a/ffmpeg 0.8/include/libavcodec/xvmc.h b/ffmpeg 0.8/include/libavcodec/xvmc.h
new file mode 100644 (file)
index 0000000..93ad8bb
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2003 Ivan Kalvachev
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_XVMC_H
+#define AVCODEC_XVMC_H
+
+#include <X11/extensions/XvMC.h>
+
+#include "avcodec.h"
+
+#define AV_XVMC_ID                    0x1DC711C0  /**< special value to ensure that regular pixel routines haven't corrupted the struct
+                                                       the number is 1337 speak for the letters IDCT MCo (motion compensation) */
+
+struct xvmc_pix_fmt {
+    /** The field contains the special constant value AV_XVMC_ID.
+        It is used as a test that the application correctly uses the API,
+        and that there is no corruption caused by pixel routines.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    int             xvmc_id;
+
+    /** Pointer to the block array allocated by XvMCCreateBlocks().
+        The array has to be freed by XvMCDestroyBlocks().
+        Each group of 64 values represents one data block of differential
+        pixel information (in MoCo mode) or coefficients for IDCT.
+        - application - set the pointer during initialization
+        - libavcodec  - fills coefficients/pixel data into the array
+    */
+    short*          data_blocks;
+
+    /** Pointer to the macroblock description array allocated by
+        XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks().
+        - application - set the pointer during initialization
+        - libavcodec  - fills description data into the array
+    */
+    XvMCMacroBlock* mv_blocks;
+
+    /** Number of macroblock descriptions that can be stored in the mv_blocks
+        array.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    int             allocated_mv_blocks;
+
+    /** Number of blocks that can be stored at once in the data_blocks array.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    int             allocated_data_blocks;
+
+    /** Indicate that the hardware would interpret data_blocks as IDCT
+        coefficients and perform IDCT on them.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    int             idct;
+
+    /** In MoCo mode it indicates that intra macroblocks are assumed to be in
+        unsigned format; same as the XVMC_INTRA_UNSIGNED flag.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    int             unsigned_intra;
+
+    /** Pointer to the surface allocated by XvMCCreateSurface().
+        It has to be freed by XvMCDestroySurface() on application exit.
+        It identifies the frame and its state on the video hardware.
+        - application - set during initialization
+        - libavcodec  - unchanged
+    */
+    XvMCSurface*    p_surface;
+
+/** Set by the decoder before calling ff_draw_horiz_band(),
+    needed by the XvMCRenderSurface function. */
+//@{
+    /** Pointer to the surface used as past reference
+        - application - unchanged
+        - libavcodec  - set
+    */
+    XvMCSurface*    p_past_surface;
+
+    /** Pointer to the surface used as future reference
+        - application - unchanged
+        - libavcodec  - set
+    */
+    XvMCSurface*    p_future_surface;
+
+    /** top/bottom field or frame
+        - application - unchanged
+        - libavcodec  - set
+    */
+    unsigned int    picture_structure;
+
+    /** XVMC_SECOND_FIELD - 1st or 2nd field in the sequence
+        - application - unchanged
+        - libavcodec  - set
+    */
+    unsigned int    flags;
+//}@
+
+    /** Number of macroblock descriptions in the mv_blocks array
+        that have already been passed to the hardware.
+        - application - zeroes it on get_buffer().
+                        A successful ff_draw_horiz_band() may increment it
+                        with filled_mb_block_num or zero both.
+        - libavcodec  - unchanged
+    */
+    int             start_mv_blocks_num;
+
+    /** Number of new macroblock descriptions in the mv_blocks array (after
+        start_mv_blocks_num) that are filled by libavcodec and have to be
+        passed to the hardware.
+        - application - zeroes it on get_buffer() or after successful
+                        ff_draw_horiz_band().
+        - libavcodec  - increment with one of each stored MB
+    */
+    int             filled_mv_blocks_num;
+
+    /** Number of the the next free data block; one data block consists of
+        64 short values in the data_blocks array.
+        All blocks before this one have already been claimed by placing their
+        position into the corresponding block description structure field,
+        that are part of the mv_blocks array.
+        - application - zeroes it on get_buffer().
+                        A successful ff_draw_horiz_band() may zero it together
+                        with start_mb_blocks_num.
+        - libavcodec  - each decoded macroblock increases it by the number
+                        of coded blocks it contains.
+    */
+    int             next_free_data_block_num;
+};
+
+#endif /* AVCODEC_XVMC_H */
diff --git a/ffmpeg 0.8/include/libavdevice/avdevice.h b/ffmpeg 0.8/include/libavdevice/avdevice.h
new file mode 100644 (file)
index 0000000..7cb8f54
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVDEVICE_AVDEVICE_H
+#define AVDEVICE_AVDEVICE_H
+
+#include "libavutil/avutil.h"
+#include "libavformat/avformat.h"
+
+#define LIBAVDEVICE_VERSION_MAJOR 53
+#define LIBAVDEVICE_VERSION_MINOR  2
+#define LIBAVDEVICE_VERSION_MICRO  0
+
+#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
+                                               LIBAVDEVICE_VERSION_MINOR, \
+                                               LIBAVDEVICE_VERSION_MICRO)
+#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
+                                           LIBAVDEVICE_VERSION_MINOR, \
+                                           LIBAVDEVICE_VERSION_MICRO)
+#define LIBAVDEVICE_BUILD       LIBAVDEVICE_VERSION_INT
+
+#ifndef FF_API_V4L
+#define FF_API_V4L              (LIBAVDEVICE_VERSION_MAJOR < 54)
+#endif
+
+/**
+ * Return the LIBAVDEVICE_VERSION_INT constant.
+ */
+unsigned avdevice_version(void);
+
+/**
+ * Return the libavdevice build-time configuration.
+ */
+const char *avdevice_configuration(void);
+
+/**
+ * Return the libavdevice license.
+ */
+const char *avdevice_license(void);
+
+/**
+ * Initialize libavdevice and register all the input and output devices.
+ * @warning This function is not thread safe.
+ */
+void avdevice_register_all(void);
+
+#endif /* AVDEVICE_AVDEVICE_H */
+
diff --git a/ffmpeg 0.8/include/libavfilter/avcodec.h b/ffmpeg 0.8/include/libavfilter/avcodec.h
new file mode 100644 (file)
index 0000000..dec5ae4
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFILTER_AVCODEC_H
+#define AVFILTER_AVCODEC_H
+
+/**
+ * @file
+ * libavcodec/libavfilter gluing utilities
+ *
+ * This should be included in an application ONLY if the installed
+ * libavfilter has been compiled with libavcodec support, otherwise
+ * symbols defined below will not be available.
+ */
+
+#include "libavcodec/avcodec.h" // AVFrame
+#include "avfilter.h"
+#include "vsrc_buffer.h"
+
+/**
+ * Copy the frame properties of src to dst, without copying the actual
+ * image data.
+ */
+void avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
+
+/**
+ * Create and return a picref reference from the data and properties
+ * contained in frame.
+ *
+ * @param perms permissions to assign to the new buffer reference
+ */
+AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
+
+/**
+ * Fill an AVFrame with the information stored in picref.
+ *
+ * @param frame an already allocated AVFrame
+ * @param picref a video buffer reference
+ * @return 0 in case of success, a negative AVERROR code in case of
+ * failure
+ */
+int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
+                                              const AVFilterBufferRef *picref);
+
+/**
+ * Add frame data to buffer_src.
+ *
+ * @param buffer_src pointer to a buffer source context
+ * @param flags a combination of AV_VSRC_BUF_FLAG_* flags
+ * @return >= 0 in case of success, a negative AVERROR code in case of
+ * failure
+ */
+int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src,
+                             const AVFrame *frame, int flags);
+
+#endif /* AVFILTER_AVCODEC_H */
diff --git a/ffmpeg 0.8/include/libavfilter/avfilter.h b/ffmpeg 0.8/include/libavfilter/avfilter.h
new file mode 100644 (file)
index 0000000..913a52b
--- /dev/null
@@ -0,0 +1,917 @@
+/*
+ * filter layer
+ * Copyright (c) 2007 Bobby Bingham
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFILTER_AVFILTER_H
+#define AVFILTER_AVFILTER_H
+
+#include "libavutil/avutil.h"
+#include "libavutil/log.h"
+#include "libavutil/samplefmt.h"
+#include "libavutil/pixfmt.h"
+#include "libavutil/rational.h"
+
+#define LIBAVFILTER_VERSION_MAJOR  2
+#define LIBAVFILTER_VERSION_MINOR 27
+#define LIBAVFILTER_VERSION_MICRO  3
+
+#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
+                                               LIBAVFILTER_VERSION_MINOR, \
+                                               LIBAVFILTER_VERSION_MICRO)
+#define LIBAVFILTER_VERSION     AV_VERSION(LIBAVFILTER_VERSION_MAJOR,   \
+                                           LIBAVFILTER_VERSION_MINOR,   \
+                                           LIBAVFILTER_VERSION_MICRO)
+#define LIBAVFILTER_BUILD       LIBAVFILTER_VERSION_INT
+
+#include <stddef.h>
+
+/**
+ * Return the LIBAVFILTER_VERSION_INT constant.
+ */
+unsigned avfilter_version(void);
+
+/**
+ * Return the libavfilter build-time configuration.
+ */
+const char *avfilter_configuration(void);
+
+/**
+ * Return the libavfilter license.
+ */
+const char *avfilter_license(void);
+
+
+typedef struct AVFilterContext AVFilterContext;
+typedef struct AVFilterLink    AVFilterLink;
+typedef struct AVFilterPad     AVFilterPad;
+
+/**
+ * A reference-counted buffer data type used by the filter system. Filters
+ * should not store pointers to this structure directly, but instead use the
+ * AVFilterBufferRef structure below.
+ */
+typedef struct AVFilterBuffer {
+    uint8_t *data[8];           ///< buffer data for each plane/channel
+    int linesize[8];            ///< number of bytes per line
+
+    unsigned refcount;          ///< number of references to this buffer
+
+    /** private data to be used by a custom free function */
+    void *priv;
+    /**
+     * A pointer to the function to deallocate this buffer if the default
+     * function is not sufficient. This could, for example, add the memory
+     * back into a memory pool to be reused later without the overhead of
+     * reallocating it from scratch.
+     */
+    void (*free)(struct AVFilterBuffer *buf);
+
+    int format;                 ///< media format
+    int w, h;                   ///< width and height of the allocated buffer
+} AVFilterBuffer;
+
+#define AV_PERM_READ     0x01   ///< can read from the buffer
+#define AV_PERM_WRITE    0x02   ///< can write to the buffer
+#define AV_PERM_PRESERVE 0x04   ///< nobody else can overwrite the buffer
+#define AV_PERM_REUSE    0x08   ///< can output the buffer multiple times, with the same contents each time
+#define AV_PERM_REUSE2   0x10   ///< can output the buffer multiple times, modified each time
+#define AV_PERM_NEG_LINESIZES 0x20  ///< the buffer requested can have negative linesizes
+
+/**
+ * Audio specific properties in a reference to an AVFilterBuffer. Since
+ * AVFilterBufferRef is common to different media formats, audio specific
+ * per reference properties must be separated out.
+ */
+typedef struct AVFilterBufferRefAudioProps {
+    int64_t channel_layout;     ///< channel layout of audio buffer
+    int nb_samples;             ///< number of audio samples per channel
+    uint32_t sample_rate;       ///< audio buffer sample rate
+    int planar;                 ///< audio buffer - planar or packed
+} AVFilterBufferRefAudioProps;
+
+/**
+ * Video specific properties in a reference to an AVFilterBuffer. Since
+ * AVFilterBufferRef is common to different media formats, video specific
+ * per reference properties must be separated out.
+ */
+typedef struct AVFilterBufferRefVideoProps {
+    int w;                      ///< image width
+    int h;                      ///< image height
+    AVRational sample_aspect_ratio; ///< sample aspect ratio
+    int interlaced;             ///< is frame interlaced
+    int top_field_first;        ///< field order
+    enum AVPictureType pict_type; ///< picture type of the frame
+    int key_frame;              ///< 1 -> keyframe, 0-> not
+} AVFilterBufferRefVideoProps;
+
+/**
+ * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
+ * a buffer to, for example, crop image without any memcpy, the buffer origin
+ * and dimensions are per-reference properties. Linesize is also useful for
+ * image flipping, frame to field filters, etc, and so is also per-reference.
+ *
+ * TODO: add anything necessary for frame reordering
+ */
+typedef struct AVFilterBufferRef {
+    AVFilterBuffer *buf;        ///< the buffer that this is a reference to
+    uint8_t *data[8];           ///< picture/audio data for each plane
+    int linesize[8];            ///< number of bytes per line
+    int format;                 ///< media format
+
+    /**
+     * presentation timestamp. The time unit may change during
+     * filtering, as it is specified in the link and the filter code
+     * may need to rescale the PTS accordingly.
+     */
+    int64_t pts;
+    int64_t pos;                ///< byte position in stream, -1 if unknown
+
+    int perms;                  ///< permissions, see the AV_PERM_* flags
+
+    enum AVMediaType type;      ///< media type of buffer data
+    AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
+    AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
+} AVFilterBufferRef;
+
+/**
+ * Copy properties of src to dst, without copying the actual data
+ */
+static inline void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
+{
+    // copy common properties
+    dst->pts             = src->pts;
+    dst->pos             = src->pos;
+
+    switch (src->type) {
+    case AVMEDIA_TYPE_VIDEO: *dst->video = *src->video; break;
+    case AVMEDIA_TYPE_AUDIO: *dst->audio = *src->audio; break;
+    default: break;
+    }
+}
+
+/**
+ * Add a new reference to a buffer.
+ *
+ * @param ref   an existing reference to the buffer
+ * @param pmask a bitmask containing the allowable permissions in the new
+ *              reference
+ * @return      a new reference to the buffer with the same properties as the
+ *              old, excluding any permissions denied by pmask
+ */
+AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
+
+/**
+ * Remove a reference to a buffer. If this is the last reference to the
+ * buffer, the buffer itself is also automatically freed.
+ *
+ * @param ref reference to the buffer, may be NULL
+ */
+void avfilter_unref_buffer(AVFilterBufferRef *ref);
+
+/**
+ * A list of supported formats for one end of a filter link. This is used
+ * during the format negotiation process to try to pick the best format to
+ * use to minimize the number of necessary conversions. Each filter gives a
+ * list of the formats supported by each input and output pad. The list
+ * given for each pad need not be distinct - they may be references to the
+ * same list of formats, as is often the case when a filter supports multiple
+ * formats, but will always output the same format as it is given in input.
+ *
+ * In this way, a list of possible input formats and a list of possible
+ * output formats are associated with each link. When a set of formats is
+ * negotiated over a link, the input and output lists are merged to form a
+ * new list containing only the common elements of each list. In the case
+ * that there were no common elements, a format conversion is necessary.
+ * Otherwise, the lists are merged, and all other links which reference
+ * either of the format lists involved in the merge are also affected.
+ *
+ * For example, consider the filter chain:
+ * filter (a) --> (b) filter (b) --> (c) filter
+ *
+ * where the letters in parenthesis indicate a list of formats supported on
+ * the input or output of the link. Suppose the lists are as follows:
+ * (a) = {A, B}
+ * (b) = {A, B, C}
+ * (c) = {B, C}
+ *
+ * First, the first link's lists are merged, yielding:
+ * filter (a) --> (a) filter (a) --> (c) filter
+ *
+ * Notice that format list (b) now refers to the same list as filter list (a).
+ * Next, the lists for the second link are merged, yielding:
+ * filter (a) --> (a) filter (a) --> (a) filter
+ *
+ * where (a) = {B}.
+ *
+ * Unfortunately, when the format lists at the two ends of a link are merged,
+ * we must ensure that all links which reference either pre-merge format list
+ * get updated as well. Therefore, we have the format list structure store a
+ * pointer to each of the pointers to itself.
+ */
+typedef struct AVFilterFormats {
+    unsigned format_count;      ///< number of formats
+    int64_t *formats;           ///< list of media formats
+
+    unsigned refcount;          ///< number of references to this list
+    struct AVFilterFormats ***refs; ///< references to this list
+}  AVFilterFormats;
+
+/**
+ * Create a list of supported formats. This is intended for use in
+ * AVFilter->query_formats().
+ *
+ * @param fmts list of media formats, terminated by -1. If NULL an
+ *        empty list is created.
+ * @return the format list, with no existing references
+ */
+AVFilterFormats *avfilter_make_format_list(const int *fmts);
+AVFilterFormats *avfilter_make_format64_list(const int64_t *fmts);
+
+/**
+ * Add fmt to the list of media formats contained in *avff.
+ * If *avff is NULL the function allocates the filter formats struct
+ * and puts its pointer in *avff.
+ *
+ * @return a non negative value in case of success, or a negative
+ * value corresponding to an AVERROR code in case of error
+ */
+int avfilter_add_format(AVFilterFormats **avff, int64_t fmt);
+
+/**
+ * Return a list of all formats supported by FFmpeg for the given media type.
+ */
+AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
+
+/**
+ * Return a list of all channel layouts supported by FFmpeg.
+ */
+AVFilterFormats *avfilter_all_channel_layouts(void);
+
+/**
+ * Return a list of all audio packing formats.
+ */
+AVFilterFormats *avfilter_all_packing_formats(void);
+
+/**
+ * Return a format list which contains the intersection of the formats of
+ * a and b. Also, all the references of a, all the references of b, and
+ * a and b themselves will be deallocated.
+ *
+ * If a and b do not share any common formats, neither is modified, and NULL
+ * is returned.
+ */
+AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b);
+
+/**
+ * Add *ref as a new reference to formats.
+ * That is the pointers will point like in the ascii art below:
+ *   ________
+ *  |formats |<--------.
+ *  |  ____  |     ____|___________________
+ *  | |refs| |    |  __|_
+ *  | |* * | |    | |  | |  AVFilterLink
+ *  | |* *--------->|*ref|
+ *  | |____| |    | |____|
+ *  |________|    |________________________
+ */
+void avfilter_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref);
+
+/**
+ * If *ref is non-NULL, remove *ref as a reference to the format list
+ * it currently points to, deallocates that list if this was the last
+ * reference, and sets *ref to NULL.
+ *
+ *         Before                                 After
+ *   ________                               ________         NULL
+ *  |formats |<--------.                   |formats |         ^
+ *  |  ____  |     ____|________________   |  ____  |     ____|________________
+ *  | |refs| |    |  __|_                  | |refs| |    |  __|_
+ *  | |* * | |    | |  | |  AVFilterLink   | |* * | |    | |  | |  AVFilterLink
+ *  | |* *--------->|*ref|                 | |*   | |    | |*ref|
+ *  | |____| |    | |____|                 | |____| |    | |____|
+ *  |________|    |_____________________   |________|    |_____________________
+ */
+void avfilter_formats_unref(AVFilterFormats **ref);
+
+/**
+ *
+ *         Before                                 After
+ *   ________                         ________
+ *  |formats |<---------.            |formats |<---------.
+ *  |  ____  |       ___|___         |  ____  |       ___|___
+ *  | |refs| |      |   |   |        | |refs| |      |   |   |   NULL
+ *  | |* *--------->|*oldref|        | |* *--------->|*newref|     ^
+ *  | |* * | |      |_______|        | |* * | |      |_______|  ___|___
+ *  | |____| |                       | |____| |                |   |   |
+ *  |________|                       |________|                |*oldref|
+ *                                                             |_______|
+ */
+void avfilter_formats_changeref(AVFilterFormats **oldref,
+                                AVFilterFormats **newref);
+
+/**
+ * A filter pad used for either input or output.
+ */
+struct AVFilterPad {
+    /**
+     * Pad name. The name is unique among inputs and among outputs, but an
+     * input may have the same name as an output. This may be NULL if this
+     * pad has no need to ever be referenced by name.
+     */
+    const char *name;
+
+    /**
+     * AVFilterPad type. Only video supported now, hopefully someone will
+     * add audio in the future.
+     */
+    enum AVMediaType type;
+
+    /**
+     * Minimum required permissions on incoming buffers. Any buffer with
+     * insufficient permissions will be automatically copied by the filter
+     * system to a new buffer which provides the needed access permissions.
+     *
+     * Input pads only.
+     */
+    int min_perms;
+
+    /**
+     * Permissions which are not accepted on incoming buffers. Any buffer
+     * which has any of these permissions set will be automatically copied
+     * by the filter system to a new buffer which does not have those
+     * permissions. This can be used to easily disallow buffers with
+     * AV_PERM_REUSE.
+     *
+     * Input pads only.
+     */
+    int rej_perms;
+
+    /**
+     * Callback called before passing the first slice of a new frame. If
+     * NULL, the filter layer will default to storing a reference to the
+     * picture inside the link structure.
+     *
+     * Input video pads only.
+     */
+    void (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref);
+
+    /**
+     * Callback function to get a video buffer. If NULL, the filter system will
+     * use avfilter_default_get_video_buffer().
+     *
+     * Input video pads only.
+     */
+    AVFilterBufferRef *(*get_video_buffer)(AVFilterLink *link, int perms, int w, int h);
+
+    /**
+     * Callback function to get an audio buffer. If NULL, the filter system will
+     * use avfilter_default_get_audio_buffer().
+     *
+     * Input audio pads only.
+     */
+    AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms,
+                                           enum AVSampleFormat sample_fmt, int nb_samples,
+                                           int64_t channel_layout, int planar);
+
+    /**
+     * Callback called after the slices of a frame are completely sent. If
+     * NULL, the filter layer will default to releasing the reference stored
+     * in the link structure during start_frame().
+     *
+     * Input video pads only.
+     */
+    void (*end_frame)(AVFilterLink *link);
+
+    /**
+     * Slice drawing callback. This is where a filter receives video data
+     * and should do its processing.
+     *
+     * Input video pads only.
+     */
+    void (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir);
+
+    /**
+     * Samples filtering callback. This is where a filter receives audio data
+     * and should do its processing.
+     *
+     * Input audio pads only.
+     */
+    void (*filter_samples)(AVFilterLink *link, AVFilterBufferRef *samplesref);
+
+    /**
+     * Frame poll callback. This returns the number of immediately available
+     * samples. It should return a positive value if the next request_frame()
+     * is guaranteed to return one frame (with no delay).
+     *
+     * Defaults to just calling the source poll_frame() method.
+     *
+     * Output video pads only.
+     */
+    int (*poll_frame)(AVFilterLink *link);
+
+    /**
+     * Frame request callback. A call to this should result in at least one
+     * frame being output over the given link. This should return zero on
+     * success, and another value on error.
+     *
+     * Output video pads only.
+     */
+    int (*request_frame)(AVFilterLink *link);
+
+    /**
+     * Link configuration callback.
+     *
+     * For output pads, this should set the link properties such as
+     * width/height. This should NOT set the format property - that is
+     * negotiated between filters by the filter system using the
+     * query_formats() callback before this function is called.
+     *
+     * For input pads, this should check the properties of the link, and update
+     * the filter's internal state as necessary.
+     *
+     * For both input and output filters, this should return zero on success,
+     * and another value on error.
+     */
+    int (*config_props)(AVFilterLink *link);
+};
+
+/** default handler for start_frame() for video inputs */
+void avfilter_default_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
+
+/** default handler for draw_slice() for video inputs */
+void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+
+/** default handler for end_frame() for video inputs */
+void avfilter_default_end_frame(AVFilterLink *link);
+
+/** default handler for filter_samples() for audio inputs */
+void avfilter_default_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
+
+/** default handler for config_props() for audio/video outputs */
+int avfilter_default_config_output_link(AVFilterLink *link);
+
+/** default handler for config_props() for audio/video inputs */
+int avfilter_default_config_input_link (AVFilterLink *link);
+
+/** default handler for get_video_buffer() for video inputs */
+AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link,
+                                                     int perms, int w, int h);
+
+/** default handler for get_audio_buffer() for audio inputs */
+AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms,
+                                                     enum AVSampleFormat sample_fmt, int nb_samples,
+                                                     int64_t channel_layout, int planar);
+
+/**
+ * Helpers for query_formats() which set all links to the same list of
+ * formats/layouts. If there are no links hooked to this filter, the list
+ * of formats is freed.
+ */
+void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats);
+void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+
+/** Default handler for query_formats() */
+int avfilter_default_query_formats(AVFilterContext *ctx);
+
+/** start_frame() handler for filters which simply pass video along */
+void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
+
+/** draw_slice() handler for filters which simply pass video along */
+void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+
+/** end_frame() handler for filters which simply pass video along */
+void avfilter_null_end_frame(AVFilterLink *link);
+
+/** filter_samples() handler for filters which simply pass audio along */
+void avfilter_null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
+
+/** get_video_buffer() handler for filters which simply pass video along */
+AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link,
+                                                  int perms, int w, int h);
+
+/** get_audio_buffer() handler for filters which simply pass audio along */
+AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms,
+                                                  enum AVSampleFormat sample_fmt, int size,
+                                                  int64_t channel_layout, int planar);
+
+/**
+ * Filter definition. This defines the pads a filter contains, and all the
+ * callback functions used to interact with the filter.
+ */
+typedef struct AVFilter {
+    const char *name;         ///< filter name
+
+    int priv_size;      ///< size of private data to allocate for the filter
+
+    /**
+     * Filter initialization function. Args contains the user-supplied
+     * parameters. FIXME: maybe an AVOption-based system would be better?
+     * opaque is data provided by the code requesting creation of the filter,
+     * and is used to pass data to the filter.
+     */
+    int (*init)(AVFilterContext *ctx, const char *args, void *opaque);
+
+    /**
+     * Filter uninitialization function. Should deallocate any memory held
+     * by the filter, release any buffer references, etc. This does not need
+     * to deallocate the AVFilterContext->priv memory itself.
+     */
+    void (*uninit)(AVFilterContext *ctx);
+
+    /**
+     * Queries formats/layouts supported by the filter and its pads, and sets
+     * the in_formats/in_chlayouts for links connected to its output pads,
+     * and out_formats/out_chlayouts for links connected to its input pads.
+     *
+     * @return zero on success, a negative value corresponding to an
+     * AVERROR code otherwise
+     */
+    int (*query_formats)(AVFilterContext *);
+
+    const AVFilterPad *inputs;  ///< NULL terminated list of inputs. NULL if none
+    const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
+
+    /**
+     * A description for the filter. You should use the
+     * NULL_IF_CONFIG_SMALL() macro to define it.
+     */
+    const char *description;
+} AVFilter;
+
+/** An instance of a filter */
+struct AVFilterContext {
+    const AVClass *av_class;              ///< needed for av_log()
+
+    AVFilter *filter;               ///< the AVFilter of which this is an instance
+
+    char *name;                     ///< name of this filter instance
+
+    unsigned input_count;           ///< number of input pads
+    AVFilterPad   *input_pads;      ///< array of input pads
+    AVFilterLink **inputs;          ///< array of pointers to input links
+
+    unsigned output_count;          ///< number of output pads
+    AVFilterPad   *output_pads;     ///< array of output pads
+    AVFilterLink **outputs;         ///< array of pointers to output links
+
+    void *priv;                     ///< private data for use by the filter
+};
+
+enum AVFilterPacking {
+    AVFILTER_PACKED = 0,
+    AVFILTER_PLANAR,
+};
+
+/**
+ * A link between two filters. This contains pointers to the source and
+ * destination filters between which this link exists, and the indexes of
+ * the pads involved. In addition, this link also contains the parameters
+ * which have been negotiated and agreed upon between the filter, such as
+ * image dimensions, format, etc.
+ */
+struct AVFilterLink {
+    AVFilterContext *src;       ///< source filter
+    AVFilterPad *srcpad;        ///< output pad on the source filter
+
+    AVFilterContext *dst;       ///< dest filter
+    AVFilterPad *dstpad;        ///< input pad on the dest filter
+
+    /** stage of the initialization of the link properties (dimensions, etc) */
+    enum {
+        AVLINK_UNINIT = 0,      ///< not started
+        AVLINK_STARTINIT,       ///< started, but incomplete
+        AVLINK_INIT             ///< complete
+    } init_state;
+
+    enum AVMediaType type;      ///< filter media type
+
+    /* These parameters apply only to video */
+    int w;                      ///< agreed upon image width
+    int h;                      ///< agreed upon image height
+    AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
+    /* These parameters apply only to audio */
+    int64_t channel_layout;     ///< channel layout of current buffer (see libavutil/audioconvert.h)
+    int64_t sample_rate;        ///< samples per second
+    int planar;                 ///< agreed upon packing mode of audio buffers. true if planar.
+
+    int format;                 ///< agreed upon media format
+
+    /**
+     * Lists of formats and channel layouts supported by the input and output
+     * filters respectively. These lists are used for negotiating the format
+     * to actually be used, which will be loaded into the format and
+     * channel_layout members, above, when chosen.
+     *
+     */
+    AVFilterFormats *in_formats;
+    AVFilterFormats *out_formats;
+
+    AVFilterFormats *in_chlayouts;
+    AVFilterFormats *out_chlayouts;
+    AVFilterFormats *in_packing;
+    AVFilterFormats *out_packing;
+
+    /**
+     * The buffer reference currently being sent across the link by the source
+     * filter. This is used internally by the filter system to allow
+     * automatic copying of buffers which do not have sufficient permissions
+     * for the destination. This should not be accessed directly by the
+     * filters.
+     */
+    AVFilterBufferRef *src_buf;
+
+    AVFilterBufferRef *cur_buf;
+    AVFilterBufferRef *out_buf;
+
+    /**
+     * Define the time base used by the PTS of the frames/samples
+     * which will pass through this link.
+     * During the configuration stage, each filter is supposed to
+     * change only the output timebase, while the timebase of the
+     * input link is assumed to be an unchangeable property.
+     */
+    AVRational time_base;
+
+    struct AVFilterPool *pool;
+};
+
+/**
+ * Link two filters together.
+ *
+ * @param src    the source filter
+ * @param srcpad index of the output pad on the source filter
+ * @param dst    the destination filter
+ * @param dstpad index of the input pad on the destination filter
+ * @return       zero on success
+ */
+int avfilter_link(AVFilterContext *src, unsigned srcpad,
+                  AVFilterContext *dst, unsigned dstpad);
+
+/**
+ * Free the link in *link, and set its pointer to NULL.
+ */
+void avfilter_link_free(AVFilterLink **link);
+
+/**
+ * Negotiate the media format, dimensions, etc of all inputs to a filter.
+ *
+ * @param filter the filter to negotiate the properties for its inputs
+ * @return       zero on successful negotiation
+ */
+int avfilter_config_links(AVFilterContext *filter);
+
+/**
+ * Request a picture buffer with a specific set of permissions.
+ *
+ * @param link  the output link to the filter from which the buffer will
+ *              be requested
+ * @param perms the required access permissions
+ * @param w     the minimum width of the buffer to allocate
+ * @param h     the minimum height of the buffer to allocate
+ * @return      A reference to the buffer. This must be unreferenced with
+ *              avfilter_unref_buffer when you are finished with it.
+ */
+AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms,
+                                          int w, int h);
+
+/**
+ * Create a buffer reference wrapped around an already allocated image
+ * buffer.
+ *
+ * @param data pointers to the planes of the image to reference
+ * @param linesize linesizes for the planes of the image to reference
+ * @param perms the required access permissions
+ * @param w the width of the image specified by the data and linesize arrays
+ * @param h the height of the image specified by the data and linesize arrays
+ * @param format the pixel format of the image specified by the data and linesize arrays
+ */
+AVFilterBufferRef *
+avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms,
+                                          int w, int h, enum PixelFormat format);
+
+/**
+ * Request an audio samples buffer with a specific set of permissions.
+ *
+ * @param link           the output link to the filter from which the buffer will
+ *                       be requested
+ * @param perms          the required access permissions
+ * @param sample_fmt     the format of each sample in the buffer to allocate
+ * @param nb_samples     the number of samples per channel
+ * @param channel_layout the number and type of channels per sample in the buffer to allocate
+ * @param planar         audio data layout - planar or packed
+ * @return               A reference to the samples. This must be unreferenced with
+ *                       avfilter_unref_buffer when you are finished with it.
+ */
+AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,
+                                             enum AVSampleFormat sample_fmt, int nb_samples,
+                                             int64_t channel_layout, int planar);
+
+/**
+ * Create an audio buffer reference wrapped around an already
+ * allocated samples buffer.
+ *
+ * @param data           pointers to the samples plane buffers
+ * @param linesize       linesize for the samples plane buffers
+ * @param perms          the required access permissions
+ * @param nb_samples     number of samples per channel
+ * @param sample_fmt     the format of each sample in the buffer to allocate
+ * @param channel_layout the channel layout of the buffer
+ * @param planar         audio data layout - planar or packed
+ */
+AVFilterBufferRef *
+avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
+                                          int nb_samples, enum AVSampleFormat sample_fmt,
+                                          int64_t channel_layout, int planar);
+
+/**
+ * Request an input frame from the filter at the other end of the link.
+ *
+ * @param link the input link
+ * @return     zero on success
+ */
+int avfilter_request_frame(AVFilterLink *link);
+
+/**
+ * Poll a frame from the filter chain.
+ *
+ * @param  link the input link
+ * @return the number of immediately available frames, a negative
+ * number in case of error
+ */
+int avfilter_poll_frame(AVFilterLink *link);
+
+/**
+ * Notifie the next filter of the start of a frame.
+ *
+ * @param link   the output link the frame will be sent over
+ * @param picref A reference to the frame about to be sent. The data for this
+ *               frame need only be valid once draw_slice() is called for that
+ *               portion. The receiving filter will free this reference when
+ *               it no longer needs it.
+ */
+void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
+
+/**
+ * Notifie the next filter that the current frame has finished.
+ *
+ * @param link the output link the frame was sent over
+ */
+void avfilter_end_frame(AVFilterLink *link);
+
+/**
+ * Send a slice to the next filter.
+ *
+ * Slices have to be provided in sequential order, either in
+ * top-bottom or bottom-top order. If slices are provided in
+ * non-sequential order the behavior of the function is undefined.
+ *
+ * @param link the output link over which the frame is being sent
+ * @param y    offset in pixels from the top of the image for this slice
+ * @param h    height of this slice in pixels
+ * @param slice_dir the assumed direction for sending slices,
+ *             from the top slice to the bottom slice if the value is 1,
+ *             from the bottom slice to the top slice if the value is -1,
+ *             for other values the behavior of the function is undefined.
+ */
+void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+
+/**
+ * Send a buffer of audio samples to the next filter.
+ *
+ * @param link       the output link over which the audio samples are being sent
+ * @param samplesref a reference to the buffer of audio samples being sent. The
+ *                   receiving filter will free this reference when it no longer
+ *                   needs it or pass it on to the next filter.
+ */
+void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref);
+
+/** Initialize the filter system. Register all builtin filters. */
+void avfilter_register_all(void);
+
+/** Uninitialize the filter system. Unregister all filters. */
+void avfilter_uninit(void);
+
+/**
+ * Register a filter. This is only needed if you plan to use
+ * avfilter_get_by_name later to lookup the AVFilter structure by name. A
+ * filter can still by instantiated with avfilter_open even if it is not
+ * registered.
+ *
+ * @param filter the filter to register
+ * @return 0 if the registration was succesfull, a negative value
+ * otherwise
+ */
+int avfilter_register(AVFilter *filter);
+
+/**
+ * Get a filter definition matching the given name.
+ *
+ * @param name the filter name to find
+ * @return     the filter definition, if any matching one is registered.
+ *             NULL if none found.
+ */
+AVFilter *avfilter_get_by_name(const char *name);
+
+/**
+ * If filter is NULL, returns a pointer to the first registered filter pointer,
+ * if filter is non-NULL, returns the next pointer after filter.
+ * If the returned pointer points to NULL, the last registered filter
+ * was already reached.
+ */
+AVFilter **av_filter_next(AVFilter **filter);
+
+/**
+ * Create a filter instance.
+ *
+ * @param filter_ctx put here a pointer to the created filter context
+ * on success, NULL on failure
+ * @param filter    the filter to create an instance of
+ * @param inst_name Name to give to the new instance. Can be NULL for none.
+ * @return >= 0 in case of success, a negative error code otherwise
+ */
+int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);
+
+/**
+ * Initialize a filter.
+ *
+ * @param filter the filter to initialize
+ * @param args   A string of parameters to use when initializing the filter.
+ *               The format and meaning of this string varies by filter.
+ * @param opaque Any extra non-string data needed by the filter. The meaning
+ *               of this parameter varies by filter.
+ * @return       zero on success
+ */
+int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
+
+/**
+ * Free a filter context.
+ *
+ * @param filter the filter to free
+ */
+void avfilter_free(AVFilterContext *filter);
+
+/**
+ * Insert a filter in the middle of an existing link.
+ *
+ * @param link the link into which the filter should be inserted
+ * @param filt the filter to be inserted
+ * @param filt_srcpad_idx the input pad on the filter to connect
+ * @param filt_dstpad_idx the output pad on the filter to connect
+ * @return     zero on success
+ */
+int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
+                           unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
+
+/**
+ * Insert a new pad.
+ *
+ * @param idx Insertion point. Pad is inserted at the end if this point
+ *            is beyond the end of the list of pads.
+ * @param count Pointer to the number of pads in the list
+ * @param padidx_off Offset within an AVFilterLink structure to the element
+ *                   to increment when inserting a new pad causes link
+ *                   numbering to change
+ * @param pads Pointer to the pointer to the beginning of the list of pads
+ * @param links Pointer to the pointer to the beginning of the list of links
+ * @param newpad The new pad to add. A copy is made when adding.
+ */
+void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
+                         AVFilterPad **pads, AVFilterLink ***links,
+                         AVFilterPad *newpad);
+
+/** Insert a new input pad for the filter. */
+static inline void avfilter_insert_inpad(AVFilterContext *f, unsigned index,
+                                         AVFilterPad *p)
+{
+    avfilter_insert_pad(index, &f->input_count, offsetof(AVFilterLink, dstpad),
+                        &f->input_pads, &f->inputs, p);
+}
+
+/** Insert a new output pad for the filter. */
+static inline void avfilter_insert_outpad(AVFilterContext *f, unsigned index,
+                                          AVFilterPad *p)
+{
+    avfilter_insert_pad(index, &f->output_count, offsetof(AVFilterLink, srcpad),
+                        &f->output_pads, &f->outputs, p);
+}
+
+#endif /* AVFILTER_AVFILTER_H */
diff --git a/ffmpeg 0.8/include/libavfilter/avfiltergraph.h b/ffmpeg 0.8/include/libavfilter/avfiltergraph.h
new file mode 100644 (file)
index 0000000..f4c88bc
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Filter graphs
+ * copyright (c) 2007 Bobby Bingham
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFILTER_AVFILTERGRAPH_H
+#define AVFILTER_AVFILTERGRAPH_H
+
+#include "avfilter.h"
+
+typedef struct AVFilterGraph {
+    unsigned filter_count;
+    AVFilterContext **filters;
+
+    char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
+} AVFilterGraph;
+
+/**
+ * Allocate a filter graph.
+ */
+AVFilterGraph *avfilter_graph_alloc(void);
+
+/**
+ * Get a filter instance with name name from graph.
+ *
+ * @return the pointer to the found filter instance or NULL if it
+ * cannot be found.
+ */
+AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
+
+/**
+ * Add an existing filter instance to a filter graph.
+ *
+ * @param graphctx  the filter graph
+ * @param filter the filter to be added
+ */
+int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
+
+/**
+ * Create and add a filter instance into an existing graph.
+ * The filter instance is created from the filter filt and inited
+ * with the parameters args and opaque.
+ *
+ * In case of success put in *filt_ctx the pointer to the created
+ * filter instance, otherwise set *filt_ctx to NULL.
+ *
+ * @param name the instance name to give to the created filter instance
+ * @param graph_ctx the filter graph
+ * @return a negative AVERROR error code in case of failure, a non
+ * negative value otherwise
+ */
+int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
+                                 const char *name, const char *args, void *opaque,
+                                 AVFilterGraph *graph_ctx);
+
+/**
+ * Check validity and configure all the links and formats in the graph.
+ *
+ * @param graphctx the filter graph
+ * @param log_ctx context used for logging
+ * @return 0 in case of success, a negative AVERROR code otherwise
+ */
+int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);
+
+/**
+ * Free a graph, destroy its links, and set *graph to NULL.
+ * If *graph is NULL, do nothing.
+ */
+void avfilter_graph_free(AVFilterGraph **graph);
+
+/**
+ * A linked-list of the inputs/outputs of the filter chain.
+ *
+ * This is mainly useful for avfilter_graph_parse(), since this
+ * function may accept a description of a graph with not connected
+ * input/output pads. This struct specifies, per each not connected
+ * pad contained in the graph, the filter context and the pad index
+ * required for establishing a link.
+ */
+typedef struct AVFilterInOut {
+    /** unique name for this input/output in the list */
+    char *name;
+
+    /** filter context associated to this input/output */
+    AVFilterContext *filter_ctx;
+
+    /** index of the filt_ctx pad to use for linking */
+    int pad_idx;
+
+    /** next input/input in the list, NULL if this is the last */
+    struct AVFilterInOut *next;
+} AVFilterInOut;
+
+/**
+ * Create an AVFilterInOut.
+ * Must be free with avfilter_inout_free().
+ */
+AVFilterInOut *avfilter_inout_alloc(void);
+
+/**
+ * Free the AVFilterInOut in *inout, and set its pointer to NULL.
+ * If *inout is NULL, do nothing.
+ */
+void avfilter_inout_free(AVFilterInOut **inout);
+
+/**
+ * Add a graph described by a string to a graph.
+ *
+ * @param graph   the filter graph where to link the parsed graph context
+ * @param filters string to be parsed
+ * @param inputs  pointer to a linked list to the inputs of the graph, may be NULL.
+ *                If non-NULL, *inputs is updated to contain the list of open inputs
+ *                after the parsing, should be freed with avfilter_inout_free().
+ * @param outputs pointer to a linked list to the outputs of the graph, may be NULL.
+ *                If non-NULL, *outputs is updated to contain the list of open outputs
+ *                after the parsing, should be freed with avfilter_inout_free().
+ * @return zero on success, a negative AVERROR code on error
+ */
+int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
+                         AVFilterInOut **inputs, AVFilterInOut **outputs,
+                         void *log_ctx);
+
+#endif /* AVFILTER_AVFILTERGRAPH_H */
diff --git a/ffmpeg 0.8/include/libavfilter/vsink_buffer.h b/ffmpeg 0.8/include/libavfilter/vsink_buffer.h
new file mode 100644 (file)
index 0000000..88b4c1d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFILTER_VSINK_BUFFER_H
+#define AVFILTER_VSINK_BUFFER_H
+
+/**
+ * @file
+ * memory buffer sink API for video
+ */
+
+#include "avfilter.h"
+
+/**
+ * Tell av_vsink_buffer_get_video_buffer_ref() to read the picref, but not
+ * remove it from the buffer. This is useful if you need only to read
+ * the picref, without to fetch it.
+ */
+#define AV_VSINK_BUF_FLAG_PEEK 1
+
+/**
+ * Get a video buffer data from buffer_sink and put it in picref.
+ *
+ * @param buffer_sink pointer to a buffer sink context
+ * @param flags a combination of AV_VSINK_BUF_FLAG_* flags
+ * @return >= 0 in case of success, a negative AVERROR code in case of
+ * failure
+ */
+int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink,
+                                         AVFilterBufferRef **picref, int flags);
+
+#endif /* AVFILTER_VSINK_BUFFER_H */
diff --git a/ffmpeg 0.8/include/libavfilter/vsrc_buffer.h b/ffmpeg 0.8/include/libavfilter/vsrc_buffer.h
new file mode 100644 (file)
index 0000000..b661d41
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2008 Vitor Sessak
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFILTER_VSRC_BUFFER_H
+#define AVFILTER_VSRC_BUFFER_H
+
+/**
+ * @file
+ * memory buffer source API for video
+ */
+
+#include "avfilter.h"
+
+/**
+ * Tell av_vsrc_buffer_add_video_buffer_ref() to overwrite the already
+ * cached video buffer with the new added one, otherwise the function
+ * will complain and exit.
+ */
+#define AV_VSRC_BUF_FLAG_OVERWRITE 1
+
+/**
+ * Add video buffer data in picref to buffer_src.
+ *
+ * @param buffer_src pointer to a buffer source context
+ * @param flags a combination of AV_VSRC_BUF_FLAG_* flags
+ * @return >= 0 in case of success, a negative AVERROR code in case of
+ * failure
+ */
+int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_src,
+                                        AVFilterBufferRef *picref, int flags);
+
+#endif /* AVFILTER_VSRC_BUFFER_H */
diff --git a/ffmpeg 0.8/include/libavformat/avformat.h b/ffmpeg 0.8/include/libavformat/avformat.h
new file mode 100644 (file)
index 0000000..7c041f6
--- /dev/null
@@ -0,0 +1,1683 @@
+/*
+ * copyright (c) 2001 Fabrice Bellard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFORMAT_AVFORMAT_H
+#define AVFORMAT_AVFORMAT_H
+
+
+/**
+ * Return the LIBAVFORMAT_VERSION_INT constant.
+ */
+unsigned avformat_version(void);
+
+/**
+ * Return the libavformat build-time configuration.
+ */
+const char *avformat_configuration(void);
+
+/**
+ * Return the libavformat license.
+ */
+const char *avformat_license(void);
+
+#include <time.h>
+#include <stdio.h>  /* FILE */
+#include "libavcodec/avcodec.h"
+#include "libavutil/dict.h"
+#include "libavutil/log.h"
+
+#include "avio.h"
+#include "libavformat/version.h"
+
+struct AVFormatContext;
+
+
+/**
+ * @defgroup metadata_api Public Metadata API
+ * @{
+ * The metadata API allows libavformat to export metadata tags to a client
+ * application using a sequence of key/value pairs. Like all strings in FFmpeg,
+ * metadata must be stored as UTF-8 encoded Unicode. Note that metadata
+ * exported by demuxers isn't checked to be valid UTF-8 in most cases.
+ * Important concepts to keep in mind:
+ * -  Keys are unique; there can never be 2 tags with the same key. This is
+ *    also meant semantically, i.e., a demuxer should not knowingly produce
+ *    several keys that are literally different but semantically identical.
+ *    E.g., key=Author5, key=Author6. In this example, all authors must be
+ *    placed in the same tag.
+ * -  Metadata is flat, not hierarchical; there are no subtags. If you
+ *    want to store, e.g., the email address of the child of producer Alice
+ *    and actor Bob, that could have key=alice_and_bobs_childs_email_address.
+ * -  Several modifiers can be applied to the tag name. This is done by
+ *    appending a dash character ('-') and the modifier name in the order
+ *    they appear in the list below -- e.g. foo-eng-sort, not foo-sort-eng.
+ *    -  language -- a tag whose value is localized for a particular language
+ *       is appended with the ISO 639-2/B 3-letter language code.
+ *       For example: Author-ger=Michael, Author-eng=Mike
+ *       The original/default language is in the unqualified "Author" tag.
+ *       A demuxer should set a default if it sets any translated tag.
+ *    -  sorting  -- a modified version of a tag that should be used for
+ *       sorting will have '-sort' appended. E.g. artist="The Beatles",
+ *       artist-sort="Beatles, The".
+ *
+ * -  Demuxers attempt to export metadata in a generic format, however tags
+ *    with no generic equivalents are left as they are stored in the container.
+ *    Follows a list of generic tag names:
+ *
+ @verbatim
+ album        -- name of the set this work belongs to
+ album_artist -- main creator of the set/album, if different from artist.
+                 e.g. "Various Artists" for compilation albums.
+ artist       -- main creator of the work
+ comment      -- any additional description of the file.
+ composer     -- who composed the work, if different from artist.
+ copyright    -- name of copyright holder.
+ creation_time-- date when the file was created, preferably in ISO 8601.
+ date         -- date when the work was created, preferably in ISO 8601.
+ disc         -- number of a subset, e.g. disc in a multi-disc collection.
+ encoder      -- name/settings of the software/hardware that produced the file.
+ encoded_by   -- person/group who created the file.
+ filename     -- original name of the file.
+ genre        -- <self-evident>.
+ language     -- main language in which the work is performed, preferably
+                 in ISO 639-2 format. Multiple languages can be specified by
+                 separating them with commas.
+ performer    -- artist who performed the work, if different from artist.
+                 E.g for "Also sprach Zarathustra", artist would be "Richard
+                 Strauss" and performer "London Philharmonic Orchestra".
+ publisher    -- name of the label/publisher.
+ service_name     -- name of the service in broadcasting (channel name).
+ service_provider -- name of the service provider in broadcasting.
+ title        -- name of the work.
+ track        -- number of this work in the set, can be in form current/total.
+ variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of
+ @endverbatim
+ *
+ * Look in the examples section for an application example how to use the Metadata API.
+ *
+ * @}
+ */
+
+#if FF_API_OLD_METADATA2
+/**
+ * @defgroup old_metadata Old metadata API
+ * The following functions are deprecated, use
+ * their equivalents from libavutil/dict.h instead.
+ * @{
+ */
+
+#define AV_METADATA_MATCH_CASE      AV_DICT_MATCH_CASE
+#define AV_METADATA_IGNORE_SUFFIX   AV_DICT_IGNORE_SUFFIX
+#define AV_METADATA_DONT_STRDUP_KEY AV_DICT_DONT_STRDUP_KEY
+#define AV_METADATA_DONT_STRDUP_VAL AV_DICT_DONT_STRDUP_VAL
+#define AV_METADATA_DONT_OVERWRITE  AV_DICT_DONT_OVERWRITE
+
+typedef attribute_deprecated AVDictionary AVMetadata;
+typedef attribute_deprecated AVDictionaryEntry  AVMetadataTag;
+
+typedef struct AVMetadataConv AVMetadataConv;
+
+/**
+ * Get a metadata element with matching key.
+ *
+ * @param prev Set to the previous matching element to find the next.
+ *             If set to NULL the first matching element is returned.
+ * @param flags Allows case as well as suffix-insensitive comparisons.
+ * @return Found tag or NULL, changing key or value leads to undefined behavior.
+ */
+attribute_deprecated AVDictionaryEntry *
+av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+
+/**
+ * Set the given tag in *pm, overwriting an existing tag.
+ *
+ * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
+ * a metadata struct is allocated and put in *pm.
+ * @param key tag key to add to *pm (will be av_strduped depending on flags)
+ * @param value tag value to add to *pm (will be av_strduped depending on flags).
+ *        Passing a NULL value will cause an existing tag to be deleted.
+ * @return >= 0 on success otherwise an error code <0
+ */
+attribute_deprecated int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags);
+
+/**
+ * This function is provided for compatibility reason and currently does nothing.
+ */
+attribute_deprecated void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
+                                                                        const AVMetadataConv *s_conv);
+
+/**
+ * Copy metadata from one AVDictionary struct into another.
+ * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
+ *            this function will allocate a struct for you and put it in *dst
+ * @param src pointer to source AVDictionary struct
+ * @param flags flags to use when setting metadata in *dst
+ * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
+ */
+attribute_deprecated void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags);
+
+/**
+ * Free all the memory allocated for an AVDictionary struct.
+ */
+attribute_deprecated void av_metadata_free(AVDictionary **m);
+/**
+ * @}
+ */
+#endif
+
+
+/* packet functions */
+
+
+/**
+ * Allocate and read the payload of a packet and initialize its
+ * fields with default values.
+ *
+ * @param pkt packet
+ * @param size desired payload size
+ * @return >0 (read size) if OK, AVERROR_xxx otherwise
+ */
+int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
+
+
+/**
+ * Read data and append it to the current content of the AVPacket.
+ * If pkt->size is 0 this is identical to av_get_packet.
+ * Note that this uses av_grow_packet and thus involves a realloc
+ * which is inefficient. Thus this function should only be used
+ * when there is no reasonable way to know (an upper bound of)
+ * the final size.
+ *
+ * @param pkt packet
+ * @param size amount of data to read
+ * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data
+ *         will not be lost even if an error occurs.
+ */
+int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
+
+/*************************************************/
+/* fractional numbers for exact pts handling */
+
+/**
+ * The exact value of the fractional number is: 'val + num / den'.
+ * num is assumed to be 0 <= num < den.
+ */
+typedef struct AVFrac {
+    int64_t val, num, den;
+} AVFrac;
+
+/*************************************************/
+/* input/output formats */
+
+struct AVCodecTag;
+
+/**
+ * This structure contains the data a format has to probe a file.
+ */
+typedef struct AVProbeData {
+    const char *filename;
+    unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */
+    int buf_size;       /**< Size of buf except extra allocated bytes */
+} AVProbeData;
+
+#define AVPROBE_SCORE_MAX 100               ///< maximum score, half of that is used for file-extension-based detection
+#define AVPROBE_PADDING_SIZE 32             ///< extra allocated bytes at the end of the probe buffer
+
+typedef struct AVFormatParameters {
+#if FF_API_FORMAT_PARAMETERS
+    attribute_deprecated AVRational time_base;
+    attribute_deprecated int sample_rate;
+    attribute_deprecated int channels;
+    attribute_deprecated int width;
+    attribute_deprecated int height;
+    attribute_deprecated enum PixelFormat pix_fmt;
+    attribute_deprecated int channel; /**< Used to select DV channel. */
+    attribute_deprecated const char *standard; /**< deprecated, use demuxer-specific options instead. */
+    attribute_deprecated unsigned int mpeg2ts_raw:1;  /**< deprecated, use mpegtsraw demuxer */
+    /**< deprecated, use mpegtsraw demuxer-specific options instead */
+    attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
+    attribute_deprecated unsigned int initial_pause:1;       /**< Do not begin to play the stream
+                                                                  immediately (RTSP only). */
+    attribute_deprecated unsigned int prealloced_context:1;
+#endif
+} AVFormatParameters;
+
+//! Demuxer will use avio_open, no opened file should be provided by the caller.
+#define AVFMT_NOFILE        0x0001
+#define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */
+#define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */
+#define AVFMT_RAWPICTURE    0x0020 /**< Format wants AVPicture structure for
+                                      raw picture data. */
+#define AVFMT_GLOBALHEADER  0x0040 /**< Format wants global header. */
+#define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */
+#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */
+#define AVFMT_TS_DISCONT    0x0200 /**< Format allows timestamp discontinuities. Note, muxers always require valid (monotone) timestamps */
+#define AVFMT_VARIABLE_FPS  0x0400 /**< Format allows variable fps. */
+#define AVFMT_NODIMENSIONS  0x0800 /**< Format does not need width/height */
+#define AVFMT_NOSTREAMS     0x1000 /**< Format does not require any streams */
+#define AVFMT_NOBINSEARCH   0x2000 /**< Format does not allow to fallback to binary search via read_timestamp */
+#define AVFMT_NOGENSEARCH   0x4000 /**< Format does not allow to fallback to generic search */
+#define AVFMT_TS_NONSTRICT  0x8000 /**< Format does not require strictly
+                                          increasing timestamps, but they must
+                                          still be monotonic */
+
+typedef struct AVOutputFormat {
+    const char *name;
+    /**
+     * Descriptive name for the format, meant to be more human-readable
+     * than name. You should use the NULL_IF_CONFIG_SMALL() macro
+     * to define it.
+     */
+    const char *long_name;
+    const char *mime_type;
+    const char *extensions; /**< comma-separated filename extensions */
+    /**
+     * size of private data so that it can be allocated in the wrapper
+     */
+    int priv_data_size;
+    /* output support */
+    enum CodecID audio_codec; /**< default audio codec */
+    enum CodecID video_codec; /**< default video codec */
+    int (*write_header)(struct AVFormatContext *);
+    int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
+    int (*write_trailer)(struct AVFormatContext *);
+    /**
+     * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE,
+     * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
+     * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS
+     */
+    int flags;
+
+    void *dummy;
+
+    int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
+                             AVPacket *in, int flush);
+
+    /**
+     * List of supported codec_id-codec_tag pairs, ordered by "better
+     * choice first". The arrays are all terminated by CODEC_ID_NONE.
+     */
+    const struct AVCodecTag * const *codec_tag;
+
+    enum CodecID subtitle_codec; /**< default subtitle codec */
+
+#if FF_API_OLD_METADATA2
+    const AVMetadataConv *metadata_conv;
+#endif
+
+    const AVClass *priv_class; ///< AVClass for the private context
+
+    void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
+                                 int64_t *dts, int64_t *wall);
+
+    /* private fields */
+    struct AVOutputFormat *next;
+} AVOutputFormat;
+
+typedef struct AVInputFormat {
+    /**
+     * A comma separated list of short names for the format. New names
+     * may be appended with a minor bump.
+     */
+    const char *name;
+
+    /**
+     * Descriptive name for the format, meant to be more human-readable
+     * than name. You should use the NULL_IF_CONFIG_SMALL() macro
+     * to define it.
+     */
+    const char *long_name;
+
+    /**
+     * Size of private data so that it can be allocated in the wrapper.
+     */
+    int priv_data_size;
+
+    /**
+     * Tell if a given file has a chance of being parsed as this format.
+     * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
+     * big so you do not have to check for that unless you need more.
+     */
+    int (*read_probe)(AVProbeData *);
+
+    /**
+     * Read the format header and initialize the AVFormatContext
+     * structure. Return 0 if OK. 'ap' if non-NULL contains
+     * additional parameters. Only used in raw format right
+     * now. 'av_new_stream' should be called to create new streams.
+     */
+    int (*read_header)(struct AVFormatContext *,
+                       AVFormatParameters *ap);
+
+    /**
+     * Read one packet and put it in 'pkt'. pts and flags are also
+     * set. 'av_new_stream' can be called only if the flag
+     * AVFMTCTX_NOHEADER is used and only in the calling thread (not in a
+     * background thread).
+     * @return 0 on success, < 0 on error.
+     *         When returning an error, pkt must not have been allocated
+     *         or must be freed before returning
+     */
+    int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
+
+    /**
+     * Close the stream. The AVFormatContext and AVStreams are not
+     * freed by this function
+     */
+    int (*read_close)(struct AVFormatContext *);
+
+#if FF_API_READ_SEEK
+    /**
+     * Seek to a given timestamp relative to the frames in
+     * stream component stream_index.
+     * @param stream_index Must not be -1.
+     * @param flags Selects which direction should be preferred if no exact
+     *              match is available.
+     * @return >= 0 on success (but not necessarily the new offset)
+     */
+    attribute_deprecated int (*read_seek)(struct AVFormatContext *,
+                                          int stream_index, int64_t timestamp, int flags);
+#endif
+    /**
+     * Gets the next timestamp in stream[stream_index].time_base units.
+     * @return the timestamp or AV_NOPTS_VALUE if an error occurred
+     */
+    int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
+                              int64_t *pos, int64_t pos_limit);
+
+    /**
+     * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER.
+     */
+    int flags;
+
+    /**
+     * If extensions are defined, then no probe is done. You should
+     * usually not use extension format guessing because it is not
+     * reliable enough
+     */
+    const char *extensions;
+
+    /**
+     * General purpose read-only value that the format can use.
+     */
+    int value;
+
+    /**
+     * Start/resume playing - only meaningful if using a network-based format
+     * (RTSP).
+     */
+    int (*read_play)(struct AVFormatContext *);
+
+    /**
+     * Pause playing - only meaningful if using a network-based format
+     * (RTSP).
+     */
+    int (*read_pause)(struct AVFormatContext *);
+
+    const struct AVCodecTag * const *codec_tag;
+
+    /**
+     * Seek to timestamp ts.
+     * Seeking will be done so that the point from which all active streams
+     * can be presented successfully will be closest to ts and within min/max_ts.
+     * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
+     */
+    int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
+
+#if FF_API_OLD_METADATA2
+    const AVMetadataConv *metadata_conv;
+#endif
+
+    const AVClass *priv_class; ///< AVClass for the private context
+
+    /* private fields */
+    struct AVInputFormat *next;
+} AVInputFormat;
+
+enum AVStreamParseType {
+    AVSTREAM_PARSE_NONE,
+    AVSTREAM_PARSE_FULL,       /**< full parsing and repack */
+    AVSTREAM_PARSE_HEADERS,    /**< Only parse headers, do not repack. */
+    AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */
+    AVSTREAM_PARSE_FULL_ONCE,  /**< full parsing and repack of the first frame only, only implemented for H.264 currently */
+};
+
+typedef struct AVIndexEntry {
+    int64_t pos;
+    int64_t timestamp;
+#define AVINDEX_KEYFRAME 0x0001
+    int flags:2;
+    int size:30; //Yeah, trying to keep the size of this small to reduce memory requirements (it is 24 vs. 32 bytes due to possible 8-byte alignment).
+    int min_distance;         /**< Minimum distance between this and the previous keyframe, used to avoid unneeded searching. */
+} AVIndexEntry;
+
+#define AV_DISPOSITION_DEFAULT   0x0001
+#define AV_DISPOSITION_DUB       0x0002
+#define AV_DISPOSITION_ORIGINAL  0x0004
+#define AV_DISPOSITION_COMMENT   0x0008
+#define AV_DISPOSITION_LYRICS    0x0010
+#define AV_DISPOSITION_KARAOKE   0x0020
+
+/**
+ * Track should be used during playback by default.
+ * Useful for subtitle track that should be displayed
+ * even when user did not explicitly ask for subtitles.
+ */
+#define AV_DISPOSITION_FORCED    0x0040
+#define AV_DISPOSITION_HEARING_IMPAIRED  0x0080  /**< stream for hearing impaired audiences */
+#define AV_DISPOSITION_VISUAL_IMPAIRED   0x0100  /**< stream for visual impaired audiences */
+#define AV_DISPOSITION_CLEAN_EFFECTS     0x0200  /**< stream without voice */
+
+/**
+ * Stream structure.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVStream) must not be used outside libav*.
+ */
+typedef struct AVStream {
+    int index;    /**< stream index in AVFormatContext */
+    int id;       /**< format-specific stream ID */
+    AVCodecContext *codec; /**< codec context */
+    /**
+     * Real base framerate of the stream.
+     * This is the lowest framerate with which all timestamps can be
+     * represented accurately (it is the least common multiple of all
+     * framerates in the stream). Note, this value is just a guess!
+     * For example, if the time base is 1/90000 and all frames have either
+     * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
+     */
+    AVRational r_frame_rate;
+    void *priv_data;
+
+    /* internal data used in av_find_stream_info() */
+    int64_t first_dts;
+
+    /**
+     * encoding: pts generation when outputting stream
+     */
+    struct AVFrac pts;
+
+    /**
+     * This is the fundamental unit of time (in seconds) in terms
+     * of which frame timestamps are represented. For fixed-fps content,
+     * time base should be 1/framerate and timestamp increments should be 1.
+     * decoding: set by libavformat
+     * encoding: set by libavformat in av_write_header
+     */
+    AVRational time_base;
+    int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
+    /* ffmpeg.c private use */
+    int stream_copy; /**< If set, just copy stream. */
+    enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
+
+#if FF_API_AVSTREAM_QUALITY
+    //FIXME move stuff to a flags field?
+    /**
+     * Quality, as it has been removed from AVCodecContext and put in AVVideoFrame.
+     * MN: dunno if that is the right place for it
+     */
+    attribute_deprecated float quality;
+#endif
+
+    /**
+     * Decoding: pts of the first frame of the stream, in stream time base.
+     * Only set this if you are absolutely 100% sure that the value you set
+     * it to really is the pts of the first frame.
+     * This may be undefined (AV_NOPTS_VALUE).
+     * @note The ASF header does NOT contain a correct start_time the ASF
+     * demuxer must NOT set this.
+     */
+    int64_t start_time;
+
+    /**
+     * Decoding: duration of the stream, in stream time base.
+     * If a source file does not specify a duration, but does specify
+     * a bitrate, this value will be estimated from bitrate and file size.
+     */
+    int64_t duration;
+
+    /* av_read_frame() support */
+    enum AVStreamParseType need_parsing;
+    struct AVCodecParserContext *parser;
+
+    int64_t cur_dts;
+    int last_IP_duration;
+    int64_t last_IP_pts;
+    /* av_seek_frame() support */
+    AVIndexEntry *index_entries; /**< Only used if the format does not
+                                    support seeking natively. */
+    int nb_index_entries;
+    unsigned int index_entries_allocated_size;
+
+    int64_t nb_frames;                 ///< number of frames in this stream if known or 0
+
+    int disposition; /**< AV_DISPOSITION_* bit field */
+
+    AVProbeData probe_data;
+#define MAX_REORDER_DELAY 16
+    int64_t pts_buffer[MAX_REORDER_DELAY+1];
+
+    /**
+     * sample aspect ratio (0 if unknown)
+     * - encoding: Set by user.
+     * - decoding: Set by libavformat.
+     */
+    AVRational sample_aspect_ratio;
+
+    AVDictionary *metadata;
+
+    /* Intended mostly for av_read_frame() support. Not supposed to be used by */
+    /* external applications; try to use something else if at all possible.    */
+    const uint8_t *cur_ptr;
+    int cur_len;
+    AVPacket cur_pkt;
+
+    // Timestamp generation support:
+    /**
+     * Timestamp corresponding to the last dts sync point.
+     *
+     * Initialized when AVCodecParserContext.dts_sync_point >= 0 and
+     * a DTS is received from the underlying container. Otherwise set to
+     * AV_NOPTS_VALUE by default.
+     */
+    int64_t reference_dts;
+
+    /**
+     * Number of packets to buffer for codec probing
+     * NOT PART OF PUBLIC API
+     */
+#define MAX_PROBE_PACKETS 2500
+    int probe_packets;
+
+    /**
+     * last packet in packet_buffer for this stream when muxing.
+     * used internally, NOT PART OF PUBLIC API, dont read or write from outside of libav*
+     */
+    struct AVPacketList *last_in_packet_buffer;
+
+    /**
+     * Average framerate
+     */
+    AVRational avg_frame_rate;
+
+    /**
+     * Number of frames that have been demuxed during av_find_stream_info()
+     */
+    int codec_info_nb_frames;
+
+    /**
+     * Stream Identifier
+     * This is the MPEG-TS stream identifier +1
+     * 0 means unknown
+     */
+    int stream_identifier;
+
+    /**
+     * Stream informations used internally by av_find_stream_info()
+     */
+#define MAX_STD_TIMEBASES (60*12+5)
+    struct {
+        int64_t last_dts;
+        int64_t duration_gcd;
+        int duration_count;
+        double duration_error[MAX_STD_TIMEBASES];
+        int64_t codec_info_duration;
+    } *info;
+
+    /**
+     * flag to indicate that probing is requested
+     * NOT PART OF PUBLIC API
+     */
+    int request_probe;
+} AVStream;
+
+#define AV_PROGRAM_RUNNING 1
+
+/**
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVProgram) must not be used outside libav*.
+ */
+typedef struct AVProgram {
+    int            id;
+    int            flags;
+    enum AVDiscard discard;        ///< selects which program to discard and which to feed to the caller
+    unsigned int   *stream_index;
+    unsigned int   nb_stream_indexes;
+    AVDictionary *metadata;
+
+    int program_num;
+    int pmt_pid;
+    int pcr_pid;
+} AVProgram;
+
+#define AVFMTCTX_NOHEADER      0x0001 /**< signal that no header is present
+                                         (streams are added dynamically) */
+
+typedef struct AVChapter {
+    int id;                 ///< unique ID to identify the chapter
+    AVRational time_base;   ///< time base in which the start/end timestamps are specified
+    int64_t start, end;     ///< chapter start/end time in time_base units
+    AVDictionary *metadata;
+} AVChapter;
+
+/**
+ * Format I/O context.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVFormatContext) must not be used outside libav*.
+ */
+typedef struct AVFormatContext {
+    const AVClass *av_class; /**< Set by avformat_alloc_context. */
+    /* Can only be iformat or oformat, not both at the same time. */
+    struct AVInputFormat *iformat;
+    struct AVOutputFormat *oformat;
+    void *priv_data;
+    AVIOContext *pb;
+    unsigned int nb_streams;
+    AVStream **streams;
+    char filename[1024]; /**< input or output filename */
+    /* stream info */
+#if FF_API_TIMESTAMP
+    /**
+     * @deprecated use 'creation_time' metadata tag instead
+     */
+    attribute_deprecated int64_t timestamp;
+#endif
+
+    int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */
+    /* private data for pts handling (do not modify directly). */
+    /**
+     * This buffer is only needed when packets were already buffered but
+     * not decoded, for example to get the codec parameters in MPEG
+     * streams.
+     */
+    struct AVPacketList *packet_buffer;
+
+    /**
+     * Decoding: position of the first frame of the component, in
+     * AV_TIME_BASE fractional seconds. NEVER set this value directly:
+     * It is deduced from the AVStream values.
+     */
+    int64_t start_time;
+
+    /**
+     * Decoding: duration of the stream, in AV_TIME_BASE fractional
+     * seconds. Only set this value if you know none of the individual stream
+     * durations and also dont set any of them. This is deduced from the
+     * AVStream values if not set.
+     */
+    int64_t duration;
+
+    /**
+     * decoding: total file size, 0 if unknown
+     */
+    int64_t file_size;
+
+    /**
+     * Decoding: total stream bitrate in bit/s, 0 if not
+     * available. Never set it directly if the file_size and the
+     * duration are known as FFmpeg can compute it automatically.
+     */
+    int bit_rate;
+
+    /* av_read_frame() support */
+    AVStream *cur_st;
+
+    /* av_seek_frame() support */
+    int64_t data_offset; /**< offset of the first packet */
+
+    int mux_rate;
+    unsigned int packet_size;
+    int preload;
+    int max_delay;
+
+#if FF_API_LOOP_OUTPUT
+#define AVFMT_NOOUTPUTLOOP -1
+#define AVFMT_INFINITEOUTPUTLOOP 0
+    /**
+     * number of times to loop output in formats that support it
+     *
+     * @deprecated use the 'loop' private option in the gif muxer.
+     */
+    attribute_deprecated int loop_output;
+#endif
+
+    int flags;
+#define AVFMT_FLAG_GENPTS       0x0001 ///< Generate missing pts even if it requires parsing future frames.
+#define AVFMT_FLAG_IGNIDX       0x0002 ///< Ignore index.
+#define AVFMT_FLAG_NONBLOCK     0x0004 ///< Do not block when reading packets from input.
+#define AVFMT_FLAG_IGNDTS       0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
+#define AVFMT_FLAG_NOFILLIN     0x0010 ///< Do not infer any values from other values, just return what is stored in the container
+#define AVFMT_FLAG_NOPARSE      0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
+#if FF_API_FLAG_RTP_HINT
+#define AVFMT_FLAG_RTP_HINT     0x0040 ///< Deprecated, use the -movflags rtphint muxer specific AVOption instead
+#endif
+#define AVFMT_FLAG_CUSTOM_IO    0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
+#define AVFMT_FLAG_MP4A_LATM    0x8000 ///< Enable RTP MP4A-LATM payload
+#define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
+#define AVFMT_FLAG_PRIV_OPT    0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
+#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Dont merge side data but keep it seperate.
+
+#if FF_API_LOOP_INPUT
+    /**
+     * @deprecated, use the 'loop' img2 demuxer private option.
+     */
+    attribute_deprecated int loop_input;
+#endif
+
+    /**
+     * decoding: size of data to probe; encoding: unused.
+     */
+    unsigned int probesize;
+
+    /**
+     * Maximum time (in AV_TIME_BASE units) during which the input should
+     * be analyzed in av_find_stream_info().
+     */
+    int max_analyze_duration;
+
+    const uint8_t *key;
+    int keylen;
+
+    unsigned int nb_programs;
+    AVProgram **programs;
+
+    /**
+     * Forced video codec_id.
+     * Demuxing: Set by user.
+     */
+    enum CodecID video_codec_id;
+
+    /**
+     * Forced audio codec_id.
+     * Demuxing: Set by user.
+     */
+    enum CodecID audio_codec_id;
+
+    /**
+     * Forced subtitle codec_id.
+     * Demuxing: Set by user.
+     */
+    enum CodecID subtitle_codec_id;
+
+    /**
+     * Maximum amount of memory in bytes to use for the index of each stream.
+     * If the index exceeds this size, entries will be discarded as
+     * needed to maintain a smaller size. This can lead to slower or less
+     * accurate seeking (depends on demuxer).
+     * Demuxers for which a full in-memory index is mandatory will ignore
+     * this.
+     * muxing  : unused
+     * demuxing: set by user
+     */
+    unsigned int max_index_size;
+
+    /**
+     * Maximum amount of memory in bytes to use for buffering frames
+     * obtained from realtime capture devices.
+     */
+    unsigned int max_picture_buffer;
+
+    unsigned int nb_chapters;
+    AVChapter **chapters;
+
+    /**
+     * Flags to enable debugging.
+     */
+    int debug;
+#define FF_FDEBUG_TS        0x0001
+
+    /**
+     * Raw packets from the demuxer, prior to parsing and decoding.
+     * This buffer is used for buffering packets until the codec can
+     * be identified, as parsing cannot be done without knowing the
+     * codec.
+     */
+    struct AVPacketList *raw_packet_buffer;
+    struct AVPacketList *raw_packet_buffer_end;
+
+    struct AVPacketList *packet_buffer_end;
+
+    AVDictionary *metadata;
+
+    /**
+     * Remaining size available for raw_packet_buffer, in bytes.
+     * NOT PART OF PUBLIC API
+     */
+#define RAW_PACKET_BUFFER_SIZE 2500000
+    int raw_packet_buffer_remaining_size;
+
+    /**
+     * Start time of the stream in real world time, in microseconds
+     * since the unix epoch (00:00 1st January 1970). That is, pts=0
+     * in the stream was captured at this real world time.
+     * - encoding: Set by user.
+     * - decoding: Unused.
+     */
+    int64_t start_time_realtime;
+
+    /**
+     * decoding: number of frames used to probe fps
+     */
+    int fps_probe_size;
+
+    /**
+     * Transport stream id.
+     * This will be moved into demuxer private options. Thus no API/ABI compatibility
+     */
+    int ts_id;
+} AVFormatContext;
+
+typedef struct AVPacketList {
+    AVPacket pkt;
+    struct AVPacketList *next;
+} AVPacketList;
+
+/**
+ * If f is NULL, returns the first registered input format,
+ * if f is non-NULL, returns the next registered input format after f
+ * or NULL if f is the last one.
+ */
+AVInputFormat  *av_iformat_next(AVInputFormat  *f);
+
+/**
+ * If f is NULL, returns the first registered output format,
+ * if f is non-NULL, returns the next registered output format after f
+ * or NULL if f is the last one.
+ */
+AVOutputFormat *av_oformat_next(AVOutputFormat *f);
+
+#if FF_API_GUESS_IMG2_CODEC
+attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename);
+#endif
+
+/* XXX: Use automatic init with either ELF sections or C file parser */
+/* modules. */
+
+/* utils.c */
+void av_register_input_format(AVInputFormat *format);
+void av_register_output_format(AVOutputFormat *format);
+
+/**
+ * Return the output format in the list of registered output formats
+ * which best matches the provided parameters, or return NULL if
+ * there is no match.
+ *
+ * @param short_name if non-NULL checks if short_name matches with the
+ * names of the registered formats
+ * @param filename if non-NULL checks if filename terminates with the
+ * extensions of the registered formats
+ * @param mime_type if non-NULL checks if mime_type matches with the
+ * MIME type of the registered formats
+ */
+AVOutputFormat *av_guess_format(const char *short_name,
+                                const char *filename,
+                                const char *mime_type);
+
+/**
+ * Guess the codec ID based upon muxer and filename.
+ */
+enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
+                            const char *filename, const char *mime_type,
+                            enum AVMediaType type);
+
+/**
+ * Send a nice hexadecimal dump of a buffer to the specified file stream.
+ *
+ * @param f The file stream pointer where the dump should be sent to.
+ * @param buf buffer
+ * @param size buffer size
+ *
+ * @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2
+ */
+void av_hex_dump(FILE *f, uint8_t *buf, int size);
+
+/**
+ * Send a nice hexadecimal dump of a buffer to the log.
+ *
+ * @param avcl A pointer to an arbitrary struct of which the first field is a
+ * pointer to an AVClass struct.
+ * @param level The importance level of the message, lower values signifying
+ * higher importance.
+ * @param buf buffer
+ * @param size buffer size
+ *
+ * @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2
+ */
+void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
+
+/**
+ * Send a nice dump of a packet to the specified file stream.
+ *
+ * @param f The file stream pointer where the dump should be sent to.
+ * @param pkt packet to dump
+ * @param dump_payload True if the payload must be displayed, too.
+ * @param st AVStream that the packet belongs to
+ */
+void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st);
+
+
+/**
+ * Send a nice dump of a packet to the log.
+ *
+ * @param avcl A pointer to an arbitrary struct of which the first field is a
+ * pointer to an AVClass struct.
+ * @param level The importance level of the message, lower values signifying
+ * higher importance.
+ * @param pkt packet to dump
+ * @param dump_payload True if the payload must be displayed, too.
+ * @param st AVStream that the packet belongs to
+ */
+void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
+                      AVStream *st);
+
+#if FF_API_PKT_DUMP
+attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
+attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
+                                          int dump_payload);
+#endif
+
+/**
+ * Initialize libavformat and register all the muxers, demuxers and
+ * protocols. If you do not call this function, then you can select
+ * exactly which formats you want to support.
+ *
+ * @see av_register_input_format()
+ * @see av_register_output_format()
+ * @see av_register_protocol()
+ */
+void av_register_all(void);
+
+/**
+ * Get the CodecID for the given codec tag tag.
+ * If no codec id is found returns CODEC_ID_NONE.
+ *
+ * @param tags list of supported codec_id-codec_tag pairs, as stored
+ * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
+ */
+enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
+
+/**
+ * Get the codec tag for the given codec id id.
+ * If no codec tag is found returns 0.
+ *
+ * @param tags list of supported codec_id-codec_tag pairs, as stored
+ * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
+ */
+unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
+
+/* media file input */
+
+/**
+ * Find AVInputFormat based on the short name of the input format.
+ */
+AVInputFormat *av_find_input_format(const char *short_name);
+
+/**
+ * Guess the file format.
+ *
+ * @param is_opened Whether the file is already opened; determines whether
+ *                  demuxers with or without AVFMT_NOFILE are probed.
+ */
+AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
+
+/**
+ * Guess the file format.
+ *
+ * @param is_opened Whether the file is already opened; determines whether
+ *                  demuxers with or without AVFMT_NOFILE are probed.
+ * @param score_max A probe score larger that this is required to accept a
+ *                  detection, the variable is set to the actual detection
+ *                  score afterwards.
+ *                  If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended
+ *                  to retry with a larger probe buffer.
+ */
+AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
+
+/**
+ * Guess the file format.
+ *
+ * @param is_opened Whether the file is already opened; determines whether
+ *                  demuxers with or without AVFMT_NOFILE are probed.
+ * @param score_ret The score of the best detection.
+ */
+AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);
+
+/**
+ * Probe a bytestream to determine the input format. Each time a probe returns
+ * with a score that is too low, the probe buffer size is increased and another
+ * attempt is made. When the maximum probe size is reached, the input format
+ * with the highest score is returned.
+ *
+ * @param pb the bytestream to probe
+ * @param fmt the input format is put here
+ * @param filename the filename of the stream
+ * @param logctx the log context
+ * @param offset the offset within the bytestream to probe from
+ * @param max_probe_size the maximum probe buffer size (zero for default)
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
+                          const char *filename, void *logctx,
+                          unsigned int offset, unsigned int max_probe_size);
+
+#if FF_API_FORMAT_PARAMETERS
+/**
+ * Allocate all the structures needed to read an input stream.
+ *        This does not open the needed codecs for decoding the stream[s].
+ * @deprecated use avformat_open_input instead.
+ */
+attribute_deprecated int av_open_input_stream(AVFormatContext **ic_ptr,
+                         AVIOContext *pb, const char *filename,
+                         AVInputFormat *fmt, AVFormatParameters *ap);
+
+/**
+ * Open a media file as input. The codecs are not opened. Only the file
+ * header (if present) is read.
+ *
+ * @param ic_ptr The opened media file handle is put here.
+ * @param filename filename to open
+ * @param fmt If non-NULL, force the file format to use.
+ * @param buf_size optional buffer size (zero if default is OK)
+ * @param ap Additional parameters needed when opening the file
+ *           (NULL if default).
+ * @return 0 if OK, AVERROR_xxx otherwise
+ *
+ * @deprecated use avformat_open_input instead.
+ */
+attribute_deprecated int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
+                       AVInputFormat *fmt,
+                       int buf_size,
+                       AVFormatParameters *ap);
+#endif
+
+/**
+ * Open an input stream and read the header. The codecs are not opened.
+ * The stream must be closed with av_close_input_file().
+ *
+ * @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
+ *           May be a pointer to NULL, in which case an AVFormatContext is allocated by this
+ *           function and written into ps.
+ *           Note that a user-supplied AVFormatContext will be freed on failure.
+ * @param filename Name of the stream to open.
+ * @param fmt If non-NULL, this parameter forces a specific input format.
+ *            Otherwise the format is autodetected.
+ * @param options  A dictionary filled with AVFormatContext and demuxer-private options.
+ *                 On return this parameter will be destroyed and replaced with a dict containing
+ *                 options that were not found. May be NULL.
+ *
+ * @return 0 on success, a negative AVERROR on failure.
+ *
+ * @note If you want to use custom IO, preallocate the format context and set its pb field.
+ */
+int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
+
+int av_demuxer_open(AVFormatContext *ic, AVFormatParameters *ap);
+
+/**
+ * Allocate an AVFormatContext.
+ * avformat_free_context() can be used to free the context and everything
+ * allocated by the framework within it.
+ */
+AVFormatContext *avformat_alloc_context(void);
+
+#if FF_API_ALLOC_OUTPUT_CONTEXT
+/**
+ * @deprecated deprecated in favor of avformat_alloc_output_context2()
+ */
+attribute_deprecated
+AVFormatContext *avformat_alloc_output_context(const char *format,
+                                               AVOutputFormat *oformat,
+                                               const char *filename);
+#endif
+
+/**
+ * Allocate an AVFormatContext for an output format.
+ * avformat_free_context() can be used to free the context and
+ * everything allocated by the framework within it.
+ *
+ * @param *ctx is set to the created format context, or to NULL in
+ * case of failure
+ * @param oformat format to use for allocating the context, if NULL
+ * format_name and filename are used instead
+ * @param format_name the name of output format to use for allocating the
+ * context, if NULL filename is used instead
+ * @param filename the name of the filename to use for allocating the
+ * context, may be NULL
+ * @return >= 0 in case of success, a negative AVERROR code in case of
+ * failure
+ */
+int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat,
+                                   const char *format_name, const char *filename);
+
+#if FF_API_FORMAT_PARAMETERS
+/**
+ * Read packets of a media file to get stream information. This
+ * is useful for file formats with no headers such as MPEG. This
+ * function also computes the real framerate in case of MPEG-2 repeat
+ * frame mode.
+ * The logical file position is not changed by this function;
+ * examined packets may be buffered for later processing.
+ *
+ * @param ic media file handle
+ * @return >=0 if OK, AVERROR_xxx on error
+ * @todo Let the user decide somehow what information is needed so that
+ *       we do not waste time getting stuff the user does not need.
+ *
+ * @deprecated use avformat_find_stream_info.
+ */
+int av_find_stream_info(AVFormatContext *ic);
+#endif
+
+/**
+ * Read packets of a media file to get stream information. This
+ * is useful for file formats with no headers such as MPEG. This
+ * function also computes the real framerate in case of MPEG-2 repeat
+ * frame mode.
+ * The logical file position is not changed by this function;
+ * examined packets may be buffered for later processing.
+ *
+ * @param ic media file handle
+ * @param options  If non-NULL, an ic.nb_streams long array of pointers to
+ *                 dictionaries, where i-th member contains options for
+ *                 codec corresponding to i-th stream.
+ *                 On return each dictionary will be filled with options that were not found.
+ * @return >=0 if OK, AVERROR_xxx on error
+ *
+ * @note this function isn't guaranteed to open all the codecs, so
+ *       options being non-empty at return is a perfectly normal behavior.
+ *
+ * @todo Let the user decide somehow what information is needed so that
+ *       we do not waste time getting stuff the user does not need.
+ */
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+
+/**
+ * Find the "best" stream in the file.
+ * The best stream is determined according to various heuristics as the most
+ * likely to be what the user expects.
+ * If the decoder parameter is non-NULL, av_find_best_stream will find the
+ * default decoder for the stream's codec; streams for which no decoder can
+ * be found are ignored.
+ *
+ * @param ic                media file handle
+ * @param type              stream type: video, audio, subtitles, etc.
+ * @param wanted_stream_nb  user-requested stream number,
+ *                          or -1 for automatic selection
+ * @param related_stream    try to find a stream related (eg. in the same
+ *                          program) to this one, or -1 if none
+ * @param decoder_ret       if non-NULL, returns the decoder for the
+ *                          selected stream
+ * @param flags             flags; none are currently defined
+ * @return  the non-negative stream number in case of success,
+ *          AVERROR_STREAM_NOT_FOUND if no stream with the requested type
+ *          could be found,
+ *          AVERROR_DECODER_NOT_FOUND if streams were found but no decoder
+ * @note  If av_find_best_stream returns successfully and decoder_ret is not
+ *        NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
+ */
+int av_find_best_stream(AVFormatContext *ic,
+                        enum AVMediaType type,
+                        int wanted_stream_nb,
+                        int related_stream,
+                        AVCodec **decoder_ret,
+                        int flags);
+
+/**
+ * Read a transport packet from a media file.
+ *
+ * This function is obsolete and should never be used.
+ * Use av_read_frame() instead.
+ *
+ * @param s media file handle
+ * @param pkt is filled
+ * @return 0 if OK, AVERROR_xxx on error
+ */
+int av_read_packet(AVFormatContext *s, AVPacket *pkt);
+
+/**
+ * Return the next frame of a stream.
+ * This function returns what is stored in the file, and does not validate
+ * that what is there are valid frames for the decoder. It will split what is
+ * stored in the file into frames and return one for each call. It will not
+ * omit invalid data between valid frames so as to give the decoder the maximum
+ * information possible for decoding.
+ *
+ * The returned packet is valid
+ * until the next av_read_frame() or until av_close_input_file() and
+ * must be freed with av_free_packet. For video, the packet contains
+ * exactly one frame. For audio, it contains an integer number of
+ * frames if each frame has a known fixed size (e.g. PCM or ADPCM
+ * data). If the audio frames have a variable size (e.g. MPEG audio),
+ * then it contains one frame.
+ *
+ * pkt->pts, pkt->dts and pkt->duration are always set to correct
+ * values in AVStream.time_base units (and guessed if the format cannot
+ * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format
+ * has B-frames, so it is better to rely on pkt->dts if you do not
+ * decompress the payload.
+ *
+ * @return 0 if OK, < 0 on error or end of file
+ */
+int av_read_frame(AVFormatContext *s, AVPacket *pkt);
+
+/**
+ * Seek to the keyframe at timestamp.
+ * 'timestamp' in 'stream_index'.
+ * @param stream_index If stream_index is (-1), a default
+ * stream is selected, and timestamp is automatically converted
+ * from AV_TIME_BASE units to the stream specific time_base.
+ * @param timestamp Timestamp in AVStream.time_base units
+ *        or, if no stream is specified, in AV_TIME_BASE units.
+ * @param flags flags which select direction and seeking mode
+ * @return >= 0 on success
+ */
+int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
+                  int flags);
+
+/**
+ * Seek to timestamp ts.
+ * Seeking will be done so that the point from which all active streams
+ * can be presented successfully will be closest to ts and within min/max_ts.
+ * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
+ *
+ * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and
+ * are the file position (this may not be supported by all demuxers).
+ * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames
+ * in the stream with stream_index (this may not be supported by all demuxers).
+ * Otherwise all timestamps are in units of the stream selected by stream_index
+ * or if stream_index is -1, in AV_TIME_BASE units.
+ * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as
+ * keyframes (this may not be supported by all demuxers).
+ *
+ * @param stream_index index of the stream which is used as time base reference
+ * @param min_ts smallest acceptable timestamp
+ * @param ts target timestamp
+ * @param max_ts largest acceptable timestamp
+ * @param flags flags
+ * @return >=0 on success, error code otherwise
+ *
+ * @note This is part of the new seek API which is still under construction.
+ *       Thus do not use this yet. It may change at any time, do not expect
+ *       ABI compatibility yet!
+ */
+int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
+
+/**
+ * Start playing a network-based stream (e.g. RTSP stream) at the
+ * current position.
+ */
+int av_read_play(AVFormatContext *s);
+
+/**
+ * Pause a network-based stream (e.g. RTSP stream).
+ *
+ * Use av_read_play() to resume it.
+ */
+int av_read_pause(AVFormatContext *s);
+
+/**
+ * Free a AVFormatContext allocated by av_open_input_stream.
+ * @param s context to free
+ */
+void av_close_input_stream(AVFormatContext *s);
+
+/**
+ * Close a media file (but not its codecs).
+ *
+ * @param s media file handle
+ */
+void av_close_input_file(AVFormatContext *s);
+
+/**
+ * Free an AVFormatContext and all its streams.
+ * @param s context to free
+ */
+void avformat_free_context(AVFormatContext *s);
+
+/**
+ * Add a new stream to a media file.
+ *
+ * Can only be called in the read_header() function. If the flag
+ * AVFMTCTX_NOHEADER is in the format context, then new streams
+ * can be added in read_packet too.
+ *
+ * @param s media file handle
+ * @param id file-format-dependent stream ID
+ */
+AVStream *av_new_stream(AVFormatContext *s, int id);
+AVProgram *av_new_program(AVFormatContext *s, int id);
+
+/**
+ * Set the pts for a given stream. If the new values would be invalid
+ * (<= 0), it leaves the AVStream unchanged.
+ *
+ * @param s stream
+ * @param pts_wrap_bits number of bits effectively used by the pts
+ *        (used for wrap control, 33 is the value for MPEG)
+ * @param pts_num numerator to convert to seconds (MPEG: 1)
+ * @param pts_den denominator to convert to seconds (MPEG: 90000)
+ */
+void av_set_pts_info(AVStream *s, int pts_wrap_bits,
+                     unsigned int pts_num, unsigned int pts_den);
+
+#define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
+#define AVSEEK_FLAG_BYTE     2 ///< seeking based on position in bytes
+#define AVSEEK_FLAG_ANY      4 ///< seek to any frame, even non-keyframes
+#define AVSEEK_FLAG_FRAME    8 ///< seeking based on frame number
+
+int av_find_default_stream_index(AVFormatContext *s);
+
+/**
+ * Get the index for a specific timestamp.
+ * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond
+ *                 to the timestamp which is <= the requested one, if backward
+ *                 is 0, then it will be >=
+ *              if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise
+ * @return < 0 if no such timestamp could be found
+ */
+int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
+
+/**
+ * Add an index entry into a sorted list. Update the entry if the list
+ * already contains it.
+ *
+ * @param timestamp timestamp in the time base of the given stream
+ */
+int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
+                       int size, int distance, int flags);
+
+/**
+ * Perform a binary search using av_index_search_timestamp() and
+ * AVInputFormat.read_timestamp().
+ * This is not supposed to be called directly by a user application,
+ * but by demuxers.
+ * @param target_ts target timestamp in the time base of the given stream
+ * @param stream_index stream number
+ */
+int av_seek_frame_binary(AVFormatContext *s, int stream_index,
+                         int64_t target_ts, int flags);
+
+/**
+ * Update cur_dts of all streams based on the given timestamp and AVStream.
+ *
+ * Stream ref_st unchanged, others set cur_dts in their native time base.
+ * Only needed for timestamp wrapping or if (dts not set and pts!=dts).
+ * @param timestamp new dts expressed in time_base of param ref_st
+ * @param ref_st reference stream giving time_base of param timestamp
+ */
+void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
+
+/**
+ * Perform a binary search using read_timestamp().
+ * This is not supposed to be called directly by a user application,
+ * but by demuxers.
+ * @param target_ts target timestamp in the time base of the given stream
+ * @param stream_index stream number
+ */
+int64_t av_gen_search(AVFormatContext *s, int stream_index,
+                      int64_t target_ts, int64_t pos_min,
+                      int64_t pos_max, int64_t pos_limit,
+                      int64_t ts_min, int64_t ts_max,
+                      int flags, int64_t *ts_ret,
+                      int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
+
+/**
+ * media file output
+ */
+#if FF_API_FORMAT_PARAMETERS
+/**
+ * @deprecated pass the options to avformat_write_header directly.
+ */
+attribute_deprecated int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
+#endif
+
+/**
+ * Split a URL string into components.
+ *
+ * The pointers to buffers for storing individual components may be null,
+ * in order to ignore that component. Buffers for components not found are
+ * set to empty strings. If the port is not found, it is set to a negative
+ * value.
+ *
+ * @param proto the buffer for the protocol
+ * @param proto_size the size of the proto buffer
+ * @param authorization the buffer for the authorization
+ * @param authorization_size the size of the authorization buffer
+ * @param hostname the buffer for the host name
+ * @param hostname_size the size of the hostname buffer
+ * @param port_ptr a pointer to store the port number in
+ * @param path the buffer for the path
+ * @param path_size the size of the path buffer
+ * @param url the URL to split
+ */
+void av_url_split(char *proto,         int proto_size,
+                  char *authorization, int authorization_size,
+                  char *hostname,      int hostname_size,
+                  int *port_ptr,
+                  char *path,          int path_size,
+                  const char *url);
+
+/**
+ * Allocate the stream private data and write the stream header to
+ * an output media file.
+ *
+ * @param s Media file handle, must be allocated with avformat_alloc_context().
+ *          Its oformat field must be set to the desired output format;
+ *          Its pb field must be set to an already openened AVIOContext.
+ * @param options  An AVDictionary filled with AVFormatContext and muxer-private options.
+ *                 On return this parameter will be destroyed and replaced with a dict containing
+ *                 options that were not found. May be NULL.
+ *
+ * @return 0 on success, negative AVERROR on failure.
+ *
+ * @see av_opt_find, av_dict_set, avio_open, av_oformat_next.
+ */
+int avformat_write_header(AVFormatContext *s, AVDictionary **options);
+
+#if FF_API_FORMAT_PARAMETERS
+/**
+ * Allocate the stream private data and write the stream header to an
+ * output media file.
+ * @note: this sets stream time-bases, if possible to stream->codec->time_base
+ * but for some formats it might also be some other time base
+ *
+ * @param s media file handle
+ * @return 0 if OK, AVERROR_xxx on error
+ *
+ * @deprecated use avformat_write_header.
+ */
+attribute_deprecated int av_write_header(AVFormatContext *s);
+#endif
+
+/**
+ * Write a packet to an output media file.
+ *
+ * The packet shall contain one audio or video frame.
+ * The packet must be correctly interleaved according to the container
+ * specification, if not then av_interleaved_write_frame must be used.
+ *
+ * @param s media file handle
+ * @param pkt The packet, which contains the stream_index, buf/buf_size,
+              dts/pts, ...
+ * @return < 0 on error, = 0 if OK, 1 if end of stream wanted
+ */
+int av_write_frame(AVFormatContext *s, AVPacket *pkt);
+
+/**
+ * Write a packet to an output media file ensuring correct interleaving.
+ *
+ * The packet must contain one audio or video frame.
+ * If the packets are already correctly interleaved, the application should
+ * call av_write_frame() instead as it is slightly faster. It is also important
+ * to keep in mind that completely non-interleaved input will need huge amounts
+ * of memory to interleave with this, so it is preferable to interleave at the
+ * demuxer level.
+ *
+ * @param s media file handle
+ * @param pkt The packet, which contains the stream_index, buf/buf_size,
+              dts/pts, ...
+ * @return < 0 on error, = 0 if OK, 1 if end of stream wanted
+ */
+int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
+
+/**
+ * Interleave a packet per dts in an output media file.
+ *
+ * Packets with pkt->destruct == av_destruct_packet will be freed inside this
+ * function, so they cannot be used after it. Note that calling av_free_packet()
+ * on them is still safe.
+ *
+ * @param s media file handle
+ * @param out the interleaved packet will be output here
+ * @param pkt the input packet
+ * @param flush 1 if no further packets are available as input and all
+ *              remaining packets should be output
+ * @return 1 if a packet was output, 0 if no packet could be output,
+ *         < 0 if an error occurred
+ */
+int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
+                                 AVPacket *pkt, int flush);
+
+/**
+ * Write the stream trailer to an output media file and free the
+ * file private data.
+ *
+ * May only be called after a successful call to av_write_header.
+ *
+ * @param s media file handle
+ * @return 0 if OK, AVERROR_xxx on error
+ */
+int av_write_trailer(AVFormatContext *s);
+
+/**
+ * Get timing information for the data currently output.
+ * The exact meaning of "currently output" depends on the format.
+ * It is mostly relevant for devices that have an internal buffer and/or
+ * work in real time.
+ * @param s          media file handle
+ * @param stream     stream in the media file
+ * @param dts[out]   DTS of the last packet output for the stream, in stream
+ *                   time_base units
+ * @param wall[out]  absolute time when that packet whas output,
+ *                   in microsecond
+ * @return  0 if OK, AVERROR(ENOSYS) if the format does not support it
+ * Note: some formats or devices may not allow to measure dts and wall
+ * atomically.
+ */
+int av_get_output_timestamp(struct AVFormatContext *s, int stream,
+                            int64_t *dts, int64_t *wall);
+
+#if FF_API_DUMP_FORMAT
+/**
+ * @deprecated Deprecated in favor of av_dump_format().
+ */
+attribute_deprecated void dump_format(AVFormatContext *ic,
+                                      int index,
+                                      const char *url,
+                                      int is_output);
+#endif
+
+void av_dump_format(AVFormatContext *ic,
+                    int index,
+                    const char *url,
+                    int is_output);
+
+#if FF_API_PARSE_DATE
+/**
+ * Parse datestr and return a corresponding number of microseconds.
+ *
+ * @param datestr String representing a date or a duration.
+ * See av_parse_time() for the syntax of the provided string.
+ * @deprecated in favor of av_parse_time()
+ */
+attribute_deprecated
+int64_t parse_date(const char *datestr, int duration);
+#endif
+
+/**
+ * Get the current time in microseconds.
+ */
+int64_t av_gettime(void);
+
+#if FF_API_FIND_INFO_TAG
+/**
+ * @deprecated use av_find_info_tag in libavutil instead.
+ */
+attribute_deprecated int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
+#endif
+
+/**
+ * Return in 'buf' the path with '%d' replaced by a number.
+ *
+ * Also handles the '%0nd' format where 'n' is the total number
+ * of digits and '%%'.
+ *
+ * @param buf destination buffer
+ * @param buf_size destination buffer size
+ * @param path numbered sequence string
+ * @param number frame number
+ * @return 0 if OK, -1 on format error
+ */
+int av_get_frame_filename(char *buf, int buf_size,
+                          const char *path, int number);
+
+/**
+ * Check whether filename actually is a numbered sequence generator.
+ *
+ * @param filename possible numbered sequence string
+ * @return 1 if a valid numbered sequence string, 0 otherwise
+ */
+int av_filename_number_test(const char *filename);
+
+/**
+ * Generate an SDP for an RTP session.
+ *
+ * @param ac array of AVFormatContexts describing the RTP streams. If the
+ *           array is composed by only one context, such context can contain
+ *           multiple AVStreams (one AVStream per RTP stream). Otherwise,
+ *           all the contexts in the array (an AVCodecContext per RTP stream)
+ *           must contain only one AVStream.
+ * @param n_files number of AVCodecContexts contained in ac
+ * @param buf buffer where the SDP will be stored (must be allocated by
+ *            the caller)
+ * @param size the size of the buffer
+ * @return 0 if OK, AVERROR_xxx on error
+ */
+int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
+
+#if FF_API_SDP_CREATE
+attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
+#endif
+
+/**
+ * Return a positive value if the given filename has one of the given
+ * extensions, 0 otherwise.
+ *
+ * @param extensions a comma-separated list of filename extensions
+ */
+int av_match_ext(const char *filename, const char *extensions);
+
+#endif /* AVFORMAT_AVFORMAT_H */
diff --git a/ffmpeg 0.8/include/libavformat/avio.h b/ffmpeg 0.8/include/libavformat/avio.h
new file mode 100644 (file)
index 0000000..8210cbd
--- /dev/null
@@ -0,0 +1,627 @@
+/*
+ * copyright (c) 2001 Fabrice Bellard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef AVFORMAT_AVIO_H
+#define AVFORMAT_AVIO_H
+
+/**
+ * @file
+ * Buffered I/O operations
+ */
+
+#include <stdint.h>
+
+#include "libavutil/common.h"
+#include "libavutil/log.h"
+
+#include "libavformat/version.h"
+
+
+#define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */
+
+/**
+ * Bytestream IO Context.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVIOContext) must not be used outside libav*.
+ *
+ * @note None of the function pointers in AVIOContext should be called
+ *       directly, they should only be set by the client application
+ *       when implementing custom I/O. Normally these are set to the
+ *       function pointers specified in avio_alloc_context()
+ */
+typedef struct {
+    unsigned char *buffer;  /**< Start of the buffer. */
+    int buffer_size;        /**< Maximum buffer size */
+    unsigned char *buf_ptr; /**< Current position in the buffer */
+    unsigned char *buf_end; /**< End of the data, may be less than
+                                 buffer+buffer_size if the read function returned
+                                 less data than requested, e.g. for streams where
+                                 no more data has been received yet. */
+    void *opaque;           /**< A private pointer, passed to the read/write/seek/...
+                                 functions. */
+    int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
+    int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
+    int64_t (*seek)(void *opaque, int64_t offset, int whence);
+    int64_t pos;            /**< position in the file of the current buffer */
+    int must_flush;         /**< true if the next seek should flush */
+    int eof_reached;        /**< true if eof reached */
+    int write_flag;         /**< true if open for writing */
+#if FF_API_OLD_AVIO
+    attribute_deprecated int is_streamed;
+#endif
+    int max_packet_size;
+    unsigned long checksum;
+    unsigned char *checksum_ptr;
+    unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
+    int error;              /**< contains the error code or 0 if no error happened */
+    /**
+     * Pause or resume playback for network streaming protocols - e.g. MMS.
+     */
+    int (*read_pause)(void *opaque, int pause);
+    /**
+     * Seek to a given timestamp in stream with the specified stream_index.
+     * Needed for some network streaming protocols which don't support seeking
+     * to byte position.
+     */
+    int64_t (*read_seek)(void *opaque, int stream_index,
+                         int64_t timestamp, int flags);
+    /**
+     * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
+     */
+    int seekable;
+} AVIOContext;
+
+/* unbuffered I/O */
+
+#if FF_API_OLD_AVIO
+/**
+ * URL Context.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(URLContext) must not be used outside libav*.
+ * @deprecated This struct will be made private
+ */
+typedef struct URLContext {
+    const AVClass *av_class; ///< information for av_log(). Set by url_open().
+    struct URLProtocol *prot;
+    int flags;
+    int is_streamed;  /**< true if streamed (no seek possible), default = false */
+    int max_packet_size;  /**< if non zero, the stream is packetized with this max packet size */
+    void *priv_data;
+    char *filename; /**< specified URL */
+    int is_connected;
+} URLContext;
+
+#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
+
+/**
+ * @deprecated This struct is to be made private. Use the higher-level
+ *             AVIOContext-based API instead.
+ */
+typedef struct URLProtocol {
+    const char *name;
+    int (*url_open)(URLContext *h, const char *url, int flags);
+    int (*url_read)(URLContext *h, unsigned char *buf, int size);
+    int (*url_write)(URLContext *h, const unsigned char *buf, int size);
+    int64_t (*url_seek)(URLContext *h, int64_t pos, int whence);
+    int (*url_close)(URLContext *h);
+    struct URLProtocol *next;
+    int (*url_read_pause)(URLContext *h, int pause);
+    int64_t (*url_read_seek)(URLContext *h, int stream_index,
+                             int64_t timestamp, int flags);
+    int (*url_get_file_handle)(URLContext *h);
+    int priv_data_size;
+    const AVClass *priv_data_class;
+    int flags;
+    int (*url_check)(URLContext *h, int mask);
+} URLProtocol;
+
+typedef struct URLPollEntry {
+    URLContext *handle;
+    int events;
+    int revents;
+} URLPollEntry;
+
+/* not implemented */
+attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout);
+
+/**
+ * @name URL open modes
+ * The flags argument to url_open and cosins must be one of the following
+ * constants, optionally ORed with other flags.
+ * @{
+ */
+#define URL_RDONLY 1  /**< read-only */
+#define URL_WRONLY 2  /**< write-only */
+#define URL_RDWR   (URL_RDONLY|URL_WRONLY)  /**< read-write */
+/**
+ * @}
+ */
+
+/**
+ * Use non-blocking mode.
+ * If this flag is set, operations on the context will return
+ * AVERROR(EAGAIN) if they can not be performed immediately.
+ * If this flag is not set, operations on the context will never return
+ * AVERROR(EAGAIN).
+ * Note that this flag does not affect the opening/connecting of the
+ * context. Connecting a protocol will always block if necessary (e.g. on
+ * network protocols) but never hang (e.g. on busy devices).
+ * Warning: non-blocking protocols is work-in-progress; this flag may be
+ * silently ignored.
+ */
+#define URL_FLAG_NONBLOCK 4
+
+typedef int URLInterruptCB(void);
+extern URLInterruptCB *url_interrupt_cb;
+
+/**
+ * @defgroup old_url_funcs Old url_* functions
+ * The following functions are deprecated. Use the buffered API based on #AVIOContext instead.
+ * @{
+ */
+attribute_deprecated int url_open_protocol (URLContext **puc, struct URLProtocol *up,
+                                            const char *url, int flags);
+attribute_deprecated int url_alloc(URLContext **h, const char *url, int flags);
+attribute_deprecated int url_connect(URLContext *h);
+attribute_deprecated int url_open(URLContext **h, const char *url, int flags);
+attribute_deprecated int url_read(URLContext *h, unsigned char *buf, int size);
+attribute_deprecated int url_read_complete(URLContext *h, unsigned char *buf, int size);
+attribute_deprecated int url_write(URLContext *h, const unsigned char *buf, int size);
+attribute_deprecated int64_t url_seek(URLContext *h, int64_t pos, int whence);
+attribute_deprecated int url_close(URLContext *h);
+attribute_deprecated int64_t url_filesize(URLContext *h);
+attribute_deprecated int url_get_file_handle(URLContext *h);
+attribute_deprecated int url_get_max_packet_size(URLContext *h);
+attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size);
+attribute_deprecated int av_url_read_pause(URLContext *h, int pause);
+attribute_deprecated int64_t av_url_read_seek(URLContext *h, int stream_index,
+                                              int64_t timestamp, int flags);
+attribute_deprecated void url_set_interrupt_cb(int (*interrupt_cb)(void));
+
+/**
+ * returns the next registered protocol after the given protocol (the first if
+ * NULL is given), or NULL if protocol is the last one.
+ */
+URLProtocol *av_protocol_next(URLProtocol *p);
+
+/**
+ * Register the URLProtocol protocol.
+ *
+ * @param size the size of the URLProtocol struct referenced
+ */
+attribute_deprecated int av_register_protocol2(URLProtocol *protocol, int size);
+/**
+ * @}
+ */
+
+
+typedef attribute_deprecated AVIOContext ByteIOContext;
+
+attribute_deprecated int init_put_byte(AVIOContext *s,
+                  unsigned char *buffer,
+                  int buffer_size,
+                  int write_flag,
+                  void *opaque,
+                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int64_t (*seek)(void *opaque, int64_t offset, int whence));
+attribute_deprecated AVIOContext *av_alloc_put_byte(
+                  unsigned char *buffer,
+                  int buffer_size,
+                  int write_flag,
+                  void *opaque,
+                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int64_t (*seek)(void *opaque, int64_t offset, int whence));
+
+/**
+ * @defgroup old_avio_funcs Old put_/get_*() functions
+ * The following functions are deprecated. Use the "avio_"-prefixed functions instead.
+ * @{
+ */
+attribute_deprecated int          get_buffer(AVIOContext *s, unsigned char *buf, int size);
+attribute_deprecated int          get_partial_buffer(AVIOContext *s, unsigned char *buf, int size);
+attribute_deprecated int          get_byte(AVIOContext *s);
+attribute_deprecated unsigned int get_le16(AVIOContext *s);
+attribute_deprecated unsigned int get_le24(AVIOContext *s);
+attribute_deprecated unsigned int get_le32(AVIOContext *s);
+attribute_deprecated uint64_t     get_le64(AVIOContext *s);
+attribute_deprecated unsigned int get_be16(AVIOContext *s);
+attribute_deprecated unsigned int get_be24(AVIOContext *s);
+attribute_deprecated unsigned int get_be32(AVIOContext *s);
+attribute_deprecated uint64_t     get_be64(AVIOContext *s);
+
+attribute_deprecated void         put_byte(AVIOContext *s, int b);
+attribute_deprecated void         put_nbyte(AVIOContext *s, int b, int count);
+attribute_deprecated void         put_buffer(AVIOContext *s, const unsigned char *buf, int size);
+attribute_deprecated void         put_le64(AVIOContext *s, uint64_t val);
+attribute_deprecated void         put_be64(AVIOContext *s, uint64_t val);
+attribute_deprecated void         put_le32(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_be32(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_le24(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_be24(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_le16(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_be16(AVIOContext *s, unsigned int val);
+attribute_deprecated void         put_tag(AVIOContext *s, const char *tag);
+/**
+ * @}
+ */
+
+attribute_deprecated int     av_url_read_fpause(AVIOContext *h,    int pause);
+attribute_deprecated int64_t av_url_read_fseek (AVIOContext *h,    int stream_index,
+                                                int64_t timestamp, int flags);
+
+/**
+ * @defgroup old_url_f_funcs Old url_f* functions
+ * The following functions are deprecated, use the "avio_"-prefixed functions instead.
+ * @{
+ */
+attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags);
+attribute_deprecated int url_fclose(AVIOContext *s);
+attribute_deprecated int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
+attribute_deprecated int url_fskip(AVIOContext *s, int64_t offset);
+attribute_deprecated int64_t url_ftell(AVIOContext *s);
+attribute_deprecated int64_t url_fsize(AVIOContext *s);
+#define URL_EOF (-1)
+attribute_deprecated int url_fgetc(AVIOContext *s);
+attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size);
+attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
+attribute_deprecated void put_flush_packet(AVIOContext *s);
+attribute_deprecated int url_open_dyn_buf(AVIOContext **s);
+attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
+attribute_deprecated int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
+attribute_deprecated int url_fdopen(AVIOContext **s, URLContext *h);
+/**
+ * @}
+ */
+
+attribute_deprecated int url_ferror(AVIOContext *s);
+
+attribute_deprecated int udp_set_remote_url(URLContext *h, const char *uri);
+attribute_deprecated int udp_get_local_port(URLContext *h);
+
+attribute_deprecated void init_checksum(AVIOContext *s,
+                   unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
+                   unsigned long checksum);
+attribute_deprecated unsigned long get_checksum(AVIOContext *s);
+attribute_deprecated void put_strz(AVIOContext *s, const char *buf);
+/** @note unlike fgets, the EOL character is not returned and a whole
+    line is parsed. return NULL if first char read was EOF */
+attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
+/**
+ * @deprecated use avio_get_str instead
+ */
+attribute_deprecated char *get_strz(AVIOContext *s, char *buf, int maxlen);
+/**
+ * @deprecated Use AVIOContext.seekable field directly.
+ */
+attribute_deprecated static inline int url_is_streamed(AVIOContext *s)
+{
+    return !s->seekable;
+}
+attribute_deprecated URLContext *url_fileno(AVIOContext *s);
+
+/**
+ * @deprecated use AVIOContext.max_packet_size directly.
+ */
+attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
+
+attribute_deprecated int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
+
+/** return the written or read size */
+attribute_deprecated int url_close_buf(AVIOContext *s);
+
+/**
+ * Return a non-zero value if the resource indicated by url
+ * exists, 0 otherwise.
+ * @deprecated Use avio_check instead.
+ */
+attribute_deprecated int url_exist(const char *url);
+#endif // FF_API_OLD_AVIO
+
+/**
+ * Return AVIO_FLAG_* access flags corresponding to the access permissions
+ * of the resource in url, or a negative value corresponding to an
+ * AVERROR code in case of failure. The returned access flags are
+ * masked by the value in flags.
+ *
+ * @note This function is intrinsically unsafe, in the sense that the
+ * checked resource may change its existence or permission status from
+ * one call to another. Thus you should not trust the returned value,
+ * unless you are sure that no other processes are accessing the
+ * checked resource.
+ */
+int avio_check(const char *url, int flags);
+
+/**
+ * The callback is called in blocking functions to test regulary if
+ * asynchronous interruption is needed. AVERROR_EXIT is returned
+ * in this case by the interrupted function. 'NULL' means no interrupt
+ * callback is given.
+ */
+void avio_set_interrupt_cb(int (*interrupt_cb)(void));
+
+/**
+ * Allocate and initialize an AVIOContext for buffered I/O. It must be later
+ * freed with av_free().
+ *
+ * @param buffer Memory block for input/output operations via AVIOContext.
+ *        The buffer must be allocated with av_malloc() and friends.
+ * @param buffer_size The buffer size is very important for performance.
+ *        For protocols with fixed blocksize it should be set to this blocksize.
+ *        For others a typical size is a cache page, e.g. 4kb.
+ * @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
+ * @param opaque An opaque pointer to user-specific data.
+ * @param read_packet  A function for refilling the buffer, may be NULL.
+ * @param write_packet A function for writing the buffer contents, may be NULL.
+ * @param seek A function for seeking to specified byte position, may be NULL.
+ *
+ * @return Allocated AVIOContext or NULL on failure.
+ */
+AVIOContext *avio_alloc_context(
+                  unsigned char *buffer,
+                  int buffer_size,
+                  int write_flag,
+                  void *opaque,
+                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int64_t (*seek)(void *opaque, int64_t offset, int whence));
+
+void avio_w8(AVIOContext *s, int b);
+void avio_write(AVIOContext *s, const unsigned char *buf, int size);
+void avio_wl64(AVIOContext *s, uint64_t val);
+void avio_wb64(AVIOContext *s, uint64_t val);
+void avio_wl32(AVIOContext *s, unsigned int val);
+void avio_wb32(AVIOContext *s, unsigned int val);
+void avio_wl24(AVIOContext *s, unsigned int val);
+void avio_wb24(AVIOContext *s, unsigned int val);
+void avio_wl16(AVIOContext *s, unsigned int val);
+void avio_wb16(AVIOContext *s, unsigned int val);
+
+/**
+ * Write a NULL-terminated string.
+ * @return number of bytes written.
+ */
+int avio_put_str(AVIOContext *s, const char *str);
+
+/**
+ * Convert an UTF-8 string to UTF-16LE and write it.
+ * @return number of bytes written.
+ */
+int avio_put_str16le(AVIOContext *s, const char *str);
+
+/**
+ * Passing this as the "whence" parameter to a seek function causes it to
+ * return the filesize without seeking anywhere. Supporting this is optional.
+ * If it is not supported then the seek function will return <0.
+ */
+#define AVSEEK_SIZE 0x10000
+
+/**
+ * Oring this flag as into the "whence" parameter to a seek function causes it to
+ * seek by any means (like reopening and linear reading) or other normally unreasonble
+ * means that can be extreemly slow.
+ * This may be ignored by the seek code.
+ */
+#define AVSEEK_FORCE 0x20000
+
+/**
+ * fseek() equivalent for AVIOContext.
+ * @return new position or AVERROR.
+ */
+int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
+
+/**
+ * Skip given number of bytes forward
+ * @return new position or AVERROR.
+ */
+int64_t avio_skip(AVIOContext *s, int64_t offset);
+
+/**
+ * ftell() equivalent for AVIOContext.
+ * @return position or AVERROR.
+ */
+static av_always_inline int64_t avio_tell(AVIOContext *s)
+{
+    return avio_seek(s, 0, SEEK_CUR);
+}
+
+/**
+ * Get the filesize.
+ * @return filesize or AVERROR
+ */
+int64_t avio_size(AVIOContext *s);
+
+/**
+ * feof() equivalent for AVIOContext.
+ * @return non zero if and only if end of file
+ */
+int url_feof(AVIOContext *s);
+
+/** @warning currently size is limited */
+int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
+
+void avio_flush(AVIOContext *s);
+
+
+/**
+ * Read size bytes from AVIOContext into buf.
+ * @return number of bytes read or AVERROR
+ */
+int avio_read(AVIOContext *s, unsigned char *buf, int size);
+
+/**
+ * @name Functions for reading from AVIOContext
+ * @{
+ *
+ * @note return 0 if EOF, so you cannot use it if EOF handling is
+ *       necessary
+ */
+int          avio_r8  (AVIOContext *s);
+unsigned int avio_rl16(AVIOContext *s);
+unsigned int avio_rl24(AVIOContext *s);
+unsigned int avio_rl32(AVIOContext *s);
+uint64_t     avio_rl64(AVIOContext *s);
+unsigned int avio_rb16(AVIOContext *s);
+unsigned int avio_rb24(AVIOContext *s);
+unsigned int avio_rb32(AVIOContext *s);
+uint64_t     avio_rb64(AVIOContext *s);
+/**
+ * @}
+ */
+
+/**
+ * Read a string from pb into buf. The reading will terminate when either
+ * a NULL character was encountered, maxlen bytes have been read, or nothing
+ * more can be read from pb. The result is guaranteed to be NULL-terminated, it
+ * will be truncated if buf is too small.
+ * Note that the string is not interpreted or validated in any way, it
+ * might get truncated in the middle of a sequence for multi-byte encodings.
+ *
+ * @return number of bytes read (is always <= maxlen).
+ * If reading ends on EOF or error, the return value will be one more than
+ * bytes actually read.
+ */
+int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
+
+/**
+ * Read a UTF-16 string from pb and convert it to UTF-8.
+ * The reading will terminate when either a null or invalid character was
+ * encountered or maxlen bytes have been read.
+ * @return number of bytes read (is always <= maxlen)
+ */
+int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);
+int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
+
+
+/**
+ * @name URL open modes
+ * The flags argument to avio_open must be one of the following
+ * constants, optionally ORed with other flags.
+ * @{
+ */
+#define AVIO_FLAG_READ  1                                      /**< read-only */
+#define AVIO_FLAG_WRITE 2                                      /**< write-only */
+#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)  /**< read-write pseudo flag */
+/**
+ * @}
+ */
+
+/**
+ * Use non-blocking mode.
+ * If this flag is set, operations on the context will return
+ * AVERROR(EAGAIN) if they can not be performed immediately.
+ * If this flag is not set, operations on the context will never return
+ * AVERROR(EAGAIN).
+ * Note that this flag does not affect the opening/connecting of the
+ * context. Connecting a protocol will always block if necessary (e.g. on
+ * network protocols) but never hang (e.g. on busy devices).
+ * Warning: non-blocking protocols is work-in-progress; this flag may be
+ * silently ignored.
+ */
+#define AVIO_FLAG_NONBLOCK 8
+
+/**
+ * Create and initialize a AVIOContext for accessing the
+ * resource indicated by url.
+ * @note When the resource indicated by url has been opened in
+ * read+write mode, the AVIOContext can be used only for writing.
+ *
+ * @param s Used to return the pointer to the created AVIOContext.
+ * In case of failure the pointed to value is set to NULL.
+ * @param flags flags which control how the resource indicated by url
+ * is to be opened
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code in case of failure
+ */
+int avio_open(AVIOContext **s, const char *url, int flags);
+
+/**
+ * Close the resource accessed by the AVIOContext s and free it.
+ * This function can only be used if s was opened by avio_open().
+ *
+ * @return 0 on success, an AVERROR < 0 on error.
+ */
+int avio_close(AVIOContext *s);
+
+/**
+ * Open a write only memory stream.
+ *
+ * @param s new IO context
+ * @return zero if no error.
+ */
+int avio_open_dyn_buf(AVIOContext **s);
+
+/**
+ * Return the written size and a pointer to the buffer. The buffer
+ * must be freed with av_free().
+ * Padding of FF_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
+ *
+ * @param s IO context
+ * @param pbuffer pointer to a byte buffer
+ * @return the length of the byte buffer
+ */
+int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
+
+/**
+ * Iterate through names of available protocols.
+ * @note it is recommanded to use av_protocol_next() instead of this
+ *
+ * @param opaque A private pointer representing current protocol.
+ *        It must be a pointer to NULL on first iteration and will
+ *        be updated by successive calls to avio_enum_protocols.
+ * @param output If set to 1, iterate over output protocols,
+ *               otherwise over input protocols.
+ *
+ * @return A static string containing the name of current protocol or NULL
+ */
+const char *avio_enum_protocols(void **opaque, int output);
+
+/**
+ * Pause and resume playing - only meaningful if using a network streaming
+ * protocol (e.g. MMS).
+ * @param pause 1 for pause, 0 for resume
+ */
+int     avio_pause(AVIOContext *h, int pause);
+
+/**
+ * Seek to a given timestamp relative to some component stream.
+ * Only meaningful if using a network streaming protocol (e.g. MMS.).
+ * @param stream_index The stream index that the timestamp is relative to.
+ *        If stream_index is (-1) the timestamp should be in AV_TIME_BASE
+ *        units from the beginning of the presentation.
+ *        If a stream_index >= 0 is used and the protocol does not support
+ *        seeking based on component streams, the call will fail with ENOTSUP.
+ * @param timestamp timestamp in AVStream.time_base units
+ *        or if there is no stream specified then in AV_TIME_BASE units.
+ * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
+ *        and AVSEEK_FLAG_ANY. The protocol may silently ignore
+ *        AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
+ *        fail with ENOTSUP if used and not supported.
+ * @return >= 0 on success
+ * @see AVInputFormat::read_seek
+ */
+int64_t avio_seek_time(AVIOContext *h, int stream_index,
+                       int64_t timestamp, int flags);
+
+#endif /* AVFORMAT_AVIO_H */
diff --git a/ffmpeg 0.8/include/libavformat/version.h b/ffmpeg 0.8/include/libavformat/version.h
new file mode 100644 (file)
index 0000000..09e52da
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Version macros.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFORMAT_VERSION_H
+#define AVFORMAT_VERSION_H
+
+#include "libavutil/avutil.h"
+
+#define LIBAVFORMAT_VERSION_MAJOR 53
+#define LIBAVFORMAT_VERSION_MINOR  6
+#define LIBAVFORMAT_VERSION_MICRO  0
+
+#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
+                                               LIBAVFORMAT_VERSION_MINOR, \
+                                               LIBAVFORMAT_VERSION_MICRO)
+#define LIBAVFORMAT_VERSION     AV_VERSION(LIBAVFORMAT_VERSION_MAJOR,   \
+                                           LIBAVFORMAT_VERSION_MINOR,   \
+                                           LIBAVFORMAT_VERSION_MICRO)
+#define LIBAVFORMAT_BUILD       LIBAVFORMAT_VERSION_INT
+
+#define LIBAVFORMAT_IDENT       "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
+
+/**
+ * Those FF_API_* defines are not part of public API.
+ * They may change, break or disappear at any time.
+ */
+#ifndef FF_API_OLD_METADATA2
+#define FF_API_OLD_METADATA2           (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_READ_SEEK
+#define FF_API_READ_SEEK               (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_OLD_AVIO
+#define FF_API_OLD_AVIO                (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_DUMP_FORMAT
+#define FF_API_DUMP_FORMAT             (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_PARSE_DATE
+#define FF_API_PARSE_DATE              (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_FIND_INFO_TAG
+#define FF_API_FIND_INFO_TAG           (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_PKT_DUMP
+#define FF_API_PKT_DUMP                (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_GUESS_IMG2_CODEC
+#define FF_API_GUESS_IMG2_CODEC        (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_SDP_CREATE
+#define FF_API_SDP_CREATE              (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
+#define FF_API_ALLOC_OUTPUT_CONTEXT    (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_FORMAT_PARAMETERS
+#define FF_API_FORMAT_PARAMETERS       (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_FLAG_RTP_HINT
+#define FF_API_FLAG_RTP_HINT           (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_AVSTREAM_QUALITY
+#define FF_API_AVSTREAM_QUALITY        (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_LOOP_INPUT
+#define FF_API_LOOP_INPUT              (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_LOOP_OUTPUT
+#define FF_API_LOOP_OUTPUT             (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+#ifndef FF_API_TIMESTAMP
+#define FF_API_TIMESTAMP               (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
+
+#endif /* AVFORMAT_VERSION_H */
diff --git a/ffmpeg 0.8/include/libavutil/adler32.h b/ffmpeg 0.8/include/libavutil/adler32.h
new file mode 100644 (file)
index 0000000..0b890bc
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * copyright (c) 2006 Mans Rullgard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_ADLER32_H
+#define AVUTIL_ADLER32_H
+
+#include <stdint.h>
+#include "attributes.h"
+
+/**
+ * Calculate the Adler32 checksum of a buffer.
+ *
+ * Passing the return value to a subsequent av_adler32_update() call
+ * allows the checksum of multiple buffers to be calculated as though
+ * they were concatenated.
+ *
+ * @param adler initial checksum value
+ * @param buf   pointer to input buffer
+ * @param len   size of input buffer
+ * @return      updated checksum
+ */
+unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
+                                unsigned int len) av_pure;
+
+#endif /* AVUTIL_ADLER32_H */
diff --git a/ffmpeg 0.8/include/libavutil/aes.h b/ffmpeg 0.8/include/libavutil/aes.h
new file mode 100644 (file)
index 0000000..368f70c
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * copyright (c) 2007 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_AES_H
+#define AVUTIL_AES_H
+
+#include <stdint.h>
+
+extern const int av_aes_size;
+
+struct AVAES;
+
+/**
+ * Initialize an AVAES context.
+ * @param key_bits 128, 192 or 256
+ * @param decrypt 0 for encryption, 1 for decryption
+ */
+int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
+
+/**
+ * Encrypt or decrypt a buffer using a previously initialized context.
+ * @param count number of 16 byte blocks
+ * @param dst destination array, can be equal to src
+ * @param src source array, can be equal to dst
+ * @param iv initialization vector for CBC mode, if NULL then ECB will be used
+ * @param decrypt 0 for encryption, 1 for decryption
+ */
+void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
+
+#endif /* AVUTIL_AES_H */
diff --git a/ffmpeg 0.8/include/libavutil/attributes.h b/ffmpeg 0.8/include/libavutil/attributes.h
new file mode 100644 (file)
index 0000000..e97fdfd
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Macro definitions for various function/variable attributes
+ */
+
+#ifndef AVUTIL_ATTRIBUTES_H
+#define AVUTIL_ATTRIBUTES_H
+
+#ifdef __GNUC__
+#    define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
+#else
+#    define AV_GCC_VERSION_AT_LEAST(x,y) 0
+#endif
+
+#ifndef av_always_inline
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+#    define av_always_inline __attribute__((always_inline)) inline
+#else
+#    define av_always_inline inline
+#endif
+#endif
+
+#ifndef av_noinline
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+#    define av_noinline __attribute__((noinline))
+#else
+#    define av_noinline
+#endif
+#endif
+
+#ifndef av_pure
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+#    define av_pure __attribute__((pure))
+#else
+#    define av_pure
+#endif
+#endif
+
+#ifndef av_const
+#if AV_GCC_VERSION_AT_LEAST(2,6)
+#    define av_const __attribute__((const))
+#else
+#    define av_const
+#endif
+#endif
+
+#ifndef av_cold
+#if AV_GCC_VERSION_AT_LEAST(4,3)
+#    define av_cold __attribute__((cold))
+#else
+#    define av_cold
+#endif
+#endif
+
+#ifndef av_flatten
+#if AV_GCC_VERSION_AT_LEAST(4,1)
+#    define av_flatten __attribute__((flatten))
+#else
+#    define av_flatten
+#endif
+#endif
+
+#ifndef attribute_deprecated
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+#    define attribute_deprecated __attribute__((deprecated))
+#else
+#    define attribute_deprecated
+#endif
+#endif
+
+#ifndef av_unused
+#if defined(__GNUC__)
+#    define av_unused __attribute__((unused))
+#else
+#    define av_unused
+#endif
+#endif
+
+/**
+ * Mark a variable as used and prevent the compiler from optimizing it
+ * away.  This is useful for variables accessed only from inline
+ * assembler without the compiler being aware.
+ */
+#ifndef av_used
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+#    define av_used __attribute__((used))
+#else
+#    define av_used
+#endif
+#endif
+
+#ifndef av_alias
+#if AV_GCC_VERSION_AT_LEAST(3,3)
+#   define av_alias __attribute__((may_alias))
+#else
+#   define av_alias
+#endif
+#endif
+
+#ifndef av_uninit
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#    define av_uninit(x) x=x
+#else
+#    define av_uninit(x) x
+#endif
+#endif
+
+#ifdef __GNUC__
+#    define av_builtin_constant_p __builtin_constant_p
+#    define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
+#else
+#    define av_builtin_constant_p(x) 0
+#    define av_printf_format(fmtpos, attrpos)
+#endif
+
+#endif /* AVUTIL_ATTRIBUTES_H */
diff --git a/ffmpeg 0.8/include/libavutil/audioconvert.h b/ffmpeg 0.8/include/libavutil/audioconvert.h
new file mode 100644 (file)
index 0000000..134c610
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ * Copyright (c) 2008 Peter Ross
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_AUDIOCONVERT_H
+#define AVUTIL_AUDIOCONVERT_H
+
+#include <stdint.h>
+
+/**
+ * @file
+ * audio conversion routines
+ */
+
+/* Audio channel masks */
+#define AV_CH_FRONT_LEFT             0x00000001
+#define AV_CH_FRONT_RIGHT            0x00000002
+#define AV_CH_FRONT_CENTER           0x00000004
+#define AV_CH_LOW_FREQUENCY          0x00000008
+#define AV_CH_BACK_LEFT              0x00000010
+#define AV_CH_BACK_RIGHT             0x00000020
+#define AV_CH_FRONT_LEFT_OF_CENTER   0x00000040
+#define AV_CH_FRONT_RIGHT_OF_CENTER  0x00000080
+#define AV_CH_BACK_CENTER            0x00000100
+#define AV_CH_SIDE_LEFT              0x00000200
+#define AV_CH_SIDE_RIGHT             0x00000400
+#define AV_CH_TOP_CENTER             0x00000800
+#define AV_CH_TOP_FRONT_LEFT         0x00001000
+#define AV_CH_TOP_FRONT_CENTER       0x00002000
+#define AV_CH_TOP_FRONT_RIGHT        0x00004000
+#define AV_CH_TOP_BACK_LEFT          0x00008000
+#define AV_CH_TOP_BACK_CENTER        0x00010000
+#define AV_CH_TOP_BACK_RIGHT         0x00020000
+#define AV_CH_STEREO_LEFT            0x20000000  ///< Stereo downmix.
+#define AV_CH_STEREO_RIGHT           0x40000000  ///< See AV_CH_STEREO_LEFT.
+
+/** Channel mask value used for AVCodecContext.request_channel_layout
+    to indicate that the user requests the channel order of the decoder output
+    to be the native codec channel order. */
+#define AV_CH_LAYOUT_NATIVE          0x8000000000000000LL
+
+/* Audio channel convenience macros */
+#define AV_CH_LAYOUT_MONO              (AV_CH_FRONT_CENTER)
+#define AV_CH_LAYOUT_STEREO            (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
+#define AV_CH_LAYOUT_2_1               (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
+#define AV_CH_LAYOUT_SURROUND          (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
+#define AV_CH_LAYOUT_4POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
+#define AV_CH_LAYOUT_2_2               (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
+#define AV_CH_LAYOUT_QUAD              (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
+#define AV_CH_LAYOUT_5POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
+#define AV_CH_LAYOUT_5POINT1           (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
+#define AV_CH_LAYOUT_5POINT0_BACK      (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
+#define AV_CH_LAYOUT_5POINT1_BACK      (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
+#define AV_CH_LAYOUT_7POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
+#define AV_CH_LAYOUT_7POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
+#define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
+#define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
+
+/**
+ * Return a channel layout id that matches name, 0 if no match.
+ */
+int64_t av_get_channel_layout(const char *name);
+
+/**
+ * Return a description of a channel layout.
+ * If nb_channels is <= 0, it is guessed from the channel_layout.
+ *
+ * @param buf put here the string containing the channel layout
+ * @param buf_size size in bytes of the buffer
+ */
+void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout);
+
+/**
+ * Return the number of channels in the channel layout.
+ */
+int av_get_channel_layout_nb_channels(int64_t channel_layout);
+
+#endif /* AVUTIL_AUDIOCONVERT_H */
diff --git a/ffmpeg 0.8/include/libavutil/avassert.h b/ffmpeg 0.8/include/libavutil/avassert.h
new file mode 100644 (file)
index 0000000..e100d0b
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * copyright (c) 2010 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * simple assert() macros that are a bit more flexible than ISO C assert().
+ * @author Michael Niedermayer <michaelni@gmx.at>
+ */
+
+#ifndef AVUTIL_AVASSERT_H
+#define AVUTIL_AVASSERT_H
+
+#include <stdlib.h>
+#include "avutil.h"
+#include "log.h"
+
+/**
+ * assert() equivalent, that is always enabled.
+ */
+#define av_assert0(cond) do {                                           \
+    if (!(cond)) {                                                      \
+        av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n",    \
+               AV_STRINGIFY(cond), __FILE__, __LINE__);                 \
+        abort();                                                        \
+    }                                                                   \
+} while (0)
+
+
+/**
+ * assert() equivalent, that does not lie in speed critical code.
+ * These asserts() thus can be enabled without fearing speedloss.
+ */
+#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
+#define av_assert1(cond) av_assert0(cond)
+#else
+#define av_assert1(cond) ((void)0)
+#endif
+
+
+/**
+ * assert() equivalent, that does lie in speed critical code.
+ */
+#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
+#define av_assert2(cond) av_assert0(cond)
+#else
+#define av_assert2(cond) ((void)0)
+#endif
+
+#endif /* AVUTIL_AVASSERT_H */
diff --git a/ffmpeg 0.8/include/libavutil/avconfig.h b/ffmpeg 0.8/include/libavutil/avconfig.h
new file mode 100644 (file)
index 0000000..f10aa61
--- /dev/null
@@ -0,0 +1,6 @@
+/* Generated by ffconf */
+#ifndef AVUTIL_AVCONFIG_H
+#define AVUTIL_AVCONFIG_H
+#define AV_HAVE_BIGENDIAN 0
+#define AV_HAVE_FAST_UNALIGNED 1
+#endif /* AVUTIL_AVCONFIG_H */
diff --git a/ffmpeg 0.8/include/libavutil/avstring.h b/ffmpeg 0.8/include/libavutil/avstring.h
new file mode 100644 (file)
index 0000000..662af6b
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2007 Mans Rullgard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_AVSTRING_H
+#define AVUTIL_AVSTRING_H
+
+#include <stddef.h>
+#include "attributes.h"
+
+/**
+ * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to
+ * the address of the first character in str after the prefix.
+ *
+ * @param str input string
+ * @param pfx prefix to test
+ * @param ptr updated if the prefix is matched inside str
+ * @return non-zero if the prefix matches, zero otherwise
+ */
+int av_strstart(const char *str, const char *pfx, const char **ptr);
+
+/**
+ * Return non-zero if pfx is a prefix of str independent of case. If
+ * it is, *ptr is set to the address of the first character in str
+ * after the prefix.
+ *
+ * @param str input string
+ * @param pfx prefix to test
+ * @param ptr updated if the prefix is matched inside str
+ * @return non-zero if the prefix matches, zero otherwise
+ */
+int av_stristart(const char *str, const char *pfx, const char **ptr);
+
+/**
+ * Locate the first case-independent occurrence in the string haystack
+ * of the string needle.  A zero-length string needle is considered to
+ * match at the start of haystack.
+ *
+ * This function is a case-insensitive version of the standard strstr().
+ *
+ * @param haystack string to search in
+ * @param needle   string to search for
+ * @return         pointer to the located match within haystack
+ *                 or a null pointer if no match
+ */
+char *av_stristr(const char *haystack, const char *needle);
+
+/**
+ * Copy the string src to dst, but no more than size - 1 bytes, and
+ * null-terminate dst.
+ *
+ * This function is the same as BSD strlcpy().
+ *
+ * @param dst destination buffer
+ * @param src source string
+ * @param size size of destination buffer
+ * @return the length of src
+ *
+ * WARNING: since the return value is the length of src, src absolutely
+ * _must_ be a properly 0-terminated string, otherwise this will read beyond
+ * the end of the buffer and possibly crash.
+ */
+size_t av_strlcpy(char *dst, const char *src, size_t size);
+
+/**
+ * Append the string src to the string dst, but to a total length of
+ * no more than size - 1 bytes, and null-terminate dst.
+ *
+ * This function is similar to BSD strlcat(), but differs when
+ * size <= strlen(dst).
+ *
+ * @param dst destination buffer
+ * @param src source string
+ * @param size size of destination buffer
+ * @return the total length of src and dst
+ *
+ * WARNING: since the return value use the length of src and dst, these absolutely
+ * _must_ be a properly 0-terminated strings, otherwise this will read beyond
+ * the end of the buffer and possibly crash.
+ */
+size_t av_strlcat(char *dst, const char *src, size_t size);
+
+/**
+ * Append output to a string, according to a format. Never write out of
+ * the destination buffer, and always put a terminating 0 within
+ * the buffer.
+ * @param dst destination buffer (string to which the output is
+ *  appended)
+ * @param size total size of the destination buffer
+ * @param fmt printf-compatible format string, specifying how the
+ *  following parameters are used
+ * @return the length of the string that would have been generated
+ *  if enough space had been available
+ */
+size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4);
+
+/**
+ * Convert a number to a av_malloced string.
+ */
+char *av_d2str(double d);
+
+/**
+ * Unescape the given string until a non escaped terminating char,
+ * and return the token corresponding to the unescaped string.
+ *
+ * The normal \ and ' escaping is supported. Leading and trailing
+ * whitespaces are removed, unless they are escaped with '\' or are
+ * enclosed between ''.
+ *
+ * @param buf the buffer to parse, buf will be updated to point to the
+ * terminating char
+ * @param term a 0-terminated list of terminating chars
+ * @return the malloced unescaped string, which must be av_freed by
+ * the user, NULL in case of allocation failure
+ */
+char *av_get_token(const char **buf, const char *term);
+
+#endif /* AVUTIL_AVSTRING_H */
diff --git a/ffmpeg 0.8/include/libavutil/avutil.h b/ffmpeg 0.8/include/libavutil/avutil.h
new file mode 100644 (file)
index 0000000..568f66b
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_AVUTIL_H
+#define AVUTIL_AVUTIL_H
+
+/**
+ * @file
+ * external API header
+ */
+
+
+#define AV_STRINGIFY(s)         AV_TOSTRING(s)
+#define AV_TOSTRING(s) #s
+
+#define AV_GLUE(a, b) a ## b
+#define AV_JOIN(a, b) AV_GLUE(a, b)
+
+#define AV_PRAGMA(s) _Pragma(#s)
+
+#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
+#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
+#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  0
+
+#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
+                                               LIBAVUTIL_VERSION_MINOR, \
+                                               LIBAVUTIL_VERSION_MICRO)
+#define LIBAVUTIL_VERSION       AV_VERSION(LIBAVUTIL_VERSION_MAJOR,     \
+                                           LIBAVUTIL_VERSION_MINOR,     \
+                                           LIBAVUTIL_VERSION_MICRO)
+#define LIBAVUTIL_BUILD         LIBAVUTIL_VERSION_INT
+
+#define LIBAVUTIL_IDENT         "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
+
+/**
+ * Those FF_API_* defines are not part of public API.
+ * They may change, break or disappear at any time.
+ */
+#ifndef FF_API_OLD_EVAL_NAMES
+#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 52)
+#endif
+#ifndef FF_API_GET_BITS_PER_SAMPLE_FMT
+#define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 52)
+#endif
+#ifndef FF_API_FIND_OPT
+#define FF_API_FIND_OPT                 (LIBAVUTIL_VERSION_MAJOR < 52)
+#endif
+
+/**
+ * Return the LIBAVUTIL_VERSION_INT constant.
+ */
+unsigned avutil_version(void);
+
+/**
+ * Return the libavutil build-time configuration.
+ */
+const char *avutil_configuration(void);
+
+/**
+ * Return the libavutil license.
+ */
+const char *avutil_license(void);
+
+enum AVMediaType {
+    AVMEDIA_TYPE_UNKNOWN = -1,
+    AVMEDIA_TYPE_VIDEO,
+    AVMEDIA_TYPE_AUDIO,
+    AVMEDIA_TYPE_DATA,
+    AVMEDIA_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_ATTACHMENT,
+    AVMEDIA_TYPE_NB
+};
+
+#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 FF_LAMBDA_MAX (256*128-1)
+
+#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove
+
+#define AV_NOPTS_VALUE          INT64_C(0x8000000000000000)
+#define AV_TIME_BASE            1000000
+#define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}
+
+enum AVPictureType {
+    AV_PICTURE_TYPE_NONE = 0, ///< Undefined
+    AV_PICTURE_TYPE_I,     ///< Intra
+    AV_PICTURE_TYPE_P,     ///< Predicted
+    AV_PICTURE_TYPE_B,     ///< Bi-dir predicted
+    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG4
+    AV_PICTURE_TYPE_SI,    ///< Switching Intra
+    AV_PICTURE_TYPE_SP,    ///< Switching Predicted
+    AV_PICTURE_TYPE_BI,    ///< BI type
+};
+
+/**
+ * Return a single letter to describe the given picture type
+ * pict_type.
+ *
+ * @param[in] pict_type the picture type @return a single character
+ * representing the picture type, '?' if pict_type is unknown
+ */
+char av_get_picture_type_char(enum AVPictureType pict_type);
+
+#include "common.h"
+#include "error.h"
+#include "mathematics.h"
+#include "rational.h"
+#include "intfloat_readwrite.h"
+#include "log.h"
+#include "pixfmt.h"
+
+#endif /* AVUTIL_AVUTIL_H */
diff --git a/ffmpeg 0.8/include/libavutil/base64.h b/ffmpeg 0.8/include/libavutil/base64.h
new file mode 100644 (file)
index 0000000..092980b
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_BASE64_H
+#define AVUTIL_BASE64_H
+
+#include <stdint.h>
+
+/**
+ * Decode a base64-encoded string.
+ *
+ * @param out      buffer for decoded data
+ * @param in       null-terminated input string
+ * @param out_size size in bytes of the out buffer, must be at
+ *                 least 3/4 of the length of in
+ * @return         number of bytes written, or a negative value in case of
+ *                 invalid input
+ */
+int av_base64_decode(uint8_t *out, const char *in, int out_size);
+
+/**
+ * Encode data to base64 and null-terminate.
+ *
+ * @param out      buffer for encoded data
+ * @param out_size size in bytes of the output buffer, must be at
+ *                 least AV_BASE64_SIZE(in_size)
+ * @param in_size  size in bytes of the 'in' buffer
+ * @return         'out' or NULL in case of error
+ */
+char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
+
+/**
+ * Calculate the output size needed to base64-encode x bytes.
+ */
+#define AV_BASE64_SIZE(x)  (((x)+2) / 3 * 4 + 1)
+
+#endif /* AVUTIL_BASE64_H */
diff --git a/ffmpeg 0.8/include/libavutil/bswap.h b/ffmpeg 0.8/include/libavutil/bswap.h
new file mode 100644 (file)
index 0000000..303bcf3
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * byte swapping routines
+ */
+
+#ifndef AVUTIL_BSWAP_H
+#define AVUTIL_BSWAP_H
+
+#include <stdint.h>
+#include "libavutil/avconfig.h"
+#include "attributes.h"
+
+#ifdef HAVE_AV_CONFIG_H
+
+#include "config.h"
+
+#if   ARCH_ARM
+#   include "arm/bswap.h"
+#elif ARCH_AVR32
+#   include "avr32/bswap.h"
+#elif ARCH_BFIN
+#   include "bfin/bswap.h"
+#elif ARCH_SH4
+#   include "sh4/bswap.h"
+#elif ARCH_X86
+#   include "x86/bswap.h"
+#endif
+
+#endif /* HAVE_AV_CONFIG_H */
+
+#define AV_BSWAP16C(x) (((x) << 8 & 0xff00)  | ((x) >> 8 & 0x00ff))
+#define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))
+#define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))
+
+#define AV_BSWAPC(s, x) AV_BSWAP##s##C(x)
+
+#ifndef av_bswap16
+static av_always_inline av_const uint16_t av_bswap16(uint16_t x)
+{
+    x= (x>>8) | (x<<8);
+    return x;
+}
+#endif
+
+#ifndef av_bswap32
+static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
+{
+    x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
+    x= (x>>16) | (x<<16);
+    return x;
+}
+#endif
+
+#ifndef av_bswap64
+static inline uint64_t av_const av_bswap64(uint64_t x)
+{
+#if 0
+    x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL);
+    x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL);
+    return (x>>32) | (x<<32);
+#else
+    union {
+        uint64_t ll;
+        uint32_t l[2];
+    } w, r;
+    w.ll = x;
+    r.l[0] = av_bswap32 (w.l[1]);
+    r.l[1] = av_bswap32 (w.l[0]);
+    return r.ll;
+#endif
+}
+#endif
+
+// be2ne ... big-endian to native-endian
+// le2ne ... little-endian to native-endian
+
+#if AV_HAVE_BIGENDIAN
+#define av_be2ne16(x) (x)
+#define av_be2ne32(x) (x)
+#define av_be2ne64(x) (x)
+#define av_le2ne16(x) av_bswap16(x)
+#define av_le2ne32(x) av_bswap32(x)
+#define av_le2ne64(x) av_bswap64(x)
+#define AV_BE2NEC(s, x) (x)
+#define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
+#else
+#define av_be2ne16(x) av_bswap16(x)
+#define av_be2ne32(x) av_bswap32(x)
+#define av_be2ne64(x) av_bswap64(x)
+#define av_le2ne16(x) (x)
+#define av_le2ne32(x) (x)
+#define av_le2ne64(x) (x)
+#define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
+#define AV_LE2NEC(s, x) (x)
+#endif
+
+#define AV_BE2NE16C(x) AV_BE2NEC(16, x)
+#define AV_BE2NE32C(x) AV_BE2NEC(32, x)
+#define AV_BE2NE64C(x) AV_BE2NEC(64, x)
+#define AV_LE2NE16C(x) AV_LE2NEC(16, x)
+#define AV_LE2NE32C(x) AV_LE2NEC(32, x)
+#define AV_LE2NE64C(x) AV_LE2NEC(64, x)
+
+#endif /* AVUTIL_BSWAP_H */
diff --git a/ffmpeg 0.8/include/libavutil/common.h b/ffmpeg 0.8/include/libavutil/common.h
new file mode 100644 (file)
index 0000000..d60e863
--- /dev/null
@@ -0,0 +1,387 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * common internal and external API header
+ */
+
+#ifndef AVUTIL_COMMON_H
+#define AVUTIL_COMMON_H
+
+#include <ctype.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "attributes.h"
+#include "libavutil/avconfig.h"
+
+#if AV_HAVE_BIGENDIAN
+#   define AV_NE(be, le) (be)
+#else
+#   define AV_NE(be, le) (le)
+#endif
+
+//rounded division & shift
+#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
+/* assume b>0 */
+#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
+#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
+#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
+#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
+#define FFSIGN(a) ((a) > 0 ? 1 : -1)
+
+#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
+#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
+#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
+#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
+
+#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
+#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
+
+/* misc math functions */
+extern const uint8_t ff_log2_tab[256];
+
+extern const uint8_t av_reverse[256];
+
+static av_always_inline av_const int av_log2_c(unsigned int v)
+{
+    int n = 0;
+    if (v & 0xffff0000) {
+        v >>= 16;
+        n += 16;
+    }
+    if (v & 0xff00) {
+        v >>= 8;
+        n += 8;
+    }
+    n += ff_log2_tab[v];
+
+    return n;
+}
+
+static av_always_inline av_const int av_log2_16bit_c(unsigned int v)
+{
+    int n = 0;
+    if (v & 0xff00) {
+        v >>= 8;
+        n += 8;
+    }
+    n += ff_log2_tab[v];
+
+    return n;
+}
+
+#ifdef HAVE_AV_CONFIG_H
+#   include "config.h"
+#   include "intmath.h"
+#endif
+
+/* Pull in unguarded fallback defines at the end of this file. */
+#include "common.h"
+
+/**
+ * Clip a signed integer value into the amin-amax range.
+ * @param a value to clip
+ * @param amin minimum value of the clip range
+ * @param amax maximum value of the clip range
+ * @return clipped value
+ */
+static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
+{
+    if      (a < amin) return amin;
+    else if (a > amax) return amax;
+    else               return a;
+}
+
+/**
+ * Clip a signed integer value into the 0-255 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
+{
+    if (a&(~0xFF)) return (-a)>>31;
+    else           return a;
+}
+
+/**
+ * Clip a signed integer value into the -128,127 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static av_always_inline av_const int8_t av_clip_int8_c(int a)
+{
+    if ((a+0x80) & ~0xFF) return (a>>31) ^ 0x7F;
+    else                  return a;
+}
+
+/**
+ * Clip a signed integer value into the 0-65535 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
+{
+    if (a&(~0xFFFF)) return (-a)>>31;
+    else             return a;
+}
+
+/**
+ * Clip a signed integer value into the -32768,32767 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static av_always_inline av_const int16_t av_clip_int16_c(int a)
+{
+    if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
+    else                      return a;
+}
+
+/**
+ * Clip a signed 64-bit integer value into the -2147483648,2147483647 range.
+ * @param a value to clip
+ * @return clipped value
+ */
+static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
+{
+    if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
+    else                                         return a;
+}
+
+/**
+ * Clip a signed integer to an unsigned power of two range.
+ * @param  a value to clip
+ * @param  p bit position to clip at
+ * @return clipped value
+ */
+static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
+{
+    if (a & ~((1<<p) - 1)) return -a >> 31 & ((1<<p) - 1);
+    else                   return  a;
+}
+
+/**
+ * Clip a float value into the amin-amax range.
+ * @param a value to clip
+ * @param amin minimum value of the clip range
+ * @param amax maximum value of the clip range
+ * @return clipped value
+ */
+static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
+{
+    if      (a < amin) return amin;
+    else if (a > amax) return amax;
+    else               return a;
+}
+
+/** Compute ceil(log2(x)).
+ * @param x value used to compute ceil(log2(x))
+ * @return computed ceiling of log2(x)
+ */
+static av_always_inline av_const int av_ceil_log2_c(int x)
+{
+    return av_log2((x - 1) << 1);
+}
+
+/**
+ * Count number of bits set to one in x
+ * @param x value to count bits of
+ * @return the number of bits set to one in x
+ */
+static av_always_inline av_const int av_popcount_c(uint32_t x)
+{
+    x -= (x >> 1) & 0x55555555;
+    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
+    x = (x + (x >> 4)) & 0x0F0F0F0F;
+    x += x >> 8;
+    return (x + (x >> 16)) & 0x3F;
+}
+
+#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
+#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
+
+/**
+ * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
+ *
+ * @param val      Output value, must be an lvalue of type uint32_t.
+ * @param GET_BYTE Expression reading one byte from the input.
+ *                 Evaluated up to 7 times (4 for the currently
+ *                 assigned Unicode range).  With a memory buffer
+ *                 input, this could be *ptr++.
+ * @param ERROR    Expression to be evaluated on invalid input,
+ *                 typically a goto statement.
+ */
+#define GET_UTF8(val, GET_BYTE, ERROR)\
+    val= GET_BYTE;\
+    {\
+        int ones= 7 - av_log2(val ^ 255);\
+        if(ones==1)\
+            ERROR\
+        val&= 127>>ones;\
+        while(--ones > 0){\
+            int tmp= GET_BYTE - 128;\
+            if(tmp>>6)\
+                ERROR\
+            val= (val<<6) + tmp;\
+        }\
+    }
+
+/**
+ * Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.
+ *
+ * @param val       Output value, must be an lvalue of type uint32_t.
+ * @param GET_16BIT Expression returning two bytes of UTF-16 data converted
+ *                  to native byte order.  Evaluated one or two times.
+ * @param ERROR     Expression to be evaluated on invalid input,
+ *                  typically a goto statement.
+ */
+#define GET_UTF16(val, GET_16BIT, ERROR)\
+    val = GET_16BIT;\
+    {\
+        unsigned int hi = val - 0xD800;\
+        if (hi < 0x800) {\
+            val = GET_16BIT - 0xDC00;\
+            if (val > 0x3FFU || hi > 0x3FFU)\
+                ERROR\
+            val += (hi<<10) + 0x10000;\
+        }\
+    }\
+
+/**
+ * @def PUT_UTF8(val, tmp, PUT_BYTE)
+ * Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
+ * @param val is an input-only argument and should be of type uint32_t. It holds
+ * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If
+ * val is given as a function it is executed only once.
+ * @param tmp is a temporary variable and should be of type uint8_t. It
+ * represents an intermediate value during conversion that is to be
+ * output by PUT_BYTE.
+ * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
+ * It could be a function or a statement, and uses tmp as the input byte.
+ * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
+ * executed up to 4 times for values in the valid UTF-8 range and up to
+ * 7 times in the general case, depending on the length of the converted
+ * Unicode character.
+ */
+#define PUT_UTF8(val, tmp, PUT_BYTE)\
+    {\
+        int bytes, shift;\
+        uint32_t in = val;\
+        if (in < 0x80) {\
+            tmp = in;\
+            PUT_BYTE\
+        } else {\
+            bytes = (av_log2(in) + 4) / 5;\
+            shift = (bytes - 1) * 6;\
+            tmp = (256 - (256 >> bytes)) | (in >> shift);\
+            PUT_BYTE\
+            while (shift >= 6) {\
+                shift -= 6;\
+                tmp = 0x80 | ((in >> shift) & 0x3f);\
+                PUT_BYTE\
+            }\
+        }\
+    }
+
+/**
+ * @def PUT_UTF16(val, tmp, PUT_16BIT)
+ * Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).
+ * @param val is an input-only argument and should be of type uint32_t. It holds
+ * a UCS-4 encoded Unicode character that is to be converted to UTF-16. If
+ * val is given as a function it is executed only once.
+ * @param tmp is a temporary variable and should be of type uint16_t. It
+ * represents an intermediate value during conversion that is to be
+ * output by PUT_16BIT.
+ * @param PUT_16BIT writes the converted UTF-16 data to any proper destination
+ * in desired endianness. It could be a function or a statement, and uses tmp
+ * as the input byte.  For example, PUT_BYTE could be "*output++ = tmp;"
+ * PUT_BYTE will be executed 1 or 2 times depending on input character.
+ */
+#define PUT_UTF16(val, tmp, PUT_16BIT)\
+    {\
+        uint32_t in = val;\
+        if (in < 0x10000) {\
+            tmp = in;\
+            PUT_16BIT\
+        } else {\
+            tmp = 0xD800 | ((in - 0x10000) >> 10);\
+            PUT_16BIT\
+            tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
+            PUT_16BIT\
+        }\
+    }\
+
+
+
+#include "mem.h"
+
+#ifdef HAVE_AV_CONFIG_H
+#    include "internal.h"
+#endif /* HAVE_AV_CONFIG_H */
+
+#endif /* AVUTIL_COMMON_H */
+
+/*
+ * The following definitions are outside the multiple inclusion guard
+ * to ensure they are immediately available in intmath.h.
+ */
+
+#ifndef av_log2
+#   define av_log2       av_log2_c
+#endif
+#ifndef av_log2_16bit
+#   define av_log2_16bit av_log2_16bit_c
+#endif
+#ifndef av_ceil_log2
+#   define av_ceil_log2     av_ceil_log2_c
+#endif
+#ifndef av_clip
+#   define av_clip          av_clip_c
+#endif
+#ifndef av_clip_uint8
+#   define av_clip_uint8    av_clip_uint8_c
+#endif
+#ifndef av_clip_int8
+#   define av_clip_int8     av_clip_int8_c
+#endif
+#ifndef av_clip_uint16
+#   define av_clip_uint16   av_clip_uint16_c
+#endif
+#ifndef av_clip_int16
+#   define av_clip_int16    av_clip_int16_c
+#endif
+#ifndef av_clipl_int32
+#   define av_clipl_int32   av_clipl_int32_c
+#endif
+#ifndef av_clip_uintp2
+#   define av_clip_uintp2   av_clip_uintp2_c
+#endif
+#ifndef av_clipf
+#   define av_clipf         av_clipf_c
+#endif
+#ifndef av_popcount
+#   define av_popcount      av_popcount_c
+#endif
diff --git a/ffmpeg 0.8/include/libavutil/cpu.h b/ffmpeg 0.8/include/libavutil/cpu.h
new file mode 100644 (file)
index 0000000..da93fb5
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_CPU_H
+#define AVUTIL_CPU_H
+
+#define AV_CPU_FLAG_FORCE    0x80000000 /* force usage of selected flags (OR) */
+
+    /* lower 16 bits - CPU features */
+#define AV_CPU_FLAG_MMX          0x0001 ///< standard MMX
+#define AV_CPU_FLAG_MMX2         0x0002 ///< SSE integer functions or AMD MMX ext
+#define AV_CPU_FLAG_3DNOW        0x0004 ///< AMD 3DNOW
+#define AV_CPU_FLAG_SSE          0x0008 ///< SSE functions
+#define AV_CPU_FLAG_SSE2         0x0010 ///< PIV SSE2 functions
+#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster
+#define AV_CPU_FLAG_3DNOWEXT     0x0020 ///< AMD 3DNowExt
+#define AV_CPU_FLAG_SSE3         0x0040 ///< Prescott SSE3 functions
+#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
+#define AV_CPU_FLAG_SSSE3        0x0080 ///< Conroe SSSE3 functions
+#define AV_CPU_FLAG_ATOM     0x10000000 ///< Atom processor, some SSSE3 instructions are slower
+#define AV_CPU_FLAG_SSE4         0x0100 ///< Penryn SSE4.1 functions
+#define AV_CPU_FLAG_SSE42        0x0200 ///< Nehalem SSE4.2 functions
+#define AV_CPU_FLAG_AVX          0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
+#define AV_CPU_FLAG_IWMMXT       0x0100 ///< XScale IWMMXT
+#define AV_CPU_FLAG_ALTIVEC      0x0001 ///< standard
+
+/**
+ * Return the flags which specify extensions supported by the CPU.
+ */
+int av_get_cpu_flags(void);
+
+
+/**
+ * Disables cpu detection and forces the specified flags.
+ */
+void av_force_cpu_flags(int flags);
+
+
+/* The following CPU-specific functions shall not be called directly. */
+int ff_get_cpu_flags_arm(void);
+int ff_get_cpu_flags_ppc(void);
+int ff_get_cpu_flags_x86(void);
+
+#endif /* AVUTIL_CPU_H */
diff --git a/ffmpeg 0.8/include/libavutil/crc.h b/ffmpeg 0.8/include/libavutil/crc.h
new file mode 100644 (file)
index 0000000..6c0baab
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_CRC_H
+#define AVUTIL_CRC_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "attributes.h"
+
+typedef uint32_t AVCRC;
+
+typedef enum {
+    AV_CRC_8_ATM,
+    AV_CRC_16_ANSI,
+    AV_CRC_16_CCITT,
+    AV_CRC_32_IEEE,
+    AV_CRC_32_IEEE_LE,  /*< reversed bitorder version of AV_CRC_32_IEEE */
+    AV_CRC_MAX,         /*< Not part of public API! Do not use outside libavutil. */
+}AVCRCId;
+
+int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
+const AVCRC *av_crc_get_table(AVCRCId crc_id);
+uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length) av_pure;
+
+#endif /* AVUTIL_CRC_H */
+
diff --git a/ffmpeg 0.8/include/libavutil/dict.h b/ffmpeg 0.8/include/libavutil/dict.h
new file mode 100644 (file)
index 0000000..84f58ec
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Public dictionary API.
+ * @deprecated
+ *  AVDictionary is provided for compatibility with libav. It is both in
+ *  implementation as well as API inefficient. It does not scale and is
+ *  extremely slow with large dictionaries.
+ *  It is recommended that new code uses our tree container from tree.c/h
+ *  where applicable, which uses AVL trees to achieve O(log n) performance.
+ */
+
+#ifndef AVUTIL_DICT_H
+#define AVUTIL_DICT_H
+
+/**
+ * @defgroup dict_api Public Dictionary API
+ * @{
+ * Dictionaries are used for storing key:value pairs. To create
+ * an AVDictionary, simply pass an address of a NULL pointer to
+ * av_dict_set(). NULL can be used as an empty dictionary wherever
+ * a pointer to an AVDictionary is required.
+ * Use av_dict_get() to retrieve an entry or iterate over all
+ * entries and finally av_dict_free() to free the dictionary
+ * and all its contents.
+ *
+ * @code
+ * AVDictionary *d = NULL;                // "create" an empty dictionary
+ * av_dict_set(&d, "foo", "bar", 0);      // add an entry
+ *
+ * char *k = av_strdup("key");            // if your strings are already allocated,
+ * char *v = av_strdup("value");          // you can avoid copying them like this
+ * av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
+ *
+ * AVDictionaryEntry *t = NULL;
+ * while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
+ *     <....>                             // iterate over all entries in d
+ * }
+ *
+ * av_dict_free(&d);
+ * @endcode
+ *
+ * @}
+ */
+
+#define AV_DICT_MATCH_CASE      1
+#define AV_DICT_IGNORE_SUFFIX   2
+#define AV_DICT_DONT_STRDUP_KEY 4   /**< Take ownership of a key that's been
+                                         allocated with av_malloc() and children. */
+#define AV_DICT_DONT_STRDUP_VAL 8   /**< Take ownership of a value that's been
+                                         allocated with av_malloc() and chilren. */
+#define AV_DICT_DONT_OVERWRITE 16   ///< Don't overwrite existing entries.
+#define AV_DICT_APPEND         32   /**< If the entry already exists, append to it.  Note that no
+                                      delimiter is added, the strings are simply concatenated. */
+
+typedef struct {
+    char *key;
+    char *value;
+} AVDictionaryEntry;
+
+typedef struct AVDictionary AVDictionary;
+
+/**
+ * Get a dictionary entry with matching key.
+ *
+ * @param prev Set to the previous matching element to find the next.
+ *             If set to NULL the first matching element is returned.
+ * @param flags Allows case as well as suffix-insensitive comparisons.
+ * @return Found entry or NULL, changing key or value leads to undefined behavior.
+ */
+AVDictionaryEntry *
+av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+
+/**
+ * Set the given entry in *pm, overwriting an existing entry.
+ *
+ * @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
+ * a dictionary struct is allocated and put in *pm.
+ * @param key entry key to add to *pm (will be av_strduped depending on flags)
+ * @param value entry value to add to *pm (will be av_strduped depending on flags).
+ *        Passing a NULL value will cause an existing tag to be deleted.
+ * @return >= 0 on success otherwise an error code <0
+ */
+int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
+
+/**
+ * Copy entries from one AVDictionary struct into another.
+ * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
+ *            this function will allocate a struct for you and put it in *dst
+ * @param src pointer to source AVDictionary struct
+ * @param flags flags to use when setting entries in *dst
+ * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
+ */
+void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags);
+
+/**
+ * Free all the memory allocated for an AVDictionary struct
+ * and all keys and values.
+ */
+void av_dict_free(AVDictionary **m);
+
+#endif // AVUTIL_DICT_H
diff --git a/ffmpeg 0.8/include/libavutil/error.h b/ffmpeg 0.8/include/libavutil/error.h
new file mode 100644 (file)
index 0000000..47d366e
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * error code definitions
+ */
+
+#ifndef AVUTIL_ERROR_H
+#define AVUTIL_ERROR_H
+
+#include <errno.h>
+#include "avutil.h"
+
+/* error handling */
+#if EDOM > 0
+#define AVERROR(e) (-(e))   ///< Returns a negative error code from a POSIX error code, to return from library functions.
+#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.
+#else
+/* Some platforms have E* and errno already negated. */
+#define AVERROR(e) (e)
+#define AVUNERROR(e) (e)
+#endif
+
+#define AVERROR_BSF_NOT_FOUND      (-MKTAG(0xF8,'B','S','F')) ///< Bitstream filter not found
+#define AVERROR_DECODER_NOT_FOUND  (-MKTAG(0xF8,'D','E','C')) ///< Decoder not found
+#define AVERROR_DEMUXER_NOT_FOUND  (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found
+#define AVERROR_ENCODER_NOT_FOUND  (-MKTAG(0xF8,'E','N','C')) ///< Encoder not found
+#define AVERROR_EOF                (-MKTAG( 'E','O','F',' ')) ///< End of file
+#define AVERROR_EXIT               (-MKTAG( 'E','X','I','T')) ///< Immediate exit was requested; the called function should not be restarted
+#define AVERROR_FILTER_NOT_FOUND   (-MKTAG(0xF8,'F','I','L')) ///< Filter not found
+#define AVERROR_INVALIDDATA        (-MKTAG( 'I','N','D','A')) ///< Invalid data found when processing input
+#define AVERROR_MUXER_NOT_FOUND    (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found
+#define AVERROR_OPTION_NOT_FOUND   (-MKTAG(0xF8,'O','P','T')) ///< Option not found
+#define AVERROR_PATCHWELCOME       (-MKTAG( 'P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
+#define AVERROR_PROTOCOL_NOT_FOUND (-MKTAG(0xF8,'P','R','O')) ///< Protocol not found
+#define AVERROR_STREAM_NOT_FOUND   (-MKTAG(0xF8,'S','T','R')) ///< Stream not found
+
+/**
+ * Put a description of the AVERROR code errnum in errbuf.
+ * In case of failure the global variable errno is set to indicate the
+ * error. Even in case of failure av_strerror() will print a generic
+ * error message indicating the errnum provided to errbuf.
+ *
+ * @param errnum      error code to describe
+ * @param errbuf      buffer to which description is written
+ * @param errbuf_size the size in bytes of errbuf
+ * @return 0 on success, a negative value if a description for errnum
+ * cannot be found
+ */
+int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
+
+#endif /* AVUTIL_ERROR_H */
diff --git a/ffmpeg 0.8/include/libavutil/eval.h b/ffmpeg 0.8/include/libavutil/eval.h
new file mode 100644 (file)
index 0000000..ee378a2
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * simple arithmetic expression evaluator
+ */
+
+#ifndef AVUTIL_EVAL_H
+#define AVUTIL_EVAL_H
+
+#include "avutil.h"
+
+typedef struct AVExpr AVExpr;
+
+/**
+ * Parse and evaluate an expression.
+ * Note, this is significantly slower than av_expr_eval().
+ *
+ * @param res a pointer to a double where is put the result value of
+ * the expression, or NAN in case of error
+ * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)"
+ * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0}
+ * @param const_values a zero terminated array of values for the identifiers from const_names
+ * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers
+ * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument
+ * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
+ * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
+ * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
+ * @param log_ctx parent logging context
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+int av_expr_parse_and_eval(double *res, const char *s,
+                           const char * const *const_names, const double *const_values,
+                           const char * const *func1_names, double (* const *funcs1)(void *, double),
+                           const char * const *func2_names, double (* const *funcs2)(void *, double, double),
+                           void *opaque, int log_offset, void *log_ctx);
+
+/**
+ * Parse an expression.
+ *
+ * @param expr a pointer where is put an AVExpr containing the parsed
+ * value in case of successfull parsing, or NULL otherwise.
+ * The pointed to AVExpr must be freed with av_expr_free() by the user
+ * when it is not needed anymore.
+ * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)"
+ * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0}
+ * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers
+ * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument
+ * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
+ * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
+ * @param log_ctx parent logging context
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+int av_expr_parse(AVExpr **expr, const char *s,
+                  const char * const *const_names,
+                  const char * const *func1_names, double (* const *funcs1)(void *, double),
+                  const char * const *func2_names, double (* const *funcs2)(void *, double, double),
+                  int log_offset, void *log_ctx);
+
+/**
+ * Evaluate a previously parsed expression.
+ *
+ * @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names
+ * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
+ * @return the value of the expression
+ */
+double av_expr_eval(AVExpr *e, const double *const_values, void *opaque);
+
+/**
+ * Free a parsed expression previously created with av_expr_parse().
+ */
+void av_expr_free(AVExpr *e);
+
+#if FF_API_OLD_EVAL_NAMES
+/**
+ * @deprecated Deprecated in favor of av_expr_parse_and_eval().
+ */
+attribute_deprecated
+int av_parse_and_eval_expr(double *res, const char *s,
+                           const char * const *const_names, const double *const_values,
+                           const char * const *func1_names, double (* const *funcs1)(void *, double),
+                           const char * const *func2_names, double (* const *funcs2)(void *, double, double),
+                           void *opaque, int log_offset, void *log_ctx);
+
+/**
+ * @deprecated Deprecated in favor of av_expr_parse().
+ */
+attribute_deprecated
+int av_parse_expr(AVExpr **expr, const char *s,
+                  const char * const *const_names,
+                  const char * const *func1_names, double (* const *funcs1)(void *, double),
+                  const char * const *func2_names, double (* const *funcs2)(void *, double, double),
+                  int log_offset, void *log_ctx);
+/**
+ * @deprecated Deprecated in favor of av_expr_eval().
+ */
+attribute_deprecated
+double av_eval_expr(AVExpr *e, const double *const_values, void *opaque);
+
+/**
+ * @deprecated Deprecated in favor of av_expr_free().
+ */
+attribute_deprecated
+void av_free_expr(AVExpr *e);
+#endif /* FF_API_OLD_EVAL_NAMES */
+
+/**
+ * Parse the string in numstr and return its value as a double. If
+ * the string is empty, contains only whitespaces, or does not contain
+ * an initial substring that has the expected syntax for a
+ * floating-point number, no conversion is performed. In this case,
+ * returns a value of zero and the value returned in tail is the value
+ * of numstr.
+ *
+ * @param numstr a string representing a number, may contain one of
+ * the International System number postfixes, for example 'K', 'M',
+ * 'G'. If 'i' is appended after the postfix, powers of 2 are used
+ * instead of powers of 10. The 'B' postfix multiplies the value for
+ * 8, and can be appended after another postfix or used alone. This
+ * allows using for example 'KB', 'MiB', 'G' and 'B' as postfix.
+ * @param tail if non-NULL puts here the pointer to the char next
+ * after the last parsed character
+ */
+double av_strtod(const char *numstr, char **tail);
+
+#endif /* AVUTIL_EVAL_H */
diff --git a/ffmpeg 0.8/include/libavutil/fifo.h b/ffmpeg 0.8/include/libavutil/fifo.h
new file mode 100644 (file)
index 0000000..999d0bf
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * a very simple circular buffer FIFO implementation
+ */
+
+#ifndef AVUTIL_FIFO_H
+#define AVUTIL_FIFO_H
+
+#include <stdint.h>
+
+typedef struct AVFifoBuffer {
+    uint8_t *buffer;
+    uint8_t *rptr, *wptr, *end;
+    uint32_t rndx, wndx;
+} AVFifoBuffer;
+
+/**
+ * Initialize an AVFifoBuffer.
+ * @param size of FIFO
+ * @return AVFifoBuffer or NULL in case of memory allocation failure
+ */
+AVFifoBuffer *av_fifo_alloc(unsigned int size);
+
+/**
+ * Free an AVFifoBuffer.
+ * @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
+ */
+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
+ * @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
+ * @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 buf_size number of bytes to read
+ * @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
+ * 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,
+ * 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.
+ * If func is NULL, src is interpreted as a simple byte array for source data.
+ * @return the number of bytes written to the FIFO
+ */
+int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
+
+/**
+ * Resize an AVFifoBuffer.
+ * @param *f AVFifoBuffer to resize
+ * @param size new AVFifoBuffer size in bytes
+ * @return <0 for failure, >=0 otherwise
+ */
+int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
+
+/**
+ * Read and discard the specified amount of data from an AVFifoBuffer.
+ * @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)
+{
+    uint8_t *ptr = f->rptr + offs;
+    if (ptr >= f->end)
+        ptr -= f->end - f->buffer;
+    return *ptr;
+}
+#endif /* AVUTIL_FIFO_H */
diff --git a/ffmpeg 0.8/include/libavutil/file.h b/ffmpeg 0.8/include/libavutil/file.h
new file mode 100644 (file)
index 0000000..f28627c
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_FILE_H
+#define AVUTIL_FILE_H
+
+#include "avutil.h"
+
+/**
+ * @file
+ * Misc file utilities.
+ */
+
+/**
+ * Read the file with name filename, and put its content in a newly
+ * allocated buffer or map it with mmap() when available.
+ * In case of success set *bufptr to the read or mmapped buffer, and
+ * *size to the size in bytes of the buffer in *bufptr.
+ * The returned buffer must be released with av_file_unmap().
+ *
+ * @param log_offset loglevel offset used for logging
+ * @param log_ctx context used for logging
+ * @return a non negative number in case of success, a negative value
+ * corresponding to an AVERROR error code in case of failure
+ */
+int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
+                int log_offset, void *log_ctx);
+
+/**
+ * Unmap or free the buffer bufptr created by av_file_map().
+ *
+ * @param size size in bytes of bufptr, must be the same as returned
+ * by av_file_map()
+ */
+void av_file_unmap(uint8_t *bufptr, size_t size);
+
+#endif /* AVUTIL_FILE_H */
diff --git a/ffmpeg 0.8/include/libavutil/imgutils.h b/ffmpeg 0.8/include/libavutil/imgutils.h
new file mode 100644 (file)
index 0000000..f976d21
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_IMGUTILS_H
+#define AVUTIL_IMGUTILS_H
+
+/**
+ * @file
+ * misc image utilities
+ */
+
+#include "avutil.h"
+#include "pixdesc.h"
+
+/**
+ * Compute the max pixel step for each plane of an image with a
+ * format described by pixdesc.
+ *
+ * The pixel step is the distance in bytes between the first byte of
+ * the group of bytes which describe a pixel component and the first
+ * byte of the successive group in the same plane for the same
+ * component.
+ *
+ * @param max_pixsteps an array which is filled with the max pixel step
+ * for each plane. Since a plane may contain different pixel
+ * components, the computed max_pixsteps[plane] is relative to the
+ * component in the plane with the max pixel step.
+ * @param max_pixstep_comps an array which is filled with the component
+ * for each plane which has the max pixel step. May be NULL.
+ */
+void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
+                                const AVPixFmtDescriptor *pixdesc);
+
+/**
+ * Compute the size of an image line with format pix_fmt and width
+ * width for the plane plane.
+ *
+ * @return the computed size in bytes
+ */
+int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane);
+
+/**
+ * Fill plane linesizes for an image with pixel format pix_fmt and
+ * width width.
+ *
+ * @param linesizes array to be filled with the linesize for each plane
+ * @return >= 0 in case of success, a negative error code otherwise
+ */
+int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width);
+
+/**
+ * Fill plane data pointers for an image with pixel format pix_fmt and
+ * height height.
+ *
+ * @param data pointers array to be filled with the pointer for each image plane
+ * @param ptr the pointer to a buffer which will contain the image
+ * @param linesizes the array containing the linesize for each
+ * plane, should be filled by av_image_fill_linesizes()
+ * @return the size in bytes required for the image buffer, a negative
+ * error code in case of failure
+ */
+int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
+                           uint8_t *ptr, const int linesizes[4]);
+
+/**
+ * Allocate an image with size w and h and pixel format pix_fmt, and
+ * fill pointers and linesizes accordingly.
+ * The allocated image buffer has to be freed by using
+ * av_freep(&pointers[0]).
+ *
+ * @param align the value to use for buffer size alignment
+ * @return the size in bytes required for the image buffer, a negative
+ * error code in case of failure
+ */
+int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
+                   int w, int h, enum PixelFormat pix_fmt, int align);
+
+/**
+ * Copy image plane from src to dst.
+ * That is, copy "height" number of lines of "bytewidth" bytes each.
+ * The first byte of each successive line is separated by *_linesize
+ * bytes.
+ *
+ * @param dst_linesize linesize for the image plane in dst
+ * @param src_linesize linesize for the image plane in src
+ */
+void av_image_copy_plane(uint8_t       *dst, int dst_linesize,
+                         const uint8_t *src, int src_linesize,
+                         int bytewidth, int height);
+
+/**
+ * Copy image in src_data to dst_data.
+ *
+ * @param dst_linesizes linesizes for the image in dst_data
+ * @param src_linesizes linesizes for the image in src_data
+ */
+void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
+                   const uint8_t *src_data[4], const int src_linesizes[4],
+                   enum PixelFormat pix_fmt, int width, int height);
+
+/**
+ * Check if the given dimension of an image is valid, meaning that all
+ * bytes of the image can be addressed with a signed int.
+ *
+ * @param w the width of the picture
+ * @param h the height of the picture
+ * @param log_offset the offset to sum to the log level for logging with log_ctx
+ * @param log_ctx the parent logging context, it may be NULL
+ * @return >= 0 if valid, a negative error code otherwise
+ */
+int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
+
+int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt);
+
+#endif /* AVUTIL_IMGUTILS_H */
diff --git a/ffmpeg 0.8/include/libavutil/intfloat_readwrite.h b/ffmpeg 0.8/include/libavutil/intfloat_readwrite.h
new file mode 100644 (file)
index 0000000..1b80fc6
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_INTFLOAT_READWRITE_H
+#define AVUTIL_INTFLOAT_READWRITE_H
+
+#include <stdint.h>
+#include "attributes.h"
+
+/* IEEE 80 bits extended float */
+typedef struct AVExtFloat  {
+    uint8_t exponent[2];
+    uint8_t mantissa[8];
+} AVExtFloat;
+
+double av_int2dbl(int64_t v) av_const;
+float av_int2flt(int32_t v) av_const;
+double av_ext2dbl(const AVExtFloat ext) av_const;
+int64_t av_dbl2int(double d) av_const;
+int32_t av_flt2int(float d) av_const;
+AVExtFloat av_dbl2ext(double d) av_const;
+
+#endif /* AVUTIL_INTFLOAT_READWRITE_H */
diff --git a/ffmpeg 0.8/include/libavutil/intreadwrite.h b/ffmpeg 0.8/include/libavutil/intreadwrite.h
new file mode 100644 (file)
index 0000000..09d796c
--- /dev/null
@@ -0,0 +1,522 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_INTREADWRITE_H
+#define AVUTIL_INTREADWRITE_H
+
+#include <stdint.h>
+#include "libavutil/avconfig.h"
+#include "attributes.h"
+#include "bswap.h"
+
+typedef union {
+    uint64_t u64;
+    uint32_t u32[2];
+    uint16_t u16[4];
+    uint8_t  u8 [8];
+    double   f64;
+    float    f32[2];
+} av_alias av_alias64;
+
+typedef union {
+    uint32_t u32;
+    uint16_t u16[2];
+    uint8_t  u8 [4];
+    float    f32;
+} av_alias av_alias32;
+
+typedef union {
+    uint16_t u16;
+    uint8_t  u8 [2];
+} av_alias av_alias16;
+
+/*
+ * Arch-specific headers can provide any combination of
+ * AV_[RW][BLN](16|24|32|64) and AV_(COPY|SWAP|ZERO)(64|128) macros.
+ * Preprocessor symbols must be defined, even if these are implemented
+ * as inline functions.
+ */
+
+#ifdef HAVE_AV_CONFIG_H
+
+#include "config.h"
+
+#if   ARCH_ARM
+#   include "arm/intreadwrite.h"
+#elif ARCH_AVR32
+#   include "avr32/intreadwrite.h"
+#elif ARCH_MIPS
+#   include "mips/intreadwrite.h"
+#elif ARCH_PPC
+#   include "ppc/intreadwrite.h"
+#elif ARCH_TOMI
+#   include "tomi/intreadwrite.h"
+#elif ARCH_X86
+#   include "x86/intreadwrite.h"
+#endif
+
+#endif /* HAVE_AV_CONFIG_H */
+
+/*
+ * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers.
+ */
+
+#if AV_HAVE_BIGENDIAN
+
+#   if    defined(AV_RN16) && !defined(AV_RB16)
+#       define AV_RB16(p) AV_RN16(p)
+#   elif !defined(AV_RN16) &&  defined(AV_RB16)
+#       define AV_RN16(p) AV_RB16(p)
+#   endif
+
+#   if    defined(AV_WN16) && !defined(AV_WB16)
+#       define AV_WB16(p, v) AV_WN16(p, v)
+#   elif !defined(AV_WN16) &&  defined(AV_WB16)
+#       define AV_WN16(p, v) AV_WB16(p, v)
+#   endif
+
+#   if    defined(AV_RN24) && !defined(AV_RB24)
+#       define AV_RB24(p) AV_RN24(p)
+#   elif !defined(AV_RN24) &&  defined(AV_RB24)
+#       define AV_RN24(p) AV_RB24(p)
+#   endif
+
+#   if    defined(AV_WN24) && !defined(AV_WB24)
+#       define AV_WB24(p, v) AV_WN24(p, v)
+#   elif !defined(AV_WN24) &&  defined(AV_WB24)
+#       define AV_WN24(p, v) AV_WB24(p, v)
+#   endif
+
+#   if    defined(AV_RN32) && !defined(AV_RB32)
+#       define AV_RB32(p) AV_RN32(p)
+#   elif !defined(AV_RN32) &&  defined(AV_RB32)
+#       define AV_RN32(p) AV_RB32(p)
+#   endif
+
+#   if    defined(AV_WN32) && !defined(AV_WB32)
+#       define AV_WB32(p, v) AV_WN32(p, v)
+#   elif !defined(AV_WN32) &&  defined(AV_WB32)
+#       define AV_WN32(p, v) AV_WB32(p, v)
+#   endif
+
+#   if    defined(AV_RN64) && !defined(AV_RB64)
+#       define AV_RB64(p) AV_RN64(p)
+#   elif !defined(AV_RN64) &&  defined(AV_RB64)
+#       define AV_RN64(p) AV_RB64(p)
+#   endif
+
+#   if    defined(AV_WN64) && !defined(AV_WB64)
+#       define AV_WB64(p, v) AV_WN64(p, v)
+#   elif !defined(AV_WN64) &&  defined(AV_WB64)
+#       define AV_WN64(p, v) AV_WB64(p, v)
+#   endif
+
+#else /* AV_HAVE_BIGENDIAN */
+
+#   if    defined(AV_RN16) && !defined(AV_RL16)
+#       define AV_RL16(p) AV_RN16(p)
+#   elif !defined(AV_RN16) &&  defined(AV_RL16)
+#       define AV_RN16(p) AV_RL16(p)
+#   endif
+
+#   if    defined(AV_WN16) && !defined(AV_WL16)
+#       define AV_WL16(p, v) AV_WN16(p, v)
+#   elif !defined(AV_WN16) &&  defined(AV_WL16)
+#       define AV_WN16(p, v) AV_WL16(p, v)
+#   endif
+
+#   if    defined(AV_RN24) && !defined(AV_RL24)
+#       define AV_RL24(p) AV_RN24(p)
+#   elif !defined(AV_RN24) &&  defined(AV_RL24)
+#       define AV_RN24(p) AV_RL24(p)
+#   endif
+
+#   if    defined(AV_WN24) && !defined(AV_WL24)
+#       define AV_WL24(p, v) AV_WN24(p, v)
+#   elif !defined(AV_WN24) &&  defined(AV_WL24)
+#       define AV_WN24(p, v) AV_WL24(p, v)
+#   endif
+
+#   if    defined(AV_RN32) && !defined(AV_RL32)
+#       define AV_RL32(p) AV_RN32(p)
+#   elif !defined(AV_RN32) &&  defined(AV_RL32)
+#       define AV_RN32(p) AV_RL32(p)
+#   endif
+
+#   if    defined(AV_WN32) && !defined(AV_WL32)
+#       define AV_WL32(p, v) AV_WN32(p, v)
+#   elif !defined(AV_WN32) &&  defined(AV_WL32)
+#       define AV_WN32(p, v) AV_WL32(p, v)
+#   endif
+
+#   if    defined(AV_RN64) && !defined(AV_RL64)
+#       define AV_RL64(p) AV_RN64(p)
+#   elif !defined(AV_RN64) &&  defined(AV_RL64)
+#       define AV_RN64(p) AV_RL64(p)
+#   endif
+
+#   if    defined(AV_WN64) && !defined(AV_WL64)
+#       define AV_WL64(p, v) AV_WN64(p, v)
+#   elif !defined(AV_WN64) &&  defined(AV_WL64)
+#       define AV_WN64(p, v) AV_WL64(p, v)
+#   endif
+
+#endif /* !AV_HAVE_BIGENDIAN */
+
+/*
+ * Define AV_[RW]N helper macros to simplify definitions not provided
+ * by per-arch headers.
+ */
+
+#if defined(__GNUC__) && !defined(__TI_COMPILER_VERSION__)
+
+union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;
+union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;
+union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
+
+#   define AV_RN(s, p) (((const union unaligned_##s *) (p))->l)
+#   define AV_WN(s, p, v) ((((union unaligned_##s *) (p))->l) = (v))
+
+#elif defined(__DECC)
+
+#   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
+#   define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))
+
+#elif AV_HAVE_FAST_UNALIGNED
+
+#   define AV_RN(s, p) (((const av_alias##s*)(p))->u##s)
+#   define AV_WN(s, p, v) (((av_alias##s*)(p))->u##s = (v))
+
+#else
+
+#ifndef AV_RB16
+#   define AV_RB16(x)                           \
+    ((((const uint8_t*)(x))[0] << 8) |          \
+      ((const uint8_t*)(x))[1])
+#endif
+#ifndef AV_WB16
+#   define AV_WB16(p, d) do {                   \
+        ((uint8_t*)(p))[1] = (d);               \
+        ((uint8_t*)(p))[0] = (d)>>8;            \
+    } while(0)
+#endif
+
+#ifndef AV_RL16
+#   define AV_RL16(x)                           \
+    ((((const uint8_t*)(x))[1] << 8) |          \
+      ((const uint8_t*)(x))[0])
+#endif
+#ifndef AV_WL16
+#   define AV_WL16(p, d) do {                   \
+        ((uint8_t*)(p))[0] = (d);               \
+        ((uint8_t*)(p))[1] = (d)>>8;            \
+    } while(0)
+#endif
+
+#ifndef AV_RB32
+#   define AV_RB32(x)                                \
+    (((uint32_t)((const uint8_t*)(x))[0] << 24) |    \
+               (((const uint8_t*)(x))[1] << 16) |    \
+               (((const uint8_t*)(x))[2] <<  8) |    \
+                ((const uint8_t*)(x))[3])
+#endif
+#ifndef AV_WB32
+#   define AV_WB32(p, d) do {                   \
+        ((uint8_t*)(p))[3] = (d);               \
+        ((uint8_t*)(p))[2] = (d)>>8;            \
+        ((uint8_t*)(p))[1] = (d)>>16;           \
+        ((uint8_t*)(p))[0] = (d)>>24;           \
+    } while(0)
+#endif
+
+#ifndef AV_RL32
+#   define AV_RL32(x)                                \
+    (((uint32_t)((const uint8_t*)(x))[3] << 24) |    \
+               (((const uint8_t*)(x))[2] << 16) |    \
+               (((const uint8_t*)(x))[1] <<  8) |    \
+                ((const uint8_t*)(x))[0])
+#endif
+#ifndef AV_WL32
+#   define AV_WL32(p, d) do {                   \
+        ((uint8_t*)(p))[0] = (d);               \
+        ((uint8_t*)(p))[1] = (d)>>8;            \
+        ((uint8_t*)(p))[2] = (d)>>16;           \
+        ((uint8_t*)(p))[3] = (d)>>24;           \
+    } while(0)
+#endif
+
+#ifndef AV_RB64
+#   define AV_RB64(x)                                   \
+    (((uint64_t)((const uint8_t*)(x))[0] << 56) |       \
+     ((uint64_t)((const uint8_t*)(x))[1] << 48) |       \
+     ((uint64_t)((const uint8_t*)(x))[2] << 40) |       \
+     ((uint64_t)((const uint8_t*)(x))[3] << 32) |       \
+     ((uint64_t)((const uint8_t*)(x))[4] << 24) |       \
+     ((uint64_t)((const uint8_t*)(x))[5] << 16) |       \
+     ((uint64_t)((const uint8_t*)(x))[6] <<  8) |       \
+      (uint64_t)((const uint8_t*)(x))[7])
+#endif
+#ifndef AV_WB64
+#   define AV_WB64(p, d) do {                   \
+        ((uint8_t*)(p))[7] = (d);               \
+        ((uint8_t*)(p))[6] = (d)>>8;            \
+        ((uint8_t*)(p))[5] = (d)>>16;           \
+        ((uint8_t*)(p))[4] = (d)>>24;           \
+        ((uint8_t*)(p))[3] = (d)>>32;           \
+        ((uint8_t*)(p))[2] = (d)>>40;           \
+        ((uint8_t*)(p))[1] = (d)>>48;           \
+        ((uint8_t*)(p))[0] = (d)>>56;           \
+    } while(0)
+#endif
+
+#ifndef AV_RL64
+#   define AV_RL64(x)                                   \
+    (((uint64_t)((const uint8_t*)(x))[7] << 56) |       \
+     ((uint64_t)((const uint8_t*)(x))[6] << 48) |       \
+     ((uint64_t)((const uint8_t*)(x))[5] << 40) |       \
+     ((uint64_t)((const uint8_t*)(x))[4] << 32) |       \
+     ((uint64_t)((const uint8_t*)(x))[3] << 24) |       \
+     ((uint64_t)((const uint8_t*)(x))[2] << 16) |       \
+     ((uint64_t)((const uint8_t*)(x))[1] <<  8) |       \
+      (uint64_t)((const uint8_t*)(x))[0])
+#endif
+#ifndef AV_WL64
+#   define AV_WL64(p, d) do {                   \
+        ((uint8_t*)(p))[0] = (d);               \
+        ((uint8_t*)(p))[1] = (d)>>8;            \
+        ((uint8_t*)(p))[2] = (d)>>16;           \
+        ((uint8_t*)(p))[3] = (d)>>24;           \
+        ((uint8_t*)(p))[4] = (d)>>32;           \
+        ((uint8_t*)(p))[5] = (d)>>40;           \
+        ((uint8_t*)(p))[6] = (d)>>48;           \
+        ((uint8_t*)(p))[7] = (d)>>56;           \
+    } while(0)
+#endif
+
+#if AV_HAVE_BIGENDIAN
+#   define AV_RN(s, p)    AV_RB##s(p)
+#   define AV_WN(s, p, v) AV_WB##s(p, v)
+#else
+#   define AV_RN(s, p)    AV_RL##s(p)
+#   define AV_WN(s, p, v) AV_WL##s(p, v)
+#endif
+
+#endif /* HAVE_FAST_UNALIGNED */
+
+#ifndef AV_RN16
+#   define AV_RN16(p) AV_RN(16, p)
+#endif
+
+#ifndef AV_RN32
+#   define AV_RN32(p) AV_RN(32, p)
+#endif
+
+#ifndef AV_RN64
+#   define AV_RN64(p) AV_RN(64, p)
+#endif
+
+#ifndef AV_WN16
+#   define AV_WN16(p, v) AV_WN(16, p, v)
+#endif
+
+#ifndef AV_WN32
+#   define AV_WN32(p, v) AV_WN(32, p, v)
+#endif
+
+#ifndef AV_WN64
+#   define AV_WN64(p, v) AV_WN(64, p, v)
+#endif
+
+#if AV_HAVE_BIGENDIAN
+#   define AV_RB(s, p)    AV_RN##s(p)
+#   define AV_WB(s, p, v) AV_WN##s(p, v)
+#   define AV_RL(s, p)    av_bswap##s(AV_RN##s(p))
+#   define AV_WL(s, p, v) AV_WN##s(p, av_bswap##s(v))
+#else
+#   define AV_RB(s, p)    av_bswap##s(AV_RN##s(p))
+#   define AV_WB(s, p, v) AV_WN##s(p, av_bswap##s(v))
+#   define AV_RL(s, p)    AV_RN##s(p)
+#   define AV_WL(s, p, v) AV_WN##s(p, v)
+#endif
+
+#define AV_RB8(x)     (((const uint8_t*)(x))[0])
+#define AV_WB8(p, d)  do { ((uint8_t*)(p))[0] = (d); } while(0)
+
+#define AV_RL8(x)     AV_RB8(x)
+#define AV_WL8(p, d)  AV_WB8(p, d)
+
+#ifndef AV_RB16
+#   define AV_RB16(p)    AV_RB(16, p)
+#endif
+#ifndef AV_WB16
+#   define AV_WB16(p, v) AV_WB(16, p, v)
+#endif
+
+#ifndef AV_RL16
+#   define AV_RL16(p)    AV_RL(16, p)
+#endif
+#ifndef AV_WL16
+#   define AV_WL16(p, v) AV_WL(16, p, v)
+#endif
+
+#ifndef AV_RB32
+#   define AV_RB32(p)    AV_RB(32, p)
+#endif
+#ifndef AV_WB32
+#   define AV_WB32(p, v) AV_WB(32, p, v)
+#endif
+
+#ifndef AV_RL32
+#   define AV_RL32(p)    AV_RL(32, p)
+#endif
+#ifndef AV_WL32
+#   define AV_WL32(p, v) AV_WL(32, p, v)
+#endif
+
+#ifndef AV_RB64
+#   define AV_RB64(p)    AV_RB(64, p)
+#endif
+#ifndef AV_WB64
+#   define AV_WB64(p, v) AV_WB(64, p, v)
+#endif
+
+#ifndef AV_RL64
+#   define AV_RL64(p)    AV_RL(64, p)
+#endif
+#ifndef AV_WL64
+#   define AV_WL64(p, v) AV_WL(64, p, v)
+#endif
+
+#ifndef AV_RB24
+#   define AV_RB24(x)                           \
+    ((((const uint8_t*)(x))[0] << 16) |         \
+     (((const uint8_t*)(x))[1] <<  8) |         \
+      ((const uint8_t*)(x))[2])
+#endif
+#ifndef AV_WB24
+#   define AV_WB24(p, d) do {                   \
+        ((uint8_t*)(p))[2] = (d);               \
+        ((uint8_t*)(p))[1] = (d)>>8;            \
+        ((uint8_t*)(p))[0] = (d)>>16;           \
+    } while(0)
+#endif
+
+#ifndef AV_RL24
+#   define AV_RL24(x)                           \
+    ((((const uint8_t*)(x))[2] << 16) |         \
+     (((const uint8_t*)(x))[1] <<  8) |         \
+      ((const uint8_t*)(x))[0])
+#endif
+#ifndef AV_WL24
+#   define AV_WL24(p, d) do {                   \
+        ((uint8_t*)(p))[0] = (d);               \
+        ((uint8_t*)(p))[1] = (d)>>8;            \
+        ((uint8_t*)(p))[2] = (d)>>16;           \
+    } while(0)
+#endif
+
+/*
+ * The AV_[RW]NA macros access naturally aligned data
+ * in a type-safe way.
+ */
+
+#define AV_RNA(s, p)    (((const av_alias##s*)(p))->u##s)
+#define AV_WNA(s, p, v) (((av_alias##s*)(p))->u##s = (v))
+
+#ifndef AV_RN16A
+#   define AV_RN16A(p) AV_RNA(16, p)
+#endif
+
+#ifndef AV_RN32A
+#   define AV_RN32A(p) AV_RNA(32, p)
+#endif
+
+#ifndef AV_RN64A
+#   define AV_RN64A(p) AV_RNA(64, p)
+#endif
+
+#ifndef AV_WN16A
+#   define AV_WN16A(p, v) AV_WNA(16, p, v)
+#endif
+
+#ifndef AV_WN32A
+#   define AV_WN32A(p, v) AV_WNA(32, p, v)
+#endif
+
+#ifndef AV_WN64A
+#   define AV_WN64A(p, v) AV_WNA(64, p, v)
+#endif
+
+/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be
+ * naturally aligned. They may be implemented using MMX,
+ * so emms_c() must be called before using any float code
+ * afterwards.
+ */
+
+#define AV_COPY(n, d, s) \
+    (((av_alias##n*)(d))->u##n = ((const av_alias##n*)(s))->u##n)
+
+#ifndef AV_COPY16
+#   define AV_COPY16(d, s) AV_COPY(16, d, s)
+#endif
+
+#ifndef AV_COPY32
+#   define AV_COPY32(d, s) AV_COPY(32, d, s)
+#endif
+
+#ifndef AV_COPY64
+#   define AV_COPY64(d, s) AV_COPY(64, d, s)
+#endif
+
+#ifndef AV_COPY128
+#   define AV_COPY128(d, s)                    \
+    do {                                       \
+        AV_COPY64(d, s);                       \
+        AV_COPY64((char*)(d)+8, (char*)(s)+8); \
+    } while(0)
+#endif
+
+#define AV_SWAP(n, a, b) FFSWAP(av_alias##n, *(av_alias##n*)(a), *(av_alias##n*)(b))
+
+#ifndef AV_SWAP64
+#   define AV_SWAP64(a, b) AV_SWAP(64, a, b)
+#endif
+
+#define AV_ZERO(n, d) (((av_alias##n*)(d))->u##n = 0)
+
+#ifndef AV_ZERO16
+#   define AV_ZERO16(d) AV_ZERO(16, d)
+#endif
+
+#ifndef AV_ZERO32
+#   define AV_ZERO32(d) AV_ZERO(32, d)
+#endif
+
+#ifndef AV_ZERO64
+#   define AV_ZERO64(d) AV_ZERO(64, d)
+#endif
+
+#ifndef AV_ZERO128
+#   define AV_ZERO128(d)         \
+    do {                         \
+        AV_ZERO64(d);            \
+        AV_ZERO64((char*)(d)+8); \
+    } while(0)
+#endif
+
+#endif /* AVUTIL_INTREADWRITE_H */
diff --git a/ffmpeg 0.8/include/libavutil/lfg.h b/ffmpeg 0.8/include/libavutil/lfg.h
new file mode 100644 (file)
index 0000000..854ffce
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Lagged Fibonacci PRNG
+ * Copyright (c) 2008 Michael Niedermayer
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_LFG_H
+#define AVUTIL_LFG_H
+
+typedef struct {
+    unsigned int state[64];
+    int index;
+} AVLFG;
+
+void av_lfg_init(AVLFG *c, unsigned int seed);
+
+/**
+ * Get the next random unsigned 32-bit number using an ALFG.
+ *
+ * Please also consider a simple LCG like state= state*1664525+1013904223,
+ * it may be good enough and faster for your specific use case.
+ */
+static inline unsigned int av_lfg_get(AVLFG *c){
+    c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
+    return c->state[c->index++ & 63];
+}
+
+/**
+ * Get the next random unsigned 32-bit number using a MLFG.
+ *
+ * Please also consider av_lfg_get() above, it is faster.
+ */
+static inline unsigned int av_mlfg_get(AVLFG *c){
+    unsigned int a= c->state[(c->index-55) & 63];
+    unsigned int b= c->state[(c->index-24) & 63];
+    return c->state[c->index++ & 63] = 2*a*b+a+b;
+}
+
+/**
+ * Get the next two numbers generated by a Box-Muller Gaussian
+ * generator using the random numbers issued by lfg.
+ *
+ * @param out array where the two generated numbers are placed
+ */
+void av_bmg_get(AVLFG *lfg, double out[2]);
+
+#endif /* AVUTIL_LFG_H */
diff --git a/ffmpeg 0.8/include/libavutil/log.h b/ffmpeg 0.8/include/libavutil/log.h
new file mode 100644 (file)
index 0000000..046d199
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_LOG_H
+#define AVUTIL_LOG_H
+
+#include <stdarg.h>
+#include "avutil.h"
+#include "attributes.h"
+
+/**
+ * Describe the class of an AVClass context structure. That is an
+ * arbitrary struct of which the first field is a pointer to an
+ * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
+ */
+typedef struct {
+    /**
+     * The name of the class; usually it is the same name as the
+     * context structure type to which the AVClass is associated.
+     */
+    const char* class_name;
+
+    /**
+     * A pointer to a function which returns the name of a context
+     * instance ctx associated with the class.
+     */
+    const char* (*item_name)(void* ctx);
+
+    /**
+     * a pointer to the first option specified in the class if any or NULL
+     *
+     * @see av_set_default_options()
+     */
+    const struct AVOption *option;
+
+    /**
+     * LIBAVUTIL_VERSION with which this structure was created.
+     * This is used to allow fields to be added without requiring major
+     * version bumps everywhere.
+     */
+
+    int version;
+
+    /**
+     * Offset in the structure where log_level_offset is stored.
+     * 0 means there is no such variable
+     */
+    int log_level_offset_offset;
+
+    /**
+     * Offset in the structure where a pointer to the parent context for loging is stored.
+     * for example a decoder that uses eval.c could pass its AVCodecContext to eval as such
+     * parent context. And a av_log() implementation could then display the parent context
+     * can be NULL of course
+     */
+    int parent_log_context_offset;
+
+    /**
+     * A function for extended searching, e.g. in possible
+     * children objects.
+     */
+    const struct AVOption* (*opt_find)(void *obj, const char *name, const char *unit,
+                                       int opt_flags, int search_flags);
+} AVClass;
+
+/* av_log API */
+
+#define AV_LOG_QUIET    -8
+
+/**
+ * Something went really wrong and we will crash now.
+ */
+#define AV_LOG_PANIC     0
+
+/**
+ * Something went wrong and recovery is not possible.
+ * For example, no header was found for a format which depends
+ * on headers or an illegal combination of parameters is used.
+ */
+#define AV_LOG_FATAL     8
+
+/**
+ * Something went wrong and cannot losslessly be recovered.
+ * However, not all future data is affected.
+ */
+#define AV_LOG_ERROR    16
+
+/**
+ * Something somehow does not look correct. This may or may not
+ * lead to problems. An example would be the use of '-vstrict -2'.
+ */
+#define AV_LOG_WARNING  24
+
+#define AV_LOG_INFO     32
+#define AV_LOG_VERBOSE  40
+
+/**
+ * Stuff which is only useful for libav* developers.
+ */
+#define AV_LOG_DEBUG    48
+
+/**
+ * Send the specified message to the log if the level is less than or equal
+ * to the current av_log_level. By default, all logging messages are sent to
+ * stderr. This behavior can be altered by setting a different av_vlog callback
+ * function.
+ *
+ * @param avcl A pointer to an arbitrary struct of which the first field is a
+ * pointer to an AVClass struct.
+ * @param level The importance level of the message, lower values signifying
+ * higher importance.
+ * @param fmt The format string (printf-compatible) that specifies how
+ * subsequent arguments are converted to output.
+ * @see av_vlog
+ */
+void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
+
+void av_vlog(void *avcl, int level, const char *fmt, va_list);
+int av_log_get_level(void);
+void av_log_set_level(int);
+void av_log_set_callback(void (*)(void*, int, const char*, va_list));
+void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
+const char* av_default_item_name(void* ctx);
+
+/**
+ * av_dlog macros
+ * Useful to print debug messages that shouldn't get compiled in normally.
+ */
+
+#ifdef DEBUG
+#    define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
+#else
+#    define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
+#endif
+
+/**
+ * Skip repeated messages, this requires the user app to use av_log() instead of
+ * (f)printf as the 2 would otherwise interfere and lead to
+ * "Last message repeated x times" messages below (f)printf messages with some
+ * bad luck.
+ * Also to receive the last, "last repeated" line if any, the user app must
+ * call av_log(NULL, AV_LOG_QUIET, "%s", ""); at the end
+ */
+#define AV_LOG_SKIP_REPEATED 1
+void av_log_set_flags(int arg);
+
+#endif /* AVUTIL_LOG_H */
diff --git a/ffmpeg 0.8/include/libavutil/lzo.h b/ffmpeg 0.8/include/libavutil/lzo.h
new file mode 100644 (file)
index 0000000..ae5fc53
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * LZO 1x decompression
+ * copyright (c) 2006 Reimar Doeffinger
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_LZO_H
+#define AVUTIL_LZO_H
+
+#include <stdint.h>
+
+/** @name Error flags returned by av_lzo1x_decode
+  * \{ */
+//! end of the input buffer reached before decoding finished
+#define AV_LZO_INPUT_DEPLETED 1
+//! decoded data did not fit into output buffer
+#define AV_LZO_OUTPUT_FULL 2
+//! a reference to previously decoded data was wrong
+#define AV_LZO_INVALID_BACKPTR 4
+//! a non-specific error in the compressed bitstream
+#define AV_LZO_ERROR 8
+/** \} */
+
+#define AV_LZO_INPUT_PADDING 8
+#define AV_LZO_OUTPUT_PADDING 12
+
+/**
+ * @brief Decodes LZO 1x compressed data.
+ * @param out output buffer
+ * @param outlen size of output buffer, number of bytes left are returned here
+ * @param in input buffer
+ * @param inlen size of input buffer, number of bytes left are returned here
+ * @return 0 on success, otherwise a combination of the error flags above
+ *
+ * Make sure all buffers are appropriately padded, in must provide
+ * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
+ */
+int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
+
+/**
+ * @brief deliberately overlapping memcpy implementation
+ * @param dst destination buffer; must be padded with 12 additional bytes
+ * @param back how many bytes back we start (the initial size of the overlapping window)
+ * @param cnt number of bytes to copy, must be >= 0
+ *
+ * cnt > back is valid, this will copy the bytes we just copied,
+ * thus creating a repeating pattern with a period length of back.
+ */
+void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
+
+#endif /* AVUTIL_LZO_H */
diff --git a/ffmpeg 0.8/include/libavutil/mathematics.h b/ffmpeg 0.8/include/libavutil/mathematics.h
new file mode 100644 (file)
index 0000000..882a516
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_MATHEMATICS_H
+#define AVUTIL_MATHEMATICS_H
+
+#include <stdint.h>
+#include <math.h>
+#include "attributes.h"
+#include "rational.h"
+
+#ifndef M_E
+#define M_E            2.7182818284590452354   /* e */
+#endif
+#ifndef M_LN2
+#define M_LN2          0.69314718055994530942  /* log_e 2 */
+#endif
+#ifndef M_LN10
+#define M_LN10         2.30258509299404568402  /* log_e 10 */
+#endif
+#ifndef M_LOG2_10
+#define M_LOG2_10      3.32192809488736234787  /* log_2 10 */
+#endif
+#ifndef M_PHI
+#define M_PHI          1.61803398874989484820   /* phi / golden ratio */
+#endif
+#ifndef M_PI
+#define M_PI           3.14159265358979323846  /* pi */
+#endif
+#ifndef M_SQRT1_2
+#define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
+#endif
+#ifndef M_SQRT2
+#define M_SQRT2        1.41421356237309504880  /* sqrt(2) */
+#endif
+#ifndef NAN
+#define NAN            (0.0/0.0)
+#endif
+#ifndef INFINITY
+#define INFINITY       (1.0/0.0)
+#endif
+
+enum AVRounding {
+    AV_ROUND_ZERO     = 0, ///< Round toward zero.
+    AV_ROUND_INF      = 1, ///< Round away from zero.
+    AV_ROUND_DOWN     = 2, ///< Round toward -infinity.
+    AV_ROUND_UP       = 3, ///< Round toward +infinity.
+    AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.
+};
+
+/**
+ * Return the greatest common divisor of a and b.
+ * If both a and b are 0 or either or both are <0 then behavior is
+ * undefined.
+ */
+int64_t av_const av_gcd(int64_t a, int64_t b);
+
+/**
+ * Rescale a 64-bit integer with rounding to nearest.
+ * A simple a*b/c isn't possible as it can overflow.
+ */
+int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
+
+/**
+ * Rescale a 64-bit integer with specified rounding.
+ * A simple a*b/c isn't possible as it can overflow.
+ */
+int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const;
+
+/**
+ * Rescale a 64-bit integer by 2 rational numbers.
+ */
+int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
+
+/**
+ * Compare 2 timestamps each in its own timebases.
+ * The result of the function is undefined if one of the timestamps
+ * is outside the int64_t range when represented in the others timebase.
+ * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position
+ */
+int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
+
+/**
+ * Compare 2 integers modulo mod.
+ * That is we compare integers a and b for which only the least
+ * significant log2(mod) bits are known.
+ *
+ * @param mod must be a power of 2
+ * @return a negative value if a is smaller than b
+ *         a positive value if a is greater than b
+ *         0                if a equals          b
+ */
+int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
+
+#endif /* AVUTIL_MATHEMATICS_H */
diff --git a/ffmpeg 0.8/include/libavutil/md5.h b/ffmpeg 0.8/include/libavutil/md5.h
new file mode 100644 (file)
index 0000000..969202a
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_MD5_H
+#define AVUTIL_MD5_H
+
+#include <stdint.h>
+
+extern const int av_md5_size;
+
+struct AVMD5;
+
+void av_md5_init(struct AVMD5 *ctx);
+void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, const int len);
+void av_md5_final(struct AVMD5 *ctx, uint8_t *dst);
+void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);
+
+#endif /* AVUTIL_MD5_H */
+
diff --git a/ffmpeg 0.8/include/libavutil/mem.h b/ffmpeg 0.8/include/libavutil/mem.h
new file mode 100644 (file)
index 0000000..8fdf5b3
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * memory handling functions
+ */
+
+#ifndef AVUTIL_MEM_H
+#define AVUTIL_MEM_H
+
+#include "attributes.h"
+#include "avutil.h"
+
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
+    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
+#elif defined(__TI_COMPILER_VERSION__)
+    #define DECLARE_ALIGNED(n,t,v)                      \
+        AV_PRAGMA(DATA_ALIGN(v,n))                      \
+        t __attribute__((aligned(n))) v
+    #define DECLARE_ASM_CONST(n,t,v)                    \
+        AV_PRAGMA(DATA_ALIGN(v,n))                      \
+        static const t __attribute__((aligned(n))) v
+#elif defined(__GNUC__)
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v
+#elif defined(_MSC_VER)
+    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
+    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v
+#else
+    #define DECLARE_ALIGNED(n,t,v)      t v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t v
+#endif
+
+#if AV_GCC_VERSION_AT_LEAST(3,1)
+    #define av_malloc_attrib __attribute__((__malloc__))
+#else
+    #define av_malloc_attrib
+#endif
+
+#if AV_GCC_VERSION_AT_LEAST(4,3)
+    #define av_alloc_size(n) __attribute__((alloc_size(n)))
+#else
+    #define av_alloc_size(n)
+#endif
+
+/**
+ * Allocate a block of size bytes with alignment suitable for all
+ * memory accesses (including vectors if available on the CPU).
+ * @param size Size in bytes for the memory block to be allocated.
+ * @return Pointer to the allocated block, NULL if the block cannot
+ * be allocated.
+ * @see av_mallocz()
+ */
+void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1);
+
+/**
+ * Allocate or reallocate a block of memory.
+ * If ptr is NULL and size > 0, allocate a new block. If
+ * size is zero, free the memory block pointed to by ptr.
+ * @param ptr Pointer to a memory block already allocated with
+ * av_malloc(z)() or av_realloc() or NULL.
+ * @param size Size in bytes for the memory block to be allocated or
+ * reallocated.
+ * @return Pointer to a newly reallocated block or NULL if the block
+ * cannot be reallocated or the function is used to free the memory block.
+ * @see av_fast_realloc()
+ */
+void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
+
+/**
+ * Free a memory block which has been allocated with av_malloc(z)() or
+ * av_realloc().
+ * @param ptr Pointer to the memory block which should be freed.
+ * @note ptr = NULL is explicitly allowed.
+ * @note It is recommended that you use av_freep() instead.
+ * @see av_freep()
+ */
+void av_free(void *ptr);
+
+/**
+ * Allocate a block of size bytes with alignment suitable for all
+ * memory accesses (including vectors if available on the CPU) and
+ * zero all the bytes of the block.
+ * @param size Size in bytes for the memory block to be allocated.
+ * @return Pointer to the allocated block, NULL if it cannot be allocated.
+ * @see av_malloc()
+ */
+void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
+
+/**
+ * Duplicate the string s.
+ * @param s string to be duplicated
+ * @return Pointer to a newly allocated string containing a
+ * copy of s or NULL if the string cannot be allocated.
+ */
+char *av_strdup(const char *s) av_malloc_attrib;
+
+/**
+ * Free a memory block which has been allocated with av_malloc(z)() or
+ * av_realloc() and set the pointer pointing to it to NULL.
+ * @param ptr Pointer to the pointer to the memory block which should
+ * be freed.
+ * @see av_free()
+ */
+void av_freep(void *ptr);
+
+/**
+ * Add an element to a dynamic array.
+ *
+ * @param tab_ptr Pointer to the array.
+ * @param nb_ptr  Pointer to the number of elements in the array.
+ * @param elem    Element to be added.
+ */
+void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
+
+#endif /* AVUTIL_MEM_H */
diff --git a/ffmpeg 0.8/include/libavutil/opt.h b/ffmpeg 0.8/include/libavutil/opt.h
new file mode 100644 (file)
index 0000000..68873de
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * AVOptions
+ * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_OPT_H
+#define AVUTIL_OPT_H
+
+/**
+ * @file
+ * AVOptions
+ */
+
+#include "rational.h"
+#include "avutil.h"
+#include "dict.h"
+
+enum AVOptionType{
+    FF_OPT_TYPE_FLAGS,
+    FF_OPT_TYPE_INT,
+    FF_OPT_TYPE_INT64,
+    FF_OPT_TYPE_DOUBLE,
+    FF_OPT_TYPE_FLOAT,
+    FF_OPT_TYPE_STRING,
+    FF_OPT_TYPE_RATIONAL,
+    FF_OPT_TYPE_BINARY,  ///< offset must point to a pointer immediately followed by an int for the length
+    FF_OPT_TYPE_CONST=128,
+};
+
+/**
+ * AVOption
+ */
+typedef struct AVOption {
+    const char *name;
+
+    /**
+     * short English help text
+     * @todo What about other languages?
+     */
+    const char *help;
+
+    /**
+     * The offset relative to the context structure where the option
+     * value is stored. It should be 0 for named constants.
+     */
+    int offset;
+    enum AVOptionType type;
+
+    /**
+     * the default value for scalar options
+     */
+    union {
+        double dbl;
+        const char *str;
+        /* TODO those are unused now */
+        int64_t i64;
+        AVRational q;
+    } default_val;
+    double min;                 ///< minimum valid value for the option
+    double max;                 ///< maximum valid value for the option
+
+    int flags;
+#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding
+#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding
+#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...
+#define AV_OPT_FLAG_AUDIO_PARAM     8
+#define AV_OPT_FLAG_VIDEO_PARAM     16
+#define AV_OPT_FLAG_SUBTITLE_PARAM  32
+//FIXME think about enc-audio, ... style flags
+
+    /**
+     * The logical unit to which the option belongs. Non-constant
+     * options and corresponding named constants share the same
+     * unit. May be NULL.
+     */
+    const char *unit;
+} AVOption;
+
+#if FF_API_FIND_OPT
+/**
+ * Look for an option in obj. Look only for the options which
+ * have the flags set as specified in mask and flags (that is,
+ * for which it is the case that opt->flags & mask == flags).
+ *
+ * @param[in] obj a pointer to a struct whose first element is a
+ * pointer to an AVClass
+ * @param[in] name the name of the option to look for
+ * @param[in] unit the unit of the option to look for, or any if NULL
+ * @return a pointer to the option found, or NULL if no option
+ * has been found
+ *
+ * @deprecated use av_opt_find.
+ */
+attribute_deprecated
+const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
+#endif
+
+/**
+ * Set the field of obj with the given name to value.
+ *
+ * @param[in] obj A struct whose first element is a pointer to an
+ * AVClass.
+ * @param[in] name the name of the field to set
+ * @param[in] val The value to set. If the field is not of a string
+ * type, then the given string is parsed.
+ * SI postfixes and some named scalars are supported.
+ * If the field is of a numeric type, it has to be a numeric or named
+ * scalar. Behavior with more than one scalar and +- infix operators
+ * is undefined.
+ * If the field is of a flags type, it has to be a sequence of numeric
+ * scalars or named flags separated by '+' or '-'. Prefixing a flag
+ * with '+' causes it to be set without affecting the other flags;
+ * similarly, '-' unsets a flag.
+ * @param[out] o_out if non-NULL put here a pointer to the AVOption
+ * found
+ * @param alloc when 1 then the old value will be av_freed() and the
+ *                     new av_strduped()
+ *              when 0 then no av_free() nor av_strdup() will be used
+ * @return 0 if the value has been set, or an AVERROR code in case of
+ * error:
+ * AVERROR(ENOENT) if no matching option exists
+ * AVERROR(ERANGE) if the value is out of range
+ * AVERROR(EINVAL) if the value is not valid
+ */
+int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out);
+
+const AVOption *av_set_double(void *obj, const char *name, double n);
+const AVOption *av_set_q(void *obj, const char *name, AVRational n);
+const AVOption *av_set_int(void *obj, const char *name, int64_t n);
+double av_get_double(void *obj, const char *name, const AVOption **o_out);
+AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
+int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
+const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
+const AVOption *av_next_option(void *obj, const AVOption *last);
+
+/**
+ * Show the obj options.
+ *
+ * @param req_flags requested flags for the options to show. Show only the
+ * options for which it is opt->flags & req_flags.
+ * @param rej_flags rejected flags for the options to show. Show only the
+ * options for which it is !(opt->flags & req_flags).
+ * @param av_log_obj log context to use for showing the options
+ */
+int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
+
+void av_opt_set_defaults(void *s);
+void av_opt_set_defaults2(void *s, int mask, int flags);
+
+/**
+ * Parse the key/value pairs list in opts. For each key/value pair
+ * found, stores the value in the field in ctx that is named like the
+ * key. ctx must be an AVClass context, storing is done using
+ * AVOptions.
+ *
+ * @param opts options string to parse, may be NULL
+ * @param key_val_sep a 0-terminated list of characters used to
+ * separate key from value
+ * @param pairs_sep a 0-terminated list of characters used to separate
+ * two pairs from each other
+ * @return the number of successfully set key/value pairs, or a negative
+ * value corresponding to an AVERROR code in case of error:
+ * AVERROR(EINVAL) if opts cannot be parsed,
+ * the error code issued by av_set_string3() if a key/value pair
+ * cannot be set
+ */
+int av_set_options_string(void *ctx, const char *opts,
+                          const char *key_val_sep, const char *pairs_sep);
+
+/**
+ * Free all string and binary options in obj.
+ */
+void av_opt_free(void *obj);
+
+/**
+ * Check whether a particular flag is set in a flags field.
+ *
+ * @param field_name the name of the flag field option
+ * @param flag_name the name of the flag to check
+ * @return non-zero if the flag is set, zero if the flag isn't set,
+ *         isn't of the right type, or the flags field doesn't exist.
+ */
+int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name);
+
+/*
+ * Set all the options from a given dictionary on an object.
+ *
+ * @param obj a struct whose first element is a pointer to AVClass
+ * @param options options to process. This dictionary will be freed and replaced
+ *                by a new one containing all options not found in obj.
+ *                Of course this new dictionary needs to be freed by caller
+ *                with av_dict_free().
+ *
+ * @return 0 on success, a negative AVERROR if some option was found in obj,
+ *         but could not be set.
+ *
+ * @see av_dict_copy()
+ */
+int av_opt_set_dict(void *obj, struct AVDictionary **options);
+
+#define AV_OPT_SEARCH_CHILDREN   0x0001 /**< Search in possible children of the
+                                             given object first. */
+
+/**
+ * Look for an option in an object. Consider only options which
+ * have all the specified flags set.
+ *
+ * @param[in] obj A pointer to a struct whose first element is a
+ *                pointer to an AVClass.
+ * @param[in] name The name of the option to look for.
+ * @param[in] unit When searching for named constants, name of the unit
+ *                 it belongs to.
+ * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).
+ * @param search_flags A combination of AV_OPT_SEARCH_*.
+ *
+ * @return A pointer to the option found, or NULL if no option
+ *         was found.
+ *
+ * @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable
+ * directly with av_set_string3(). Use special calls which take an options
+ * AVDictionary (e.g. avformat_open_input()) to set options found with this
+ * flag.
+ */
+const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
+                            int opt_flags, int search_flags);
+
+#endif /* AVUTIL_OPT_H */
diff --git a/ffmpeg 0.8/include/libavutil/parseutils.h b/ffmpeg 0.8/include/libavutil/parseutils.h
new file mode 100644 (file)
index 0000000..dfaec5e
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_PARSEUTILS_H
+#define AVUTIL_PARSEUTILS_H
+
+#include "rational.h"
+
+/**
+ * @file
+ * misc parsing utilities
+ */
+
+/**
+ * Parse str and put in width_ptr and height_ptr the detected values.
+ *
+ * @param[in,out] width_ptr pointer to the variable which will contain the detected
+ * width value
+ * @param[in,out] height_ptr pointer to the variable which will contain the detected
+ * height value
+ * @param[in] str the string to parse: it has to be a string in the format
+ * width x height or a valid video size abbreviation.
+ * @return >= 0 on success, a negative error code otherwise
+ */
+int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str);
+
+/**
+ * Parse str and store the detected values in *rate.
+ *
+ * @param[in,out] rate pointer to the AVRational which will contain the detected
+ * frame rate
+ * @param[in] str the string to parse: it has to be a string in the format
+ * rate_num / rate_den, a float number or a valid video rate abbreviation
+ * @return >= 0 on success, a negative error code otherwise
+ */
+int av_parse_video_rate(AVRational *rate, const char *str);
+
+/**
+ * Put the RGBA values that correspond to color_string in rgba_color.
+ *
+ * @param color_string a string specifying a color. It can be the name of
+ * a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence,
+ * possibly followed by "@" and a string representing the alpha
+ * component.
+ * The alpha component may be a string composed by "0x" followed by an
+ * hexadecimal number or a decimal number between 0.0 and 1.0, which
+ * represents the opacity value (0x00/0.0 means completely transparent,
+ * 0xff/1.0 completely opaque).
+ * If the alpha component is not specified then 0xff is assumed.
+ * The string "random" will result in a random color.
+ * @param slen length of the initial part of color_string containing the
+ * color. It can be set to -1 if color_string is a null terminated string
+ * containing nothing else than the color.
+ * @return >= 0 in case of success, a negative value in case of
+ * failure (for example if color_string cannot be parsed).
+ */
+int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
+                   void *log_ctx);
+
+/**
+ * Parses timestr and returns in *time a corresponding number of
+ * microseconds.
+ *
+ * @param timeval puts here the number of microseconds corresponding
+ * to the string in timestr. If the string represents a duration, it
+ * is the number of microseconds contained in the time interval.  If
+ * the string is a date, is the number of microseconds since 1st of
+ * January, 1970 up to the time of the parsed date.  If timestr cannot
+ * be successfully parsed, set *time to INT64_MIN.
+
+ * @param timestr a string representing a date or a duration.
+ * - If a date the syntax is:
+ * @code
+ * [{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH[:MM[:SS[.m...]]]}|{HH[MM[SS[.m...]]]}}[Z]
+ * now
+ * @endcode
+ * If the value is "now" it takes the current time.
+ * Time is local time unless Z is appended, in which case it is
+ * interpreted as UTC.
+ * If the year-month-day part is not specified it takes the current
+ * year-month-day.
+ * - If a duration the syntax is:
+ * @code
+ * [-]HH[:MM[:SS[.m...]]]
+ * [-]S+[.m...]
+ * @endcode
+ * @param duration flag which tells how to interpret timestr, if not
+ * zero timestr is interpreted as a duration, otherwise as a date
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+int av_parse_time(int64_t *timeval, const char *timestr, int duration);
+
+/**
+ * Attempt to find a specific tag in a URL.
+ *
+ * syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done.
+ * Return 1 if found.
+ */
+int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
+
+#endif /* AVUTIL_PARSEUTILS_H */
diff --git a/ffmpeg 0.8/include/libavutil/pixdesc.h b/ffmpeg 0.8/include/libavutil/pixdesc.h
new file mode 100644 (file)
index 0000000..f0de998
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * pixel format descriptor
+ * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_PIXDESC_H
+#define AVUTIL_PIXDESC_H
+
+#include <inttypes.h>
+#include "pixfmt.h"
+
+typedef struct AVComponentDescriptor{
+    uint16_t plane        :2;            ///< which of the 4 planes contains the component
+
+    /**
+     * Number of elements between 2 horizontally consecutive pixels minus 1.
+     * Elements are bits for bitstream formats, bytes otherwise.
+     */
+    uint16_t step_minus1  :3;
+
+    /**
+     * Number of elements before the component of the first pixel plus 1.
+     * Elements are bits for bitstream formats, bytes otherwise.
+     */
+    uint16_t offset_plus1 :3;
+    uint16_t shift        :3;            ///< number of least significant bits that must be shifted away to get the value
+    uint16_t depth_minus1 :4;            ///< number of bits in the component minus 1
+}AVComponentDescriptor;
+
+/**
+ * Descriptor that unambiguously describes how the bits of a pixel are
+ * stored in the up to 4 data planes of an image. It also stores the
+ * subsampling factors and number of components.
+ *
+ * @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV
+ *       and all the YUV variants) AVPixFmtDescriptor just stores how values
+ *       are stored not what these values represent.
+ */
+typedef struct AVPixFmtDescriptor{
+    const char *name;
+    uint8_t nb_components;      ///< The number of components each pixel has, (1-4)
+
+    /**
+     * Amount to shift the luma width right to find the chroma width.
+     * For YV12 this is 1 for example.
+     * chroma_width = -((-luma_width) >> log2_chroma_w)
+     * The note above is needed to ensure rounding up.
+     * This value only refers to the chroma components.
+     */
+    uint8_t log2_chroma_w;      ///< chroma_width = -((-luma_width )>>log2_chroma_w)
+
+    /**
+     * Amount to shift the luma height right to find the chroma height.
+     * For YV12 this is 1 for example.
+     * chroma_height= -((-luma_height) >> log2_chroma_h)
+     * The note above is needed to ensure rounding up.
+     * This value only refers to the chroma components.
+     */
+    uint8_t log2_chroma_h;
+    uint8_t flags;
+
+    /**
+     * Parameters that describe how pixels are packed. If the format
+     * has chroma components, they must be stored in comp[1] and
+     * comp[2].
+     */
+    AVComponentDescriptor comp[4];
+}AVPixFmtDescriptor;
+
+#define PIX_FMT_BE        1 ///< Pixel format is big-endian.
+#define PIX_FMT_PAL       2 ///< Pixel format has a palette in data[1], values are indexes in this palette.
+#define PIX_FMT_BITSTREAM 4 ///< All values of a component are bit-wise packed end to end.
+#define PIX_FMT_HWACCEL   8 ///< Pixel format is an HW accelerated format.
+
+/**
+ * The array of all the pixel format descriptors.
+ */
+extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
+
+/**
+ * Read a line from an image, and write the values of the
+ * pixel format component c to dst.
+ *
+ * @param data the array containing the pointers to the planes of the image
+ * @param linesize the array containing the linesizes of the image
+ * @param desc the pixel format descriptor for the image
+ * @param x the horizontal coordinate of the first pixel to read
+ * @param y the vertical coordinate of the first pixel to read
+ * @param w the width of the line to read, that is the number of
+ * values to write to dst
+ * @param read_pal_component if not zero and the format is a paletted
+ * format writes the values corresponding to the palette
+ * component c in data[1] to dst, rather than the palette indexes in
+ * data[0]. The behavior is undefined if the format is not paletted.
+ */
+void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
+                        const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
+
+/**
+ * Write the values from src to the pixel format component c of an
+ * image line.
+ *
+ * @param src array containing the values to write
+ * @param data the array containing the pointers to the planes of the
+ * image to write into. It is supposed to be zeroed.
+ * @param linesize the array containing the linesizes of the image
+ * @param desc the pixel format descriptor for the image
+ * @param x the horizontal coordinate of the first pixel to write
+ * @param y the vertical coordinate of the first pixel to write
+ * @param w the width of the line to write, that is the number of
+ * values to write to the image line
+ */
+void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
+                         const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
+
+/**
+ * Return the pixel format corresponding to name.
+ *
+ * If there is no pixel format with name name, then looks for a
+ * pixel format with the name corresponding to the native endian
+ * format of name.
+ * For example in a little-endian system, first looks for "gray16",
+ * then for "gray16le".
+ *
+ * Finally if no pixel format has been found, returns PIX_FMT_NONE.
+ */
+enum PixelFormat av_get_pix_fmt(const char *name);
+
+/**
+ * Return the short name for a pixel format, NULL in case pix_fmt is
+ * unknown.
+ *
+ * @see av_get_pix_fmt(), av_get_pix_fmt_string()
+ */
+const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt);
+
+/**
+ * Print in buf the string corresponding to the pixel format with
+ * number pix_fmt, or an header if pix_fmt is negative.
+ *
+ * @param buf the buffer where to write the string
+ * @param buf_size the size of buf
+ * @param pix_fmt the number of the pixel format to print the
+ * corresponding info string, or a negative value to print the
+ * corresponding header.
+ */
+char *av_get_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
+
+/**
+ * Return the number of bits per pixel used by the pixel format
+ * described by pixdesc.
+ *
+ * The returned number of bits refers to the number of bits actually
+ * used for storing the pixel information, that is padding bits are
+ * not counted.
+ */
+int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
+
+#endif /* AVUTIL_PIXDESC_H */
diff --git a/ffmpeg 0.8/include/libavutil/pixfmt.h b/ffmpeg 0.8/include/libavutil/pixfmt.h
new file mode 100644 (file)
index 0000000..bac7b45
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_PIXFMT_H
+#define AVUTIL_PIXFMT_H
+
+/**
+ * @file
+ * pixel format definitions
+ *
+ * @warning This file has to be considered an internal but installed
+ * header, so it should not be directly included in your projects.
+ */
+
+#include "libavutil/avconfig.h"
+
+/**
+ * Pixel format. Notes:
+ *
+ * PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA
+ * color is put together as:
+ *  (A << 24) | (R << 16) | (G << 8) | B
+ * This is stored as BGRA on little-endian CPU architectures and ARGB on
+ * big-endian CPUs.
+ *
+ * When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized
+ * image data is stored in AVFrame.data[0]. The palette is transported in
+ * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is
+ * formatted the same as in PIX_FMT_RGB32 described above (i.e., it is
+ * also endian-specific). Note also that the individual RGB palette
+ * components stored in AVFrame.data[1] should be in the range 0..255.
+ * This is important as many custom PAL8 video codecs that were designed
+ * to run on the IBM VGA graphics adapter use 6-bit palette components.
+ *
+ * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like
+ * for pal8. This palette is filled in automatically by the function
+ * allocating the picture.
+ *
+ * Note, make sure that all newly added big endian formats have pix_fmt&1==1
+ *       and that all newly added little endian formats have pix_fmt&1==0
+ *       this allows simpler detection of big vs little endian.
+ */
+enum PixelFormat {
+    PIX_FMT_NONE= -1,
+    PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
+    PIX_FMT_YUYV422,   ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
+    PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...
+    PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
+    PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
+    PIX_FMT_YUV444P,   ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
+    PIX_FMT_YUV410P,   ///< planar YUV 4:1:0,  9bpp, (1 Cr & Cb sample per 4x4 Y samples)
+    PIX_FMT_YUV411P,   ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
+    PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
+    PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
+    PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
+    PIX_FMT_PAL8,      ///< 8 bit with PIX_FMT_RGB32 palette
+    PIX_FMT_YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV420P and setting color_range
+    PIX_FMT_YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_range
+    PIX_FMT_YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV444P and setting color_range
+    PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing
+    PIX_FMT_XVMC_MPEG2_IDCT,
+    PIX_FMT_UYVY422,   ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
+    PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
+    PIX_FMT_BGR8,      ///< packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb)
+    PIX_FMT_BGR4,      ///< packed RGB 1:2:1 bitstream,  4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
+    PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1B 2G 1R(lsb)
+    PIX_FMT_RGB8,      ///< packed RGB 3:3:2,  8bpp, (msb)2R 3G 3B(lsb)
+    PIX_FMT_RGB4,      ///< packed RGB 1:2:1 bitstream,  4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
+    PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1R 2G 1B(lsb)
+    PIX_FMT_NV12,      ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
+    PIX_FMT_NV21,      ///< as above, but U and V bytes are swapped
+
+    PIX_FMT_ARGB,      ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
+    PIX_FMT_RGBA,      ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
+    PIX_FMT_ABGR,      ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
+    PIX_FMT_BGRA,      ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
+
+    PIX_FMT_GRAY16BE,  ///<        Y        , 16bpp, big-endian
+    PIX_FMT_GRAY16LE,  ///<        Y        , 16bpp, little-endian
+    PIX_FMT_YUV440P,   ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
+    PIX_FMT_YUVJ440P,  ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of PIX_FMT_YUV440P and setting color_range
+    PIX_FMT_YUVA420P,  ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
+    PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_RGB48BE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
+    PIX_FMT_RGB48LE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian
+
+    PIX_FMT_RGB565BE,  ///< packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), big-endian
+    PIX_FMT_RGB565LE,  ///< packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), little-endian
+    PIX_FMT_RGB555BE,  ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0
+    PIX_FMT_RGB555LE,  ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0
+
+    PIX_FMT_BGR565BE,  ///< packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), big-endian
+    PIX_FMT_BGR565LE,  ///< packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), little-endian
+    PIX_FMT_BGR555BE,  ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1
+    PIX_FMT_BGR555LE,  ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1
+
+    PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers
+    PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers
+    PIX_FMT_VAAPI_VLD,  ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+
+    PIX_FMT_YUV420P16LE,  ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+    PIX_FMT_YUV420P16BE,  ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+    PIX_FMT_YUV422P16LE,  ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+    PIX_FMT_YUV422P16BE,  ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
+    PIX_FMT_YUV444P16LE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+    PIX_FMT_YUV444P16BE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+    PIX_FMT_VDPAU_MPEG4,  ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_DXVA2_VLD,    ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
+
+    PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
+    PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
+    PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
+    PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
+    PIX_FMT_GRAY8A,    ///< 8bit gray, 8bit alpha
+    PIX_FMT_BGR48BE,   ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
+    PIX_FMT_BGR48LE,   ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
+
+    //the following 10 formats have the disadvantage of needing 1 format for each bit depth, thus
+    //If you want to support multiple bit depths, then using PIX_FMT_YUV420P16* with the bpp stored seperately
+    //is better
+    PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+    PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+    PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+    PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+    PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
+    PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+    PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+    PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+    PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+    PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+    PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
+};
+
+#define PIX_FMT_Y400A PIX_FMT_GRAY8A
+
+#if AV_HAVE_BIGENDIAN
+#   define PIX_FMT_NE(be, le) PIX_FMT_##be
+#else
+#   define PIX_FMT_NE(be, le) PIX_FMT_##le
+#endif
+
+#define PIX_FMT_RGB32   PIX_FMT_NE(ARGB, BGRA)
+#define PIX_FMT_RGB32_1 PIX_FMT_NE(RGBA, ABGR)
+#define PIX_FMT_BGR32   PIX_FMT_NE(ABGR, RGBA)
+#define PIX_FMT_BGR32_1 PIX_FMT_NE(BGRA, ARGB)
+
+#define PIX_FMT_GRAY16 PIX_FMT_NE(GRAY16BE, GRAY16LE)
+#define PIX_FMT_RGB48  PIX_FMT_NE(RGB48BE,  RGB48LE)
+#define PIX_FMT_RGB565 PIX_FMT_NE(RGB565BE, RGB565LE)
+#define PIX_FMT_RGB555 PIX_FMT_NE(RGB555BE, RGB555LE)
+#define PIX_FMT_RGB444 PIX_FMT_NE(RGB444BE, RGB444LE)
+#define PIX_FMT_BGR48  PIX_FMT_NE(BGR48BE,  BGR48LE)
+#define PIX_FMT_BGR565 PIX_FMT_NE(BGR565BE, BGR565LE)
+#define PIX_FMT_BGR555 PIX_FMT_NE(BGR555BE, BGR555LE)
+#define PIX_FMT_BGR444 PIX_FMT_NE(BGR444BE, BGR444LE)
+
+#define PIX_FMT_YUV420P9  PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
+#define PIX_FMT_YUV444P9  PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
+#define PIX_FMT_YUV420P10 PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
+#define PIX_FMT_YUV422P10 PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
+#define PIX_FMT_YUV444P10 PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
+#define PIX_FMT_YUV420P16 PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
+#define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
+#define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
+
+#endif /* AVUTIL_PIXFMT_H */
diff --git a/ffmpeg 0.8/include/libavutil/random_seed.h b/ffmpeg 0.8/include/libavutil/random_seed.h
new file mode 100644 (file)
index 0000000..bb95787
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_RANDOM_SEED_H
+#define AVUTIL_RANDOM_SEED_H
+
+#include <stdint.h>
+
+/**
+ * Get a seed to use in conjunction with random functions.
+ * This function tries to provide a good seed at a best effort bases.
+ * Its possible to call this function multiple times if more bits are needed.
+ * It can be quite slow, which is why it should only be used as seed for a faster
+ * PRNG. The quality of the seed depends on the platform.
+ */
+uint32_t av_get_random_seed(void);
+
+#endif /* AVUTIL_RANDOM_SEED_H */
diff --git a/ffmpeg 0.8/include/libavutil/rational.h b/ffmpeg 0.8/include/libavutil/rational.h
new file mode 100644 (file)
index 0000000..789e4ac
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * rational numbers
+ * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * rational numbers
+ * @author Michael Niedermayer <michaelni@gmx.at>
+ */
+
+#ifndef AVUTIL_RATIONAL_H
+#define AVUTIL_RATIONAL_H
+
+#include <stdint.h>
+#include <limits.h>
+#include "attributes.h"
+
+/**
+ * rational number numerator/denominator
+ */
+typedef struct AVRational{
+    int num; ///< numerator
+    int den; ///< denominator
+} AVRational;
+
+/**
+ * Compare two rationals.
+ * @param a first rational
+ * @param b second rational
+ * @return 0 if a==b, 1 if a>b, -1 if a<b, and INT_MIN if one of the
+ * values is of the form 0/0
+ */
+static inline int av_cmp_q(AVRational a, AVRational b){
+    const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
+
+    if(tmp) return ((tmp ^ a.den ^ b.den)>>63)|1;
+    else if(b.den && a.den) return 0;
+    else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
+    else                    return INT_MIN;
+}
+
+/**
+ * Convert rational to double.
+ * @param a rational to convert
+ * @return (double) a
+ */
+static inline double av_q2d(AVRational a){
+    return a.num / (double) a.den;
+}
+
+/**
+ * Reduce a fraction.
+ * This is useful for framerate calculations.
+ * @param dst_num destination numerator
+ * @param dst_den destination denominator
+ * @param num source numerator
+ * @param den source denominator
+ * @param max the maximum allowed for dst_num & dst_den
+ * @return 1 if exact, 0 otherwise
+ */
+int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
+
+/**
+ * Multiply two rationals.
+ * @param b first rational
+ * @param c second rational
+ * @return b*c
+ */
+AVRational av_mul_q(AVRational b, AVRational c) av_const;
+
+/**
+ * Divide one rational by another.
+ * @param b first rational
+ * @param c second rational
+ * @return b/c
+ */
+AVRational av_div_q(AVRational b, AVRational c) av_const;
+
+/**
+ * Add two rationals.
+ * @param b first rational
+ * @param c second rational
+ * @return b+c
+ */
+AVRational av_add_q(AVRational b, AVRational c) av_const;
+
+/**
+ * Subtract one rational from another.
+ * @param b first rational
+ * @param c second rational
+ * @return b-c
+ */
+AVRational av_sub_q(AVRational b, AVRational c) av_const;
+
+/**
+ * Convert a double precision floating point number to a rational.
+ * inf is expressed as {1,0} or {-1,0} depending on the sign.
+ *
+ * @param d double to convert
+ * @param max the maximum allowed numerator and denominator
+ * @return (AVRational) d
+ */
+AVRational av_d2q(double d, int max) av_const;
+
+/**
+ * @return 1 if q1 is nearer to q than q2, -1 if q2 is nearer
+ * than q1, 0 if they have the same distance.
+ */
+int av_nearer_q(AVRational q, AVRational q1, AVRational q2);
+
+/**
+ * Find the nearest value in q_list to q.
+ * @param q_list an array of rationals terminated by {0, 0}
+ * @return the index of the nearest value found in the array
+ */
+int av_find_nearest_q_idx(AVRational q, const AVRational* q_list);
+
+#endif /* AVUTIL_RATIONAL_H */
diff --git a/ffmpeg 0.8/include/libavutil/samplefmt.h b/ffmpeg 0.8/include/libavutil/samplefmt.h
new file mode 100644 (file)
index 0000000..b06755d
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_SAMPLEFMT_H
+#define AVUTIL_SAMPLEFMT_H
+
+#include "avutil.h"
+
+/**
+ * all in native-endian format
+ */
+enum AVSampleFormat {
+    AV_SAMPLE_FMT_NONE = -1,
+    AV_SAMPLE_FMT_U8,          ///< unsigned 8 bits
+    AV_SAMPLE_FMT_S16,         ///< signed 16 bits
+    AV_SAMPLE_FMT_S32,         ///< signed 32 bits
+    AV_SAMPLE_FMT_FLT,         ///< float
+    AV_SAMPLE_FMT_DBL,         ///< double
+    AV_SAMPLE_FMT_NB           ///< Number of sample formats. DO NOT USE if linking dynamically
+};
+
+/**
+ * Return the name of sample_fmt, or NULL if sample_fmt is not
+ * recognized.
+ */
+const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
+
+/**
+ * Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE
+ * on error.
+ */
+enum AVSampleFormat av_get_sample_fmt(const char *name);
+
+/**
+ * Generate a string corresponding to the sample format with
+ * sample_fmt, or a header if sample_fmt is negative.
+ *
+ * @param buf the buffer where to write the string
+ * @param buf_size the size of buf
+ * @param sample_fmt the number of the sample format to print the
+ * corresponding info string, or a negative value to print the
+ * corresponding header.
+ * @return the pointer to the filled buffer or NULL if sample_fmt is
+ * unknown or in case of other errors
+ */
+char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
+
+#if FF_API_GET_BITS_PER_SAMPLE_FMT
+/**
+ * @deprecated Use av_get_bytes_per_sample() instead.
+ */
+attribute_deprecated
+int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt);
+#endif
+
+/**
+ * Return number of bytes per sample.
+ *
+ * @param sample_fmt the sample format
+ * @return number of bytes per sample or zero if unknown for the given
+ * sample format
+ */
+int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
+
+/**
+ * Fill channel data pointers and linesizes for samples with sample
+ * format sample_fmt.
+ *
+ * The pointers array is filled with the pointers to the samples data:
+ * for planar, set the start point of each plane's data within the buffer,
+ * for packed, set the start point of the entire buffer only.
+ *
+ * The linesize array is filled with the aligned size of each samples
+ * plane, that is linesize[i] will contain the linesize of the plane i,
+ * and will be zero for all the unused planes. All linesize values are
+ * equal.
+ *
+ * @param pointers array to be filled with the pointer for each plane, may be NULL
+ * @param linesizes array to be filled with the linesize, may be NULL
+ * @param buf the pointer to a buffer containing the samples
+ * @param nb_samples the number of samples in a single channel
+ * @param planar 1 if the samples layout is planar, 0 if it is packed
+ * @param nb_channels the number of channels
+ * @return the total size of the buffer, a negative
+ * error code in case of failure
+ */
+int av_samples_fill_arrays(uint8_t *pointers[8], int linesizes[8],
+                           uint8_t *buf, int nb_channels, int nb_samples,
+                           enum AVSampleFormat sample_fmt, int planar, int align);
+
+/**
+ * Allocate a samples buffer for nb_samples samples, and
+ * fill pointers and linesizes accordingly.
+ * The allocated samples buffer has to be freed by using
+ * av_freep(&pointers[0]).
+ *
+ * @param nb_channels number of audio channels
+ * @param nb_samples number of samples per channel
+ * @param planar 1 if the samples layout is planar, 0 if packed,
+ * @param align the value to use for buffer size alignment
+ * @return the size in bytes required for the samples buffer, a negative
+ * error code in case of failure
+ * @see av_samples_fill_arrays()
+ */
+int av_samples_alloc(uint8_t *pointers[8], int linesizes[8],
+                     int nb_channels, int nb_samples,
+                     enum AVSampleFormat sample_fmt, int planar,
+                     int align);
+
+#endif /* AVCORE_SAMPLEFMT_H */
diff --git a/ffmpeg 0.8/include/libavutil/sha.h b/ffmpeg 0.8/include/libavutil/sha.h
new file mode 100644 (file)
index 0000000..543f5a1
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_SHA_H
+#define AVUTIL_SHA_H
+
+#include <stdint.h>
+
+extern const int av_sha_size;
+
+struct AVSHA;
+
+/**
+ * Initialize SHA-1 or SHA-2 hashing.
+ *
+ * @param context pointer to the function context (of size av_sha_size)
+ * @param bits    number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
+ * @return        zero if initialization succeeded, -1 otherwise
+ */
+int av_sha_init(struct AVSHA* context, int bits);
+
+/**
+ * Update hash value.
+ *
+ * @param context hash function context
+ * @param data    input data to update hash with
+ * @param len     input data length
+ */
+void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);
+
+/**
+ * Finish hashing and output digest value.
+ *
+ * @param context hash function context
+ * @param digest  buffer where output digest value is stored
+ */
+void av_sha_final(struct AVSHA* context, uint8_t *digest);
+
+#endif /* AVUTIL_SHA_H */
diff --git a/ffmpeg 0.8/include/libpostproc/postprocess.h b/ffmpeg 0.8/include/libpostproc/postprocess.h
new file mode 100644 (file)
index 0000000..0713c47
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef POSTPROC_POSTPROCESS_H
+#define POSTPROC_POSTPROCESS_H
+
+/**
+ * @file
+ * @brief
+ *     external postprocessing API
+ */
+
+#include "libavutil/avutil.h"
+
+#define LIBPOSTPROC_VERSION_MAJOR 51
+#define LIBPOSTPROC_VERSION_MINOR  2
+#define LIBPOSTPROC_VERSION_MICRO  0
+
+#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
+                                               LIBPOSTPROC_VERSION_MINOR, \
+                                               LIBPOSTPROC_VERSION_MICRO)
+#define LIBPOSTPROC_VERSION     AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
+                                           LIBPOSTPROC_VERSION_MINOR, \
+                                           LIBPOSTPROC_VERSION_MICRO)
+#define LIBPOSTPROC_BUILD       LIBPOSTPROC_VERSION_INT
+
+#define LIBPOSTPROC_IDENT       "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
+
+/**
+ * Return the LIBPOSTPROC_VERSION_INT constant.
+ */
+unsigned postproc_version(void);
+
+/**
+ * Return the libpostproc build-time configuration.
+ */
+const char *postproc_configuration(void);
+
+/**
+ * Return the libpostproc license.
+ */
+const char *postproc_license(void);
+
+#define PP_QUALITY_MAX 6
+
+#define QP_STORE_T int8_t
+
+#include <inttypes.h>
+
+typedef void pp_context;
+typedef void pp_mode;
+
+#if LIBPOSTPROC_VERSION_INT < (52<<16)
+typedef pp_context pp_context_t;
+typedef pp_mode pp_mode_t;
+extern const char *const pp_help; ///< a simple help text
+#else
+extern const char pp_help[]; ///< a simple help text
+#endif
+
+void  pp_postprocess(const uint8_t * src[3], const int srcStride[3],
+                     uint8_t * dst[3], const int dstStride[3],
+                     int horizontalSize, int verticalSize,
+                     const QP_STORE_T *QP_store,  int QP_stride,
+                     pp_mode *mode, pp_context *ppContext, int pict_type);
+
+
+/**
+ * returns a pp_mode or NULL if an error occurred
+ * name is the string after "-pp" on the command line
+ * quality is a number from 0 to PP_QUALITY_MAX
+ */
+pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality);
+void pp_free_mode(pp_mode *mode);
+
+pp_context *pp_get_context(int width, int height, int flags);
+void pp_free_context(pp_context *ppContext);
+
+#define PP_CPU_CAPS_MMX   0x80000000
+#define PP_CPU_CAPS_MMX2  0x20000000
+#define PP_CPU_CAPS_3DNOW 0x40000000
+#define PP_CPU_CAPS_ALTIVEC 0x10000000
+
+#define PP_FORMAT         0x00000008
+#define PP_FORMAT_420    (0x00000011|PP_FORMAT)
+#define PP_FORMAT_422    (0x00000001|PP_FORMAT)
+#define PP_FORMAT_411    (0x00000002|PP_FORMAT)
+#define PP_FORMAT_444    (0x00000000|PP_FORMAT)
+
+#define PP_PICT_TYPE_QP2  0x00000010 ///< MPEG2 style QScale
+
+#endif /* POSTPROC_POSTPROCESS_H */
diff --git a/ffmpeg 0.8/include/libswscale/swscale.h b/ffmpeg 0.8/include/libswscale/swscale.h
new file mode 100644 (file)
index 0000000..a4b3a48
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ * Copyright (C) 2001-2003 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef SWSCALE_SWSCALE_H
+#define SWSCALE_SWSCALE_H
+
+/**
+ * @file
+ * @brief
+ *     external api for the swscale stuff
+ */
+
+#include "libavutil/avutil.h"
+#include "libavutil/log.h"
+#include "libavutil/pixfmt.h"
+
+#define LIBSWSCALE_VERSION_MAJOR 2
+#define LIBSWSCALE_VERSION_MINOR 0
+#define LIBSWSCALE_VERSION_MICRO 0
+
+#define LIBSWSCALE_VERSION_INT  AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
+                                               LIBSWSCALE_VERSION_MINOR, \
+                                               LIBSWSCALE_VERSION_MICRO)
+#define LIBSWSCALE_VERSION      AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \
+                                           LIBSWSCALE_VERSION_MINOR, \
+                                           LIBSWSCALE_VERSION_MICRO)
+#define LIBSWSCALE_BUILD        LIBSWSCALE_VERSION_INT
+
+#define LIBSWSCALE_IDENT        "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
+
+/**
+ * Those FF_API_* defines are not part of public API.
+ * They may change, break or disappear at any time.
+ */
+#ifndef FF_API_SWS_GETCONTEXT
+#define FF_API_SWS_GETCONTEXT  (LIBSWSCALE_VERSION_MAJOR < 3)
+#endif
+#ifndef FF_API_SWS_CPU_CAPS
+#define FF_API_SWS_CPU_CAPS    (LIBSWSCALE_VERSION_MAJOR < 3)
+#endif
+#ifndef FF_API_SWS_FORMAT_NAME
+#define FF_API_SWS_FORMAT_NAME  (LIBSWSCALE_VERSION_MAJOR < 3)
+#endif
+
+/**
+ * Returns the LIBSWSCALE_VERSION_INT constant.
+ */
+unsigned swscale_version(void);
+
+/**
+ * Returns the libswscale build-time configuration.
+ */
+const char *swscale_configuration(void);
+
+/**
+ * Returns the libswscale license.
+ */
+const char *swscale_license(void);
+
+/* values for the flags, the stuff on the command line is different */
+#define SWS_FAST_BILINEAR     1
+#define SWS_BILINEAR          2
+#define SWS_BICUBIC           4
+#define SWS_X                 8
+#define SWS_POINT          0x10
+#define SWS_AREA           0x20
+#define SWS_BICUBLIN       0x40
+#define SWS_GAUSS          0x80
+#define SWS_SINC          0x100
+#define SWS_LANCZOS       0x200
+#define SWS_SPLINE        0x400
+
+#define SWS_SRC_V_CHR_DROP_MASK     0x30000
+#define SWS_SRC_V_CHR_DROP_SHIFT    16
+
+#define SWS_PARAM_DEFAULT           123456
+
+#define SWS_PRINT_INFO              0x1000
+
+//the following 3 flags are not completely implemented
+//internal chrominace subsampling info
+#define SWS_FULL_CHR_H_INT    0x2000
+//input subsampling info
+#define SWS_FULL_CHR_H_INP    0x4000
+#define SWS_DIRECT_BGR        0x8000
+#define SWS_ACCURATE_RND      0x40000
+#define SWS_BITEXACT          0x80000
+
+#if FF_API_SWS_CPU_CAPS
+/**
+ * CPU caps are autodetected now, those flags
+ * are only provided for API compatibility.
+ */
+#define SWS_CPU_CAPS_MMX      0x80000000
+#define SWS_CPU_CAPS_MMX2     0x20000000
+#define SWS_CPU_CAPS_3DNOW    0x40000000
+#define SWS_CPU_CAPS_ALTIVEC  0x10000000
+#define SWS_CPU_CAPS_BFIN     0x01000000
+#define SWS_CPU_CAPS_SSE2     0x02000000
+#endif
+
+#define SWS_MAX_REDUCE_CUTOFF 0.002
+
+#define SWS_CS_ITU709         1
+#define SWS_CS_FCC            4
+#define SWS_CS_ITU601         5
+#define SWS_CS_ITU624         5
+#define SWS_CS_SMPTE170M      5
+#define SWS_CS_SMPTE240M      7
+#define SWS_CS_DEFAULT        5
+
+/**
+ * Returns a pointer to yuv<->rgb coefficients for the given colorspace
+ * suitable for sws_setColorspaceDetails().
+ *
+ * @param colorspace One of the SWS_CS_* macros. If invalid,
+ * SWS_CS_DEFAULT is used.
+ */
+const int *sws_getCoefficients(int colorspace);
+
+
+// when used for filters they must have an odd number of elements
+// coeffs cannot be shared between vectors
+typedef struct {
+    double *coeff;              ///< pointer to the list of coefficients
+    int length;                 ///< number of coefficients in the vector
+} SwsVector;
+
+// vectors can be shared
+typedef struct {
+    SwsVector *lumH;
+    SwsVector *lumV;
+    SwsVector *chrH;
+    SwsVector *chrV;
+} SwsFilter;
+
+struct SwsContext;
+
+/**
+ * Returns a positive value if pix_fmt is a supported input format, 0
+ * otherwise.
+ */
+int sws_isSupportedInput(enum PixelFormat pix_fmt);
+
+/**
+ * Returns a positive value if pix_fmt is a supported output format, 0
+ * otherwise.
+ */
+int sws_isSupportedOutput(enum PixelFormat pix_fmt);
+
+/**
+ * Allocates an empty SwsContext. This must be filled and passed to
+ * sws_init_context(). For filling see AVOptions, options.c and
+ * sws_setColorspaceDetails().
+ */
+struct SwsContext *sws_alloc_context(void);
+
+/**
+ * Initializes the swscaler context sws_context.
+ *
+ * @return zero or positive value on success, a negative value on
+ * error
+ */
+int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
+
+/**
+ * Frees the swscaler context swsContext.
+ * If swsContext is NULL, then does nothing.
+ */
+void sws_freeContext(struct SwsContext *swsContext);
+
+#if FF_API_SWS_GETCONTEXT
+/**
+ * Allocates and returns a SwsContext. You need it to perform
+ * scaling/conversion operations using sws_scale().
+ *
+ * @param srcW the width of the source image
+ * @param srcH the height of the source image
+ * @param srcFormat the source image format
+ * @param dstW the width of the destination image
+ * @param dstH the height of the destination image
+ * @param dstFormat the destination image format
+ * @param flags specify which algorithm and options to use for rescaling
+ * @return a pointer to an allocated context, or NULL in case of error
+ * @note this function is to be removed after a saner alternative is
+ *       written
+ * @deprecated Use sws_getCachedContext() instead.
+ */
+struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
+                                  int dstW, int dstH, enum PixelFormat dstFormat,
+                                  int flags, SwsFilter *srcFilter,
+                                  SwsFilter *dstFilter, const double *param);
+#endif
+
+/**
+ * Scales the image slice in srcSlice and puts the resulting scaled
+ * slice in the image in dst. A slice is a sequence of consecutive
+ * rows in an image.
+ *
+ * Slices have to be provided in sequential order, either in
+ * top-bottom or bottom-top order. If slices are provided in
+ * non-sequential order the behavior of the function is undefined.
+ *
+ * @param c         the scaling context previously created with
+ *                  sws_getContext()
+ * @param srcSlice  the array containing the pointers to the planes of
+ *                  the source slice
+ * @param srcStride the array containing the strides for each plane of
+ *                  the source image
+ * @param srcSliceY the position in the source image of the slice to
+ *                  process, that is the number (counted starting from
+ *                  zero) in the image of the first row of the slice
+ * @param srcSliceH the height of the source slice, that is the number
+ *                  of rows in the slice
+ * @param dst       the array containing the pointers to the planes of
+ *                  the destination image
+ * @param dstStride the array containing the strides for each plane of
+ *                  the destination image
+ * @return          the height of the output slice
+ */
+int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
+              const int srcStride[], int srcSliceY, int srcSliceH,
+              uint8_t* const dst[], const int dstStride[]);
+
+#if LIBSWSCALE_VERSION_MAJOR < 1
+/**
+ * @deprecated Use sws_scale() instead.
+ */
+int sws_scale_ordered(struct SwsContext *context, const uint8_t* const src[],
+                      int srcStride[], int srcSliceY, int srcSliceH,
+                      uint8_t* dst[], int dstStride[]) attribute_deprecated;
+#endif
+
+/**
+ * @param inv_table the yuv2rgb coefficients, normally ff_yuv2rgb_coeffs[x]
+ * @return -1 if not supported
+ */
+int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
+                             int srcRange, const int table[4], int dstRange,
+                             int brightness, int contrast, int saturation);
+
+/**
+ * @return -1 if not supported
+ */
+int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
+                             int *srcRange, int **table, int *dstRange,
+                             int *brightness, int *contrast, int *saturation);
+
+/**
+ * Allocates and returns an uninitialized vector with length coefficients.
+ */
+SwsVector *sws_allocVec(int length);
+
+/**
+ * Returns a normalized Gaussian curve used to filter stuff
+ * quality=3 is high quality, lower is lower quality.
+ */
+SwsVector *sws_getGaussianVec(double variance, double quality);
+
+/**
+ * Allocates and returns a vector with length coefficients, all
+ * with the same value c.
+ */
+SwsVector *sws_getConstVec(double c, int length);
+
+/**
+ * Allocates and returns a vector with just one coefficient, with
+ * value 1.0.
+ */
+SwsVector *sws_getIdentityVec(void);
+
+/**
+ * Scales all the coefficients of a by the scalar value.
+ */
+void sws_scaleVec(SwsVector *a, double scalar);
+
+/**
+ * Scales all the coefficients of a so that their sum equals height.
+ */
+void sws_normalizeVec(SwsVector *a, double height);
+void sws_convVec(SwsVector *a, SwsVector *b);
+void sws_addVec(SwsVector *a, SwsVector *b);
+void sws_subVec(SwsVector *a, SwsVector *b);
+void sws_shiftVec(SwsVector *a, int shift);
+
+/**
+ * Allocates and returns a clone of the vector a, that is a vector
+ * with the same coefficients as a.
+ */
+SwsVector *sws_cloneVec(SwsVector *a);
+
+#if LIBSWSCALE_VERSION_MAJOR < 1
+/**
+ * @deprecated Use sws_printVec2() instead.
+ */
+attribute_deprecated void sws_printVec(SwsVector *a);
+#endif
+
+/**
+ * Prints with av_log() a textual representation of the vector a
+ * if log_level <= av_log_level.
+ */
+void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level);
+
+void sws_freeVec(SwsVector *a);
+
+SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
+                                float lumaSharpen, float chromaSharpen,
+                                float chromaHShift, float chromaVShift,
+                                int verbose);
+void sws_freeFilter(SwsFilter *filter);
+
+/**
+ * Checks if context can be reused, otherwise reallocates a new
+ * one.
+ *
+ * If context is NULL, just calls sws_getContext() to get a new
+ * context. Otherwise, checks if the parameters are the ones already
+ * saved in context. If that is the case, returns the current
+ * context. Otherwise, frees context and gets a new context with
+ * the new parameters.
+ *
+ * Be warned that srcFilter and dstFilter are not checked, they
+ * are assumed to remain the same.
+ */
+struct SwsContext *sws_getCachedContext(struct SwsContext *context,
+                                        int srcW, int srcH, enum PixelFormat srcFormat,
+                                        int dstW, int dstH, enum PixelFormat dstFormat,
+                                        int flags, SwsFilter *srcFilter,
+                                        SwsFilter *dstFilter, const double *param);
+
+/**
+ * Converts an 8bit paletted frame into a frame with a color depth of 32-bits.
+ *
+ * The output frame will have the same packed format as the palette.
+ *
+ * @param src        source frame buffer
+ * @param dst        destination frame buffer
+ * @param num_pixels number of pixels to convert
+ * @param palette    array with [256] entries, which must match color arrangement (RGB or BGR) of src
+ */
+void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
+
+/**
+ * Converts an 8bit paletted frame into a frame with a color depth of 24 bits.
+ *
+ * With the palette format "ABCD", the destination frame ends up with the format "ABC".
+ *
+ * @param src        source frame buffer
+ * @param dst        destination frame buffer
+ * @param num_pixels number of pixels to convert
+ * @param palette    array with [256] entries, which must match color arrangement (RGB or BGR) of src
+ */
+void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
+
+
+#endif /* SWSCALE_SWSCALE_H */
diff --git a/ffmpeg 0.8/lib/avcodec.lib b/ffmpeg 0.8/lib/avcodec.lib
new file mode 100644 (file)
index 0000000..fffaf7c
Binary files /dev/null and b/ffmpeg 0.8/lib/avcodec.lib differ
diff --git a/ffmpeg 0.8/lib/avdevice.lib b/ffmpeg 0.8/lib/avdevice.lib
new file mode 100644 (file)
index 0000000..5f40d0b
Binary files /dev/null and b/ffmpeg 0.8/lib/avdevice.lib differ
diff --git a/ffmpeg 0.8/lib/avfilter.lib b/ffmpeg 0.8/lib/avfilter.lib
new file mode 100644 (file)
index 0000000..e8a6e9d
Binary files /dev/null and b/ffmpeg 0.8/lib/avfilter.lib differ
diff --git a/ffmpeg 0.8/lib/avformat.lib b/ffmpeg 0.8/lib/avformat.lib
new file mode 100644 (file)
index 0000000..80c2cb7
Binary files /dev/null and b/ffmpeg 0.8/lib/avformat.lib differ
diff --git a/ffmpeg 0.8/lib/avutil.lib b/ffmpeg 0.8/lib/avutil.lib
new file mode 100644 (file)
index 0000000..cb86421
Binary files /dev/null and b/ffmpeg 0.8/lib/avutil.lib differ
diff --git a/ffmpeg 0.8/lib/postproc.lib b/ffmpeg 0.8/lib/postproc.lib
new file mode 100644 (file)
index 0000000..1ef1cd5
Binary files /dev/null and b/ffmpeg 0.8/lib/postproc.lib differ
diff --git a/ffmpeg 0.8/lib/swscale.lib b/ffmpeg 0.8/lib/swscale.lib
new file mode 100644 (file)
index 0000000..1767b1f
Binary files /dev/null and b/ffmpeg 0.8/lib/swscale.lib differ
diff --git a/ffmpeg 0.8/licenses/bzip2.txt b/ffmpeg 0.8/licenses/bzip2.txt
new file mode 100644 (file)
index 0000000..af3a130
--- /dev/null
@@ -0,0 +1,42 @@
+\r
+--------------------------------------------------------------------------\r
+\r
+This program, "bzip2", the associated library "libbzip2", and all\r
+documentation, are copyright (C) 1996-2010 Julian R Seward.  All\r
+rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions\r
+are met:\r
+\r
+1. Redistributions of source code must retain the above copyright\r
+   notice, this list of conditions and the following disclaimer.\r
+\r
+2. The origin of this software must not be misrepresented; you must \r
+   not claim that you wrote the original software.  If you use this \r
+   software in a product, an acknowledgment in the product \r
+   documentation would be appreciated but is not required.\r
+\r
+3. Altered source versions must be plainly marked as such, and must\r
+   not be misrepresented as being the original software.\r
+\r
+4. The name of the author may not be used to endorse or promote \r
+   products derived from this software without specific prior written \r
+   permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Julian Seward, jseward@bzip.org\r
+bzip2/libbzip2 version 1.0.6 of 6 September 2010\r
+\r
+--------------------------------------------------------------------------\r
diff --git a/ffmpeg 0.8/licenses/ffmpeg.txt b/ffmpeg 0.8/licenses/ffmpeg.txt
new file mode 100644 (file)
index 0000000..818433e
--- /dev/null
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE\r
+                       Version 3, 29 June 2007\r
+\r
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                            Preamble\r
+\r
+  The GNU General Public License is a free, copyleft license for\r
+software and other kinds of works.\r
+\r
+  The licenses for most software and other practical works are designed\r
+to take away your freedom to share and change the works.  By contrast,\r
+the GNU General Public License is intended to guarantee your freedom to\r
+share and change all versions of a program--to make sure it remains free\r
+software for all its users.  We, the Free Software Foundation, use the\r
+GNU General Public License for most of our software; it applies also to\r
+any other work released this way by its authors.  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+them if you wish), that you receive source code or can get it if you\r
+want it, that you can change the software or use pieces of it in new\r
+free programs, and that you know you can do these things.\r
+\r
+  To protect your rights, we need to prevent others from denying you\r
+these rights or asking you to surrender the rights.  Therefore, you have\r
+certain responsibilities if you distribute copies of the software, or if\r
+you modify it: responsibilities to respect the freedom of others.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must pass on to the recipients the same\r
+freedoms that you received.  You must make sure that they, too, receive\r
+or can get the source code.  And you must show them these terms so they\r
+know their rights.\r
+\r
+  Developers that use the GNU GPL protect your rights with two steps:\r
+(1) assert copyright on the software, and (2) offer you this License\r
+giving you legal permission to copy, distribute and/or modify it.\r
+\r
+  For the developers' and authors' protection, the GPL clearly explains\r
+that there is no warranty for this free software.  For both users' and\r
+authors' sake, the GPL requires that modified versions be marked as\r
+changed, so that their problems will not be attributed erroneously to\r
+authors of previous versions.\r
+\r
+  Some devices are designed to deny users access to install or run\r
+modified versions of the software inside them, although the manufacturer\r
+can do so.  This is fundamentally incompatible with the aim of\r
+protecting users' freedom to change the software.  The systematic\r
+pattern of such abuse occurs in the area of products for individuals to\r
+use, which is precisely where it is most unacceptable.  Therefore, we\r
+have designed this version of the GPL to prohibit the practice for those\r
+products.  If such problems arise substantially in other domains, we\r
+stand ready to extend this provision to those domains in future versions\r
+of the GPL, as needed to protect the freedom of users.\r
+\r
+  Finally, every program is threatened constantly by software patents.\r
+States should not allow patents to restrict development and use of\r
+software on general-purpose computers, but in those that do, we wish to\r
+avoid the special danger that patents applied to a free program could\r
+make it effectively proprietary.  To prevent this, the GPL assures that\r
+patents cannot be used to render the program non-free.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+                       TERMS AND CONDITIONS\r
+\r
+  0. Definitions.\r
+\r
+  "This License" refers to version 3 of the GNU General Public License.\r
+\r
+  "Copyright" also means copyright-like laws that apply to other kinds of\r
+works, such as semiconductor masks.\r
+\r
+  "The Program" refers to any copyrightable work licensed under this\r
+License.  Each licensee is addressed as "you".  "Licensees" and\r
+"recipients" may be individuals or organizations.\r
+\r
+  To "modify" a work means to copy from or adapt all or part of the work\r
+in a fashion requiring copyright permission, other than the making of an\r
+exact copy.  The resulting work is called a "modified version" of the\r
+earlier work or a work "based on" the earlier work.\r
+\r
+  A "covered work" means either the unmodified Program or a work based\r
+on the Program.\r
+\r
+  To "propagate" a work means to do anything with it that, without\r
+permission, would make you directly or secondarily liable for\r
+infringement under applicable copyright law, except executing it on a\r
+computer or modifying a private copy.  Propagation includes copying,\r
+distribution (with or without modification), making available to the\r
+public, and in some countries other activities as well.\r
+\r
+  To "convey" a work means any kind of propagation that enables other\r
+parties to make or receive copies.  Mere interaction with a user through\r
+a computer network, with no transfer of a copy, is not conveying.\r
+\r
+  An interactive user interface displays "Appropriate Legal Notices"\r
+to the extent that it includes a convenient and prominently visible\r
+feature that (1) displays an appropriate copyright notice, and (2)\r
+tells the user that there is no warranty for the work (except to the\r
+extent that warranties are provided), that licensees may convey the\r
+work under this License, and how to view a copy of this License.  If\r
+the interface presents a list of user commands or options, such as a\r
+menu, a prominent item in the list meets this criterion.\r
+\r
+  1. Source Code.\r
+\r
+  The "source code" for a work means the preferred form of the work\r
+for making modifications to it.  "Object code" means any non-source\r
+form of a work.\r
+\r
+  A "Standard Interface" means an interface that either is an official\r
+standard defined by a recognized standards body, or, in the case of\r
+interfaces specified for a particular programming language, one that\r
+is widely used among developers working in that language.\r
+\r
+  The "System Libraries" of an executable work include anything, other\r
+than the work as a whole, that (a) is included in the normal form of\r
+packaging a Major Component, but which is not part of that Major\r
+Component, and (b) serves only to enable use of the work with that\r
+Major Component, or to implement a Standard Interface for which an\r
+implementation is available to the public in source code form.  A\r
+"Major Component", in this context, means a major essential component\r
+(kernel, window system, and so on) of the specific operating system\r
+(if any) on which the executable work runs, or a compiler used to\r
+produce the work, or an object code interpreter used to run it.\r
+\r
+  The "Corresponding Source" for a work in object code form means all\r
+the source code needed to generate, install, and (for an executable\r
+work) run the object code and to modify the work, including scripts to\r
+control those activities.  However, it does not include the work's\r
+System Libraries, or general-purpose tools or generally available free\r
+programs which are used unmodified in performing those activities but\r
+which are not part of the work.  For example, Corresponding Source\r
+includes interface definition files associated with source files for\r
+the work, and the source code for shared libraries and dynamically\r
+linked subprograms that the work is specifically designed to require,\r
+such as by intimate data communication or control flow between those\r
+subprograms and other parts of the work.\r
+\r
+  The Corresponding Source need not include anything that users\r
+can regenerate automatically from other parts of the Corresponding\r
+Source.\r
+\r
+  The Corresponding Source for a work in source code form is that\r
+same work.\r
+\r
+  2. Basic Permissions.\r
+\r
+  All rights granted under this License are granted for the term of\r
+copyright on the Program, and are irrevocable provided the stated\r
+conditions are met.  This License explicitly affirms your unlimited\r
+permission to run the unmodified Program.  The output from running a\r
+covered work is covered by this License only if the output, given its\r
+content, constitutes a covered work.  This License acknowledges your\r
+rights of fair use or other equivalent, as provided by copyright law.\r
+\r
+  You may make, run and propagate covered works that you do not\r
+convey, without conditions so long as your license otherwise remains\r
+in force.  You may convey covered works to others for the sole purpose\r
+of having them make modifications exclusively for you, or provide you\r
+with facilities for running those works, provided that you comply with\r
+the terms of this License in conveying all material for which you do\r
+not control copyright.  Those thus making or running the covered works\r
+for you must do so exclusively on your behalf, under your direction\r
+and control, on terms that prohibit them from making any copies of\r
+your copyrighted material outside their relationship with you.\r
+\r
+  Conveying under any other circumstances is permitted solely under\r
+the conditions stated below.  Sublicensing is not allowed; section 10\r
+makes it unnecessary.\r
+\r
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r
+\r
+  No covered work shall be deemed part of an effective technological\r
+measure under any applicable law fulfilling obligations under article\r
+11 of the WIPO copyright treaty adopted on 20 December 1996, or\r
+similar laws prohibiting or restricting circumvention of such\r
+measures.\r
+\r
+  When you convey a covered work, you waive any legal power to forbid\r
+circumvention of technological measures to the extent such circumvention\r
+is effected by exercising rights under this License with respect to\r
+the covered work, and you disclaim any intention to limit operation or\r
+modification of the work as a means of enforcing, against the work's\r
+users, your or third parties' legal rights to forbid circumvention of\r
+technological measures.\r
+\r
+  4. Conveying Verbatim Copies.\r
+\r
+  You may convey verbatim copies of the Program's source code as you\r
+receive it, in any medium, provided that you conspicuously and\r
+appropriately publish on each copy an appropriate copyright notice;\r
+keep intact all notices stating that this License and any\r
+non-permissive terms added in accord with section 7 apply to the code;\r
+keep intact all notices of the absence of any warranty; and give all\r
+recipients a copy of this License along with the Program.\r
+\r
+  You may charge any price or no price for each copy that you convey,\r
+and you may offer support or warranty protection for a fee.\r
+\r
+  5. Conveying Modified Source Versions.\r
+\r
+  You may convey a work based on the Program, or the modifications to\r
+produce it from the Program, in the form of source code under the\r
+terms of section 4, provided that you also meet all of these conditions:\r
+\r
+    a) The work must carry prominent notices stating that you modified\r
+    it, and giving a relevant date.\r
+\r
+    b) The work must carry prominent notices stating that it is\r
+    released under this License and any conditions added under section\r
+    7.  This requirement modifies the requirement in section 4 to\r
+    "keep intact all notices".\r
+\r
+    c) You must license the entire work, as a whole, under this\r
+    License to anyone who comes into possession of a copy.  This\r
+    License will therefore apply, along with any applicable section 7\r
+    additional terms, to the whole of the work, and all its parts,\r
+    regardless of how they are packaged.  This License gives no\r
+    permission to license the work in any other way, but it does not\r
+    invalidate such permission if you have separately received it.\r
+\r
+    d) If the work has interactive user interfaces, each must display\r
+    Appropriate Legal Notices; however, if the Program has interactive\r
+    interfaces that do not display Appropriate Legal Notices, your\r
+    work need not make them do so.\r
+\r
+  A compilation of a covered work with other separate and independent\r
+works, which are not by their nature extensions of the covered work,\r
+and which are not combined with it such as to form a larger program,\r
+in or on a volume of a storage or distribution medium, is called an\r
+"aggregate" if the compilation and its resulting copyright are not\r
+used to limit the access or legal rights of the compilation's users\r
+beyond what the individual works permit.  Inclusion of a covered work\r
+in an aggregate does not cause this License to apply to the other\r
+parts of the aggregate.\r
+\r
+  6. Conveying Non-Source Forms.\r
+\r
+  You may convey a covered work in object code form under the terms\r
+of sections 4 and 5, provided that you also convey the\r
+machine-readable Corresponding Source under the terms of this License,\r
+in one of these ways:\r
+\r
+    a) Convey the object code in, or embodied in, a physical product\r
+    (including a physical distribution medium), accompanied by the\r
+    Corresponding Source fixed on a durable physical medium\r
+    customarily used for software interchange.\r
+\r
+    b) Convey the object code in, or embodied in, a physical product\r
+    (including a physical distribution medium), accompanied by a\r
+    written offer, valid for at least three years and valid for as\r
+    long as you offer spare parts or customer support for that product\r
+    model, to give anyone who possesses the object code either (1) a\r
+    copy of the Corresponding Source for all the software in the\r
+    product that is covered by this License, on a durable physical\r
+    medium customarily used for software interchange, for a price no\r
+    more than your reasonable cost of physically performing this\r
+    conveying of source, or (2) access to copy the\r
+    Corresponding Source from a network server at no charge.\r
+\r
+    c) Convey individual copies of the object code with a copy of the\r
+    written offer to provide the Corresponding Source.  This\r
+    alternative is allowed only occasionally and noncommercially, and\r
+    only if you received the object code with such an offer, in accord\r
+    with subsection 6b.\r
+\r
+    d) Convey the object code by offering access from a designated\r
+    place (gratis or for a charge), and offer equivalent access to the\r
+    Corresponding Source in the same way through the same place at no\r
+    further charge.  You need not require recipients to copy the\r
+    Corresponding Source along with the object code.  If the place to\r
+    copy the object code is a network server, the Corresponding Source\r
+    may be on a different server (operated by you or a third party)\r
+    that supports equivalent copying facilities, provided you maintain\r
+    clear directions next to the object code saying where to find the\r
+    Corresponding Source.  Regardless of what server hosts the\r
+    Corresponding Source, you remain obligated to ensure that it is\r
+    available for as long as needed to satisfy these requirements.\r
+\r
+    e) Convey the object code using peer-to-peer transmission, provided\r
+    you inform other peers where the object code and Corresponding\r
+    Source of the work are being offered to the general public at no\r
+    charge under subsection 6d.\r
+\r
+  A separable portion of the object code, whose source code is excluded\r
+from the Corresponding Source as a System Library, need not be\r
+included in conveying the object code work.\r
+\r
+  A "User Product" is either (1) a "consumer product", which means any\r
+tangible personal property which is normally used for personal, family,\r
+or household purposes, or (2) anything designed or sold for incorporation\r
+into a dwelling.  In determining whether a product is a consumer product,\r
+doubtful cases shall be resolved in favor of coverage.  For a particular\r
+product received by a particular user, "normally used" refers to a\r
+typical or common use of that class of product, regardless of the status\r
+of the particular user or of the way in which the particular user\r
+actually uses, or expects or is expected to use, the product.  A product\r
+is a consumer product regardless of whether the product has substantial\r
+commercial, industrial or non-consumer uses, unless such uses represent\r
+the only significant mode of use of the product.\r
+\r
+  "Installation Information" for a User Product means any methods,\r
+procedures, authorization keys, or other information required to install\r
+and execute modified versions of a covered work in that User Product from\r
+a modified version of its Corresponding Source.  The information must\r
+suffice to ensure that the continued functioning of the modified object\r
+code is in no case prevented or interfered with solely because\r
+modification has been made.\r
+\r
+  If you convey an object code work under this section in, or with, or\r
+specifically for use in, a User Product, and the conveying occurs as\r
+part of a transaction in which the right of possession and use of the\r
+User Product is transferred to the recipient in perpetuity or for a\r
+fixed term (regardless of how the transaction is characterized), the\r
+Corresponding Source conveyed under this section must be accompanied\r
+by the Installation Information.  But this requirement does not apply\r
+if neither you nor any third party retains the ability to install\r
+modified object code on the User Product (for example, the work has\r
+been installed in ROM).\r
+\r
+  The requirement to provide Installation Information does not include a\r
+requirement to continue to provide support service, warranty, or updates\r
+for a work that has been modified or installed by the recipient, or for\r
+the User Product in which it has been modified or installed.  Access to a\r
+network may be denied when the modification itself materially and\r
+adversely affects the operation of the network or violates the rules and\r
+protocols for communication across the network.\r
+\r
+  Corresponding Source conveyed, and Installation Information provided,\r
+in accord with this section must be in a format that is publicly\r
+documented (and with an implementation available to the public in\r
+source code form), and must require no special password or key for\r
+unpacking, reading or copying.\r
+\r
+  7. Additional Terms.\r
+\r
+  "Additional permissions" are terms that supplement the terms of this\r
+License by making exceptions from one or more of its conditions.\r
+Additional permissions that are applicable to the entire Program shall\r
+be treated as though they were included in this License, to the extent\r
+that they are valid under applicable law.  If additional permissions\r
+apply only to part of the Program, that part may be used separately\r
+under those permissions, but the entire Program remains governed by\r
+this License without regard to the additional permissions.\r
+\r
+  When you convey a copy of a covered work, you may at your option\r
+remove any additional permissions from that copy, or from any part of\r
+it.  (Additional permissions may be written to require their own\r
+removal in certain cases when you modify the work.)  You may place\r
+additional permissions on material, added by you to a covered work,\r
+for which you have or can give appropriate copyright permission.\r
+\r
+  Notwithstanding any other provision of this License, for material you\r
+add to a covered work, you may (if authorized by the copyright holders of\r
+that material) supplement the terms of this License with terms:\r
+\r
+    a) Disclaiming warranty or limiting liability differently from the\r
+    terms of sections 15 and 16 of this License; or\r
+\r
+    b) Requiring preservation of specified reasonable legal notices or\r
+    author attributions in that material or in the Appropriate Legal\r
+    Notices displayed by works containing it; or\r
+\r
+    c) Prohibiting misrepresentation of the origin of that material, or\r
+    requiring that modified versions of such material be marked in\r
+    reasonable ways as different from the original version; or\r
+\r
+    d) Limiting the use for publicity purposes of names of licensors or\r
+    authors of the material; or\r
+\r
+    e) Declining to grant rights under trademark law for use of some\r
+    trade names, trademarks, or service marks; or\r
+\r
+    f) Requiring indemnification of licensors and authors of that\r
+    material by anyone who conveys the material (or modified versions of\r
+    it) with contractual assumptions of liability to the recipient, for\r
+    any liability that these contractual assumptions directly impose on\r
+    those licensors and authors.\r
+\r
+  All other non-permissive additional terms are considered "further\r
+restrictions" within the meaning of section 10.  If the Program as you\r
+received it, or any part of it, contains a notice stating that it is\r
+governed by this License along with a term that is a further\r
+restriction, you may remove that term.  If a license document contains\r
+a further restriction but permits relicensing or conveying under this\r
+License, you may add to a covered work material governed by the terms\r
+of that license document, provided that the further restriction does\r
+not survive such relicensing or conveying.\r
+\r
+  If you add terms to a covered work in accord with this section, you\r
+must place, in the relevant source files, a statement of the\r
+additional terms that apply to those files, or a notice indicating\r
+where to find the applicable terms.\r
+\r
+  Additional terms, permissive or non-permissive, may be stated in the\r
+form of a separately written license, or stated as exceptions;\r
+the above requirements apply either way.\r
+\r
+  8. Termination.\r
+\r
+  You may not propagate or modify a covered work except as expressly\r
+provided under this License.  Any attempt otherwise to propagate or\r
+modify it is void, and will automatically terminate your rights under\r
+this License (including any patent licenses granted under the third\r
+paragraph of section 11).\r
+\r
+  However, if you cease all violation of this License, then your\r
+license from a particular copyright holder is reinstated (a)\r
+provisionally, unless and until the copyright holder explicitly and\r
+finally terminates your license, and (b) permanently, if the copyright\r
+holder fails to notify you of the violation by some reasonable means\r
+prior to 60 days after the cessation.\r
+\r
+  Moreover, your license from a particular copyright holder is\r
+reinstated permanently if the copyright holder notifies you of the\r
+violation by some reasonable means, this is the first time you have\r
+received notice of violation of this License (for any work) from that\r
+copyright holder, and you cure the violation prior to 30 days after\r
+your receipt of the notice.\r
+\r
+  Termination of your rights under this section does not terminate the\r
+licenses of parties who have received copies or rights from you under\r
+this License.  If your rights have been terminated and not permanently\r
+reinstated, you do not qualify to receive new licenses for the same\r
+material under section 10.\r
+\r
+  9. Acceptance Not Required for Having Copies.\r
+\r
+  You are not required to accept this License in order to receive or\r
+run a copy of the Program.  Ancillary propagation of a covered work\r
+occurring solely as a consequence of using peer-to-peer transmission\r
+to receive a copy likewise does not require acceptance.  However,\r
+nothing other than this License grants you permission to propagate or\r
+modify any covered work.  These actions infringe copyright if you do\r
+not accept this License.  Therefore, by modifying or propagating a\r
+covered work, you indicate your acceptance of this License to do so.\r
+\r
+  10. Automatic Licensing of Downstream Recipients.\r
+\r
+  Each time you convey a covered work, the recipient automatically\r
+receives a license from the original licensors, to run, modify and\r
+propagate that work, subject to this License.  You are not responsible\r
+for enforcing compliance by third parties with this License.\r
+\r
+  An "entity transaction" is a transaction transferring control of an\r
+organization, or substantially all assets of one, or subdividing an\r
+organization, or merging organizations.  If propagation of a covered\r
+work results from an entity transaction, each party to that\r
+transaction who receives a copy of the work also receives whatever\r
+licenses to the work the party's predecessor in interest had or could\r
+give under the previous paragraph, plus a right to possession of the\r
+Corresponding Source of the work from the predecessor in interest, if\r
+the predecessor has it or can get it with reasonable efforts.\r
+\r
+  You may not impose any further restrictions on the exercise of the\r
+rights granted or affirmed under this License.  For example, you may\r
+not impose a license fee, royalty, or other charge for exercise of\r
+rights granted under this License, and you may not initiate litigation\r
+(including a cross-claim or counterclaim in a lawsuit) alleging that\r
+any patent claim is infringed by making, using, selling, offering for\r
+sale, or importing the Program or any portion of it.\r
+\r
+  11. Patents.\r
+\r
+  A "contributor" is a copyright holder who authorizes use under this\r
+License of the Program or a work on which the Program is based.  The\r
+work thus licensed is called the contributor's "contributor version".\r
+\r
+  A contributor's "essential patent claims" are all patent claims\r
+owned or controlled by the contributor, whether already acquired or\r
+hereafter acquired, that would be infringed by some manner, permitted\r
+by this License, of making, using, or selling its contributor version,\r
+but do not include claims that would be infringed only as a\r
+consequence of further modification of the contributor version.  For\r
+purposes of this definition, "control" includes the right to grant\r
+patent sublicenses in a manner consistent with the requirements of\r
+this License.\r
+\r
+  Each contributor grants you a non-exclusive, worldwide, royalty-free\r
+patent license under the contributor's essential patent claims, to\r
+make, use, sell, offer for sale, import and otherwise run, modify and\r
+propagate the contents of its contributor version.\r
+\r
+  In the following three paragraphs, a "patent license" is any express\r
+agreement or commitment, however denominated, not to enforce a patent\r
+(such as an express permission to practice a patent or covenant not to\r
+sue for patent infringement).  To "grant" such a patent license to a\r
+party means to make such an agreement or commitment not to enforce a\r
+patent against the party.\r
+\r
+  If you convey a covered work, knowingly relying on a patent license,\r
+and the Corresponding Source of the work is not available for anyone\r
+to copy, free of charge and under the terms of this License, through a\r
+publicly available network server or other readily accessible means,\r
+then you must either (1) cause the Corresponding Source to be so\r
+available, or (2) arrange to deprive yourself of the benefit of the\r
+patent license for this particular work, or (3) arrange, in a manner\r
+consistent with the requirements of this License, to extend the patent\r
+license to downstream recipients.  "Knowingly relying" means you have\r
+actual knowledge that, but for the patent license, your conveying the\r
+covered work in a country, or your recipient's use of the covered work\r
+in a country, would infringe one or more identifiable patents in that\r
+country that you have reason to believe are valid.\r
+\r
+  If, pursuant to or in connection with a single transaction or\r
+arrangement, you convey, or propagate by procuring conveyance of, a\r
+covered work, and grant a patent license to some of the parties\r
+receiving the covered work authorizing them to use, propagate, modify\r
+or convey a specific copy of the covered work, then the patent license\r
+you grant is automatically extended to all recipients of the covered\r
+work and works based on it.\r
+\r
+  A patent license is "discriminatory" if it does not include within\r
+the scope of its coverage, prohibits the exercise of, or is\r
+conditioned on the non-exercise of one or more of the rights that are\r
+specifically granted under this License.  You may not convey a covered\r
+work if you are a party to an arrangement with a third party that is\r
+in the business of distributing software, under which you make payment\r
+to the third party based on the extent of your activity of conveying\r
+the work, and under which the third party grants, to any of the\r
+parties who would receive the covered work from you, a discriminatory\r
+patent license (a) in connection with copies of the covered work\r
+conveyed by you (or copies made from those copies), or (b) primarily\r
+for and in connection with specific products or compilations that\r
+contain the covered work, unless you entered into that arrangement,\r
+or that patent license was granted, prior to 28 March 2007.\r
+\r
+  Nothing in this License shall be construed as excluding or limiting\r
+any implied license or other defenses to infringement that may\r
+otherwise be available to you under applicable patent law.\r
+\r
+  12. No Surrender of Others' Freedom.\r
+\r
+  If conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot convey a\r
+covered work so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you may\r
+not convey it at all.  For example, if you agree to terms that obligate you\r
+to collect a royalty for further conveying from those to whom you convey\r
+the Program, the only way you could satisfy both those terms and this\r
+License would be to refrain entirely from conveying the Program.\r
+\r
+  13. Use with the GNU Affero General Public License.\r
+\r
+  Notwithstanding any other provision of this License, you have\r
+permission to link or combine any covered work with a work licensed\r
+under version 3 of the GNU Affero General Public License into a single\r
+combined work, and to convey the resulting work.  The terms of this\r
+License will continue to apply to the part which is the covered work,\r
+but the special requirements of the GNU Affero General Public License,\r
+section 13, concerning interaction through a network will apply to the\r
+combination as such.\r
+\r
+  14. Revised Versions of this License.\r
+\r
+  The Free Software Foundation may publish revised and/or new versions of\r
+the GNU General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+  Each version is given a distinguishing version number.  If the\r
+Program specifies that a certain numbered version of the GNU General\r
+Public License "or any later version" applies to it, you have the\r
+option of following the terms and conditions either of that numbered\r
+version or of any later version published by the Free Software\r
+Foundation.  If the Program does not specify a version number of the\r
+GNU General Public License, you may choose any version ever published\r
+by the Free Software Foundation.\r
+\r
+  If the Program specifies that a proxy can decide which future\r
+versions of the GNU General Public License can be used, that proxy's\r
+public statement of acceptance of a version permanently authorizes you\r
+to choose that version for the Program.\r
+\r
+  Later license versions may give you additional or different\r
+permissions.  However, no additional obligations are imposed on any\r
+author or copyright holder as a result of your choosing to follow a\r
+later version.\r
+\r
+  15. Disclaimer of Warranty.\r
+\r
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\r
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. Limitation of Liability.\r
+\r
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r
+SUCH DAMAGES.\r
+\r
+  17. Interpretation of Sections 15 and 16.\r
+\r
+  If the disclaimer of warranty and limitation of liability provided\r
+above cannot be given local legal effect according to their terms,\r
+reviewing courts shall apply local law that most closely approximates\r
+an absolute waiver of all civil liability in connection with the\r
+Program, unless a warranty or assumption of liability accompanies a\r
+copy of the Program in return for a fee.\r
+\r
+                     END OF TERMS AND CONDITIONS\r
+\r
+            How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+state the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software: you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation, either version 3 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+  If the program does terminal interaction, make it output a short\r
+notice like this when it starts in an interactive mode:\r
+\r
+    <program>  Copyright (C) <year>  <name of author>\r
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, your program's commands\r
+might be different; for a GUI interface, you would use an "about box".\r
+\r
+  You should also get your employer (if you work as a programmer) or school,\r
+if any, to sign a "copyright disclaimer" for the program, if necessary.\r
+For more information on this, and how to apply and follow the GNU GPL, see\r
+<http://www.gnu.org/licenses/>.\r
+\r
+  The GNU General Public License does not permit incorporating your program\r
+into proprietary programs.  If your program is a subroutine library, you\r
+may consider it more useful to permit linking proprietary applications with\r
+the library.  If this is what you want to do, use the GNU Lesser General\r
+Public License instead of this License.  But first, please read\r
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.\r
diff --git a/ffmpeg 0.8/licenses/freetype.txt b/ffmpeg 0.8/licenses/freetype.txt
new file mode 100644 (file)
index 0000000..b6ee268
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year  name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.\r
diff --git a/ffmpeg 0.8/licenses/frei0r.txt b/ffmpeg 0.8/licenses/frei0r.txt
new file mode 100644 (file)
index 0000000..0f3bd3d
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year  name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/gsm.txt b/ffmpeg 0.8/licenses/gsm.txt
new file mode 100644 (file)
index 0000000..8aec8e1
--- /dev/null
@@ -0,0 +1,35 @@
+Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,\r
+Technische Universitaet Berlin\r
+\r
+Any use of this software is permitted provided that this notice is not\r
+removed and that neither the authors nor the Technische Universitaet Berlin\r
+are deemed to have made any representations as to the suitability of this\r
+software for any purpose nor are held responsible for any defects of\r
+this software.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.\r
+\r
+As a matter of courtesy, the authors request to be informed about uses\r
+this software has found, about bugs in this software, and about any\r
+improvements that may be of general interest.\r
+\r
+Berlin, 28.11.1994\r
+Jutta Degener\r
+Carsten Bormann\r
+\r
+                                 oOo\r
+\r
+Since the original terms of 15 years ago maybe do not make our\r
+intentions completely clear given today's refined usage of the legal\r
+terms, we append this additional permission:\r
+\r
+      Permission to use, copy, modify, and distribute this software\r
+      for any purpose with or without fee is hereby granted,\r
+      provided that this notice is not removed and that neither\r
+      the authors nor the Technische Universitaet Berlin are\r
+      deemed to have made any representations as to the suitability\r
+      of this software for any purpose nor are held responsible\r
+      for any defects of this software.  THERE IS ABSOLUTELY NO\r
+      WARRANTY FOR THIS SOFTWARE.\r
+\r
+Berkeley/Bremen, 05.04.2009\r
+Jutta Degener\r
+Carsten Bormann
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/lame.txt b/ffmpeg 0.8/licenses/lame.txt
new file mode 100644 (file)
index 0000000..b240210
--- /dev/null
@@ -0,0 +1,481 @@
+                 GNU LIBRARY GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1991 Free Software Foundation, Inc.\r
+                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+[This is the first released version of the library GPL.  It is\r
+ numbered 2 because it goes with version 2 of the ordinary GPL.]\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+Licenses are intended to guarantee your freedom to share and change\r
+free software--to make sure the software is free for all its users.\r
+\r
+  This license, the Library General Public License, applies to some\r
+specially designated Free Software Foundation software, and to any\r
+other libraries whose authors decide to use it.  You can use it for\r
+your libraries, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if\r
+you distribute copies of the library, or if you modify it.\r
+\r
+  For example, if you distribute copies of the library, whether gratis\r
+or for a fee, you must give the recipients all the rights that we gave\r
+you.  You must make sure that they, too, receive or can get the source\r
+code.  If you link a program with the library, you must provide\r
+complete object files to the recipients so that they can relink them\r
+with the library, after making changes to the library and recompiling\r
+it.  And you must show them these terms so they know their rights.\r
+\r
+  Our method of protecting your rights has two steps: (1) copyright\r
+the library, and (2) offer you this license which gives you legal\r
+permission to copy, distribute and/or modify the library.\r
+\r
+  Also, for each distributor's protection, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+library.  If the library is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original\r
+version, so that any problems introduced by others will not reflect on\r
+the original authors' reputations.\r
+\f\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that companies distributing free\r
+software will individually obtain patent licenses, thus in effect\r
+transforming the program into proprietary software.  To prevent this,\r
+we have made it clear that any patent must be licensed for everyone's\r
+free use or not licensed at all.\r
+\r
+  Most GNU software, including some libraries, is covered by the ordinary\r
+GNU General Public License, which was designed for utility programs.  This\r
+license, the GNU Library General Public License, applies to certain\r
+designated libraries.  This license is quite different from the ordinary\r
+one; be sure to read it in full, and don't assume that anything in it is\r
+the same as in the ordinary license.\r
+\r
+  The reason we have a separate public license for some libraries is that\r
+they blur the distinction we usually make between modifying or adding to a\r
+program and simply using it.  Linking a program with a library, without\r
+changing the library, is in some sense simply using the library, and is\r
+analogous to running a utility program or application program.  However, in\r
+a textual and legal sense, the linked executable is a combined work, a\r
+derivative of the original library, and the ordinary General Public License\r
+treats it as such.\r
+\r
+  Because of this blurred distinction, using the ordinary General\r
+Public License for libraries did not effectively promote software\r
+sharing, because most developers did not use the libraries.  We\r
+concluded that weaker conditions might promote sharing better.\r
+\r
+  However, unrestricted linking of non-free programs would deprive the\r
+users of those programs of all benefit from the free status of the\r
+libraries themselves.  This Library General Public License is intended to\r
+permit developers of non-free programs to use free libraries, while\r
+preserving your freedom as a user of such programs to change the free\r
+libraries that are incorporated in them.  (We have not seen how to achieve\r
+this as regards changes in header files, but we have achieved it as regards\r
+changes in the actual functions of the Library.)  The hope is that this\r
+will lead to faster development of free libraries.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.  Pay close attention to the difference between a\r
+"work based on the library" and a "work that uses the library".  The\r
+former contains code derived from the library, while the latter only\r
+works together with the library.\r
+\r
+  Note that it is possible for a library to be covered by the ordinary\r
+General Public License rather than by this special one.\r
+\f\r
+                 GNU LIBRARY GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License Agreement applies to any software library which\r
+contains a notice placed by the copyright holder or other authorized\r
+party saying it may be distributed under the terms of this Library\r
+General Public License (also called "this License").  Each licensee is\r
+addressed as "you".\r
+\r
+  A "library" means a collection of software functions and/or data\r
+prepared so as to be conveniently linked with application programs\r
+(which use some of those functions and data) to form executables.\r
+\r
+  The "Library", below, refers to any such software library or work\r
+which has been distributed under these terms.  A "work based on the\r
+Library" means either the Library or any derivative work under\r
+copyright law: that is to say, a work containing the Library or a\r
+portion of it, either verbatim or with modifications and/or translated\r
+straightforwardly into another language.  (Hereinafter, translation is\r
+included without limitation in the term "modification".)\r
+\r
+  "Source code" for a work means the preferred form of the work for\r
+making modifications to it.  For a library, complete source code means\r
+all the source code for all modules it contains, plus any associated\r
+interface definition files, plus the scripts used to control compilation\r
+and installation of the library.\r
+\r
+  Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running a program using the Library is not restricted, and output from\r
+such a program is covered only if its contents constitute a work based\r
+on the Library (independent of the use of the Library in a tool for\r
+writing it).  Whether that is true depends on what the Library does\r
+and what the program that uses the Library does.\r
+  \r
+  1. You may copy and distribute verbatim copies of the Library's\r
+complete source code as you receive it, in any medium, provided that\r
+you conspicuously and appropriately publish on each copy an\r
+appropriate copyright notice and disclaimer of warranty; keep intact\r
+all the notices that refer to this License and to the absence of any\r
+warranty; and distribute a copy of this License along with the\r
+Library.\r
+\r
+  You may charge a fee for the physical act of transferring a copy,\r
+and you may at your option offer warranty protection in exchange for a\r
+fee.\r
+\f\r
+  2. You may modify your copy or copies of the Library or any portion\r
+of it, thus forming a work based on the Library, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) The modified work must itself be a software library.\r
+\r
+    b) You must cause the files modified to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    c) You must cause the whole of the work to be licensed at no\r
+    charge to all third parties under the terms of this License.\r
+\r
+    d) If a facility in the modified Library refers to a function or a\r
+    table of data to be supplied by an application program that uses\r
+    the facility, other than as an argument passed when the facility\r
+    is invoked, then you must make a good faith effort to ensure that,\r
+    in the event an application does not supply such function or\r
+    table, the facility still operates, and performs whatever part of\r
+    its purpose remains meaningful.\r
+\r
+    (For example, a function in a library to compute square roots has\r
+    a purpose that is entirely well-defined independent of the\r
+    application.  Therefore, Subsection 2d requires that any\r
+    application-supplied function or table used by this function must\r
+    be optional: if the application does not supply it, the square\r
+    root function must still compute square roots.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Library,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Library, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote\r
+it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Library.\r
+\r
+In addition, mere aggregation of another work not based on the Library\r
+with the Library (or with a work based on the Library) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may opt to apply the terms of the ordinary GNU General Public\r
+License instead of this License to a given copy of the Library.  To do\r
+this, you must alter all the notices that refer to this License, so\r
+that they refer to the ordinary GNU General Public License, version 2,\r
+instead of to this License.  (If a newer version than version 2 of the\r
+ordinary GNU General Public License has appeared, then you can specify\r
+that version instead if you wish.)  Do not make any other change in\r
+these notices.\r
+\f\r
+  Once this change is made in a given copy, it is irreversible for\r
+that copy, so the ordinary GNU General Public License applies to all\r
+subsequent copies and derivative works made from that copy.\r
+\r
+  This option is useful when you wish to copy part of the code of\r
+the Library into a program that is not a library.\r
+\r
+  4. You may copy and distribute the Library (or a portion or\r
+derivative of it, under Section 2) in object code or executable form\r
+under the terms of Sections 1 and 2 above provided that you accompany\r
+it with the complete corresponding machine-readable source code, which\r
+must be distributed under the terms of Sections 1 and 2 above on a\r
+medium customarily used for software interchange.\r
+\r
+  If distribution of object code is made by offering access to copy\r
+from a designated place, then offering equivalent access to copy the\r
+source code from the same place satisfies the requirement to\r
+distribute the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  5. A program that contains no derivative of any portion of the\r
+Library, but is designed to work with the Library by being compiled or\r
+linked with it, is called a "work that uses the Library".  Such a\r
+work, in isolation, is not a derivative work of the Library, and\r
+therefore falls outside the scope of this License.\r
+\r
+  However, linking a "work that uses the Library" with the Library\r
+creates an executable that is a derivative of the Library (because it\r
+contains portions of the Library), rather than a "work that uses the\r
+library".  The executable is therefore covered by this License.\r
+Section 6 states terms for distribution of such executables.\r
+\r
+  When a "work that uses the Library" uses material from a header file\r
+that is part of the Library, the object code for the work may be a\r
+derivative work of the Library even though the source code is not.\r
+Whether this is true is especially significant if the work can be\r
+linked without the Library, or if the work is itself a library.  The\r
+threshold for this to be true is not precisely defined by law.\r
+\r
+  If such an object file uses only numerical parameters, data\r
+structure layouts and accessors, and small macros and small inline\r
+functions (ten lines or less in length), then the use of the object\r
+file is unrestricted, regardless of whether it is legally a derivative\r
+work.  (Executables containing this object code plus portions of the\r
+Library will still fall under Section 6.)\r
+\r
+  Otherwise, if the work is a derivative of the Library, you may\r
+distribute the object code for the work under the terms of Section 6.\r
+Any executables containing that work also fall under Section 6,\r
+whether or not they are linked directly with the Library itself.\r
+\f\r
+  6. As an exception to the Sections above, you may also compile or\r
+link a "work that uses the Library" with the Library to produce a\r
+work containing portions of the Library, and distribute that work\r
+under terms of your choice, provided that the terms permit\r
+modification of the work for the customer's own use and reverse\r
+engineering for debugging such modifications.\r
+\r
+  You must give prominent notice with each copy of the work that the\r
+Library is used in it and that the Library and its use are covered by\r
+this License.  You must supply a copy of this License.  If the work\r
+during execution displays copyright notices, you must include the\r
+copyright notice for the Library among them, as well as a reference\r
+directing the user to the copy of this License.  Also, you must do one\r
+of these things:\r
+\r
+    a) Accompany the work with the complete corresponding\r
+    machine-readable source code for the Library including whatever\r
+    changes were used in the work (which must be distributed under\r
+    Sections 1 and 2 above); and, if the work is an executable linked\r
+    with the Library, with the complete machine-readable "work that\r
+    uses the Library", as object code and/or source code, so that the\r
+    user can modify the Library and then relink to produce a modified\r
+    executable containing the modified Library.  (It is understood\r
+    that the user who changes the contents of definitions files in the\r
+    Library will not necessarily be able to recompile the application\r
+    to use the modified definitions.)\r
+\r
+    b) Accompany the work with a written offer, valid for at\r
+    least three years, to give the same user the materials\r
+    specified in Subsection 6a, above, for a charge no more\r
+    than the cost of performing this distribution.\r
+\r
+    c) If distribution of the work is made by offering access to copy\r
+    from a designated place, offer equivalent access to copy the above\r
+    specified materials from the same place.\r
+\r
+    d) Verify that the user has already received a copy of these\r
+    materials or that you have already sent this user a copy.\r
+\r
+  For an executable, the required form of the "work that uses the\r
+Library" must include any data and utility programs needed for\r
+reproducing the executable from it.  However, as a special exception,\r
+the source code distributed need not include anything that is normally\r
+distributed (in either source or binary form) with the major\r
+components (compiler, kernel, and so on) of the operating system on\r
+which the executable runs, unless that component itself accompanies\r
+the executable.\r
+\r
+  It may happen that this requirement contradicts the license\r
+restrictions of other proprietary libraries that do not normally\r
+accompany the operating system.  Such a contradiction means you cannot\r
+use both them and the Library together in an executable that you\r
+distribute.\r
+\f\r
+  7. You may place library facilities that are a work based on the\r
+Library side-by-side in a single library together with other library\r
+facilities not covered by this License, and distribute such a combined\r
+library, provided that the separate distribution of the work based on\r
+the Library and of the other library facilities is otherwise\r
+permitted, and provided that you do these two things:\r
+\r
+    a) Accompany the combined library with a copy of the same work\r
+    based on the Library, uncombined with any other library\r
+    facilities.  This must be distributed under the terms of the\r
+    Sections above.\r
+\r
+    b) Give prominent notice with the combined library of the fact\r
+    that part of it is a work based on the Library, and explaining\r
+    where to find the accompanying uncombined form of the same work.\r
+\r
+  8. You may not copy, modify, sublicense, link with, or distribute\r
+the Library except as expressly provided under this License.  Any\r
+attempt otherwise to copy, modify, sublicense, link with, or\r
+distribute the Library is void, and will automatically terminate your\r
+rights under this License.  However, parties who have received copies,\r
+or rights, from you under this License will not have their licenses\r
+terminated so long as such parties remain in full compliance.\r
+\r
+  9. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Library or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Library (or any work based on the\r
+Library), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Library or works based on it.\r
+\r
+  10. Each time you redistribute the Library (or any work based on the\r
+Library), the recipient automatically receives a license from the\r
+original licensor to copy, distribute, link with or modify the Library\r
+subject to these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\f\r
+  11. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Library at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Library by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Library.\r
+\r
+If any portion of this section is held invalid or unenforceable under any\r
+particular circumstance, the balance of the section is intended to apply,\r
+and the section as a whole is intended to apply in other circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  12. If the distribution and/or use of the Library is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Library under this License may add\r
+an explicit geographical distribution limitation excluding those countries,\r
+so that distribution is permitted only in or among countries not thus\r
+excluded.  In such case, this License incorporates the limitation as if\r
+written in the body of this License.\r
+\r
+  13. The Free Software Foundation may publish revised and/or new\r
+versions of the Library General Public License from time to time.\r
+Such new versions will be similar in spirit to the present version,\r
+but may differ in detail to address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Library\r
+specifies a version number of this License which applies to it and\r
+"any later version", you have the option of following the terms and\r
+conditions either of that version or of any later version published by\r
+the Free Software Foundation.  If the Library does not specify a\r
+license version number, you may choose any version ever published by\r
+the Free Software Foundation.\r
+\f\r
+  14. If you wish to incorporate parts of the Library into other free\r
+programs whose distribution conditions are incompatible with these,\r
+write to the author to ask for permission.  For software which is\r
+copyrighted by the Free Software Foundation, write to the Free\r
+Software Foundation; we sometimes make exceptions for this.  Our\r
+decision will be guided by the two goals of preserving the free status\r
+of all derivatives of our free software and of promoting the sharing\r
+and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\r
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r
+DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Libraries\r
+\r
+  If you develop a new library, and you want it to be of the greatest\r
+possible use to the public, we recommend making it free software that\r
+everyone can redistribute and change.  You can do so by permitting\r
+redistribution under these terms (or, alternatively, under the terms of the\r
+ordinary General Public License).\r
+\r
+  To apply these terms, attach the following notices to the library.  It is\r
+safest to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least the\r
+"copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the library's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This library is free software; you can redistribute it and/or\r
+    modify it under the terms of the GNU Library General Public\r
+    License as published by the Free Software Foundation; either\r
+    version 2 of the License, or (at your option) any later version.\r
+\r
+    This library is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+    Library General Public License for more details.\r
+\r
+    You should have received a copy of the GNU Library General Public\r
+    License along with this library; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the library, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the\r
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1990\r
+  Ty Coon, President of Vice\r
+\r
+That's all there is to it!
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/libvpx.txt b/ffmpeg 0.8/licenses/libvpx.txt
new file mode 100644 (file)
index 0000000..872c1f1
--- /dev/null
@@ -0,0 +1,29 @@
+Copyright (c) 2010, Google Inc. All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are\r
+met:\r
+\r
+  * Redistributions of source code must retain the above copyright\r
+    notice, this list of conditions and the following disclaimer.\r
+\r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in\r
+    the documentation and/or other materials provided with the\r
+    distribution.\r
+\r
+  * Neither the name of Google nor the names of its contributors may\r
+    be used to endorse or promote products derived from this software\r
+    without specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
diff --git a/ffmpeg 0.8/licenses/opencore-amr.txt b/ffmpeg 0.8/licenses/opencore-amr.txt
new file mode 100644 (file)
index 0000000..6c40ca5
--- /dev/null
@@ -0,0 +1,191 @@
+Apache License\r
+Version 2.0, January 2004\r
+http://www.apache.org/licenses/\r
+\r
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+1. Definitions.\r
+\r
+"License" shall mean the terms and conditions for use, reproduction, and\r
+distribution as defined by Sections 1 through 9 of this document.\r
+\r
+"Licensor" shall mean the copyright owner or entity authorized by the\r
+copyright owner that is granting the License.\r
+\r
+"Legal Entity" shall mean the union of the acting entity and all other\r
+entities that control, are controlled by, or are under common control with\r
+that entity. For the purposes of this definition, "control" means (i) the\r
+power, direct or indirect, to cause the direction or management of such\r
+entity, whether by contract or otherwise, or (ii) ownership of fifty\r
+percent (50%) or more of the outstanding shares, or (iii) beneficial\r
+ownership of such entity.\r
+\r
+"You" (or "Your") shall mean an individual or Legal Entity exercising\r
+permissions granted by this License.\r
+\r
+"Source" form shall mean the preferred form for making modifications,\r
+including but not limited to software source code, documentation source,\r
+and configuration files.\r
+\r
+"Object" form shall mean any form resulting from mechanical transformation\r
+or translation of a Source form, including but not limited to compiled\r
+object code, generated documentation, and conversions to other media types.\r
+\r
+"Work" shall mean the work of authorship, whether in Source or Object form,\r
+made available under the License, as indicated by a copyright notice that\r
+is included in or attached to the work (an example is provided in the\r
+Appendix below).\r
+\r
+"Derivative Works" shall mean any work, whether in Source or Object form,\r
+that is based on (or derived from) the Work and for which the editorial\r
+revisions, annotations, elaborations, or other modifications represent, as\r
+a whole, an original work of authorship. For the purposes of this License,\r
+Derivative Works shall not include works that remain separable from, or\r
+merely link (or bind by name) to the interfaces of, the Work and Derivative\r
+Works thereof.\r
+\r
+"Contribution" shall mean any work of authorship, including the original\r
+version of the Work and any modifications or additions to that Work or\r
+Derivative Works thereof, that is intentionally submitted to Licensor for\r
+inclusion in the Work by the copyright owner or by an individual or Legal\r
+Entity authorized to submit on behalf of the copyright owner. For the\r
+purposes of this definition, "submitted" means any form of electronic,\r
+verbal, or written communication sent to the Licensor or its\r
+representatives, including but not limited to communication on electronic\r
+mailing lists, source code control systems, and issue tracking systems that\r
+are managed by, or on behalf of, the Licensor for the purpose of discussing\r
+and improving the Work, but excluding communication that is conspicuously\r
+marked or otherwise designated in writing by the copyright owner as "Not a\r
+Contribution."\r
+\r
+"Contributor" shall mean Licensor and any individual or Legal Entity on\r
+behalf of whom a Contribution has been received by Licensor and\r
+subsequently incorporated within the Work.\r
+\r
+2. Grant of Copyright License. Subject to the terms and conditions of this\r
+License, each Contributor hereby grants to You a perpetual, worldwide,\r
+non-exclusive, no-charge, royalty-free, irrevocable copyright license to\r
+reproduce, prepare Derivative Works of, publicly display, publicly perform,\r
+sublicense, and distribute the Work and such Derivative Works in Source or\r
+Object form.\r
+\r
+3. Grant of Patent License. Subject to the terms and conditions of this\r
+License, each Contributor hereby grants to You a perpetual, worldwide,\r
+non-exclusive, no-charge, royalty-free, irrevocable (except as stated in\r
+this section) patent license to make, have made, use, offer to sell, sell,\r
+import, and otherwise transfer the Work, where such license applies only to\r
+those patent claims licensable by such Contributor that are necessarily\r
+infringed by their Contribution(s) alone or by combination of their\r
+Contribution(s) with the Work to which such Contribution(s) was submitted.\r
+If You institute patent litigation against any entity (including a\r
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a\r
+Contribution incorporated within the Work constitutes direct or\r
+contributory patent infringement, then any patent licenses granted to You\r
+under this License for that Work shall terminate as of the date such\r
+litigation is filed.\r
+\r
+4. Redistribution. You may reproduce and distribute copies of the Work or\r
+Derivative Works thereof in any medium, with or without modifications, and\r
+in Source or Object form, provided that You meet the following conditions:\r
+\r
+   1. You must give any other recipients of the Work or Derivative Works a\r
+copy of this License; and\r
+\r
+   2. You must cause any modified files to carry prominent notices stating\r
+that You changed the files; and\r
+\r
+   3. You must retain, in the Source form of any Derivative Works that You\r
+distribute, all copyright, patent, trademark, and attribution notices from\r
+the Source form of the Work, excluding those notices that do not pertain to\r
+any part of the Derivative Works; and\r
+\r
+   4. If the Work includes a "NOTICE" text file as part of its\r
+distribution, then any Derivative Works that You distribute must include a\r
+readable copy of the attribution notices contained within such NOTICE file,\r
+excluding those notices that do not pertain to any part of the Derivative\r
+Works, in at least one of the following places: within a NOTICE text file\r
+distributed as part of the Derivative Works; within the Source form or\r
+documentation, if provided along with the Derivative Works; or, within a\r
+display generated by the Derivative Works, if and wherever such third-party\r
+notices normally appear. The contents of the NOTICE file are for\r
+informational purposes only and do not modify the License. You may add Your\r
+own attribution notices within Derivative Works that You distribute,\r
+alongside or as an addendum to the NOTICE text from the Work, provided that\r
+such additional attribution notices cannot be construed as modifying the\r
+License.\r
+\r
+You may add Your own copyright statement to Your modifications and may\r
+provide additional or different license terms and conditions for use,\r
+reproduction, or distribution of Your modifications, or for any such\r
+Derivative Works as a whole, provided Your use, reproduction, and\r
+distribution of the Work otherwise complies with the conditions stated in\r
+this License.\r
+\r
+5. Submission of Contributions. Unless You explicitly state otherwise, any\r
+Contribution intentionally submitted for inclusion in the Work by You to\r
+the Licensor shall be under the terms and conditions of this License,\r
+without any additional terms or conditions. Notwithstanding the above,\r
+nothing herein shall supersede or modify the terms of any separate license\r
+agreement you may have executed with Licensor regarding such Contributions.\r
+\r
+6. Trademarks. This License does not grant permission to use the trade\r
+names, trademarks, service marks, or product names of the Licensor, except\r
+as required for reasonable and customary use in describing the origin of\r
+the Work and reproducing the content of the NOTICE file.\r
+\r
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to\r
+in writing, Licensor provides the Work (and each Contributor provides its\r
+Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+KIND, either express or implied, including, without limitation, any\r
+warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or\r
+FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for\r
+determining the appropriateness of using or redistributing the Work and\r
+assume any risks associated with Your exercise of permissions under this\r
+License.\r
+\r
+8. Limitation of Liability. In no event and under no legal theory, whether\r
+in tort (including negligence), contract, or otherwise, unless required by\r
+applicable law (such as deliberate and grossly negligent acts) or agreed to\r
+in writing, shall any Contributor be liable to You for damages, including\r
+any direct, indirect, special, incidental, or consequential damages of any\r
+character arising as a result of this License or out of the use or\r
+inability to use the Work (including but not limited to damages for loss of\r
+goodwill, work stoppage, computer failure or malfunction, or any and all\r
+other commercial damages or losses), even if such Contributor has been\r
+advised of the possibility of such damages.\r
+\r
+9. Accepting Warranty or Additional Liability. While redistributing the\r
+Work or Derivative Works thereof, You may choose to offer, and charge a fee\r
+for, acceptance of support, warranty, indemnity, or other liability\r
+obligations and/or rights consistent with this License. However, in\r
+accepting such obligations, You may act only on Your own behalf and on Your\r
+sole responsibility, not on behalf of any other Contributor, and only if\r
+You agree to indemnify, defend, and hold each Contributor harmless for any\r
+liability incurred by, or claims asserted against, such Contributor by\r
+reason of your accepting any such warranty or additional liability.\r
+\r
+END OF TERMS AND CONDITIONS\r
+\r
+APPENDIX: How to apply the Apache License to your work\r
+\r
+To apply the Apache License to your work, attach the following boilerplate\r
+notice, with the fields enclosed by brackets "[]" replaced with your own\r
+identifying information. (Don't include the brackets!) The text should be\r
+enclosed in the appropriate comment syntax for the file format. We also\r
+recommend that a file or class name and description of purpose be included\r
+on the same "printed page" as the copyright notice for easier\r
+identification within third-party archives.\r
+\r
+ Copyright [yyyy] [name of copyright owner]\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License"); you may\r
+ not use this file except in compliance with the License. You may obtain a\r
+ copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable\r
+ law or agreed to in writing, software distributed under the License is\r
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ KIND, either express or implied. See the License for the specific language\r
+ governing permissions and limitations under the License.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/openjpeg.txt b/ffmpeg 0.8/licenses/openjpeg.txt
new file mode 100644 (file)
index 0000000..0ad4488
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium\r
+ * Copyright (c) 2002-2007, Professor Benoit Macq\r
+ * Copyright (c) 2001-2003, David Janssens\r
+ * Copyright (c) 2002-2003, Yannick Verschueren\r
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe\r
+ * Copyright (c) 2005, Herve Drolon, FreeImage Team\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
+ * POSSIBILITY OF SUCH DAMAGE.\r
+ */
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/rtmp.txt b/ffmpeg 0.8/licenses/rtmp.txt
new file mode 100644 (file)
index 0000000..7ba5aff
--- /dev/null
@@ -0,0 +1,503 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE\r
+                       Version 2.1, February 1999\r
+\r
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.\r
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+[This is the first released version of the Lesser GPL.  It also counts\r
+ as the successor of the GNU Library Public License, version 2, hence\r
+ the version number 2.1.]\r
+\r
+                            Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+Licenses are intended to guarantee your freedom to share and change\r
+free software--to make sure the software is free for all its users.\r
+\r
+  This license, the Lesser General Public License, applies to some\r
+specially designated software packages--typically libraries--of the\r
+Free Software Foundation and other authors who decide to use it.  You\r
+can use it too, but we suggest you first think carefully about whether\r
+this license or the ordinary General Public License is the better\r
+strategy to use in any particular case, based on the explanations below.\r
+\r
+  When we speak of free software, we are referring to freedom of use,\r
+not price.  Our General Public Licenses are designed to make sure that\r
+you have the freedom to distribute copies of free software (and charge\r
+for this service if you wish); that you receive source code or can get\r
+it if you want it; that you can change the software and use pieces of\r
+it in new free programs; and that you are informed that you can do\r
+these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+distributors to deny you these rights or to ask you to surrender these\r
+rights.  These restrictions translate to certain responsibilities for\r
+you if you distribute copies of the library or if you modify it.\r
+\r
+  For example, if you distribute copies of the library, whether gratis\r
+or for a fee, you must give the recipients all the rights that we gave\r
+you.  You must make sure that they, too, receive or can get the source\r
+code.  If you link other code with the library, you must provide\r
+complete object files to the recipients, so that they can relink them\r
+with the library after making changes to the library and recompiling\r
+it.  And you must show them these terms so they know their rights.\r
+\r
+  We protect your rights with a two-step method: (1) we copyright the\r
+library, and (2) we offer you this license, which gives you legal\r
+permission to copy, distribute and/or modify the library.\r
+\r
+  To protect each distributor, we want to make it very clear that\r
+there is no warranty for the free library.  Also, if the library is\r
+modified by someone else and passed on, the recipients should know\r
+that what they have is not the original version, so that the original\r
+author's reputation will not be affected by problems that might be\r
+introduced by others.\r
+\r
+  Finally, software patents pose a constant threat to the existence of\r
+any free program.  We wish to make sure that a company cannot\r
+effectively restrict the users of a free program by obtaining a\r
+restrictive license from a patent holder.  Therefore, we insist that\r
+any patent license obtained for a version of the library must be\r
+consistent with the full freedom of use specified in this license.\r
+\r
+  Most GNU software, including some libraries, is covered by the\r
+ordinary GNU General Public License.  This license, the GNU Lesser\r
+General Public License, applies to certain designated libraries, and\r
+is quite different from the ordinary General Public License.  We use\r
+this license for certain libraries in order to permit linking those\r
+libraries into non-free programs.\r
+\r
+  When a program is linked with a library, whether statically or using\r
+a shared library, the combination of the two is legally speaking a\r
+combined work, a derivative of the original library.  The ordinary\r
+General Public License therefore permits such linking only if the\r
+entire combination fits its criteria of freedom.  The Lesser General\r
+Public License permits more lax criteria for linking other code with\r
+the library.\r
+\r
+  We call this license the "Lesser" General Public License because it\r
+does Less to protect the user's freedom than the ordinary General\r
+Public License.  It also provides other free software developers Less\r
+of an advantage over competing non-free programs.  These disadvantages\r
+are the reason we use the ordinary General Public License for many\r
+libraries.  However, the Lesser license provides advantages in certain\r
+special circumstances.\r
+\r
+  For example, on rare occasions, there may be a special need to\r
+encourage the widest possible use of a certain library, so that it becomes\r
+a de-facto standard.  To achieve this, non-free programs must be\r
+allowed to use the library.  A more frequent case is that a free\r
+library does the same job as widely used non-free libraries.  In this\r
+case, there is little to gain by limiting the free library to free\r
+software only, so we use the Lesser General Public License.\r
+\r
+  In other cases, permission to use a particular library in non-free\r
+programs enables a greater number of people to use a large body of\r
+free software.  For example, permission to use the GNU C Library in\r
+non-free programs enables many more people to use the whole GNU\r
+operating system, as well as its variant, the GNU/Linux operating\r
+system.\r
+\r
+  Although the Lesser General Public License is Less protective of the\r
+users' freedom, it does ensure that the user of a program that is\r
+linked with the Library has the freedom and the wherewithal to run\r
+that program using a modified version of the Library.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.  Pay close attention to the difference between a\r
+"work based on the library" and a "work that uses the library".  The\r
+former contains code derived from the library, whereas the latter must\r
+be combined with the library in order to run.\r
+\r
+                  GNU LESSER GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License Agreement applies to any software library or other\r
+program which contains a notice placed by the copyright holder or\r
+other authorized party saying it may be distributed under the terms of\r
+this Lesser General Public License (also called "this License").\r
+Each licensee is addressed as "you".\r
+\r
+  A "library" means a collection of software functions and/or data\r
+prepared so as to be conveniently linked with application programs\r
+(which use some of those functions and data) to form executables.\r
+\r
+  The "Library", below, refers to any such software library or work\r
+which has been distributed under these terms.  A "work based on the\r
+Library" means either the Library or any derivative work under\r
+copyright law: that is to say, a work containing the Library or a\r
+portion of it, either verbatim or with modifications and/or translated\r
+straightforwardly into another language.  (Hereinafter, translation is\r
+included without limitation in the term "modification".)\r
+\r
+  "Source code" for a work means the preferred form of the work for\r
+making modifications to it.  For a library, complete source code means\r
+all the source code for all modules it contains, plus any associated\r
+interface definition files, plus the scripts used to control compilation\r
+and installation of the library.\r
+\r
+  Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running a program using the Library is not restricted, and output from\r
+such a program is covered only if its contents constitute a work based\r
+on the Library (independent of the use of the Library in a tool for\r
+writing it).  Whether that is true depends on what the Library does\r
+and what the program that uses the Library does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Library's\r
+complete source code as you receive it, in any medium, provided that\r
+you conspicuously and appropriately publish on each copy an\r
+appropriate copyright notice and disclaimer of warranty; keep intact\r
+all the notices that refer to this License and to the absence of any\r
+warranty; and distribute a copy of this License along with the\r
+Library.\r
+\r
+  You may charge a fee for the physical act of transferring a copy,\r
+and you may at your option offer warranty protection in exchange for a\r
+fee.\r
+\r
+  2. You may modify your copy or copies of the Library or any portion\r
+of it, thus forming a work based on the Library, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) The modified work must itself be a software library.\r
+\r
+    b) You must cause the files modified to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    c) You must cause the whole of the work to be licensed at no\r
+    charge to all third parties under the terms of this License.\r
+\r
+    d) If a facility in the modified Library refers to a function or a\r
+    table of data to be supplied by an application program that uses\r
+    the facility, other than as an argument passed when the facility\r
+    is invoked, then you must make a good faith effort to ensure that,\r
+    in the event an application does not supply such function or\r
+    table, the facility still operates, and performs whatever part of\r
+    its purpose remains meaningful.\r
+\r
+    (For example, a function in a library to compute square roots has\r
+    a purpose that is entirely well-defined independent of the\r
+    application.  Therefore, Subsection 2d requires that any\r
+    application-supplied function or table used by this function must\r
+    be optional: if the application does not supply it, the square\r
+    root function must still compute square roots.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Library,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Library, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote\r
+it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Library.\r
+\r
+In addition, mere aggregation of another work not based on the Library\r
+with the Library (or with a work based on the Library) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may opt to apply the terms of the ordinary GNU General Public\r
+License instead of this License to a given copy of the Library.  To do\r
+this, you must alter all the notices that refer to this License, so\r
+that they refer to the ordinary GNU General Public License, version 2,\r
+instead of to this License.  (If a newer version than version 2 of the\r
+ordinary GNU General Public License has appeared, then you can specify\r
+that version instead if you wish.)  Do not make any other change in\r
+these notices.\r
+\r
+  Once this change is made in a given copy, it is irreversible for\r
+that copy, so the ordinary GNU General Public License applies to all\r
+subsequent copies and derivative works made from that copy.\r
+\r
+  This option is useful when you wish to copy part of the code of\r
+the Library into a program that is not a library.\r
+\r
+  4. You may copy and distribute the Library (or a portion or\r
+derivative of it, under Section 2) in object code or executable form\r
+under the terms of Sections 1 and 2 above provided that you accompany\r
+it with the complete corresponding machine-readable source code, which\r
+must be distributed under the terms of Sections 1 and 2 above on a\r
+medium customarily used for software interchange.\r
+\r
+  If distribution of object code is made by offering access to copy\r
+from a designated place, then offering equivalent access to copy the\r
+source code from the same place satisfies the requirement to\r
+distribute the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  5. A program that contains no derivative of any portion of the\r
+Library, but is designed to work with the Library by being compiled or\r
+linked with it, is called a "work that uses the Library".  Such a\r
+work, in isolation, is not a derivative work of the Library, and\r
+therefore falls outside the scope of this License.\r
+\r
+  However, linking a "work that uses the Library" with the Library\r
+creates an executable that is a derivative of the Library (because it\r
+contains portions of the Library), rather than a "work that uses the\r
+library".  The executable is therefore covered by this License.\r
+Section 6 states terms for distribution of such executables.\r
+\r
+  When a "work that uses the Library" uses material from a header file\r
+that is part of the Library, the object code for the work may be a\r
+derivative work of the Library even though the source code is not.\r
+Whether this is true is especially significant if the work can be\r
+linked without the Library, or if the work is itself a library.  The\r
+threshold for this to be true is not precisely defined by law.\r
+\r
+  If such an object file uses only numerical parameters, data\r
+structure layouts and accessors, and small macros and small inline\r
+functions (ten lines or less in length), then the use of the object\r
+file is unrestricted, regardless of whether it is legally a derivative\r
+work.  (Executables containing this object code plus portions of the\r
+Library will still fall under Section 6.)\r
+\r
+  Otherwise, if the work is a derivative of the Library, you may\r
+distribute the object code for the work under the terms of Section 6.\r
+Any executables containing that work also fall under Section 6,\r
+whether or not they are linked directly with the Library itself.\r
+\r
+  6. As an exception to the Sections above, you may also combine or\r
+link a "work that uses the Library" with the Library to produce a\r
+work containing portions of the Library, and distribute that work\r
+under terms of your choice, provided that the terms permit\r
+modification of the work for the customer's own use and reverse\r
+engineering for debugging such modifications.\r
+\r
+  You must give prominent notice with each copy of the work that the\r
+Library is used in it and that the Library and its use are covered by\r
+this License.  You must supply a copy of this License.  If the work\r
+during execution displays copyright notices, you must include the\r
+copyright notice for the Library among them, as well as a reference\r
+directing the user to the copy of this License.  Also, you must do one\r
+of these things:\r
+\r
+    a) Accompany the work with the complete corresponding\r
+    machine-readable source code for the Library including whatever\r
+    changes were used in the work (which must be distributed under\r
+    Sections 1 and 2 above); and, if the work is an executable linked\r
+    with the Library, with the complete machine-readable "work that\r
+    uses the Library", as object code and/or source code, so that the\r
+    user can modify the Library and then relink to produce a modified\r
+    executable containing the modified Library.  (It is understood\r
+    that the user who changes the contents of definitions files in the\r
+    Library will not necessarily be able to recompile the application\r
+    to use the modified definitions.)\r
+\r
+    b) Use a suitable shared library mechanism for linking with the\r
+    Library.  A suitable mechanism is one that (1) uses at run time a\r
+    copy of the library already present on the user's computer system,\r
+    rather than copying library functions into the executable, and (2)\r
+    will operate properly with a modified version of the library, if\r
+    the user installs one, as long as the modified version is\r
+    interface-compatible with the version that the work was made with.\r
+\r
+    c) Accompany the work with a written offer, valid for at\r
+    least three years, to give the same user the materials\r
+    specified in Subsection 6a, above, for a charge no more\r
+    than the cost of performing this distribution.\r
+\r
+    d) If distribution of the work is made by offering access to copy\r
+    from a designated place, offer equivalent access to copy the above\r
+    specified materials from the same place.\r
+\r
+    e) Verify that the user has already received a copy of these\r
+    materials or that you have already sent this user a copy.\r
+\r
+  For an executable, the required form of the "work that uses the\r
+Library" must include any data and utility programs needed for\r
+reproducing the executable from it.  However, as a special exception,\r
+the materials to be distributed need not include anything that is\r
+normally distributed (in either source or binary form) with the major\r
+components (compiler, kernel, and so on) of the operating system on\r
+which the executable runs, unless that component itself accompanies\r
+the executable.\r
+\r
+  It may happen that this requirement contradicts the license\r
+restrictions of other proprietary libraries that do not normally\r
+accompany the operating system.  Such a contradiction means you cannot\r
+use both them and the Library together in an executable that you\r
+distribute.\r
+\r
+  7. You may place library facilities that are a work based on the\r
+Library side-by-side in a single library together with other library\r
+facilities not covered by this License, and distribute such a combined\r
+library, provided that the separate distribution of the work based on\r
+the Library and of the other library facilities is otherwise\r
+permitted, and provided that you do these two things:\r
+\r
+    a) Accompany the combined library with a copy of the same work\r
+    based on the Library, uncombined with any other library\r
+    facilities.  This must be distributed under the terms of the\r
+    Sections above.\r
+\r
+    b) Give prominent notice with the combined library of the fact\r
+    that part of it is a work based on the Library, and explaining\r
+    where to find the accompanying uncombined form of the same work.\r
+\r
+  8. You may not copy, modify, sublicense, link with, or distribute\r
+the Library except as expressly provided under this License.  Any\r
+attempt otherwise to copy, modify, sublicense, link with, or\r
+distribute the Library is void, and will automatically terminate your\r
+rights under this License.  However, parties who have received copies,\r
+or rights, from you under this License will not have their licenses\r
+terminated so long as such parties remain in full compliance.\r
+\r
+  9. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Library or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Library (or any work based on the\r
+Library), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Library or works based on it.\r
+\r
+  10. Each time you redistribute the Library (or any work based on the\r
+Library), the recipient automatically receives a license from the\r
+original licensor to copy, distribute, link with or modify the Library\r
+subject to these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties with\r
+this License.\r
+\r
+  11. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Library at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Library by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Library.\r
+\r
+If any portion of this section is held invalid or unenforceable under any\r
+particular circumstance, the balance of the section is intended to apply,\r
+and the section as a whole is intended to apply in other circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  12. If the distribution and/or use of the Library is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Library under this License may add\r
+an explicit geographical distribution limitation excluding those countries,\r
+so that distribution is permitted only in or among countries not thus\r
+excluded.  In such case, this License incorporates the limitation as if\r
+written in the body of this License.\r
+\r
+  13. The Free Software Foundation may publish revised and/or new\r
+versions of the Lesser General Public License from time to time.\r
+Such new versions will be similar in spirit to the present version,\r
+but may differ in detail to address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Library\r
+specifies a version number of this License which applies to it and\r
+"any later version", you have the option of following the terms and\r
+conditions either of that version or of any later version published by\r
+the Free Software Foundation.  If the Library does not specify a\r
+license version number, you may choose any version ever published by\r
+the Free Software Foundation.\r
+\r
+  14. If you wish to incorporate parts of the Library into other free\r
+programs whose distribution conditions are incompatible with these,\r
+write to the author to ask for permission.  For software which is\r
+copyrighted by the Free Software Foundation, write to the Free\r
+Software Foundation; we sometimes make exceptions for this.  Our\r
+decision will be guided by the two goals of preserving the free status\r
+of all derivatives of our free software and of promoting the sharing\r
+and reuse of software generally.\r
+\r
+                            NO WARRANTY\r
+\r
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\r
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r
+DAMAGES.\r
+\r
+                     END OF TERMS AND CONDITIONS\r
+\r
+           How to Apply These Terms to Your New Libraries\r
+\r
+  If you develop a new library, and you want it to be of the greatest\r
+possible use to the public, we recommend making it free software that\r
+everyone can redistribute and change.  You can do so by permitting\r
+redistribution under these terms (or, alternatively, under the terms of the\r
+ordinary General Public License).\r
+\r
+  To apply these terms, attach the following notices to the library.  It is\r
+safest to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least the\r
+"copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the library's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This library is free software; you can redistribute it and/or\r
+    modify it under the terms of the GNU Lesser General Public\r
+    License as published by the Free Software Foundation; either\r
+    version 2.1 of the License, or (at your option) any later version.\r
+\r
+    This library is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+    Lesser General Public License for more details.\r
+\r
+    You should have received a copy of the GNU Lesser General Public\r
+    License along with this library; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the library, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the\r
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1990\r
+  Ty Coon, President of Vice\r
+\r
+That's all there is to it!\r
+\r
diff --git a/ffmpeg 0.8/licenses/schroedinger.txt b/ffmpeg 0.8/licenses/schroedinger.txt
new file mode 100644 (file)
index 0000000..2b79e5a
--- /dev/null
@@ -0,0 +1,278 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/speex.txt b/ffmpeg 0.8/licenses/speex.txt
new file mode 100644 (file)
index 0000000..e7a3ac7
--- /dev/null
@@ -0,0 +1,35 @@
+Copyright 2002-2008    Xiph.org Foundation\r
+Copyright 2002-2008    Jean-Marc Valin\r
+Copyright 2005-2007    Analog Devices Inc.\r
+Copyright 2005-2008    Commonwealth Scientific and Industrial Research \r
+                        Organisation (CSIRO)\r
+Copyright 1993, 2002, 2006 David Rowe\r
+Copyright 2003                 EpicGames\r
+Copyright 1992-1994    Jutta Degener, Carsten Bormann\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions\r
+are met:\r
+\r
+- Redistributions of source code must retain the above copyright\r
+notice, this list of conditions and the following disclaimer.\r
+\r
+- Redistributions in binary form must reproduce the above copyright\r
+notice, this list of conditions and the following disclaimer in the\r
+documentation and/or other materials provided with the distribution.\r
+\r
+- Neither the name of the Xiph.org Foundation nor the names of its\r
+contributors may be used to endorse or promote products derived from\r
+this software without specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR\r
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/theora.txt b/ffmpeg 0.8/licenses/theora.txt
new file mode 100644 (file)
index 0000000..0914cca
--- /dev/null
@@ -0,0 +1,28 @@
+Copyright (C) 2002-2009 Xiph.org Foundation\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions\r
+are met:\r
+\r
+- Redistributions of source code must retain the above copyright\r
+notice, this list of conditions and the following disclaimer.\r
+\r
+- Redistributions in binary form must reproduce the above copyright\r
+notice, this list of conditions and the following disclaimer in the\r
+documentation and/or other materials provided with the distribution.\r
+\r
+- Neither the name of the Xiph.org Foundation nor the names of its\r
+contributors may be used to endorse or promote products derived from\r
+this software without specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION\r
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/vorbis.txt b/ffmpeg 0.8/licenses/vorbis.txt
new file mode 100644 (file)
index 0000000..9ce60f8
--- /dev/null
@@ -0,0 +1,28 @@
+Copyright (c) 2002-2008 Xiph.org Foundation\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions\r
+are met:\r
+\r
+- Redistributions of source code must retain the above copyright\r
+notice, this list of conditions and the following disclaimer.\r
+\r
+- Redistributions in binary form must reproduce the above copyright\r
+notice, this list of conditions and the following disclaimer in the\r
+documentation and/or other materials provided with the distribution.\r
+\r
+- Neither the name of the Xiph.org Foundation nor the names of its\r
+contributors may be used to endorse or promote products derived from\r
+this software without specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION\r
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/x264.txt b/ffmpeg 0.8/licenses/x264.txt
new file mode 100644 (file)
index 0000000..1e51ded
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year  name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/xavs.txt b/ffmpeg 0.8/licenses/xavs.txt
new file mode 100644 (file)
index 0000000..818433e
--- /dev/null
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE\r
+                       Version 3, 29 June 2007\r
+\r
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                            Preamble\r
+\r
+  The GNU General Public License is a free, copyleft license for\r
+software and other kinds of works.\r
+\r
+  The licenses for most software and other practical works are designed\r
+to take away your freedom to share and change the works.  By contrast,\r
+the GNU General Public License is intended to guarantee your freedom to\r
+share and change all versions of a program--to make sure it remains free\r
+software for all its users.  We, the Free Software Foundation, use the\r
+GNU General Public License for most of our software; it applies also to\r
+any other work released this way by its authors.  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+them if you wish), that you receive source code or can get it if you\r
+want it, that you can change the software or use pieces of it in new\r
+free programs, and that you know you can do these things.\r
+\r
+  To protect your rights, we need to prevent others from denying you\r
+these rights or asking you to surrender the rights.  Therefore, you have\r
+certain responsibilities if you distribute copies of the software, or if\r
+you modify it: responsibilities to respect the freedom of others.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must pass on to the recipients the same\r
+freedoms that you received.  You must make sure that they, too, receive\r
+or can get the source code.  And you must show them these terms so they\r
+know their rights.\r
+\r
+  Developers that use the GNU GPL protect your rights with two steps:\r
+(1) assert copyright on the software, and (2) offer you this License\r
+giving you legal permission to copy, distribute and/or modify it.\r
+\r
+  For the developers' and authors' protection, the GPL clearly explains\r
+that there is no warranty for this free software.  For both users' and\r
+authors' sake, the GPL requires that modified versions be marked as\r
+changed, so that their problems will not be attributed erroneously to\r
+authors of previous versions.\r
+\r
+  Some devices are designed to deny users access to install or run\r
+modified versions of the software inside them, although the manufacturer\r
+can do so.  This is fundamentally incompatible with the aim of\r
+protecting users' freedom to change the software.  The systematic\r
+pattern of such abuse occurs in the area of products for individuals to\r
+use, which is precisely where it is most unacceptable.  Therefore, we\r
+have designed this version of the GPL to prohibit the practice for those\r
+products.  If such problems arise substantially in other domains, we\r
+stand ready to extend this provision to those domains in future versions\r
+of the GPL, as needed to protect the freedom of users.\r
+\r
+  Finally, every program is threatened constantly by software patents.\r
+States should not allow patents to restrict development and use of\r
+software on general-purpose computers, but in those that do, we wish to\r
+avoid the special danger that patents applied to a free program could\r
+make it effectively proprietary.  To prevent this, the GPL assures that\r
+patents cannot be used to render the program non-free.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+                       TERMS AND CONDITIONS\r
+\r
+  0. Definitions.\r
+\r
+  "This License" refers to version 3 of the GNU General Public License.\r
+\r
+  "Copyright" also means copyright-like laws that apply to other kinds of\r
+works, such as semiconductor masks.\r
+\r
+  "The Program" refers to any copyrightable work licensed under this\r
+License.  Each licensee is addressed as "you".  "Licensees" and\r
+"recipients" may be individuals or organizations.\r
+\r
+  To "modify" a work means to copy from or adapt all or part of the work\r
+in a fashion requiring copyright permission, other than the making of an\r
+exact copy.  The resulting work is called a "modified version" of the\r
+earlier work or a work "based on" the earlier work.\r
+\r
+  A "covered work" means either the unmodified Program or a work based\r
+on the Program.\r
+\r
+  To "propagate" a work means to do anything with it that, without\r
+permission, would make you directly or secondarily liable for\r
+infringement under applicable copyright law, except executing it on a\r
+computer or modifying a private copy.  Propagation includes copying,\r
+distribution (with or without modification), making available to the\r
+public, and in some countries other activities as well.\r
+\r
+  To "convey" a work means any kind of propagation that enables other\r
+parties to make or receive copies.  Mere interaction with a user through\r
+a computer network, with no transfer of a copy, is not conveying.\r
+\r
+  An interactive user interface displays "Appropriate Legal Notices"\r
+to the extent that it includes a convenient and prominently visible\r
+feature that (1) displays an appropriate copyright notice, and (2)\r
+tells the user that there is no warranty for the work (except to the\r
+extent that warranties are provided), that licensees may convey the\r
+work under this License, and how to view a copy of this License.  If\r
+the interface presents a list of user commands or options, such as a\r
+menu, a prominent item in the list meets this criterion.\r
+\r
+  1. Source Code.\r
+\r
+  The "source code" for a work means the preferred form of the work\r
+for making modifications to it.  "Object code" means any non-source\r
+form of a work.\r
+\r
+  A "Standard Interface" means an interface that either is an official\r
+standard defined by a recognized standards body, or, in the case of\r
+interfaces specified for a particular programming language, one that\r
+is widely used among developers working in that language.\r
+\r
+  The "System Libraries" of an executable work include anything, other\r
+than the work as a whole, that (a) is included in the normal form of\r
+packaging a Major Component, but which is not part of that Major\r
+Component, and (b) serves only to enable use of the work with that\r
+Major Component, or to implement a Standard Interface for which an\r
+implementation is available to the public in source code form.  A\r
+"Major Component", in this context, means a major essential component\r
+(kernel, window system, and so on) of the specific operating system\r
+(if any) on which the executable work runs, or a compiler used to\r
+produce the work, or an object code interpreter used to run it.\r
+\r
+  The "Corresponding Source" for a work in object code form means all\r
+the source code needed to generate, install, and (for an executable\r
+work) run the object code and to modify the work, including scripts to\r
+control those activities.  However, it does not include the work's\r
+System Libraries, or general-purpose tools or generally available free\r
+programs which are used unmodified in performing those activities but\r
+which are not part of the work.  For example, Corresponding Source\r
+includes interface definition files associated with source files for\r
+the work, and the source code for shared libraries and dynamically\r
+linked subprograms that the work is specifically designed to require,\r
+such as by intimate data communication or control flow between those\r
+subprograms and other parts of the work.\r
+\r
+  The Corresponding Source need not include anything that users\r
+can regenerate automatically from other parts of the Corresponding\r
+Source.\r
+\r
+  The Corresponding Source for a work in source code form is that\r
+same work.\r
+\r
+  2. Basic Permissions.\r
+\r
+  All rights granted under this License are granted for the term of\r
+copyright on the Program, and are irrevocable provided the stated\r
+conditions are met.  This License explicitly affirms your unlimited\r
+permission to run the unmodified Program.  The output from running a\r
+covered work is covered by this License only if the output, given its\r
+content, constitutes a covered work.  This License acknowledges your\r
+rights of fair use or other equivalent, as provided by copyright law.\r
+\r
+  You may make, run and propagate covered works that you do not\r
+convey, without conditions so long as your license otherwise remains\r
+in force.  You may convey covered works to others for the sole purpose\r
+of having them make modifications exclusively for you, or provide you\r
+with facilities for running those works, provided that you comply with\r
+the terms of this License in conveying all material for which you do\r
+not control copyright.  Those thus making or running the covered works\r
+for you must do so exclusively on your behalf, under your direction\r
+and control, on terms that prohibit them from making any copies of\r
+your copyrighted material outside their relationship with you.\r
+\r
+  Conveying under any other circumstances is permitted solely under\r
+the conditions stated below.  Sublicensing is not allowed; section 10\r
+makes it unnecessary.\r
+\r
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r
+\r
+  No covered work shall be deemed part of an effective technological\r
+measure under any applicable law fulfilling obligations under article\r
+11 of the WIPO copyright treaty adopted on 20 December 1996, or\r
+similar laws prohibiting or restricting circumvention of such\r
+measures.\r
+\r
+  When you convey a covered work, you waive any legal power to forbid\r
+circumvention of technological measures to the extent such circumvention\r
+is effected by exercising rights under this License with respect to\r
+the covered work, and you disclaim any intention to limit operation or\r
+modification of the work as a means of enforcing, against the work's\r
+users, your or third parties' legal rights to forbid circumvention of\r
+technological measures.\r
+\r
+  4. Conveying Verbatim Copies.\r
+\r
+  You may convey verbatim copies of the Program's source code as you\r
+receive it, in any medium, provided that you conspicuously and\r
+appropriately publish on each copy an appropriate copyright notice;\r
+keep intact all notices stating that this License and any\r
+non-permissive terms added in accord with section 7 apply to the code;\r
+keep intact all notices of the absence of any warranty; and give all\r
+recipients a copy of this License along with the Program.\r
+\r
+  You may charge any price or no price for each copy that you convey,\r
+and you may offer support or warranty protection for a fee.\r
+\r
+  5. Conveying Modified Source Versions.\r
+\r
+  You may convey a work based on the Program, or the modifications to\r
+produce it from the Program, in the form of source code under the\r
+terms of section 4, provided that you also meet all of these conditions:\r
+\r
+    a) The work must carry prominent notices stating that you modified\r
+    it, and giving a relevant date.\r
+\r
+    b) The work must carry prominent notices stating that it is\r
+    released under this License and any conditions added under section\r
+    7.  This requirement modifies the requirement in section 4 to\r
+    "keep intact all notices".\r
+\r
+    c) You must license the entire work, as a whole, under this\r
+    License to anyone who comes into possession of a copy.  This\r
+    License will therefore apply, along with any applicable section 7\r
+    additional terms, to the whole of the work, and all its parts,\r
+    regardless of how they are packaged.  This License gives no\r
+    permission to license the work in any other way, but it does not\r
+    invalidate such permission if you have separately received it.\r
+\r
+    d) If the work has interactive user interfaces, each must display\r
+    Appropriate Legal Notices; however, if the Program has interactive\r
+    interfaces that do not display Appropriate Legal Notices, your\r
+    work need not make them do so.\r
+\r
+  A compilation of a covered work with other separate and independent\r
+works, which are not by their nature extensions of the covered work,\r
+and which are not combined with it such as to form a larger program,\r
+in or on a volume of a storage or distribution medium, is called an\r
+"aggregate" if the compilation and its resulting copyright are not\r
+used to limit the access or legal rights of the compilation's users\r
+beyond what the individual works permit.  Inclusion of a covered work\r
+in an aggregate does not cause this License to apply to the other\r
+parts of the aggregate.\r
+\r
+  6. Conveying Non-Source Forms.\r
+\r
+  You may convey a covered work in object code form under the terms\r
+of sections 4 and 5, provided that you also convey the\r
+machine-readable Corresponding Source under the terms of this License,\r
+in one of these ways:\r
+\r
+    a) Convey the object code in, or embodied in, a physical product\r
+    (including a physical distribution medium), accompanied by the\r
+    Corresponding Source fixed on a durable physical medium\r
+    customarily used for software interchange.\r
+\r
+    b) Convey the object code in, or embodied in, a physical product\r
+    (including a physical distribution medium), accompanied by a\r
+    written offer, valid for at least three years and valid for as\r
+    long as you offer spare parts or customer support for that product\r
+    model, to give anyone who possesses the object code either (1) a\r
+    copy of the Corresponding Source for all the software in the\r
+    product that is covered by this License, on a durable physical\r
+    medium customarily used for software interchange, for a price no\r
+    more than your reasonable cost of physically performing this\r
+    conveying of source, or (2) access to copy the\r
+    Corresponding Source from a network server at no charge.\r
+\r
+    c) Convey individual copies of the object code with a copy of the\r
+    written offer to provide the Corresponding Source.  This\r
+    alternative is allowed only occasionally and noncommercially, and\r
+    only if you received the object code with such an offer, in accord\r
+    with subsection 6b.\r
+\r
+    d) Convey the object code by offering access from a designated\r
+    place (gratis or for a charge), and offer equivalent access to the\r
+    Corresponding Source in the same way through the same place at no\r
+    further charge.  You need not require recipients to copy the\r
+    Corresponding Source along with the object code.  If the place to\r
+    copy the object code is a network server, the Corresponding Source\r
+    may be on a different server (operated by you or a third party)\r
+    that supports equivalent copying facilities, provided you maintain\r
+    clear directions next to the object code saying where to find the\r
+    Corresponding Source.  Regardless of what server hosts the\r
+    Corresponding Source, you remain obligated to ensure that it is\r
+    available for as long as needed to satisfy these requirements.\r
+\r
+    e) Convey the object code using peer-to-peer transmission, provided\r
+    you inform other peers where the object code and Corresponding\r
+    Source of the work are being offered to the general public at no\r
+    charge under subsection 6d.\r
+\r
+  A separable portion of the object code, whose source code is excluded\r
+from the Corresponding Source as a System Library, need not be\r
+included in conveying the object code work.\r
+\r
+  A "User Product" is either (1) a "consumer product", which means any\r
+tangible personal property which is normally used for personal, family,\r
+or household purposes, or (2) anything designed or sold for incorporation\r
+into a dwelling.  In determining whether a product is a consumer product,\r
+doubtful cases shall be resolved in favor of coverage.  For a particular\r
+product received by a particular user, "normally used" refers to a\r
+typical or common use of that class of product, regardless of the status\r
+of the particular user or of the way in which the particular user\r
+actually uses, or expects or is expected to use, the product.  A product\r
+is a consumer product regardless of whether the product has substantial\r
+commercial, industrial or non-consumer uses, unless such uses represent\r
+the only significant mode of use of the product.\r
+\r
+  "Installation Information" for a User Product means any methods,\r
+procedures, authorization keys, or other information required to install\r
+and execute modified versions of a covered work in that User Product from\r
+a modified version of its Corresponding Source.  The information must\r
+suffice to ensure that the continued functioning of the modified object\r
+code is in no case prevented or interfered with solely because\r
+modification has been made.\r
+\r
+  If you convey an object code work under this section in, or with, or\r
+specifically for use in, a User Product, and the conveying occurs as\r
+part of a transaction in which the right of possession and use of the\r
+User Product is transferred to the recipient in perpetuity or for a\r
+fixed term (regardless of how the transaction is characterized), the\r
+Corresponding Source conveyed under this section must be accompanied\r
+by the Installation Information.  But this requirement does not apply\r
+if neither you nor any third party retains the ability to install\r
+modified object code on the User Product (for example, the work has\r
+been installed in ROM).\r
+\r
+  The requirement to provide Installation Information does not include a\r
+requirement to continue to provide support service, warranty, or updates\r
+for a work that has been modified or installed by the recipient, or for\r
+the User Product in which it has been modified or installed.  Access to a\r
+network may be denied when the modification itself materially and\r
+adversely affects the operation of the network or violates the rules and\r
+protocols for communication across the network.\r
+\r
+  Corresponding Source conveyed, and Installation Information provided,\r
+in accord with this section must be in a format that is publicly\r
+documented (and with an implementation available to the public in\r
+source code form), and must require no special password or key for\r
+unpacking, reading or copying.\r
+\r
+  7. Additional Terms.\r
+\r
+  "Additional permissions" are terms that supplement the terms of this\r
+License by making exceptions from one or more of its conditions.\r
+Additional permissions that are applicable to the entire Program shall\r
+be treated as though they were included in this License, to the extent\r
+that they are valid under applicable law.  If additional permissions\r
+apply only to part of the Program, that part may be used separately\r
+under those permissions, but the entire Program remains governed by\r
+this License without regard to the additional permissions.\r
+\r
+  When you convey a copy of a covered work, you may at your option\r
+remove any additional permissions from that copy, or from any part of\r
+it.  (Additional permissions may be written to require their own\r
+removal in certain cases when you modify the work.)  You may place\r
+additional permissions on material, added by you to a covered work,\r
+for which you have or can give appropriate copyright permission.\r
+\r
+  Notwithstanding any other provision of this License, for material you\r
+add to a covered work, you may (if authorized by the copyright holders of\r
+that material) supplement the terms of this License with terms:\r
+\r
+    a) Disclaiming warranty or limiting liability differently from the\r
+    terms of sections 15 and 16 of this License; or\r
+\r
+    b) Requiring preservation of specified reasonable legal notices or\r
+    author attributions in that material or in the Appropriate Legal\r
+    Notices displayed by works containing it; or\r
+\r
+    c) Prohibiting misrepresentation of the origin of that material, or\r
+    requiring that modified versions of such material be marked in\r
+    reasonable ways as different from the original version; or\r
+\r
+    d) Limiting the use for publicity purposes of names of licensors or\r
+    authors of the material; or\r
+\r
+    e) Declining to grant rights under trademark law for use of some\r
+    trade names, trademarks, or service marks; or\r
+\r
+    f) Requiring indemnification of licensors and authors of that\r
+    material by anyone who conveys the material (or modified versions of\r
+    it) with contractual assumptions of liability to the recipient, for\r
+    any liability that these contractual assumptions directly impose on\r
+    those licensors and authors.\r
+\r
+  All other non-permissive additional terms are considered "further\r
+restrictions" within the meaning of section 10.  If the Program as you\r
+received it, or any part of it, contains a notice stating that it is\r
+governed by this License along with a term that is a further\r
+restriction, you may remove that term.  If a license document contains\r
+a further restriction but permits relicensing or conveying under this\r
+License, you may add to a covered work material governed by the terms\r
+of that license document, provided that the further restriction does\r
+not survive such relicensing or conveying.\r
+\r
+  If you add terms to a covered work in accord with this section, you\r
+must place, in the relevant source files, a statement of the\r
+additional terms that apply to those files, or a notice indicating\r
+where to find the applicable terms.\r
+\r
+  Additional terms, permissive or non-permissive, may be stated in the\r
+form of a separately written license, or stated as exceptions;\r
+the above requirements apply either way.\r
+\r
+  8. Termination.\r
+\r
+  You may not propagate or modify a covered work except as expressly\r
+provided under this License.  Any attempt otherwise to propagate or\r
+modify it is void, and will automatically terminate your rights under\r
+this License (including any patent licenses granted under the third\r
+paragraph of section 11).\r
+\r
+  However, if you cease all violation of this License, then your\r
+license from a particular copyright holder is reinstated (a)\r
+provisionally, unless and until the copyright holder explicitly and\r
+finally terminates your license, and (b) permanently, if the copyright\r
+holder fails to notify you of the violation by some reasonable means\r
+prior to 60 days after the cessation.\r
+\r
+  Moreover, your license from a particular copyright holder is\r
+reinstated permanently if the copyright holder notifies you of the\r
+violation by some reasonable means, this is the first time you have\r
+received notice of violation of this License (for any work) from that\r
+copyright holder, and you cure the violation prior to 30 days after\r
+your receipt of the notice.\r
+\r
+  Termination of your rights under this section does not terminate the\r
+licenses of parties who have received copies or rights from you under\r
+this License.  If your rights have been terminated and not permanently\r
+reinstated, you do not qualify to receive new licenses for the same\r
+material under section 10.\r
+\r
+  9. Acceptance Not Required for Having Copies.\r
+\r
+  You are not required to accept this License in order to receive or\r
+run a copy of the Program.  Ancillary propagation of a covered work\r
+occurring solely as a consequence of using peer-to-peer transmission\r
+to receive a copy likewise does not require acceptance.  However,\r
+nothing other than this License grants you permission to propagate or\r
+modify any covered work.  These actions infringe copyright if you do\r
+not accept this License.  Therefore, by modifying or propagating a\r
+covered work, you indicate your acceptance of this License to do so.\r
+\r
+  10. Automatic Licensing of Downstream Recipients.\r
+\r
+  Each time you convey a covered work, the recipient automatically\r
+receives a license from the original licensors, to run, modify and\r
+propagate that work, subject to this License.  You are not responsible\r
+for enforcing compliance by third parties with this License.\r
+\r
+  An "entity transaction" is a transaction transferring control of an\r
+organization, or substantially all assets of one, or subdividing an\r
+organization, or merging organizations.  If propagation of a covered\r
+work results from an entity transaction, each party to that\r
+transaction who receives a copy of the work also receives whatever\r
+licenses to the work the party's predecessor in interest had or could\r
+give under the previous paragraph, plus a right to possession of the\r
+Corresponding Source of the work from the predecessor in interest, if\r
+the predecessor has it or can get it with reasonable efforts.\r
+\r
+  You may not impose any further restrictions on the exercise of the\r
+rights granted or affirmed under this License.  For example, you may\r
+not impose a license fee, royalty, or other charge for exercise of\r
+rights granted under this License, and you may not initiate litigation\r
+(including a cross-claim or counterclaim in a lawsuit) alleging that\r
+any patent claim is infringed by making, using, selling, offering for\r
+sale, or importing the Program or any portion of it.\r
+\r
+  11. Patents.\r
+\r
+  A "contributor" is a copyright holder who authorizes use under this\r
+License of the Program or a work on which the Program is based.  The\r
+work thus licensed is called the contributor's "contributor version".\r
+\r
+  A contributor's "essential patent claims" are all patent claims\r
+owned or controlled by the contributor, whether already acquired or\r
+hereafter acquired, that would be infringed by some manner, permitted\r
+by this License, of making, using, or selling its contributor version,\r
+but do not include claims that would be infringed only as a\r
+consequence of further modification of the contributor version.  For\r
+purposes of this definition, "control" includes the right to grant\r
+patent sublicenses in a manner consistent with the requirements of\r
+this License.\r
+\r
+  Each contributor grants you a non-exclusive, worldwide, royalty-free\r
+patent license under the contributor's essential patent claims, to\r
+make, use, sell, offer for sale, import and otherwise run, modify and\r
+propagate the contents of its contributor version.\r
+\r
+  In the following three paragraphs, a "patent license" is any express\r
+agreement or commitment, however denominated, not to enforce a patent\r
+(such as an express permission to practice a patent or covenant not to\r
+sue for patent infringement).  To "grant" such a patent license to a\r
+party means to make such an agreement or commitment not to enforce a\r
+patent against the party.\r
+\r
+  If you convey a covered work, knowingly relying on a patent license,\r
+and the Corresponding Source of the work is not available for anyone\r
+to copy, free of charge and under the terms of this License, through a\r
+publicly available network server or other readily accessible means,\r
+then you must either (1) cause the Corresponding Source to be so\r
+available, or (2) arrange to deprive yourself of the benefit of the\r
+patent license for this particular work, or (3) arrange, in a manner\r
+consistent with the requirements of this License, to extend the patent\r
+license to downstream recipients.  "Knowingly relying" means you have\r
+actual knowledge that, but for the patent license, your conveying the\r
+covered work in a country, or your recipient's use of the covered work\r
+in a country, would infringe one or more identifiable patents in that\r
+country that you have reason to believe are valid.\r
+\r
+  If, pursuant to or in connection with a single transaction or\r
+arrangement, you convey, or propagate by procuring conveyance of, a\r
+covered work, and grant a patent license to some of the parties\r
+receiving the covered work authorizing them to use, propagate, modify\r
+or convey a specific copy of the covered work, then the patent license\r
+you grant is automatically extended to all recipients of the covered\r
+work and works based on it.\r
+\r
+  A patent license is "discriminatory" if it does not include within\r
+the scope of its coverage, prohibits the exercise of, or is\r
+conditioned on the non-exercise of one or more of the rights that are\r
+specifically granted under this License.  You may not convey a covered\r
+work if you are a party to an arrangement with a third party that is\r
+in the business of distributing software, under which you make payment\r
+to the third party based on the extent of your activity of conveying\r
+the work, and under which the third party grants, to any of the\r
+parties who would receive the covered work from you, a discriminatory\r
+patent license (a) in connection with copies of the covered work\r
+conveyed by you (or copies made from those copies), or (b) primarily\r
+for and in connection with specific products or compilations that\r
+contain the covered work, unless you entered into that arrangement,\r
+or that patent license was granted, prior to 28 March 2007.\r
+\r
+  Nothing in this License shall be construed as excluding or limiting\r
+any implied license or other defenses to infringement that may\r
+otherwise be available to you under applicable patent law.\r
+\r
+  12. No Surrender of Others' Freedom.\r
+\r
+  If conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot convey a\r
+covered work so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you may\r
+not convey it at all.  For example, if you agree to terms that obligate you\r
+to collect a royalty for further conveying from those to whom you convey\r
+the Program, the only way you could satisfy both those terms and this\r
+License would be to refrain entirely from conveying the Program.\r
+\r
+  13. Use with the GNU Affero General Public License.\r
+\r
+  Notwithstanding any other provision of this License, you have\r
+permission to link or combine any covered work with a work licensed\r
+under version 3 of the GNU Affero General Public License into a single\r
+combined work, and to convey the resulting work.  The terms of this\r
+License will continue to apply to the part which is the covered work,\r
+but the special requirements of the GNU Affero General Public License,\r
+section 13, concerning interaction through a network will apply to the\r
+combination as such.\r
+\r
+  14. Revised Versions of this License.\r
+\r
+  The Free Software Foundation may publish revised and/or new versions of\r
+the GNU General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+  Each version is given a distinguishing version number.  If the\r
+Program specifies that a certain numbered version of the GNU General\r
+Public License "or any later version" applies to it, you have the\r
+option of following the terms and conditions either of that numbered\r
+version or of any later version published by the Free Software\r
+Foundation.  If the Program does not specify a version number of the\r
+GNU General Public License, you may choose any version ever published\r
+by the Free Software Foundation.\r
+\r
+  If the Program specifies that a proxy can decide which future\r
+versions of the GNU General Public License can be used, that proxy's\r
+public statement of acceptance of a version permanently authorizes you\r
+to choose that version for the Program.\r
+\r
+  Later license versions may give you additional or different\r
+permissions.  However, no additional obligations are imposed on any\r
+author or copyright holder as a result of your choosing to follow a\r
+later version.\r
+\r
+  15. Disclaimer of Warranty.\r
+\r
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\r
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. Limitation of Liability.\r
+\r
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r
+SUCH DAMAGES.\r
+\r
+  17. Interpretation of Sections 15 and 16.\r
+\r
+  If the disclaimer of warranty and limitation of liability provided\r
+above cannot be given local legal effect according to their terms,\r
+reviewing courts shall apply local law that most closely approximates\r
+an absolute waiver of all civil liability in connection with the\r
+Program, unless a warranty or assumption of liability accompanies a\r
+copy of the Program in return for a fee.\r
+\r
+                     END OF TERMS AND CONDITIONS\r
+\r
+            How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+state the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software: you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation, either version 3 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+  If the program does terminal interaction, make it output a short\r
+notice like this when it starts in an interactive mode:\r
+\r
+    <program>  Copyright (C) <year>  <name of author>\r
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, your program's commands\r
+might be different; for a GUI interface, you would use an "about box".\r
+\r
+  You should also get your employer (if you work as a programmer) or school,\r
+if any, to sign a "copyright disclaimer" for the program, if necessary.\r
+For more information on this, and how to apply and follow the GNU GPL, see\r
+<http://www.gnu.org/licenses/>.\r
+\r
+  The GNU General Public License does not permit incorporating your program\r
+into proprietary programs.  If your program is a subroutine library, you\r
+may consider it more useful to permit linking proprietary applications with\r
+the library.  If this is what you want to do, use the GNU Lesser General\r
+Public License instead of this License.  But first, please read\r
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.\r
diff --git a/ffmpeg 0.8/licenses/xvid.txt b/ffmpeg 0.8/licenses/xvid.txt
new file mode 100644 (file)
index 0000000..ea9864d
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.
\ No newline at end of file
diff --git a/ffmpeg 0.8/licenses/zlib.txt b/ffmpeg 0.8/licenses/zlib.txt
new file mode 100644 (file)
index 0000000..eb9dc58
--- /dev/null
@@ -0,0 +1,23 @@
+  zlib.h -- interface of the 'zlib' general purpose compression library\r
+  version 1.2.5, April 19th, 2010\r
+\r
+  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler\r
+\r
+  This software is provided 'as-is', without any express or implied\r
+  warranty.  In no event will the authors be held liable for any damages\r
+  arising from the use of this software.\r
+\r
+  Permission is granted to anyone to use this software for any purpose,\r
+  including commercial applications, and to alter it and redistribute it\r
+  freely, subject to the following restrictions:\r
+\r
+  1. The origin of this software must not be misrepresented; you must not\r
+     claim that you wrote the original software. If you use this software\r
+     in a product, an acknowledgment in the product documentation would be\r
+     appreciated but is not required.\r
+  2. Altered source versions must be plainly marked as such, and must not be\r
+     misrepresented as being the original software.\r
+  3. This notice may not be removed or altered from any source distribution.\r
+\r
+  Jean-loup Gailly\r
+  Mark Adler\r