Sophie

Sophie

distrib > Mageia > 3 > x86_64 > media > tainted-updates > by-pkgid > 9ed110908a90e75a93bc55ea5b096552 > files > 19

ffmpeg-1.1.8-1.mga3.tainted.x86_64.rpm

<!DOCTYPE html>
<html>
<!-- Created on February 9, 2014 by texi2html 5.0 -->
<!--
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>FFmpeg documentation : : </title>

<meta name="description" content=": ">
<meta name="keywords" content="FFmpeg documentation : : ">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="default.css" />

<link rel="icon" href="favicon.png" type="image/png" />
</head>
<body>
<div id="container">

<h1 class="titlefont">FFmpeg Protocols Documentation</h1>
<hr>
<a name="SEC_Top"></a>

<a name="SEC_Contents"></a>
<h1>Table of Contents</h1>

<div class="contents">

<ul class="no-bullet">
  <li><a name="toc-Description" href="#Description">1 Description</a></li>
  <li><a name="toc-Protocols" href="#Protocols">2 Protocols</a>
  <ul class="no-bullet">
    <li><a name="toc-bluray" href="#bluray">2.1 bluray</a></li>
    <li><a name="toc-concat" href="#concat">2.2 concat</a></li>
    <li><a name="toc-data" href="#data">2.3 data</a></li>
    <li><a name="toc-file" href="#file">2.4 file</a></li>
    <li><a name="toc-gopher" href="#gopher">2.5 gopher</a></li>
    <li><a name="toc-hls" href="#hls">2.6 hls</a></li>
    <li><a name="toc-http" href="#http">2.7 http</a></li>
    <li><a name="toc-mmst" href="#mmst">2.8 mmst</a></li>
    <li><a name="toc-mmsh" href="#mmsh">2.9 mmsh</a></li>
    <li><a name="toc-md5" href="#md5">2.10 md5</a></li>
    <li><a name="toc-pipe" href="#pipe">2.11 pipe</a></li>
    <li><a name="toc-rtmp" href="#rtmp">2.12 rtmp</a></li>
    <li><a name="toc-rtmpe" href="#rtmpe">2.13 rtmpe</a></li>
    <li><a name="toc-rtmps" href="#rtmps">2.14 rtmps</a></li>
    <li><a name="toc-rtmpt" href="#rtmpt">2.15 rtmpt</a></li>
    <li><a name="toc-rtmpte" href="#rtmpte">2.16 rtmpte</a></li>
    <li><a name="toc-rtmpts" href="#rtmpts">2.17 rtmpts</a></li>
    <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">2.18 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
    <li><a name="toc-rtp" href="#rtp">2.19 rtp</a></li>
    <li><a name="toc-rtsp" href="#rtsp">2.20 rtsp</a></li>
    <li><a name="toc-sap" href="#sap">2.21 sap</a>
    <ul class="no-bullet">
      <li><a name="toc-Muxer" href="#Muxer">2.21.1 Muxer</a></li>
      <li><a name="toc-Demuxer" href="#Demuxer">2.21.2 Demuxer</a></li>
    </ul></li>
    <li><a name="toc-tcp" href="#tcp">2.22 tcp</a></li>
    <li><a name="toc-tls" href="#tls">2.23 tls</a></li>
    <li><a name="toc-udp" href="#udp">2.24 udp</a></li>
  </ul></li>
  <li><a name="toc-See-Also" href="#See-Also">3 See Also</a></li>
  <li><a name="toc-Authors" href="#Authors">4 Authors</a></li>
</ul>
</div>


<hr size="6">
<a name="Description"></a>
<h1 class="chapter"><a href="ffmpeg-protocols.html#toc-Description">1 Description</a></h1>

<p>This document describes the input and output protocols provided by the
libavformat library.
</p>

<a name="Protocols"></a>
<h1 class="chapter"><a href="ffmpeg-protocols.html#toc-Protocols">2 Protocols</a></h1>

