<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on April 27, 2012 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="Synopsis"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[ &lt; ]</td>
<td valign="middle" align="left">[<a href="#Description" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[ &lt;&lt; ]</td>
<td valign="middle" align="left">[ Up ]</td>
<td valign="middle" align="left">[<a href="#Description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">1. Synopsis</h1>

<table><tr><td>&nbsp;</td><td><pre class="example">ffplay [options] &lsquo;<tt>input_file</tt>&rsquo;
</pre></td></tr></table>

<hr size="6">
<a name="Description"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Synopsis" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">2. Description</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>
<hr size="6">
<a name="Options"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Description" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Generic-options" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Description" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">3. Options</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>
<hr size="6">
<a name="Generic-options"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Options" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Main-options" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Options" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">3.1 Generic options</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>

<hr size="6">
<a name="Main-options"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Generic-options" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Advanced-options" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Options" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">3.2 Main options</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>Set frame size (WxH or abbreviation), needed for videos which don&rsquo;t
contain a header with the frame size like raw YUV.
</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>-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>

<hr size="6">
<a name="Advanced-options"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Main-options" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#While-playing" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Options" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">3.3 Advanced options</h2>
<dl compact="compact">
<dt> &lsquo;<samp>-pix_fmt <var>format</var></samp>&rsquo;</dt>
<dd><p>Set 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>-debug</samp>&rsquo;</dt>
<dd><p>Print specific debug info.
</p></dd>
<dt> &lsquo;<samp>-bug</samp>&rsquo;</dt>
<dd><p>Work around bugs.
</p></dd>
<dt> &lsquo;<samp>-vismv</samp>&rsquo;</dt>
<dd><p>Visualize motion vectors.
</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>

<hr size="6">
<a name="While-playing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Advanced-options" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Options" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Options" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">3.4 While playing</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>


<hr size="6">
<a name="Expression-Evaluation"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#While-playing" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Demuxers" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Options" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Demuxers" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">4. Expression Evaluation</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>
</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>When A evaluates to either 1 or 0, that is the same as
</p><table><tr><td>&nbsp;</td><td><pre class="example">A*B + eq(A,0)*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>

<hr size="6">
<a name="Demuxers"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#image2" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Expression-Evaluation" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">5. Demuxers</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>
<hr size="6">
<a name="image2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Demuxers" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Demuxers" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Demuxers" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">5.1 image2</h2>

<p>Image file demuxer.
</p>
<p>This demuxer reads from a list of image files specified by a pattern.
</p>
<p>The filename of each file to read must contain a sequential number,
which specifies the position of the file in the sequence.
</p>
<p>The pattern must contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
specifies the position of the characters representing the seqential
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>The first filename of the file sequence specified by the pattern must
contain a number inclusively contained between 0 and 4, all the
following numbers must be sequential.
</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>

<hr size="6">
<a name="Input-Devices"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#image2" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#alsa" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Demuxers" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">6. Input Devices</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>
<hr size="6">
<a name="alsa"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Input-Devices" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#bktr" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.1 alsa</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>
<hr size="6">
<a name="bktr"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#alsa" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#dv1394" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.2 bktr</h2>

<p>BSD video input device.
</p>
<hr size="6">
<a name="dv1394"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#bktr" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#jack" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.3 dv1394</h2>

<p>Linux DV 1394 input device.
</p>
<hr size="6">
<a name="jack"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#dv1394" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#libdc1394" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.4 jack</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>
<hr size="6">
<a name="libdc1394"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#jack" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#oss" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.5 libdc1394</h2>

<p>IIDC1394 input device, based on libdc1394 and libraw1394.
</p>
<hr size="6">
<a name="oss"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#libdc1394" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#video4linux-and-video4linux2" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.6 oss</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>
<hr size="6">
<a name="video4linux-and-video4linux2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#oss" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#vfwcap" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.7 video4linux and video4linux2</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>

<hr size="6">
<a name="vfwcap"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#video4linux-and-video4linux2" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#x11grab" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.8 vfwcap</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>
<hr size="6">
<a name="x11grab"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#vfwcap" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">6.9 x11grab</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="6">
<a name="Output-Devices"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#x11grab" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#alsa-1" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Input-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">7. Output Devices</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>
<hr size="6">
<a name="alsa-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Output-Devices" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#oss-1" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">7.1 alsa</h2>

<p>ALSA (Advanced Linux Sound Architecture) output device.
</p>
<hr size="6">
<a name="oss-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#alsa-1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">7.2 oss</h2>

<p>OSS (Open Sound System) output device.
</p>
<hr size="6">
<a name="Protocols"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#oss-1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#concat" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Output-Devices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">8. Protocols</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>
<hr size="6">
<a name="concat"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Protocols" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#file" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.1 concat</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>
<hr size="6">
<a name="file"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#concat" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#gopher" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.2 file</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>
<hr size="6">
<a name="gopher"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#file" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#http" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.3 gopher</h2>

<p>Gopher protocol.
</p>
<hr size="6">
<a name="http"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#gopher" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#mmst" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.4 http</h2>

<p>HTTP (Hyper Text Transfer Protocol).
</p>
<hr size="6">
<a name="mmst"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#http" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#mmsh" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.5 mmst</h2>

<p>MMS (Microsoft Media Server) protocol over TCP.
</p>
<hr size="6">
<a name="mmsh"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#mmst" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#md5" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.6 mmsh</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>

<hr size="6">
<a name="md5"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#mmsh" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#pipe" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.7 md5</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>
<hr size="6">
<a name="pipe"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#md5" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#rtmp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.8 pipe</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>
<hr size="6">
<a name="rtmp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#pipe" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.9 rtmp</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>

<hr size="6">
<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#rtmp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#rtp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.10 rtmp, rtmpe, rtmps, rtmpt, rtmpte</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>

<hr size="6">
<a name="rtp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#rtsp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.11 rtp</h2>

<p>Real-Time Protocol.
</p>
<hr size="6">
<a name="rtsp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#rtp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#sap" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.12 rtsp</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
RTSP server, <a href="http://github.com/revmischa/rtsp-server">http://github.com/revmischa/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>

<hr size="6">
<a name="sap"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#rtsp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Muxer" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.13 sap</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>
<hr size="6">
<a name="Muxer"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#sap" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Demuxer" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#sap" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">8.13.1 Muxer</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>

<hr size="6">
<a name="Demuxer"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Muxer" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#tcp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#sap" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">8.13.2 Demuxer</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>

<hr size="6">
<a name="tcp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Demuxer" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#udp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.14 tcp</h2>

<p>Trasmission Control Protocol.
</p>
<hr size="6">
<a name="udp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#tcp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Protocols" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.15 udp</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 udp_set_remote_url later.
If the destination address isn&rsquo;t known at the start, this option can
be specified in 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>

<hr size="6">
<a name="Filtergraph-description"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#udp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-syntax" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Protocols" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">9. Filtergraph description</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>
<hr size="6">
<a name="Filtergraph-syntax"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Filtergraph-description" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">9.1 Filtergraph syntax</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>


<hr size="6">
<a name="Audio-Filters"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Filtergraph-syntax" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#anull" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Filtergraph-description" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">10. Audio Filters</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>
<hr size="6">
<a name="anull"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Audio-Filters" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">10.1 anull</h2>

<p>Pass the audio source unchanged to the output.
</p>

<hr size="6">
<a name="Audio-Sources"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#anull" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#anullsrc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">11. Audio Sources</h1>

<p>Below is a description of the currently available audio sources.
</p>
<hr size="6">
<a name="anullsrc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Audio-Sources" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">11.1 anullsrc</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>


<hr size="6">
<a name="Audio-Sinks"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#anullsrc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#anullsink" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">12. Audio Sinks</h1>

<p>Below is a description of the currently available audio sinks.
</p>
<hr size="6">
<a name="anullsink"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Audio-Sinks" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">12.1 anullsink</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>

<hr size="6">
<a name="Video-Filters"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#anullsink" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#blackframe" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Audio-Sinks" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">13. Video Filters</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>
<hr size="6">
<a name="blackframe"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Video-Filters" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#copy" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.1 blackframe</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>
<hr size="6">
<a name="copy"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#blackframe" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#crop" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.2 copy</h2>

<p>Copy the input source unchanged to the output. Mainly useful for
testing purposes.
</p>
<hr size="6">
<a name="crop"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#copy" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#cropdetect" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.3 crop</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>

<hr size="6">
<a name="cropdetect"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#crop" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#drawbox" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.4 cropdetect</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>

<hr size="6">
<a name="drawbox"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#cropdetect" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#fifo" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.5 drawbox</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>

<hr size="6">
<a name="fifo"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#drawbox" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#format" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.6 fifo</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>
<hr size="6">
<a name="format"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#fifo" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#frei0r-1" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.7 format</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><hr size="6">
<a name="frei0r-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#format" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#gradfun" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.8 frei0r</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>
<hr size="6">
<a name="gradfun"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#frei0r-1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#hflip" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.9 gradfun</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>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>

<hr size="6">
<a name="hflip"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#gradfun" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#hqdn3d" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.10 hflip</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>

<hr size="6">
<a name="hqdn3d"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#hflip" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#noformat" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.11 hqdn3d</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>

<hr size="6">
<a name="noformat"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#hqdn3d" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#null" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.12 noformat</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>

<hr size="6">
<a name="null"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#noformat" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ocv" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.13 null</h2>

<p>Pass the video source unchanged to the output.
</p>
<hr size="6">
<a name="ocv"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#null" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#dilate-1" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.14 ocv</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><hr size="6">
<a name="dilate-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ocv" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#erode" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ocv" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">13.14.1 dilate</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>

<hr size="6">
<a name="erode"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#dilate-1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#smooth" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ocv" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">13.14.2 erode</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 meaning and use of those of the dilate filter
(see <a href="#dilate">dilate</a>).
</p>
<hr size="6">
<a name="smooth"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#erode" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#overlay" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ocv" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">13.14.3 smooth</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>
<hr size="6">
<a name="overlay"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#smooth" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#pad" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.15 overlay</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=0:png: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=0:png:logo1.png [logo1];
movie=0:png: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>
<hr size="6">
<a name="pad"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#overlay" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#pixdesctest" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.16 pad</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>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 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 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>For example:
</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
# row 0, column 40.
pad=640:480:0:40:violet
</pre></td></tr></table>

<hr size="6">
<a name="pixdesctest"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#pad" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#scale" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.17 pixdesctest</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>
<hr size="6">
<a name="scale"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#pixdesctest" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#setpts" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.18 scale</h2>

<p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
</p>
<p>For example the command:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./ffmpeg -i in.avi -vf &quot;scale=200:100&quot; out.avi
</pre></td></tr></table>

<p>will scale the input video to a size of 200x100.
</p>
<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>
<hr size="6">
<a name="setpts"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#scale" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#settb" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.19 setpts</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>

<hr size="6">
<a name="settb"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#setpts" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#slicify" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.20 settb</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>

<hr size="6">
<a name="slicify"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#settb" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#transpose" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.21 slicify</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>
<hr size="6">
<a name="transpose"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#slicify" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#unsharp" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.22 transpose</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>

<hr size="6">
<a name="unsharp"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#transpose" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#vflip" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.23 unsharp</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>

<hr size="6">
<a name="vflip"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#unsharp" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#yadif" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.24 vflip</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>

<hr size="6">
<a name="yadif"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#vflip" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">13.25 yadif</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>.
</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>

<hr size="6">
<a name="Video-Sources"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#yadif" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#buffer" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Filters" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">14. Video Sources</h1>

<p>Below is a description of the currently available video sources.
</p>
<hr size="6">
<a name="buffer"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Video-Sources" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#color" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">14.1 buffer</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>
</p>
<p>All the parameters 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>
</dl>

<p>For example:
</p><table><tr><td>&nbsp;</td><td><pre class="example">buffer=320:240:yuv410p:1:24
</pre></td></tr></table>

<p>will instruct the source to accept video frames with size 320x240 and
with format &quot;yuv410p&quot; and assuming 1/24 as the timestamps timebase.
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
</pre></td></tr></table>

<hr size="6">
<a name="color"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#buffer" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#nullsrc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">14.2 color</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>

<hr size="6">
<a name="nullsrc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#color" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#frei0r_005fsrc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">14.3 nullsrc</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>
<hr size="6">
<a name="frei0r_005fsrc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#nullsrc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">14.4 frei0r_src</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 &quot;frei0r&quot; (see <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>


<hr size="6">
<a name="Video-Sinks"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#frei0r_005fsrc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#nullsink" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sources" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter">15. Video Sinks</h1>

<p>Below is a description of the currently available video sinks.
</p>
<hr size="6">
<a name="nullsink"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Video-Sinks" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Video-Sinks" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">15.1 nullsink</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="6">
<a name="SEC_About"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Synopsis" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>About This Document</h1>
<p>
  This document was generated by <em>Christopher Martin</em> on <em>April 27, 2012</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</p>
<p>
  The buttons in the navigation panels have the following meaning:
</p>
<table border="1">
  <tr>
    <th> Button </th>
    <th> Name </th>
    <th> Go to </th>
    <th> From 1.2.3 go to</th>
  </tr>
  <tr>
    <td align="center"> [ &lt; ] </td>
    <td align="center">Back</td>
    <td>Previous section in reading order</td>
    <td>1.2.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt; ] </td>
    <td align="center">Forward</td>
    <td>Next section in reading order</td>
    <td>1.2.4</td>
  </tr>
  <tr>
    <td align="center"> [ &lt;&lt; ] </td>
    <td align="center">FastBack</td>
    <td>Beginning of this chapter or previous chapter</td>
    <td>1</td>
  </tr>
  <tr>
    <td align="center"> [ Up ] </td>
    <td align="center">Up</td>
    <td>Up section</td>
    <td>1.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt;&gt; ] </td>
    <td align="center">FastForward</td>
    <td>Next chapter</td>
    <td>2</td>
  </tr>
  <tr>
    <td align="center"> [Top] </td>
    <td align="center">Top</td>
    <td>Cover (top) of document</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Contents] </td>
    <td align="center">Contents</td>
    <td>Table of contents</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Index] </td>
    <td align="center">Index</td>
    <td>Index</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [ ? ] </td>
    <td align="center">About</td>
    <td>About (help)</td>
    <td> &nbsp; </td>
  </tr>
</table>

<p>
  where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
</p>

<ul>
  <li> 1. Section One
    <ul>
      <li>1.1 Subsection One-One
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.2 Subsection One-Two
        <ul>
          <li>1.2.1 Subsubsection One-Two-One</li>
          <li>1.2.2 Subsubsection One-Two-Two</li>
          <li>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
            <strong>&lt;== Current Position </strong></li>
          <li>1.2.4 Subsubsection One-Two-Four</li>
        </ul>
      </li>
      <li>1.3 Subsection One-Three
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.4 Subsection One-Four</li>
    </ul>
  </li>
</ul>

<hr size="1">
<p>
 <font size="-1">
  This document was generated by <em>Christopher Martin</em> on <em>April 27, 2012</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>

</p>
</body>
</html>
