codekingpro/portable-devtools
114k
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">2<html>3<!-- Created by , GNU Texinfo 7.1.1 -->4 <head>5 <meta charset="utf-8">6 <title>7 FFmpeg Protocols Documentation8 </title>9 <meta name="viewport" content="width=device-width,initial-scale=1.0">10 <link rel="stylesheet" type="text/css" href="bootstrap.min.css">11 <link rel="stylesheet" type="text/css" href="style.min.css">12 </head>13 <body>14 <div class="container">15 <h1>16 FFmpeg Protocols Documentation17 </h1>18 19 20<a name="SEC_Top"></a>21 22<div class="element-contents" id="SEC_Contents">23<h2 class="contents-heading">Table of Contents</h2>24 25<div class="contents">26 27<ul class="toc-numbered-mark">28 <li><a id="toc-Description" href="#Description">1 Description</a></li>29 <li><a id="toc-Protocol-Options" href="#Protocol-Options">2 Protocol Options</a></li>30 <li><a id="toc-Protocols" href="#Protocols">3 Protocols</a>31 <ul class="toc-numbered-mark">32 <li><a id="toc-amqp" href="#amqp">3.1 amqp</a></li>33 <li><a id="toc-async" href="#async">3.2 async</a></li>34 <li><a id="toc-bluray" href="#bluray">3.3 bluray</a></li>35 <li><a id="toc-cache" href="#cache">3.4 cache</a></li>36 <li><a id="toc-concat" href="#concat">3.5 concat</a></li>37 <li><a id="toc-concatf" href="#concatf">3.6 concatf</a></li>38 <li><a id="toc-crypto" href="#crypto">3.7 crypto</a></li>39 <li><a id="toc-data" href="#data">3.8 data</a></li>40 <li><a id="toc-fd" href="#fd">3.9 fd</a></li>41 <li><a id="toc-file" href="#file">3.10 file</a></li>42 <li><a id="toc-ftp" href="#ftp">3.11 ftp</a></li>43 <li><a id="toc-gopher" href="#gopher">3.12 gopher</a></li>44 <li><a id="toc-gophers" href="#gophers">3.13 gophers</a></li>45 <li><a id="toc-http" href="#http">3.14 http</a>46 <ul class="toc-numbered-mark">47 <li><a id="toc-HTTP-Cookies" href="#HTTP-Cookies">3.14.1 HTTP Cookies</a></li>48 </ul></li>49 <li><a id="toc-Icecast" href="#Icecast">3.15 Icecast</a></li>50 <li><a id="toc-ipfs" href="#ipfs">3.16 ipfs</a></li>51 <li><a id="toc-mmst" href="#mmst">3.17 mmst</a></li>52 <li><a id="toc-mmsh" href="#mmsh">3.18 mmsh</a></li>53 <li><a id="toc-md5" href="#md5">3.19 md5</a></li>54 <li><a id="toc-pipe" href="#pipe">3.20 pipe</a></li>55 <li><a id="toc-prompeg" href="#prompeg">3.21 prompeg</a></li>56 <li><a id="toc-rist" href="#rist">3.22 rist</a></li>57 <li><a id="toc-rtmp" href="#rtmp">3.23 rtmp</a></li>58 <li><a id="toc-rtmpe" href="#rtmpe">3.24 rtmpe</a></li>59 <li><a id="toc-rtmps" href="#rtmps">3.25 rtmps</a></li>60 <li><a id="toc-rtmpt" href="#rtmpt">3.26 rtmpt</a></li>61 <li><a id="toc-rtmpte" href="#rtmpte">3.27 rtmpte</a></li>62 <li><a id="toc-rtmpts" href="#rtmpts">3.28 rtmpts</a></li>63 <li><a id="toc-libsmbclient" href="#libsmbclient">3.29 libsmbclient</a></li>64 <li><a id="toc-libssh" href="#libssh">3.30 libssh</a></li>65 <li><a id="toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">3.31 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>66 <li><a id="toc-rtp" href="#rtp">3.32 rtp</a></li>67 <li><a id="toc-rtsp" href="#rtsp">3.33 rtsp</a>68 <ul class="toc-numbered-mark">69 <li><a id="toc-Muxer" href="#Muxer">3.33.1 Muxer</a></li>70 <li><a id="toc-Demuxer" href="#Demuxer">3.33.2 Demuxer</a></li>71 <li><a id="toc-Examples" href="#Examples">3.33.3 Examples</a></li>72 </ul></li>73 <li><a id="toc-sap" href="#sap">3.34 sap</a>74 <ul class="toc-numbered-mark">75 <li><a id="toc-Muxer-1" href="#Muxer-1">3.34.1 Muxer</a></li>76 <li><a id="toc-Demuxer-1" href="#Demuxer-1">3.34.2 Demuxer</a></li>77 </ul></li>78 <li><a id="toc-sctp" href="#sctp">3.35 sctp</a></li>79 <li><a id="toc-srt" href="#srt">3.36 srt</a></li>80 <li><a id="toc-srtp" href="#srtp">3.37 srtp</a></li>81 <li><a id="toc-subfile" href="#subfile">3.38 subfile</a></li>82 <li><a id="toc-tee" href="#tee">3.39 tee</a></li>83 <li><a id="toc-tcp" href="#tcp">3.40 tcp</a></li>84 <li><a id="toc-tls" href="#tls">3.41 tls</a></li>85 <li><a id="toc-dtls" href="#dtls">3.42 dtls</a></li>86 <li><a id="toc-udp" href="#udp">3.43 udp</a>87 <ul class="toc-numbered-mark">88 <li><a id="toc-Examples-1" href="#Examples-1">3.43.1 Examples</a></li>89 </ul></li>90 <li><a id="toc-unix" href="#unix">3.44 unix</a></li>91 <li><a id="toc-zmq" href="#zmq">3.45 zmq</a></li>92 </ul></li>93 <li><a id="toc-See-Also" href="#See-Also">4 See Also</a></li>94 <li><a id="toc-Authors" href="#Authors">5 Authors</a></li>95</ul>96</div>97</div>98 99<a name="Description"></a>100<h2 class="chapter">1 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>101 102<p>This document describes the input and output protocols provided by the103libavformat library.104</p>105 106<a name="Protocol-Options"></a>107<h2 class="chapter">2 Protocol Options<span class="pull-right"><a class="anchor hidden-xs" href="#Protocol-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Protocol-Options" aria-hidden="true">TOC</a></span></h2>108 109<p>The libavformat library provides some generic global options, which110can be set on all the protocols. In addition each protocol may support111so-called private options, which are specific for that component.112</p>113<p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the114FFmpeg tools, or by setting the value explicitly in the115<code class="code">AVFormatContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API116for programmatic use.117</p>118<p>The list of supported options follows:119</p>120<dl class="table">121<dt><samp class="option">protocol_whitelist <var class="var">list</var> (<em class="emph">input</em>)</samp></dt>122<dd><p>Set a ","-separated list of allowed protocols. "ALL" matches all protocols. Protocols123prefixed by "-" are disabled.124All protocols are allowed by default but protocols used by an another125protocol (nested protocols) are restricted to a per protocol subset.126</p></dd>127</dl>128 129 130<a name="Protocols"></a>131<h2 class="chapter">3 Protocols<span class="pull-right"><a class="anchor hidden-xs" href="#Protocols" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Protocols" aria-hidden="true">TOC</a></span></h2>132 133<p>Protocols are configured elements in FFmpeg that enable access to134resources that require specific protocols.135</p>136<p>When you configure your FFmpeg build, all the supported protocols are137enabled by default. You can list all available ones using the138configure option "–list-protocols".139</p>140<p>You can disable all the protocols using the configure option141"–disable-protocols", and selectively enable a protocol using the142option "–enable-protocol=<var class="var">PROTOCOL</var>", or you can disable a143particular protocol using the option144"–disable-protocol=<var class="var">PROTOCOL</var>".145</p>146<p>The option "-protocols" of the ff* tools will display the list of147supported protocols.148</p>149<p>All protocols accept the following options:150</p>151<dl class="table">152<dt><samp class="option">rw_timeout</samp></dt>153<dd><p>Maximum time to wait for (network) read/write operations to complete,154in microseconds.155</p></dd>156</dl>157 158<p>A description of the currently available protocols follows.159</p>160<a name="amqp"></a>161<h3 class="section">3.1 amqp<span class="pull-right"><a class="anchor hidden-xs" href="#amqp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amqp" aria-hidden="true">TOC</a></span></h3>162 163<p>Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker based164publish-subscribe communication protocol.165</p>166<p>FFmpeg must be compiled with –enable-librabbitmq to support AMQP. A separate167AMQP broker must also be run. An example open-source AMQP broker is RabbitMQ.168</p>169<p>After starting the broker, an FFmpeg client may stream data to the broker using170the command:171</p>172<div class="example">173<pre class="example-preformatted">ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]174</pre></div>175 176<p>Where hostname and port (default is 5672) is the address of the broker. The177client may also set a user/password for authentication. The default for both178fields is "guest". Name of virtual host on broker can be set with vhost. The179default value is "/".180</p>181<p>Multiple subscribers may stream from the broker using the command:182</p><div class="example">183<pre class="example-preformatted">ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]184</pre></div>185 186<p>In RabbitMQ all data published to the broker flows through a specific exchange,187and each subscribing client has an assigned queue/buffer. When a packet arrives188at an exchange, it may be copied to a client’s queue depending on the exchange189and routing_key fields.190</p>191<p>The following options are supported:192</p>193<dl class="table">194<dt><samp class="option">exchange</samp></dt>195<dd><p>Sets the exchange to use on the broker. RabbitMQ has several predefined196exchanges: "amq.direct" is the default exchange, where the publisher and197subscriber must have a matching routing_key; "amq.fanout" is the same as a198broadcast operation (i.e. the data is forwarded to all queues on the fanout199exchange independent of the routing_key); and "amq.topic" is similar to200"amq.direct", but allows for more complex pattern matching (refer to the RabbitMQ201documentation).202</p>203</dd>204<dt><samp class="option">routing_key</samp></dt>205<dd><p>Sets the routing key. The default value is "amqp". The routing key is used on206the "amq.direct" and "amq.topic" exchanges to decide whether packets are written207to the queue of a subscriber.208</p>209</dd>210<dt><samp class="option">pkt_size</samp></dt>211<dd><p>Maximum size of each packet sent/received to the broker. Default is 131072.212Minimum is 4096 and max is any large value (representable by an int). When213receiving packets, this sets an internal buffer size in FFmpeg. It should be214equal to or greater than the size of the published packets to the broker. Otherwise215the received message may be truncated causing decoding errors.216</p>217</dd>218<dt><samp class="option">connection_timeout</samp></dt>219<dd><p>The timeout in seconds during the initial connection to the broker. The220default value is rw_timeout, or 5 seconds if rw_timeout is not set.221</p>222</dd>223<dt><samp class="option">delivery_mode <var class="var">mode</var></samp></dt>224<dd><p>Sets the delivery mode of each message sent to broker.225The following values are accepted:226</p><dl class="table">227<dt>‘<samp class="samp">persistent</samp>’</dt>228<dd><p>Delivery mode set to "persistent" (2). This is the default value.229Messages may be written to the broker’s disk depending on its setup.230</p>231</dd>232<dt>‘<samp class="samp">non-persistent</samp>’</dt>233<dd><p>Delivery mode set to "non-persistent" (1).234Messages will stay in broker’s memory unless the broker is under memory235pressure.236</p>237</dd>238</dl>239 240</dd>241</dl>242 243<a name="async"></a>244<h3 class="section">3.2 async<span class="pull-right"><a class="anchor hidden-xs" href="#async" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-async" aria-hidden="true">TOC</a></span></h3>245 246<p>Asynchronous data filling wrapper for input stream.247</p>248<p>Fill data in a background thread, to decouple I/O operation from demux thread.249</p>250<div class="example">251<pre class="example-preformatted">async:<var class="var">URL</var>252async:http://host/resource253async:cache:http://host/resource254</pre></div>255 256<a name="bluray"></a>257<h3 class="section">3.3 bluray<span class="pull-right"><a class="anchor hidden-xs" href="#bluray" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bluray" aria-hidden="true">TOC</a></span></h3>258 259<p>Read BluRay playlist.260</p>261<p>The accepted options are:262</p><dl class="table">263<dt><samp class="option">angle</samp></dt>264<dd><p>BluRay angle265</p>266</dd>267<dt><samp class="option">chapter</samp></dt>268<dd><p>Start chapter (1...N)269</p>270</dd>271<dt><samp class="option">playlist</samp></dt>272<dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)273</p>274</dd>275</dl>276 277<p>Examples:278</p>279<p>Read longest playlist from BluRay mounted to /mnt/bluray:280</p><div class="example">281<pre class="example-preformatted">bluray:/mnt/bluray282</pre></div>283 284<p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:285</p><div class="example">286<pre class="example-preformatted">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray287</pre></div>288 289<a name="cache"></a>290<h3 class="section">3.4 cache<span class="pull-right"><a class="anchor hidden-xs" href="#cache" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cache" aria-hidden="true">TOC</a></span></h3>291 292<p>Caching wrapper for input stream.293</p>294<p>Cache the input stream to temporary file. It brings seeking capability to live streams.295</p>296<p>The accepted options are:297</p><dl class="table">298<dt><samp class="option">read_ahead_limit</samp></dt>299<dd><p>Amount in bytes that may be read ahead when seeking isn’t supported. Range is -1 to INT_MAX.300-1 for unlimited. Default is 65536.301</p>302</dd>303</dl>304 305<p>URL Syntax is306</p><div class="example">307<pre class="example-preformatted">cache:<var class="var">URL</var>308</pre></div>309 310<a name="concat"></a>311<h3 class="section">3.5 concat<span class="pull-right"><a class="anchor hidden-xs" href="#concat" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-concat" aria-hidden="true">TOC</a></span></h3>312 313<p>Physical concatenation protocol.314</p>315<p>Read and seek from many resources in sequence as if they were316a unique resource.317</p>318<p>A URL accepted by this protocol has the syntax:319</p><div class="example">320<pre class="example-preformatted">concat:<var class="var">URL1</var>|<var class="var">URL2</var>|...|<var class="var">URLN</var>321</pre></div>322 323<p>where <var class="var">URL1</var>, <var class="var">URL2</var>, ..., <var class="var">URLN</var> are the urls of the324resource to be concatenated, each one possibly specifying a distinct325protocol.326</p>327<p>For example to read a sequence of files <samp class="file">split1.mpeg</samp>,328<samp class="file">split2.mpeg</samp>, <samp class="file">split3.mpeg</samp> with <code class="command">ffplay</code> use the329command:330</p><div class="example">331<pre class="example-preformatted">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg332</pre></div>333 334<p>Note that you may need to escape the character "|" which is special for335many shells.336</p>337<a name="concatf"></a>338<h3 class="section">3.6 concatf<span class="pull-right"><a class="anchor hidden-xs" href="#concatf" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-concatf" aria-hidden="true">TOC</a></span></h3>339 340<p>Physical concatenation protocol using a line break delimited list of341resources.342</p>343<p>Read and seek from many resources in sequence as if they were344a unique resource.345</p>346<p>A URL accepted by this protocol has the syntax:347</p><div class="example">348<pre class="example-preformatted">concatf:<var class="var">URL</var>349</pre></div>350 351<p>where <var class="var">URL</var> is the url containing a line break delimited list of352resources to be concatenated, each one possibly specifying a distinct353protocol. Special characters must be escaped with backslash or single354quotes. See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#quoting_005fand_005fescaping">the "Quoting and escaping"355section in the ffmpeg-utils(1) manual</a>.356</p>357<p>For example to read a sequence of files <samp class="file">split1.mpeg</samp>,358<samp class="file">split2.mpeg</samp>, <samp class="file">split3.mpeg</samp> listed in separate lines within359a file <samp class="file">split.txt</samp> with <code class="command">ffplay</code> use the command:360</p><div class="example">361<pre class="example-preformatted">ffplay concatf:split.txt362</pre></div>363<p>Where <samp class="file">split.txt</samp> contains the lines:364</p><div class="example">365<pre class="example-preformatted">split1.mpeg366split2.mpeg367split3.mpeg368</pre></div>369 370<a name="crypto"></a>371<h3 class="section">3.7 crypto<span class="pull-right"><a class="anchor hidden-xs" href="#crypto" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-crypto" aria-hidden="true">TOC</a></span></h3>372 373<p>AES-encrypted stream reading protocol.374</p>375<p>The accepted options are:376</p><dl class="table">377<dt><samp class="option">key</samp></dt>378<dd><p>Set the AES decryption key binary block from given hexadecimal representation.379</p>380</dd>381<dt><samp class="option">iv</samp></dt>382<dd><p>Set the AES decryption initialization vector binary block from given hexadecimal representation.383</p></dd>384</dl>385 386<p>Accepted URL formats:387</p><div class="example">388<pre class="example-preformatted">crypto:<var class="var">URL</var>389crypto+<var class="var">URL</var>390</pre></div>391 392<a name="data"></a>393<h3 class="section">3.8 data<span class="pull-right"><a class="anchor hidden-xs" href="#data" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-data" aria-hidden="true">TOC</a></span></h3>394 395<p>Data in-line in the URI. See <a class="url" href="http://en.wikipedia.org/wiki/Data_URI_scheme">http://en.wikipedia.org/wiki/Data_URI_scheme</a>.396</p>397<p>For example, to convert a GIF file given inline with <code class="command">ffmpeg</code>:398</p><div class="example">399<pre class="example-preformatted">ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png400</pre></div>401 402<a name="fd"></a>403<h3 class="section">3.9 fd<span class="pull-right"><a class="anchor hidden-xs" href="#fd" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fd" aria-hidden="true">TOC</a></span></h3>404 405<p>File descriptor access protocol.406</p>407<p>The accepted syntax is:408</p><div class="example">409<pre class="example-preformatted">fd: -fd <var class="var">file_descriptor</var>410</pre></div>411 412<p>If <samp class="option">fd</samp> is not specified, by default the stdout file descriptor will be413used for writing, stdin for reading. Unlike the pipe protocol, fd protocol has414seek support if it corresponding to a regular file. fd protocol doesn’t support415pass file descriptor via URL for security.416</p>417<p>This protocol accepts the following options:418</p>419<dl class="table">420<dt><samp class="option">blocksize</samp></dt>421<dd><p>Set I/O operation maximum block size, in bytes. Default value is422<code class="code">INT_MAX</code>, which results in not limiting the requested block size.423Setting this value reasonably low improves user termination request reaction424time, which is valuable if data transmission is slow.425</p>426</dd>427<dt><samp class="option">fd</samp></dt>428<dd><p>Set file descriptor.429</p></dd>430</dl>431 432<a name="file"></a>433<h3 class="section">3.10 file<span class="pull-right"><a class="anchor hidden-xs" href="#file" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-file" aria-hidden="true">TOC</a></span></h3>434 435<p>File access protocol.436</p>437<p>Read from or write to a file.438</p>439<p>A file URL can have the form:440</p><div class="example">441<pre class="example-preformatted">file:<var class="var">filename</var>442</pre></div>443 444<p>where <var class="var">filename</var> is the path of the file to read.445</p>446<p>An URL that does not have a protocol prefix will be assumed to be a447file URL. Depending on the build, an URL that looks like a Windows448path with the drive letter at the beginning will also be assumed to be449a file URL (usually not the case in builds for unix-like systems).450</p>451<p>For example to read from a file <samp class="file">input.mpeg</samp> with <code class="command">ffmpeg</code>452use the command:453</p><div class="example">454<pre class="example-preformatted">ffmpeg -i file:input.mpeg output.mpeg455</pre></div>456 457<p>This protocol accepts the following options:458</p>459<dl class="table">460<dt><samp class="option">truncate</samp></dt>461<dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents462truncating. Default value is 1.463</p>464</dd>465<dt><samp class="option">blocksize</samp></dt>466<dd><p>Set I/O operation maximum block size, in bytes. Default value is467<code class="code">INT_MAX</code>, which results in not limiting the requested block size.468Setting this value reasonably low improves user termination request reaction469time, which is valuable for files on slow medium.470</p>471</dd>472<dt><samp class="option">follow</samp></dt>473<dd><p>If set to 1, the protocol will retry reading at the end of the file, allowing474reading files that still are being written. In order for this to terminate,475you either need to use the rw_timeout option, or use the interrupt callback476(for API users).477</p>478</dd>479<dt><samp class="option">seekable</samp></dt>480<dd><p>Controls if seekability is advertised on the file. 0 means non-seekable, -1481means auto (seekable for normal files, non-seekable for named pipes).482</p>483<p>Many demuxers handle seekable and non-seekable resources differently,484overriding this might speed up opening certain files at the cost of losing some485features (e.g. accurate seeking).486</p>487</dd>488<dt><samp class="option">pkt_size</samp></dt>489<dd><p>Set the maximum packet size used for file I/O. A smaller value may reduce490memory usage. A higher value may increase throughput especially with networked491filesystems.492</p>493<p>For reading, if explicitly set, it overrides the default internal buffer size494(32 KB) and limits the maximum amount of data read per operation.495</p>496<p>For writing, this sets the size of each write operation. The default is 256 KB497for regular files, 32 KB otherwise.498</p></dd>499</dl>500 501<a name="ftp"></a>502<h3 class="section">3.11 ftp<span class="pull-right"><a class="anchor hidden-xs" href="#ftp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ftp" aria-hidden="true">TOC</a></span></h3>503 504<p>FTP (File Transfer Protocol).505</p>506<p>Read from or write to remote resources using FTP protocol.507</p>508<p>Following syntax is required.509</p><div class="example">510<pre class="example-preformatted">ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg511</pre></div>512 513<p>This protocol accepts the following options.514</p>515<dl class="table">516<dt><samp class="option">timeout</samp></dt>517<dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level518operation. By default it is set to -1, which means that the timeout is519not specified.520</p>521</dd>522<dt><samp class="option">ftp-user</samp></dt>523<dd><p>Set a user to be used for authenticating to the FTP server. This is overridden by the524user in the FTP URL.525</p>526</dd>527<dt><samp class="option">ftp-password</samp></dt>528<dd><p>Set a password to be used for authenticating to the FTP server. This is overridden by529the password in the FTP URL, or by <samp class="option">ftp-anonymous-password</samp> if no user is set.530</p>531</dd>532<dt><samp class="option">ftp-anonymous-password</samp></dt>533<dd><p>Password used when login as anonymous user. Typically an e-mail address534should be used.535</p>536</dd>537<dt><samp class="option">ftp-write-seekable</samp></dt>538<dd><p>Control seekability of connection during encoding. If set to 1 the539resource is supposed to be seekable, if set to 0 it is assumed not540to be seekable. Default value is 0.541</p></dd>542</dl>543 544<p>NOTE: Protocol can be used as output, but it is recommended to not do545it, unless special care is taken (tests, customized server configuration546etc.). Different FTP servers behave in different way during seek547operation. ff* tools may produce incomplete content due to server limitations.548</p>549<a name="gopher"></a>550<h3 class="section">3.12 gopher<span class="pull-right"><a class="anchor hidden-xs" href="#gopher" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gopher" aria-hidden="true">TOC</a></span></h3>551 552<p>Gopher protocol.553</p>554<a name="gophers"></a>555<h3 class="section">3.13 gophers<span class="pull-right"><a class="anchor hidden-xs" href="#gophers" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gophers" aria-hidden="true">TOC</a></span></h3>556 557<p>Gophers protocol.558</p>559<p>The Gopher protocol with TLS encapsulation.560</p>561<a name="http"></a>562<h3 class="section">3.14 http<span class="pull-right"><a class="anchor hidden-xs" href="#http" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-http" aria-hidden="true">TOC</a></span></h3>563 564<p>HTTP (Hyper Text Transfer Protocol).565</p>566<p>This protocol accepts the following options:567</p>568<dl class="table">569<dt><samp class="option">seekable</samp></dt>570<dd><p>Control seekability of connection. If set to 1 the resource is571supposed to be seekable, if set to 0 it is assumed not to be seekable,572if set to -1 it will try to autodetect if it is seekable. Default573value is -1.574</p>575</dd>576<dt><samp class="option">chunked_post</samp></dt>577<dd><p>If set to 1 use chunked Transfer-Encoding for posts, default is 1.578</p>579</dd>580<dt><samp class="option">http_proxy</samp></dt>581<dd><p>set HTTP proxy to tunnel through e.g. http://example.com:1234582</p>583</dd>584<dt><samp class="option">headers</samp></dt>585<dd><p>Set custom HTTP headers, can override built in default headers. The586value must be a string encoding the headers.587</p>588</dd>589<dt><samp class="option">content_type</samp></dt>590<dd><p>Set a specific content type for the POST messages or for listen mode.591</p>592</dd>593<dt><samp class="option">user_agent</samp></dt>594<dd><p>Override the User-Agent header. If not specified the protocol will use a595string describing the libavformat build. ("Lavf/<version>")596</p>597</dd>598<dt><samp class="option">referer</samp></dt>599<dd><p>Set the Referer header. Include ’Referer: URL’ header in HTTP request.600</p>601</dd>602<dt><samp class="option">multiple_requests</samp></dt>603<dd><p>Use persistent connections if set to 1, default is 0.604</p>605</dd>606<dt><samp class="option">request_size</samp></dt>607<dd><p>Limit the size of requests made. This is useful for some pathological servers608that throttle unbounded range requests, as well as when expecting to seek609frequently. Disabled (set to 0) by default.610</p>611<p>Note that if enabling this option, it’s strongly recommended to also enable612the <samp class="option">multiple_requests</samp> option, as well as setting613<samp class="option">short_seek_size</samp> to the same value or higher. Doing so allows FFmpeg614to reuse a single HTTP connection wherever possible.615</p>616</dd>617<dt><samp class="option">initial_request_size</samp></dt>618<dd><p>Limit the size of initial requests. Similar to <code class="code">request_size</code>, but only619used during initial format parsing. Useful for formats like MXF or MOV that620require frequent seeks during header parsing. Lasts until the demuxer makes a621read request larger than this size (without a seek in between), after which622the implementation will continue using requests as usual. Disabled (set to 0)623by default.624</p>625<p>Note that if enabling this option, it’s strongly recommended to also enable626the <samp class="option">multiple_requests</samp> option, as well as setting627<samp class="option">short_seek_size</samp> to the same value or higher.628</p>629</dd>630<dt><samp class="option">post_data</samp></dt>631<dd><p>Set custom HTTP post data.632</p>633</dd>634<dt><samp class="option">mime_type</samp></dt>635<dd><p>Export the MIME type.636</p>637</dd>638<dt><samp class="option">http_version</samp></dt>639<dd><p>Exports the HTTP response version number. Usually "1.0" or "1.1".640</p>641</dd>642<dt><samp class="option">cookies</samp></dt>643<dd><p>Set the cookies to be sent in future requests. The format of each cookie is the644same as the value of a Set-Cookie HTTP response field. Multiple cookies can be645delimited by a newline character.646</p>647</dd>648<dt><samp class="option">icy</samp></dt>649<dd><p>If set to 1 request ICY (SHOUTcast) metadata from the server. If the server650supports this, the metadata has to be retrieved by the application by reading651the <samp class="option">icy_metadata_headers</samp> and <samp class="option">icy_metadata_packet</samp> options.652The default is 1.653</p>654</dd>655<dt><samp class="option">icy_metadata_headers</samp></dt>656<dd><p>If the server supports ICY metadata, this contains the ICY-specific HTTP reply657headers, separated by newline characters.658</p>659</dd>660<dt><samp class="option">icy_metadata_packet</samp></dt>661<dd><p>If the server supports ICY metadata, and <samp class="option">icy</samp> was set to 1, this662contains the last non-empty metadata packet sent by the server. It should be663polled in regular intervals by applications interested in mid-stream metadata664updates.665</p>666</dd>667<dt><samp class="option">metadata</samp></dt>668<dd><p>Set an exported dictionary containing Icecast metadata from the bitstream, if present.669Only useful with the C API.670</p>671</dd>672<dt><samp class="option">auth_type</samp></dt>673<dd>674<p>Set HTTP authentication type. No option for Digest, since this method requires675getting nonce parameters from the server first and can’t be used straight away like676Basic.677</p>678<dl class="table">679<dt><samp class="option">none</samp></dt>680<dd><p>Choose the HTTP authentication type automatically. This is the default.681</p></dd>682<dt><samp class="option">basic</samp></dt>683<dd>684<p>Choose the HTTP basic authentication.685</p>686<p>Basic authentication sends a Base64-encoded string that contains a user name and password687for the client. Base64 is not a form of encryption and should be considered the same as688sending the user name and password in clear text (Base64 is a reversible encoding).689If a resource needs to be protected, strongly consider using an authentication scheme690other than basic authentication. HTTPS/TLS should be used with basic authentication.691Without these additional security enhancements, basic authentication should not be used692to protect sensitive or valuable information.693</p></dd>694</dl>695 696</dd>697<dt><samp class="option">send_expect_100</samp></dt>698<dd><p>Send an Expect: 100-continue header for POST. If set to 1 it will send, if set699to 0 it won’t, if set to -1 it will try to send if it is applicable. Default700value is -1.701</p>702</dd>703<dt><samp class="option">location</samp></dt>704<dd><p>An exported dictionary containing the content location. Only useful with the C705API.706</p>707</dd>708<dt><samp class="option">offset</samp></dt>709<dd><p>Set initial byte offset.710</p>711</dd>712<dt><samp class="option">end_offset</samp></dt>713<dd><p>Try to limit the request to bytes preceding this offset.714</p>715</dd>716<dt><samp class="option">method</samp></dt>717<dd><p>When used as a client option it sets the HTTP method for the request.718</p>719<p>When used as a server option it sets the HTTP method that is going to be720expected from the client(s).721If the expected and the received HTTP method do not match the client will722be given a Bad Request response.723When unset the HTTP method is not checked for now. This will be replaced by724autodetection in the future.725</p>726</dd>727<dt><samp class="option">reconnect</samp></dt>728<dd><p>Reconnect automatically when disconnected before EOF is hit.729</p>730</dd>731<dt><samp class="option">reconnect_at_eof</samp></dt>732<dd><p>If set then eof is treated like an error and causes reconnection, this is useful733for live / endless streams.734</p>735</dd>736<dt><samp class="option">reconnect_on_network_error</samp></dt>737<dd><p>Reconnect automatically in case of TCP/TLS errors during connect.738</p>739</dd>740<dt><samp class="option">reconnect_on_http_error</samp></dt>741<dd><p>A comma separated list of HTTP status codes to reconnect on. The list can742include specific status codes (e.g. ’503’) or the strings ’4xx’ / ’5xx’.743</p>744</dd>745<dt><samp class="option">reconnect_streamed</samp></dt>746<dd><p>If set then even streamed/non seekable streams will be reconnected on errors.747</p>748</dd>749<dt><samp class="option">reconnect_delay_max</samp></dt>750<dd><p>Set the maximum delay in seconds after which to give up reconnecting.751</p>752</dd>753<dt><samp class="option">reconnect_max_retries</samp></dt>754<dd><p>Set the maximum number of times to retry a connection. Default unset.755</p>756</dd>757<dt><samp class="option">reconnect_delay_total_max</samp></dt>758<dd><p>Set the maximum total delay in seconds after which to give up reconnecting.759</p>760</dd>761<dt><samp class="option">respect_retry_after</samp></dt>762<dd><p>If enabled, and a Retry-After header is encountered, its requested reconnection763delay will be honored, rather than using exponential backoff. Useful for 429 and764503 errors. Default enabled.765</p>766</dd>767<dt><samp class="option">listen</samp></dt>768<dd><p>If set to 1 enables experimental HTTP server. This can be used to send data when769used as an output option, or read data from a client with HTTP POST when used as770an input option.771If set to 2 enables experimental multi-client HTTP server. This is not yet implemented772in ffmpeg.c and thus must not be used as a command line option.773</p><div class="example">774<pre class="example-preformatted"># Server side (sending):775ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<var class="var">server</var>:<var class="var">port</var>776 777# Client side (receiving):778ffmpeg -i http://<var class="var">server</var>:<var class="var">port</var> -c copy somefile.ogg779 780# Client can also be done with wget:781wget http://<var class="var">server</var>:<var class="var">port</var> -O somefile.ogg782 783# Server side (receiving):784ffmpeg -listen 1 -i http://<var class="var">server</var>:<var class="var">port</var> -c copy somefile.ogg785 786# Client side (sending):787ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<var class="var">server</var>:<var class="var">port</var>788 789# Client can also be done with wget:790wget --post-file=somefile.ogg http://<var class="var">server</var>:<var class="var">port</var>791</pre></div>792 793</dd>794<dt><samp class="option">resource</samp></dt>795<dd><p>The resource requested by a client, when the experimental HTTP server is in use.796</p>797</dd>798<dt><samp class="option">reply_code</samp></dt>799<dd><p>The HTTP code returned to the client, when the experimental HTTP server is in use.800</p>801</dd>802<dt><samp class="option">short_seek_size</samp></dt>803<dd><p>Set the threshold, in bytes, for when a readahead should be preferred over a seek and804new HTTP request. This is useful, for example, to make sure the same connection805is used for reading large video packets with small audio packets in between.806</p>807</dd>808</dl>809 810<a name="HTTP-Cookies"></a>811<h4 class="subsection">3.14.1 HTTP Cookies<span class="pull-right"><a class="anchor hidden-xs" href="#HTTP-Cookies" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-HTTP-Cookies" aria-hidden="true">TOC</a></span></h4>812 813<p>Some HTTP requests will be denied unless cookie values are passed in with the814request. The <samp class="option">cookies</samp> option allows these cookies to be specified. At815the very least, each cookie must specify a value along with a path and domain.816HTTP requests that match both the domain and path will automatically include the817cookie value in the HTTP Cookie header field. Multiple cookies can be delimited818by a newline.819</p>820<p>The required syntax to play a stream specifying a cookie is:821</p><div class="example">822<pre class="example-preformatted">ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8823</pre></div>824 825<a name="Icecast"></a>826<h3 class="section">3.15 Icecast<span class="pull-right"><a class="anchor hidden-xs" href="#Icecast" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Icecast" aria-hidden="true">TOC</a></span></h3>827 828<p>Icecast protocol (stream to Icecast servers)829</p>830<p>This protocol accepts the following options:831</p>832<dl class="table">833<dt><samp class="option">ice_genre</samp></dt>834<dd><p>Set the stream genre.835</p>836</dd>837<dt><samp class="option">ice_name</samp></dt>838<dd><p>Set the stream name.839</p>840</dd>841<dt><samp class="option">ice_description</samp></dt>842<dd><p>Set the stream description.843</p>844</dd>845<dt><samp class="option">ice_url</samp></dt>846<dd><p>Set the stream website URL.847</p>848</dd>849<dt><samp class="option">ice_public</samp></dt>850<dd><p>Set if the stream should be public.851The default is 0 (not public).852</p>853</dd>854<dt><samp class="option">user_agent</samp></dt>855<dd><p>Override the User-Agent header. If not specified a string of the form856"Lavf/<version>" will be used.857</p>858</dd>859<dt><samp class="option">password</samp></dt>860<dd><p>Set the Icecast mountpoint password.861</p>862</dd>863<dt><samp class="option">content_type</samp></dt>864<dd><p>Set the stream content type. This must be set if it is different from865audio/mpeg.866</p>867</dd>868<dt><samp class="option">legacy_icecast</samp></dt>869<dd><p>This enables support for Icecast versions < 2.4.0, that do not support the870HTTP PUT method but the SOURCE method.871</p>872</dd>873<dt><samp class="option">tls</samp></dt>874<dd><p>Establish a TLS (HTTPS) connection to Icecast.875</p>876</dd>877</dl>878 879<div class="example">880<pre class="example-preformatted">icecast://[<var class="var">username</var>[:<var class="var">password</var>]@]<var class="var">server</var>:<var class="var">port</var>/<var class="var">mountpoint</var>881</pre></div>882 883<a name="ipfs"></a>884<h3 class="section">3.16 ipfs<span class="pull-right"><a class="anchor hidden-xs" href="#ipfs" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ipfs" aria-hidden="true">TOC</a></span></h3>885 886<p>InterPlanetary File System (IPFS) protocol support. One can access files stored887on the IPFS network through so-called gateways. These are http(s) endpoints.888This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be sent889to such a gateway. Users can (and should) host their own node which means this890protocol will use one’s local gateway to access files on the IPFS network.891</p>892<p>This protocol accepts the following options:893</p>894<dl class="table">895<dt><samp class="option">gateway</samp></dt>896<dd><p>Defines the gateway to use. When not set, the protocol will first try897locating the local gateway by looking at <code class="code">$IPFS_GATEWAY</code>, <code class="code">$IPFS_PATH</code>898and <code class="code">$HOME/.ipfs/</code>, in that order.899</p>900</dd>901</dl>902 903<p>One can use this protocol in 2 ways. Using IPFS:904</p><div class="example">905<pre class="example-preformatted">ffplay ipfs://<hash>906</pre></div>907 908<p>Or the IPNS protocol (IPNS is mutable IPFS):909</p><div class="example">910<pre class="example-preformatted">ffplay ipns://<hash>911</pre></div>912 913<a name="mmst"></a>914<h3 class="section">3.17 mmst<span class="pull-right"><a class="anchor hidden-xs" href="#mmst" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mmst" aria-hidden="true">TOC</a></span></h3>915 916<p>MMS (Microsoft Media Server) protocol over TCP.917</p>918<a name="mmsh"></a>919<h3 class="section">3.18 mmsh<span class="pull-right"><a class="anchor hidden-xs" href="#mmsh" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mmsh" aria-hidden="true">TOC</a></span></h3>920 921<p>MMS (Microsoft Media Server) protocol over HTTP.922</p>923<p>The required syntax is:924</p><div class="example">925<pre class="example-preformatted">mmsh://<var class="var">server</var>[:<var class="var">port</var>][/<var class="var">app</var>][/<var class="var">playpath</var>]926</pre></div>927 928<a name="md5"></a>929<h3 class="section">3.19 md5<span class="pull-right"><a class="anchor hidden-xs" href="#md5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-md5" aria-hidden="true">TOC</a></span></h3>930 931<p>MD5 output protocol.932</p>933<p>Computes the MD5 hash of the data to be written, and on close writes934this to the designated output or stdout if none is specified. It can935be used to test muxers without writing an actual file.936</p>937<p>Some examples follow.938</p><div class="example">939<pre class="example-preformatted"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.940ffmpeg -i input.flv -f avi -y md5:output.avi.md5941 942# Write the MD5 hash of the encoded AVI file to stdout.943ffmpeg -i input.flv -f avi -y md5:944</pre></div>945 946<p>Note that some formats (typically MOV) require the output protocol to947be seekable, so they will fail with the MD5 output protocol.948</p>949<a name="pipe"></a>950<h3 class="section">3.20 pipe<span class="pull-right"><a class="anchor hidden-xs" href="#pipe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pipe" aria-hidden="true">TOC</a></span></h3>951 952<p>UNIX pipe access protocol.953</p>954<p>Read and write from UNIX pipes.955</p>956<p>The accepted syntax is:957</p><div class="example">958<pre class="example-preformatted">pipe:[<var class="var">number</var>]959</pre></div>960 961<p>If <samp class="option">fd</samp> isn’t specified, <var class="var">number</var> is the number corresponding to the file descriptor of the962pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var class="var">number</var>963is not specified, by default the stdout file descriptor will be used964for writing, stdin for reading.965</p>966<p>For example to read from stdin with <code class="command">ffmpeg</code>:967</p><div class="example">968<pre class="example-preformatted">cat test.wav | ffmpeg -i pipe:0969# ...this is the same as...970cat test.wav | ffmpeg -i pipe:971</pre></div>972 973<p>For writing to stdout with <code class="command">ffmpeg</code>:974</p><div class="example">975<pre class="example-preformatted">ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi976# ...this is the same as...977ffmpeg -i test.wav -f avi pipe: | cat > test.avi978</pre></div>979 980<p>This protocol accepts the following options:981</p>982<dl class="table">983<dt><samp class="option">blocksize</samp></dt>984<dd><p>Set I/O operation maximum block size, in bytes. Default value is985<code class="code">INT_MAX</code>, which results in not limiting the requested block size.986Setting this value reasonably low improves user termination request reaction987time, which is valuable if data transmission is slow.988</p></dd>989<dt><samp class="option">fd</samp></dt>990<dd><p>Set file descriptor.991</p></dd>992</dl>993 994<p>Note that some formats (typically MOV), require the output protocol to995be seekable, so they will fail with the pipe output protocol.996</p>997<a name="prompeg"></a>998<h3 class="section">3.21 prompeg<span class="pull-right"><a class="anchor hidden-xs" href="#prompeg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-prompeg" aria-hidden="true">TOC</a></span></h3>999 1000<p>Pro-MPEG Code of Practice #3 Release 2 FEC protocol.1001</p>1002<p>The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction mechanism1003for MPEG-2 Transport Streams sent over RTP.1004</p>1005<p>This protocol must be used in conjunction with the <code class="code">rtp_mpegts</code> muxer and1006the <code class="code">rtp</code> protocol.1007</p>1008<p>The required syntax is:1009</p><div class="example">1010<pre class="example-preformatted">-f rtp_mpegts -fec prompeg=<var class="var">option</var>=<var class="var">val</var>... rtp://<var class="var">hostname</var>:<var class="var">port</var>1011</pre></div>1012 1013<p>The destination UDP ports are <code class="code">port + 2</code> for the column FEC stream1014and <code class="code">port + 4</code> for the row FEC stream.1015</p>1016<p>This protocol accepts the following options:1017</p><dl class="table">1018<dt><samp class="option">l=<var class="var">n</var></samp></dt>1019<dd><p>The number of columns (4-20, LxD <= 100)1020</p>1021</dd>1022<dt><samp class="option">d=<var class="var">n</var></samp></dt>1023<dd><p>The number of rows (4-20, LxD <= 100)1024</p>1025</dd>1026</dl>1027 1028<p>Example usage:1029</p>1030<div class="example">1031<pre class="example-preformatted">-f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<var class="var">hostname</var>:<var class="var">port</var>1032</pre></div>1033 1034<a name="rist"></a>1035<h3 class="section">3.22 rist<span class="pull-right"><a class="anchor hidden-xs" href="#rist" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rist" aria-hidden="true">TOC</a></span></h3>1036 1037<p>Reliable Internet Streaming Transport protocol1038</p>1039<p>The accepted options are:1040</p><dl class="table">1041<dt><samp class="option">rist_profile</samp></dt>1042<dd><p>Supported values:1043</p><dl class="table">1044<dt>‘<samp class="samp">simple</samp>’</dt>1045<dt>‘<samp class="samp">main</samp>’</dt>1046<dd><p>This one is default.1047</p></dd>1048<dt>‘<samp class="samp">advanced</samp>’</dt>1049</dl>1050 1051</dd>1052<dt><samp class="option">buffer_size</samp></dt>1053<dd><p>Set internal RIST buffer size in milliseconds for retransmission of data.1054Default value is 0 which means the librist default (1 sec). Maximum value is 301055seconds.1056</p>1057</dd>1058<dt><samp class="option">fifo_size</samp></dt>1059<dd><p>Size of the librist receiver output fifo in number of packets. This must be a1060power of 2.1061Defaults to 8192 (vs the librist default of 1024).1062</p>1063</dd>1064<dt><samp class="option">overrun_nonfatal=<var class="var">1|0</var></samp></dt>1065<dd><p>Survive in case of librist fifo buffer overrun. Default value is 0.1066</p>1067</dd>1068<dt><samp class="option">pkt_size</samp></dt>1069<dd><p>Set maximum packet size for sending data. 1316 by default.1070</p>1071</dd>1072<dt><samp class="option">log_level</samp></dt>1073<dd><p>Set loglevel for RIST logging messages. You only need to set this if you1074explicitly want to enable debug level messages or packet loss simulation,1075otherwise the regular loglevel is respected.1076</p>1077</dd>1078<dt><samp class="option">secret</samp></dt>1079<dd><p>Set override of encryption secret, by default is unset.1080</p>1081</dd>1082<dt><samp class="option">encryption</samp></dt>1083<dd><p>Set encryption type, by default is disabled.1084Acceptable values are 128 and 256.1085</p></dd>1086</dl>1087 1088<a name="rtmp"></a>1089<h3 class="section">3.23 rtmp<span class="pull-right"><a class="anchor hidden-xs" href="#rtmp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmp" aria-hidden="true">TOC</a></span></h3>1090 1091<p>Real-Time Messaging Protocol.1092</p>1093<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia1094content across a TCP/IP network.1095</p>1096<p>The required syntax is:1097</p><div class="example">1098<pre class="example-preformatted">rtmp://[<var class="var">username</var>:<var class="var">password</var>@]<var class="var">server</var>[:<var class="var">port</var>][/<var class="var">app</var>][/<var class="var">instance</var>][/<var class="var">playpath</var>]1099</pre></div>1100 1101<p>The accepted parameters are:1102</p><dl class="table">1103<dt><samp class="option">username</samp></dt>1104<dd><p>An optional username (mostly for publishing).1105</p>1106</dd>1107<dt><samp class="option">password</samp></dt>1108<dd><p>An optional password (mostly for publishing).1109</p>1110</dd>1111<dt><samp class="option">server</samp></dt>1112<dd><p>The address of the RTMP server.1113</p>1114</dd>1115<dt><samp class="option">port</samp></dt>1116<dd><p>The number of the TCP port to use (by default is 1935).1117</p>1118</dd>1119<dt><samp class="option">app</samp></dt>1120<dd><p>It is the name of the application to access. It usually corresponds to1121the path where the application is installed on the RTMP server1122(e.g. <samp class="file">/ondemand/</samp>, <samp class="file">/flash/live/</samp>, etc.). You can override1123the value parsed from the URI through the <code class="code">rtmp_app</code> option, too.1124</p>1125</dd>1126<dt><samp class="option">playpath</samp></dt>1127<dd><p>It is the path or name of the resource to play with reference to the1128application specified in <var class="var">app</var>, may be prefixed by "mp4:". You1129can override the value parsed from the URI through the <code class="code">rtmp_playpath</code>1130option, too.1131</p>1132</dd>1133<dt><samp class="option">listen</samp></dt>1134<dd><p>Act as a server, listening for an incoming connection.1135</p>1136</dd>1137<dt><samp class="option">timeout</samp></dt>1138<dd><p>Maximum time to wait for the incoming connection. Implies listen.1139</p></dd>1140</dl>1141 1142<p>Additionally, the following parameters can be set via command line options1143(or in code via <code class="code">AVOption</code>s):1144</p><dl class="table">1145<dt><samp class="option">rtmp_app</samp></dt>1146<dd><p>Name of application to connect on the RTMP server. This option1147overrides the parameter specified in the URI.1148</p>1149</dd>1150<dt><samp class="option">rtmp_buffer</samp></dt>1151<dd><p>Set the client buffer time in milliseconds. The default is 3000.1152</p>1153</dd>1154<dt><samp class="option">rtmp_conn</samp></dt>1155<dd><p>Extra arbitrary AMF connection parameters, parsed from a string,1156e.g. like <code class="code">B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.1157Each value is prefixed by a single character denoting the type,1158B for Boolean, N for number, S for string, O for object, or Z for null,1159followed by a colon. For Booleans the data must be either 0 or 1 for1160FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or11611 to end or begin an object, respectively. Data items in subobjects may1162be named, by prefixing the type with ’N’ and specifying the name before1163the value (i.e. <code class="code">NB:myFlag:1</code>). This option may be used multiple1164times to construct arbitrary AMF sequences.1165</p>1166</dd>1167<dt><samp class="option">rtmp_enhanced_codecs</samp></dt>1168<dd><p>Specify the list of codecs the client advertises to support in an1169enhanced RTMP stream. This option should be set to a comma separated1170list of fourcc values, like <code class="code">hvc1,av01,vp09</code> for multiple codecs1171or <code class="code">hvc1</code> for only one codec. The specified list will be presented1172in the "fourCcLive" property of the Connect Command Message.1173</p>1174</dd>1175<dt><samp class="option">rtmp_flashver</samp></dt>1176<dd><p>Version of the Flash plugin used to run the SWF player. The default1177is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;1178<libavformat version>).)1179</p>1180</dd>1181<dt><samp class="option">rtmp_flush_interval</samp></dt>1182<dd><p>Number of packets flushed in the same request (RTMPT only). The default1183is 10.1184</p>1185</dd>1186<dt><samp class="option">rtmp_live</samp></dt>1187<dd><p>Specify that the media is a live stream. No resuming or seeking in1188live streams is possible. The default value is <code class="code">any</code>, which means the1189subscriber first tries to play the live stream specified in the1190playpath. If a live stream of that name is not found, it plays the1191recorded stream. The other possible values are <code class="code">live</code> and1192<code class="code">recorded</code>.1193</p>1194</dd>1195<dt><samp class="option">rtmp_pageurl</samp></dt>1196<dd><p>URL of the web page in which the media was embedded. By default no1197value will be sent.1198</p>1199</dd>1200<dt><samp class="option">rtmp_playpath</samp></dt>