<p>Protocols are configured elements in FFmpeg which allow to access
resources which require the use of a particular protocol.
</p>
<p>When you configure your FFmpeg build, all the supported protocols are
enabled by default. You can list all available ones using the
configure option &quot;&ndash;list-protocols&quot;.
</p>
<p>You can disable all the protocols using the configure option
&quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
particular protocol using the option
&quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
</p>
<p>The option &quot;-protocols&quot; of the ff* tools will display the list of
supported protocols.
</p>
<p>A description of the currently available protocols follows.
</p>
<a name="bluray"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-bluray">2.1 bluray</a></h2>

<p>Read BluRay playlist.
</p>
<p>The accepted options are:
</p><dl compact="compact">
<dt>&lsquo;<samp>angle</samp>&rsquo;</dt>
<dd><p>BluRay angle
</p>
</dd>
<dt>&lsquo;<samp>chapter</samp>&rsquo;</dt>
<dd><p>Start chapter (1...N)
</p>
</dd>
<dt>&lsquo;<samp>playlist</samp>&rsquo;</dt>
<dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)
</p>
</dd>
</dl>

<p>Examples:
</p>
<p>Read longest playlist from BluRay mounted to /mnt/bluray:
</p><div class="example">
<pre class="example">bluray:/mnt/bluray
</pre></div>

<p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
</p><div class="example">
<pre class="example">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
</pre></div>

<a name="concat"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-concat">2.2 concat</a></h2>

<p>Physical concatenation protocol.
</p>
<p>Allow to read and seek from many resource in sequence as if they were
a unique resource.
</p>
<p>A URL accepted by this protocol has the syntax:
</p><div class="example">
<pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
</pre></div>

<p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
resource to be concatenated, each one possibly specifying a distinct
protocol.
</p>
<p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
&lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with <code>ffplay</code> use the
command:
</p><div class="example">
<pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
</pre></div>

<p>Note that you may need to escape the character &quot;|&quot; which is special for
many shells.
</p>
<a name="data"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-data">2.3 data</a></h2>

<p>Data in-line in the URI. See <a href="http://en.wikipedia.org/wiki/Data_URI_scheme">http://en.wikipedia.org/wiki/Data_URI_scheme</a>.
</p>
<p>For example, to convert a GIF file given inline with <code>ffmpeg</code>:
</p><div class="example">
<pre class="example">ffmpeg -i &quot;data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=&quot; smiley.png
</pre></div>

<a name="file"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-file">2.4 file</a></h2>

<p>File access protocol.
</p>
<p>Allow to read from or read to a file.
</p>
<p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with <code>ffmpeg</code>
use the command:
</p><div class="example">
<pre class="example">ffmpeg -i file:input.mpeg output.mpeg
</pre></div>

<p>The ff* tools default to the file protocol, that is a resource
specified with the name &quot;FILE.mpeg&quot; is interpreted as the URL
&quot;file:FILE.mpeg&quot;.
</p>
<a name="gopher"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-gopher">2.5 gopher</a></h2>

<p>Gopher protocol.
</p>
<a name="hls"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-hls">2.6 hls</a></h2>

<p>Read Apple HTTP Live Streaming compliant segmented stream as
a uniform one. The M3U8 playlists describing the segments can be
remote HTTP resources or local files, accessed using the standard
file protocol.
The nested protocol is declared by specifying
&quot;+<var>proto</var>&quot; after the hls URI scheme name, where <var>proto</var>
is either &quot;file&quot; or &quot;http&quot;.
</p>
<div class="example">
<pre class="example">hls+http://host/path/to/remote/resource.m3u8
hls+file://path/to/local/resource.m3u8
</pre></div>

<p>Using this protocol is discouraged - the hls demuxer should work
just as well (if not, please report the issues) and is more complete.
To use the hls demuxer instead, simply use the direct URLs to the
m3u8 files.
</p>
<a name="http"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-http">2.7 http</a></h2>

<p>HTTP (Hyper Text Transfer Protocol).
</p>
<a name="mmst"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-mmst">2.8 mmst</a></h2>

<p>MMS (Microsoft Media Server) protocol over TCP.
</p>
<a name="mmsh"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-mmsh">2.9 mmsh</a></h2>

<p>MMS (Microsoft Media Server) protocol over HTTP.
</p>
<p>The required syntax is:
</p><div class="example">
<pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
</pre></div>

<a name="md5"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-md5">2.10 md5</a></h2>

