<!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>Untitled Document</title>

<meta name="description" content="Untitled Document">
<meta name="keywords" content="Untitled Document">
<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="Filtergraph-description"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[ &lt; ]</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">[ &lt;&lt; ]</td>
<td valign="middle" align="left">[ Up ]</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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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">1.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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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">2.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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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">4.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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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">5.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="#Filtergraph-description" 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">5.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="#Filtergraph-description" 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">5.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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.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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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="#Filtergraph-description" 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. 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="#Filtergraph-description" 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 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="#Filtergraph-description" 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>