<p>MD5 output protocol.
</p>
<p>Computes the MD5 hash of the data to be written, and on close writes
this to the designated output or stdout if none is specified. It can
be used to test muxers without writing an actual file.
</p>
<p>Some examples follow.
</p><div class="example">
<pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
ffmpeg -i input.flv -f avi -y md5:output.avi.md5

# Write the MD5 hash of the encoded AVI file to stdout.
ffmpeg -i input.flv -f avi -y md5:
</pre></div>

<p>Note that some formats (typically MOV) require the output protocol to
be seekable, so they will fail with the MD5 output protocol.
</p>
<a name="pipe"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-pipe">2.11 pipe</a></h2>

<p>UNIX pipe access protocol.
</p>
<p>Allow to read and write from UNIX pipes.
</p>
<p>The accepted syntax is:
</p><div class="example">
<pre class="example">pipe:[<var>number</var>]
</pre></div>

<p><var>number</var> is the number corresponding to the file descriptor of the
pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
is not specified, by default the stdout file descriptor will be used
for writing, stdin for reading.
</p>
<p>For example to read from stdin with <code>ffmpeg</code>:
</p><div class="example">
<pre class="example">cat test.wav | ffmpeg -i pipe:0
# ...this is the same as...
cat test.wav | ffmpeg -i pipe:
</pre></div>

<p>For writing to stdout with <code>ffmpeg</code>:
</p><div class="example">
<pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
# ...this is the same as...
ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
</pre></div>

<p>Note that some formats (typically MOV), require the output protocol to
be seekable, so they will fail with the pipe output protocol.
</p>
<a name="rtmp"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmp">2.12 rtmp</a></h2>

<p>Real-Time Messaging Protocol.
</p>
<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
content across a TCP/IP network.
</p>
<p>The required syntax is:
</p><div class="example">
<pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>instance</var>][/<var>playpath</var>]
</pre></div>

<p>The accepted parameters are:
</p><dl compact="compact">
<dt>&lsquo;<samp>server</samp>&rsquo;</dt>
<dd><p>The address of the RTMP server.
</p>
</dd>
<dt>&lsquo;<samp>port</samp>&rsquo;</dt>
<dd><p>The number of the TCP port to use (by default is 1935).
</p>
</dd>
<dt>&lsquo;<samp>app</samp>&rsquo;</dt>
<dd><p>It is the name of the application to access. It usually corresponds to
the path where the application is installed on the RTMP server
(e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.). You can override
the value parsed from the URI through the <code>rtmp_app</code> option, too.
</p>
</dd>
<dt>&lsquo;<samp>playpath</samp>&rsquo;</dt>
<dd><p>It is the path or name of the resource to play with reference to the
application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;. You
can override the value parsed from the URI through the <code>rtmp_playpath</code>
option, too.
</p>
</dd>
<dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
<dd><p>Act as a server, listening for an incoming connection.
</p>
</dd>
<dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
<dd><p>Maximum time to wait for the incoming connection. Implies listen.
</p></dd>
</dl>

<p>Additionally, the following parameters can be set via command line options
(or in code via <code>AVOption</code>s):
</p><dl compact="compact">
<dt>&lsquo;<samp>rtmp_app</samp>&rsquo;</dt>
<dd><p>Name of application to connect on the RTMP server. This option
overrides the parameter specified in the URI.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_buffer</samp>&rsquo;</dt>
<dd><p>Set the client buffer time in milliseconds. The default is 3000.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_conn</samp>&rsquo;</dt>
<dd><p>Extra arbitrary AMF connection parameters, parsed from a string,
e.g. like <code>B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.
Each value is prefixed by a single character denoting the type,
B for Boolean, N for number, S for string, O for object, or Z for null,
followed by a colon. For Booleans the data must be either 0 or 1 for
FALSE or TRUE, respectively.  Likewise for Objects the data must be 0 or
1 to end or begin an object, respectively. Data items in subobjects may
be named, by prefixing the type with &rsquo;N&rsquo; and specifying the name before
the value (i.e. <code>NB:myFlag:1</code>). This option may be used multiple
times to construct arbitrary AMF sequences.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_flashver</samp>&rsquo;</dt>
<dd><p>Version of the Flash plugin used to run the SWF player. The default
is LNX 9,0,124,2.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_flush_interval</samp>&rsquo;</dt>
<dd><p>Number of packets flushed in the same request (RTMPT only). The default
is 10.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_live</samp>&rsquo;</dt>
<dd><p>Specify that the media is a live stream. No resuming or seeking in
live streams is possible. The default value is <code>any</code>, which means the
subscriber first tries to play the live stream specified in the
playpath. If a live stream of that name is not found, it plays the
recorded stream. The other possible values are <code>live</code> and
<code>recorded</code>.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_pageurl</samp>&rsquo;</dt>
<dd><p>URL of the web page in which the media was embedded. By default no
value will be sent.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_playpath</samp>&rsquo;</dt>
<dd><p>Stream identifier to play or to publish. This option overrides the
parameter specified in the URI.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_subscribe</samp>&rsquo;</dt>
<dd><p>Name of live stream to subscribe to. By default no value will be sent.
It is only sent if the option is specified or if rtmp_live
is set to live.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_swfhash</samp>&rsquo;</dt>
<dd><p>SHA256 hash of the decompressed SWF file (32 bytes).
</p>
</dd>
<dt>&lsquo;<samp>rtmp_swfsize</samp>&rsquo;</dt>
<dd><p>Size of the decompressed SWF file, required for SWFVerification.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_swfurl</samp>&rsquo;</dt>
<dd><p>URL of the SWF player for the media. By default no value will be sent.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_swfverify</samp>&rsquo;</dt>
<dd><p>URL to player swf file, compute hash/size automatically.
</p>
</dd>
<dt>&lsquo;<samp>rtmp_tcurl</samp>&rsquo;</dt>
<dd><p>URL of the target stream. Defaults to proto://host[:port]/app.
</p>
</dd>
</dl>

<p>For example to read with <code>ffplay</code> a multimedia resource named
&quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
</p><div class="example">
<pre class="example">ffplay rtmp://myserver/vod/sample
</pre></div>

<a name="rtmpe"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmpe">2.13 rtmpe</a></h2>

<p>Encrypted Real-Time Messaging Protocol.
</p>
<p>The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
streaming multimedia content within standard cryptographic primitives,
consisting of Diffie-Hellman key exchange and HMACSHA256, generating
a pair of RC4 keys.
</p>
<a name="rtmps"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmps">2.14 rtmps</a></h2>

<p>Real-Time Messaging Protocol over a secure SSL connection.
</p>
<p>The Real-Time Messaging Protocol (RTMPS) is used for streaming
multimedia content across an encrypted connection.
</p>
<a name="rtmpt"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmpt">2.15 rtmpt</a></h2>

<p>Real-Time Messaging Protocol tunneled through HTTP.
</p>
<p>The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
for streaming multimedia content within HTTP requests to traverse
firewalls.
</p>
<a name="rtmpte"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmpte">2.16 rtmpte</a></h2>

<p>Encrypted Real-Time Messaging Protocol tunneled through HTTP.
</p>
<p>The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
is used for streaming multimedia content within HTTP requests to traverse
firewalls.
</p>
<a name="rtmpts"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmpts">2.17 rtmpts</a></h2>

<p>Real-Time Messaging Protocol tunneled through HTTPS.
</p>
<p>The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
for streaming multimedia content within HTTPS requests to traverse
firewalls.
</p>
<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">2.18 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>

<p>Real-Time Messaging Protocol and its variants supported through
librtmp.
</p>
<p>Requires the presence of the librtmp headers and library during
configuration. You need to explicitly configure the build with
&quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
protocol.
</p>
<p>This protocol provides most client functions and a few server
functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
variants of these encrypted types (RTMPTE, RTMPTS).
</p>
<p>The required syntax is:
</p><div class="example">
<pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
</pre></div>

<p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
&quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
<var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
meaning as specified for the RTMP native protocol.
<var>options</var> contains a list of space-separated options of the form
<var>key</var>=<var>val</var>.
</p>
<p>See the librtmp manual page (man 3 librtmp) for more information.
</p>
<p>For example, to stream a file in real-time to an RTMP server using
<code>ffmpeg</code>:
</p><div class="example">
<pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
</pre></div>

<p>To play the same stream using <code>ffplay</code>:
</p><div class="example">
<pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
</pre></div>

<a name="rtp"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtp">2.19 rtp</a></h2>

<p>Real-Time Protocol.
</p>
<a name="rtsp"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-rtsp">2.20 rtsp</a></h2>

<p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
and muxer. The demuxer supports both normal RTSP (with data transferred
over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
data transferred over RDT).
</p>
<p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
<a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
</p>
<p>The required syntax for a RTSP url is:
</p><div class="example">
<pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>
</pre></div>

<p>The following options (set on the <code>ffmpeg</code>/<code>ffplay</code> command
line, or set in code via <code>AVOption</code>s or in <code>avformat_open_input</code>),
are supported:
</p>
<p>Flags for <code>rtsp_transport</code>:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>udp</samp>&rsquo;</dt>
<dd><p>Use UDP as lower transport protocol.
</p>
</dd>
<dt>&lsquo;<samp>tcp</samp>&rsquo;</dt>
<dd><p>Use TCP (interleaving within the RTSP control channel) as lower
transport protocol.
</p>
</dd>
<dt>&lsquo;<samp>udp_multicast</samp>&rsquo;</dt>
<dd><p>Use UDP multicast as lower transport protocol.
</p>
</dd>
<dt>&lsquo;<samp>http</samp>&rsquo;</dt>
<dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
passing proxies.
</p></dd>
</dl>

<p>Multiple lower transport protocols may be specified, in that case they are
tried one at a time (if the setup of one fails, the next one is tried).
For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
</p>
<p>Flags for <code>rtsp_flags</code>:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>filter_src</samp>&rsquo;</dt>
<dd><p>Accept packets only from negotiated peer address and port.
</p></dd>
<dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
<dd><p>Act as a server, listening for an incoming connection.
</p></dd>
</dl>

<p>When receiving data over UDP, the demuxer tries to reorder received packets
(since they may arrive out of order, or packets may get lost totally). This
can be disabled by setting the maximum demuxing delay to zero (via
the <code>max_delay</code> field of AVFormatContext).
</p>
<p>When watching multi-bitrate Real-RTSP streams with <code>ffplay</code>, the
streams to display can be chosen with <code>-vst</code> <var>n</var> and
<code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
on the fly by pressing <code>v</code> and <code>a</code>.
</p>
<p>Example command lines:
</p>
<p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
</p>
<div class="example">
<pre class="example">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
</pre></div>

<p>To watch a stream tunneled over HTTP:
</p>
<div class="example">
<pre class="example">ffplay -rtsp_transport http rtsp://server/video.mp4
</pre></div>

<p>To send a stream in realtime to a RTSP server, for others to watch:
</p>
<div class="example">
<pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
</pre></div>

<p>To receive a stream in realtime:
</p>
<div class="example">
<pre class="example">ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <var>output</var>
</pre></div>

<a name="sap"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-sap">2.21 sap</a></h2>

<p>Session Announcement Protocol (RFC 2974). This is not technically a
protocol handler in libavformat, it is a muxer and demuxer.
It is used for signalling of RTP streams, by announcing the SDP for the
streams regularly on a separate port.
</p>
<a name="Muxer"></a>
<h3 class="subsection"><a href="ffmpeg-protocols.html#toc-Muxer">2.21.1 Muxer</a></h3>

<p>The syntax for a SAP url given to the muxer is:
</p><div class="example">
<pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
</pre></div>

<p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
or to port 5004 if no port is specified.
<var>options</var> is a <code>&amp;</code>-separated list. The following options
are supported:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
<dd><p>Specify the destination IP address for sending the announcements to.
If omitted, the announcements are sent to the commonly used SAP
announcement multicast address 224.2.127.254 (sap.mcast.net), or
ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
</p>
</dd>
<dt>&lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
<dd><p>Specify the port to send the announcements on, defaults to
9875 if not specified.
</p>
</dd>
<dt>&lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
<dd><p>Specify the time to live value for the announcements and RTP packets,
defaults to 255.
</p>
</dd>
<dt>&lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
<dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
default), all streams are sent on unique ports, with each stream on a
port 2 numbers higher than the previous.
VLC/Live555 requires this to be set to 1, to be able to receive the stream.
The RTP stack in libavformat for receiving requires all streams to be sent
on unique ports.
</p></dd>
</dl>

<p>Example command lines follow.
</p>
<p>To broadcast a stream on the local subnet, for watching in VLC:
</p>
<div class="example">
<pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
</pre></div>

<p>Similarly, for watching in <code>ffplay</code>:
</p>
<div class="example">
<pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
</pre></div>

<p>And for watching in <code>ffplay</code>, over IPv6:
</p>
<div class="example">
<pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
</pre></div>

<a name="Demuxer"></a>
<h3 class="subsection"><a href="ffmpeg-protocols.html#toc-Demuxer">2.21.2 Demuxer</a></h3>

<p>The syntax for a SAP url given to the demuxer is:
</p><div class="example">
<pre class="example">sap://[<var>address</var>][:<var>port</var>]
</pre></div>

<p><var>address</var> is the multicast address to listen for announcements on,
if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
is the port that is listened on, 9875 if omitted.
</p>
<p>The demuxers listens for announcements on the given address and port.
Once an announcement is received, it tries to receive that particular stream.
</p>
<p>Example command lines follow.
</p>
<p>To play back the first stream announced on the normal SAP multicast address:
</p>
<div class="example">
<pre class="example">ffplay sap://
</pre></div>

<p>To play back the first stream announced on one the default IPv6 SAP multicast address:
</p>
<div class="example">
<pre class="example">ffplay sap://[ff0e::2:7ffe]
</pre></div>

<a name="tcp"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-tcp">2.22 tcp</a></h2>

<p>Trasmission Control Protocol.
</p>
<p>The required syntax for a TCP url is:
</p><div class="example">
<pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
</pre></div>

<dl compact="compact">
<dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
<dd><p>Listen for an incoming connection
</p>
</dd>
<dt>&lsquo;<samp>timeout=<var>microseconds</var></samp>&rsquo;</dt>
<dd><p>In read mode: if no data arrived in more than this time interval, raise error.
In write mode: if socket cannot be written in more than this time interval, raise error.
This also sets timeout on TCP connection establishing.
</p>
<div class="example">
<pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
ffplay tcp://<var>hostname</var>:<var>port</var>
</pre></div>

</dd>
</dl>

<a name="tls"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-tls">2.23 tls</a></h2>

<p>Transport Layer Security/Secure Sockets Layer
</p>
<p>The required syntax for a TLS/SSL url is:
</p><div class="example">
<pre class="example">tls://<var>hostname</var>:<var>port</var>[?<var>options</var>]
</pre></div>

<dl compact="compact">
<dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
<dd><p>Act as a server, listening for an incoming connection.
</p>
</dd>
<dt>&lsquo;<samp>cafile=<var>filename</var></samp>&rsquo;</dt>
<dd><p>Certificate authority file. The file must be in OpenSSL PEM format.
</p>
</dd>
<dt>&lsquo;<samp>cert=<var>filename</var></samp>&rsquo;</dt>
<dd><p>Certificate file. The file must be in OpenSSL PEM format.
</p>
</dd>
<dt>&lsquo;<samp>key=<var>filename</var></samp>&rsquo;</dt>
<dd><p>Private key file.
</p>
</dd>
<dt>&lsquo;<samp>verify=<var>0|1</var></samp>&rsquo;</dt>
<dd><p>Verify the peer&rsquo;s certificate.
</p>
</dd>
</dl>

<p>Example command lines:
</p>
<p>To create a TLS/SSL server that serves an input stream.
</p>
<div class="example">
<pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tls://<var>hostname</var>:<var>port</var>?listen&amp;cert=<var>server.crt</var>&amp;key=<var>server.key</var>
</pre></div>

<p>To play back a stream from the TLS/SSL server using <code>ffplay</code>:
</p>
<div class="example">
<pre class="example">ffplay tls://<var>hostname</var>:<var>port</var>
</pre></div>

<a name="udp"></a>
<h2 class="section"><a href="ffmpeg-protocols.html#toc-udp">2.24 udp</a></h2>

<p>User Datagram Protocol.
</p>
<p>The required syntax for a UDP url is:
</p><div class="example">
<pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
</pre></div>

<p><var>options</var> contains a list of &amp;-separated options of the form <var>key</var>=<var>val</var>.
</p>
<p>In case threading is enabled on the system, a circular buffer is used
to store the incoming data, which allows to reduce loss of data due to
UDP socket buffer overruns. The <var>fifo_size</var> and
<var>overrun_nonfatal</var> options are related to this buffer.
</p>
<p>The list of supported options follows.
</p>
<dl compact="compact">
<dt>&lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
<dd><p>Set the UDP socket buffer size in bytes. This is used both for the
receiving and the sending buffer size.
</p>
</dd>
<dt>&lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
<dd><p>Override the local UDP port to bind with.
</p>
</dd>
<dt>&lsquo;<samp>localaddr=<var>addr</var></samp>&rsquo;</dt>
<dd><p>Choose the local IP address. This is useful e.g. if sending multicast
and the host has multiple interfaces, where the user can choose
which interface to send on by specifying the IP address of that interface.
</p>
</dd>
<dt>&lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
<dd><p>Set the size in bytes of UDP packets.
</p>
</dd>
<dt>&lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
<dd><p>Explicitly allow or disallow reusing UDP sockets.
</p>
</dd>
<dt>&lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
<dd><p>Set the time to live value (for multicast only).
</p>
</dd>
<dt>&lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
<dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
If the destination address isn&rsquo;t known at the start, this option can
be specified in ff_udp_set_remote_url, too.
This allows finding out the source address for the packets with getsockname,
and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
unreachable&quot; is received.
For receiving, this gives the benefit of only receiving packets from
the specified peer address/port.
</p>
</dd>
<dt>&lsquo;<samp>sources=<var>address</var>[,<var>address</var>]</samp>&rsquo;</dt>
<dd><p>Only receive packets sent to the multicast group from one of the
specified sender IP addresses.
</p>
</dd>
<dt>&lsquo;<samp>block=<var>address</var>[,<var>address</var>]</samp>&rsquo;</dt>
<dd><p>Ignore packets sent to the multicast group from the specified
sender IP addresses.
</p>
</dd>
<dt>&lsquo;<samp>fifo_size=<var>units</var></samp>&rsquo;</dt>
<dd><p>Set the UDP receiving circular buffer size, expressed as a number of
packets with size of 188 bytes. If not specified defaults to 7*4096.
</p>
</dd>
<dt>&lsquo;<samp>overrun_nonfatal=<var>1|0</var></samp>&rsquo;</dt>
<dd><p>Survive in case of UDP receiving circular buffer overrun. Default
value is 0.
</p>
</dd>
<dt>&lsquo;<samp>timeout=<var>microseconds</var></samp>&rsquo;</dt>
<dd><p>In read mode: if no data arrived in more than this time interval, raise error.
</p></dd>
</dl>

<p>Some usage examples of the UDP protocol with <code>ffmpeg</code> follow.
</p>
<p>To stream over UDP to a remote endpoint:
</p><div class="example">
<pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
</pre></div>

<p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
</p><div class="example">
<pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
</pre></div>

<p>To receive over UDP from a remote endpoint:
</p><div class="example">
<pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
</pre></div>


<a name="See-Also"></a>
<h1 class="chapter"><a href="ffmpeg-protocols.html#toc-See-Also">3 See Also</a></h1>

<p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>,
<a href="libavformat.html">libavformat</a>
</p>

<a name="Authors"></a>
<h1 class="chapter"><a href="ffmpeg-protocols.html#toc-Authors">4 Authors</a></h1>

<p>The FFmpeg developers.
</p>
<p>For details about the authorship, see the Git history of the project
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
<code>git log</code> in the FFmpeg source directory, or browsing the
online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
</p>
<p>Maintainers for the specific components are listed in the file
&lsquo;<tt>MAINTAINERS</tt>&rsquo; in the source code tree.
</p>

<footer class="footer pagination-right">
<span class="label label-info">This document was generated on <i>February 9, 2014</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 5.0</i></a>.</span></footer></div>