]> git.sesse.net Git - casparcg/blob - dependencies64/ffmpeg/doc/ffmpeg-protocols.html
Created a consumer that provides sync to a channel based on the pace of another chann...
[casparcg] / dependencies64 / ffmpeg / doc / ffmpeg-protocols.html
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 5.2, http://www.gnu.org/software/texinfo/ -->
4   <head>
5     <meta charset="utf-8">
6     <title>
7       FFmpeg Protocols Documentation
8     </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 style="width: 95%; margin: auto">
15       <h1>
16       FFmpeg Protocols Documentation
17       </h1>
18 <div align="center">
19 </div>
20
21
22 <a name="SEC_Top"></a>
23
24 <a name="SEC_Contents"></a>
25 <h2 class="contents-heading">Table of Contents</h2>
26
27 <div class="contents">
28
29 <ul class="no-bullet">
30   <li><a name="toc-Description" href="#Description">1 Description</a></li>
31   <li><a name="toc-Protocols" href="#Protocols">2 Protocols</a>
32   <ul class="no-bullet">
33     <li><a name="toc-bluray" href="#bluray">2.1 bluray</a></li>
34     <li><a name="toc-cache" href="#cache">2.2 cache</a></li>
35     <li><a name="toc-concat" href="#concat">2.3 concat</a></li>
36     <li><a name="toc-crypto" href="#crypto">2.4 crypto</a></li>
37     <li><a name="toc-data" href="#data">2.5 data</a></li>
38     <li><a name="toc-file" href="#file">2.6 file</a></li>
39     <li><a name="toc-ftp" href="#ftp">2.7 ftp</a></li>
40     <li><a name="toc-gopher" href="#gopher">2.8 gopher</a></li>
41     <li><a name="toc-hls" href="#hls">2.9 hls</a></li>
42     <li><a name="toc-http" href="#http">2.10 http</a>
43     <ul class="no-bullet">
44       <li><a name="toc-HTTP-Cookies" href="#HTTP-Cookies">2.10.1 HTTP Cookies</a></li>
45     </ul></li>
46     <li><a name="toc-Icecast" href="#Icecast">2.11 Icecast</a></li>
47     <li><a name="toc-mmst" href="#mmst">2.12 mmst</a></li>
48     <li><a name="toc-mmsh" href="#mmsh">2.13 mmsh</a></li>
49     <li><a name="toc-md5" href="#md5">2.14 md5</a></li>
50     <li><a name="toc-pipe" href="#pipe">2.15 pipe</a></li>
51     <li><a name="toc-rtmp" href="#rtmp">2.16 rtmp</a></li>
52     <li><a name="toc-rtmpe" href="#rtmpe">2.17 rtmpe</a></li>
53     <li><a name="toc-rtmps" href="#rtmps">2.18 rtmps</a></li>
54     <li><a name="toc-rtmpt" href="#rtmpt">2.19 rtmpt</a></li>
55     <li><a name="toc-rtmpte" href="#rtmpte">2.20 rtmpte</a></li>
56     <li><a name="toc-rtmpts" href="#rtmpts">2.21 rtmpts</a></li>
57     <li><a name="toc-libsmbclient" href="#libsmbclient">2.22 libsmbclient</a></li>
58     <li><a name="toc-libssh" href="#libssh">2.23 libssh</a></li>
59     <li><a name="toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">2.24 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
60     <li><a name="toc-rtp" href="#rtp">2.25 rtp</a></li>
61     <li><a name="toc-rtsp" href="#rtsp">2.26 rtsp</a>
62     <ul class="no-bullet">
63       <li><a name="toc-Examples" href="#Examples">2.26.1 Examples</a></li>
64     </ul></li>
65     <li><a name="toc-sap" href="#sap">2.27 sap</a>
66     <ul class="no-bullet">
67       <li><a name="toc-Muxer" href="#Muxer">2.27.1 Muxer</a></li>
68       <li><a name="toc-Demuxer" href="#Demuxer">2.27.2 Demuxer</a></li>
69     </ul></li>
70     <li><a name="toc-sctp" href="#sctp">2.28 sctp</a></li>
71     <li><a name="toc-srtp" href="#srtp">2.29 srtp</a></li>
72     <li><a name="toc-subfile" href="#subfile">2.30 subfile</a></li>
73     <li><a name="toc-tcp" href="#tcp">2.31 tcp</a></li>
74     <li><a name="toc-tls" href="#tls">2.32 tls</a></li>
75     <li><a name="toc-udp" href="#udp">2.33 udp</a>
76     <ul class="no-bullet">
77       <li><a name="toc-Examples-1" href="#Examples-1">2.33.1 Examples</a></li>
78     </ul></li>
79     <li><a name="toc-unix" href="#unix">2.34 unix</a></li>
80   </ul></li>
81   <li><a name="toc-See-Also" href="#See-Also">3 See Also</a></li>
82   <li><a name="toc-Authors" href="#Authors">4 Authors</a></li>
83 </ul>
84 </div>
85
86
87 <a name="Description"></a>
88 <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>
89
90 <p>This document describes the input and output protocols provided by the
91 libavformat library.
92 </p>
93
94 <a name="Protocols"></a>
95 <h2 class="chapter">2 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>
96
97 <p>Protocols are configured elements in FFmpeg that enable access to
98 resources that require specific protocols.
99 </p>
100 <p>When you configure your FFmpeg build, all the supported protocols are
101 enabled by default. You can list all available ones using the
102 configure option &quot;&ndash;list-protocols&quot;.
103 </p>
104 <p>You can disable all the protocols using the configure option
105 &quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
106 option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
107 particular protocol using the option
108 &quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
109 </p>
110 <p>The option &quot;-protocols&quot; of the ff* tools will display the list of
111 supported protocols.
112 </p>
113 <p>A description of the currently available protocols follows.
114 </p>
115 <a name="bluray"></a>
116 <h3 class="section">2.1 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>
117
118 <p>Read BluRay playlist.
119 </p>
120 <p>The accepted options are:
121 </p><dl compact="compact">
122 <dt><samp>angle</samp></dt>
123 <dd><p>BluRay angle
124 </p>
125 </dd>
126 <dt><samp>chapter</samp></dt>
127 <dd><p>Start chapter (1...N)
128 </p>
129 </dd>
130 <dt><samp>playlist</samp></dt>
131 <dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)
132 </p>
133 </dd>
134 </dl>
135
136 <p>Examples:
137 </p>
138 <p>Read longest playlist from BluRay mounted to /mnt/bluray:
139 </p><div class="example">
140 <pre class="example">bluray:/mnt/bluray
141 </pre></div>
142
143 <p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
144 </p><div class="example">
145 <pre class="example">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
146 </pre></div>
147
148 <a name="cache"></a>
149 <h3 class="section">2.2 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>
150
151 <p>Caching wrapper for input stream.
152 </p>
153 <p>Cache the input stream to temporary file. It brings seeking capability to live streams.
154 </p>
155 <div class="example">
156 <pre class="example">cache:<var>URL</var>
157 </pre></div>
158
159 <a name="concat"></a>
160 <h3 class="section">2.3 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>
161
162 <p>Physical concatenation protocol.
163 </p>
164 <p>Read and seek from many resources in sequence as if they were
165 a unique resource.
166 </p>
167 <p>A URL accepted by this protocol has the syntax:
168 </p><div class="example">
169 <pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
170 </pre></div>
171
172 <p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
173 resource to be concatenated, each one possibly specifying a distinct
174 protocol.
175 </p>
176 <p>For example to read a sequence of files <samp>split1.mpeg</samp>,
177 <samp>split2.mpeg</samp>, <samp>split3.mpeg</samp> with <code>ffplay</code> use the
178 command:
179 </p><div class="example">
180 <pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
181 </pre></div>
182
183 <p>Note that you may need to escape the character &quot;|&quot; which is special for
184 many shells.
185 </p>
186 <a name="crypto"></a>
187 <h3 class="section">2.4 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>
188
189 <p>AES-encrypted stream reading protocol.
190 </p>
191 <p>The accepted options are:
192 </p><dl compact="compact">
193 <dt><samp>key</samp></dt>
194 <dd><p>Set the AES decryption key binary block from given hexadecimal representation.
195 </p>
196 </dd>
197 <dt><samp>iv</samp></dt>
198 <dd><p>Set the AES decryption initialization vector binary block from given hexadecimal representation.
199 </p></dd>
200 </dl>
201
202 <p>Accepted URL formats:
203 </p><div class="example">
204 <pre class="example">crypto:<var>URL</var>
205 crypto+<var>URL</var>
206 </pre></div>
207
208 <a name="data"></a>
209 <h3 class="section">2.5 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>
210
211 <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>.
212 </p>
213 <p>For example, to convert a GIF file given inline with <code>ffmpeg</code>:
214 </p><div class="example">
215 <pre class="example">ffmpeg -i &quot;data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=&quot; smiley.png
216 </pre></div>
217
218 <a name="file"></a>
219 <h3 class="section">2.6 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>
220
221 <p>File access protocol.
222 </p>
223 <p>Read from or write to a file.
224 </p>
225 <p>A file URL can have the form:
226 </p><div class="example">
227 <pre class="example">file:<var>filename</var>
228 </pre></div>
229
230 <p>where <var>filename</var> is the path of the file to read.
231 </p>
232 <p>An URL that does not have a protocol prefix will be assumed to be a
233 file URL. Depending on the build, an URL that looks like a Windows
234 path with the drive letter at the beginning will also be assumed to be
235 a file URL (usually not the case in builds for unix-like systems).
236 </p>
237 <p>For example to read from a file <samp>input.mpeg</samp> with <code>ffmpeg</code>
238 use the command:
239 </p><div class="example">
240 <pre class="example">ffmpeg -i file:input.mpeg output.mpeg
241 </pre></div>
242
243 <p>This protocol accepts the following options:
244 </p>
245 <dl compact="compact">
246 <dt><samp>truncate</samp></dt>
247 <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
248 truncating. Default value is 1.
249 </p>
250 </dd>
251 <dt><samp>blocksize</samp></dt>
252 <dd><p>Set I/O operation maximum block size, in bytes. Default value is
253 <code>INT_MAX</code>, which results in not limiting the requested block size.
254 Setting this value reasonably low improves user termination request reaction
255 time, which is valuable for files on slow medium.
256 </p></dd>
257 </dl>
258
259 <a name="ftp"></a>
260 <h3 class="section">2.7 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>
261
262 <p>FTP (File Transfer Protocol).
263 </p>
264 <p>Read from or write to remote resources using FTP protocol.
265 </p>
266 <p>Following syntax is required.
267 </p><div class="example">
268 <pre class="example">ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
269 </pre></div>
270
271 <p>This protocol accepts the following options.
272 </p>
273 <dl compact="compact">
274 <dt><samp>timeout</samp></dt>
275 <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
276 operation. By default it is set to -1, which means that the timeout is
277 not specified.
278 </p>
279 </dd>
280 <dt><samp>ftp-anonymous-password</samp></dt>
281 <dd><p>Password used when login as anonymous user. Typically an e-mail address
282 should be used.
283 </p>
284 </dd>
285 <dt><samp>ftp-write-seekable</samp></dt>
286 <dd><p>Control seekability of connection during encoding. If set to 1 the
287 resource is supposed to be seekable, if set to 0 it is assumed not
288 to be seekable. Default value is 0.
289 </p></dd>
290 </dl>
291
292 <p>NOTE: Protocol can be used as output, but it is recommended to not do
293 it, unless special care is taken (tests, customized server configuration
294 etc.). Different FTP servers behave in different way during seek
295 operation. ff* tools may produce incomplete content due to server limitations.
296 </p>
297 <a name="gopher"></a>
298 <h3 class="section">2.8 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>
299
300 <p>Gopher protocol.
301 </p>
302 <a name="hls"></a>
303 <h3 class="section">2.9 hls<span class="pull-right"><a class="anchor hidden-xs" href="#hls" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hls" aria-hidden="true">TOC</a></span></h3>
304
305 <p>Read Apple HTTP Live Streaming compliant segmented stream as
306 a uniform one. The M3U8 playlists describing the segments can be
307 remote HTTP resources or local files, accessed using the standard
308 file protocol.
309 The nested protocol is declared by specifying
310 &quot;+<var>proto</var>&quot; after the hls URI scheme name, where <var>proto</var>
311 is either &quot;file&quot; or &quot;http&quot;.
312 </p>
313 <div class="example">
314 <pre class="example">hls+http://host/path/to/remote/resource.m3u8
315 hls+file://path/to/local/resource.m3u8
316 </pre></div>
317
318 <p>Using this protocol is discouraged - the hls demuxer should work
319 just as well (if not, please report the issues) and is more complete.
320 To use the hls demuxer instead, simply use the direct URLs to the
321 m3u8 files.
322 </p>
323 <a name="http"></a>
324 <h3 class="section">2.10 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>
325
326 <p>HTTP (Hyper Text Transfer Protocol).
327 </p>
328 <p>This protocol accepts the following options:
329 </p>
330 <dl compact="compact">
331 <dt><samp>seekable</samp></dt>
332 <dd><p>Control seekability of connection. If set to 1 the resource is
333 supposed to be seekable, if set to 0 it is assumed not to be seekable,
334 if set to -1 it will try to autodetect if it is seekable. Default
335 value is -1.
336 </p>
337 </dd>
338 <dt><samp>chunked_post</samp></dt>
339 <dd><p>If set to 1 use chunked Transfer-Encoding for posts, default is 1.
340 </p>
341 </dd>
342 <dt><samp>content_type</samp></dt>
343 <dd><p>Set a specific content type for the POST messages.
344 </p>
345 </dd>
346 <dt><samp>headers</samp></dt>
347 <dd><p>Set custom HTTP headers, can override built in default headers. The
348 value must be a string encoding the headers.
349 </p>
350 </dd>
351 <dt><samp>multiple_requests</samp></dt>
352 <dd><p>Use persistent connections if set to 1, default is 0.
353 </p>
354 </dd>
355 <dt><samp>post_data</samp></dt>
356 <dd><p>Set custom HTTP post data.
357 </p>
358 </dd>
359 <dt><samp>user-agent</samp></dt>
360 <dt><samp>user_agent</samp></dt>
361 <dd><p>Override the User-Agent header. If not specified the protocol will use a
362 string describing the libavformat build. (&quot;Lavf/&lt;version&gt;&quot;)
363 </p>
364 </dd>
365 <dt><samp>timeout</samp></dt>
366 <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
367 operation. By default it is set to -1, which means that the timeout is
368 not specified.
369 </p>
370 </dd>
371 <dt><samp>mime_type</samp></dt>
372 <dd><p>Export the MIME type.
373 </p>
374 </dd>
375 <dt><samp>icy</samp></dt>
376 <dd><p>If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
377 supports this, the metadata has to be retrieved by the application by reading
378 the <samp>icy_metadata_headers</samp> and <samp>icy_metadata_packet</samp> options.
379 The default is 1.
380 </p>
381 </dd>
382 <dt><samp>icy_metadata_headers</samp></dt>
383 <dd><p>If the server supports ICY metadata, this contains the ICY-specific HTTP reply
384 headers, separated by newline characters.
385 </p>
386 </dd>
387 <dt><samp>icy_metadata_packet</samp></dt>
388 <dd><p>If the server supports ICY metadata, and <samp>icy</samp> was set to 1, this
389 contains the last non-empty metadata packet sent by the server. It should be
390 polled in regular intervals by applications interested in mid-stream metadata
391 updates.
392 </p>
393 </dd>
394 <dt><samp>cookies</samp></dt>
395 <dd><p>Set the cookies to be sent in future requests. The format of each cookie is the
396 same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
397 delimited by a newline character.
398 </p>
399 </dd>
400 <dt><samp>offset</samp></dt>
401 <dd><p>Set initial byte offset.
402 </p>
403 </dd>
404 <dt><samp>end_offset</samp></dt>
405 <dd><p>Try to limit the request to bytes preceding this offset.
406 </p>
407 </dd>
408 <dt><samp>method</samp></dt>
409 <dd><p>When used as a client option it sets the HTTP method for the request.
410 </p>
411 <p>When used as a server option it sets the HTTP method that is going to be
412 expected from the client(s).
413 If the expected and the received HTTP method do not match the client will
414 be given a Bad Request response.
415 When unset the HTTP method is not checked for now. This will be replaced by
416 autodetection in the future.
417 </p>
418 </dd>
419 <dt><samp>listen</samp></dt>
420 <dd><p>If set to 1 enables experimental HTTP server. This can be used to send data when
421 used as an output option, or read data from a client with HTTP POST when used as
422 an input option.
423 </p><div class="example">
424 <pre class="example"># Server side (sending):
425 ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<var>server</var>:<var>port</var>
426
427 # Client side (receiving):
428 ffmpeg -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
429
430 # Client can also be done with wget:
431 wget http://<var>server</var>:<var>port</var> -O somefile.ogg
432
433 # Server side (receiving):
434 ffmpeg -listen 1 -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
435
436 # Client side (sending):
437 ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<var>server</var>:<var>port</var>
438
439 # Client can also be done with wget:
440 wget --post-file=somefile.ogg http://<var>server</var>:<var>port</var>
441 </pre></div>
442
443 </dd>
444 </dl>
445
446 <a name="HTTP-Cookies"></a>
447 <h4 class="subsection">2.10.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>
448
449 <p>Some HTTP requests will be denied unless cookie values are passed in with the
450 request. The <samp>cookies</samp> option allows these cookies to be specified. At
451 the very least, each cookie must specify a value along with a path and domain.
452 HTTP requests that match both the domain and path will automatically include the
453 cookie value in the HTTP Cookie header field. Multiple cookies can be delimited
454 by a newline.
455 </p>
456 <p>The required syntax to play a stream specifying a cookie is:
457 </p><div class="example">
458 <pre class="example">ffplay -cookies &quot;nlqptid=nltid=tsn; path=/; domain=somedomain.com;&quot; http://somedomain.com/somestream.m3u8
459 </pre></div>
460
461 <a name="Icecast"></a>
462 <h3 class="section">2.11 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>
463
464 <p>Icecast protocol (stream to Icecast servers)
465 </p>
466 <p>This protocol accepts the following options:
467 </p>
468 <dl compact="compact">
469 <dt><samp>ice_genre</samp></dt>
470 <dd><p>Set the stream genre.
471 </p>
472 </dd>
473 <dt><samp>ice_name</samp></dt>
474 <dd><p>Set the stream name.
475 </p>
476 </dd>
477 <dt><samp>ice_description</samp></dt>
478 <dd><p>Set the stream description.
479 </p>
480 </dd>
481 <dt><samp>ice_url</samp></dt>
482 <dd><p>Set the stream website URL.
483 </p>
484 </dd>
485 <dt><samp>ice_public</samp></dt>
486 <dd><p>Set if the stream should be public.
487 The default is 0 (not public).
488 </p>
489 </dd>
490 <dt><samp>user_agent</samp></dt>
491 <dd><p>Override the User-Agent header. If not specified a string of the form
492 &quot;Lavf/&lt;version&gt;&quot; will be used.
493 </p>
494 </dd>
495 <dt><samp>password</samp></dt>
496 <dd><p>Set the Icecast mountpoint password.
497 </p>
498 </dd>
499 <dt><samp>content_type</samp></dt>
500 <dd><p>Set the stream content type. This must be set if it is different from
501 audio/mpeg.
502 </p>
503 </dd>
504 <dt><samp>legacy_icecast</samp></dt>
505 <dd><p>This enables support for Icecast versions &lt; 2.4.0, that do not support the
506 HTTP PUT method but the SOURCE method.
507 </p>
508 </dd>
509 </dl>
510
511 <div class="example">
512 <pre class="example">icecast://[<var>username</var>[:<var>password</var>]@]<var>server</var>:<var>port</var>/<var>mountpoint</var>
513 </pre></div>
514
515 <a name="mmst"></a>
516 <h3 class="section">2.12 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>
517
518 <p>MMS (Microsoft Media Server) protocol over TCP.
519 </p>
520 <a name="mmsh"></a>
521 <h3 class="section">2.13 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>
522
523 <p>MMS (Microsoft Media Server) protocol over HTTP.
524 </p>
525 <p>The required syntax is:
526 </p><div class="example">
527 <pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
528 </pre></div>
529
530 <a name="md5"></a>
531 <h3 class="section">2.14 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>
532
533 <p>MD5 output protocol.
534 </p>
535 <p>Computes the MD5 hash of the data to be written, and on close writes
536 this to the designated output or stdout if none is specified. It can
537 be used to test muxers without writing an actual file.
538 </p>
539 <p>Some examples follow.
540 </p><div class="example">
541 <pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
542 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
543
544 # Write the MD5 hash of the encoded AVI file to stdout.
545 ffmpeg -i input.flv -f avi -y md5:
546 </pre></div>
547
548 <p>Note that some formats (typically MOV) require the output protocol to
549 be seekable, so they will fail with the MD5 output protocol.
550 </p>
551 <a name="pipe"></a>
552 <h3 class="section">2.15 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>
553
554 <p>UNIX pipe access protocol.
555 </p>
556 <p>Read and write from UNIX pipes.
557 </p>
558 <p>The accepted syntax is:
559 </p><div class="example">
560 <pre class="example">pipe:[<var>number</var>]
561 </pre></div>
562
563 <p><var>number</var> is the number corresponding to the file descriptor of the
564 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
565 is not specified, by default the stdout file descriptor will be used
566 for writing, stdin for reading.
567 </p>
568 <p>For example to read from stdin with <code>ffmpeg</code>:
569 </p><div class="example">
570 <pre class="example">cat test.wav | ffmpeg -i pipe:0
571 # ...this is the same as...
572 cat test.wav | ffmpeg -i pipe:
573 </pre></div>
574
575 <p>For writing to stdout with <code>ffmpeg</code>:
576 </p><div class="example">
577 <pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
578 # ...this is the same as...
579 ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
580 </pre></div>
581
582 <p>This protocol accepts the following options:
583 </p>
584 <dl compact="compact">
585 <dt><samp>blocksize</samp></dt>
586 <dd><p>Set I/O operation maximum block size, in bytes. Default value is
587 <code>INT_MAX</code>, which results in not limiting the requested block size.
588 Setting this value reasonably low improves user termination request reaction
589 time, which is valuable if data transmission is slow.
590 </p></dd>
591 </dl>
592
593 <p>Note that some formats (typically MOV), require the output protocol to
594 be seekable, so they will fail with the pipe output protocol.
595 </p>
596 <a name="rtmp"></a>
597 <h3 class="section">2.16 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>
598
599 <p>Real-Time Messaging Protocol.
600 </p>
601 <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
602 content across a TCP/IP network.
603 </p>
604 <p>The required syntax is:
605 </p><div class="example">
606 <pre class="example">rtmp://[<var>username</var>:<var>password</var>@]<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>instance</var>][/<var>playpath</var>]
607 </pre></div>
608
609 <p>The accepted parameters are:
610 </p><dl compact="compact">
611 <dt><samp>username</samp></dt>
612 <dd><p>An optional username (mostly for publishing).
613 </p>
614 </dd>
615 <dt><samp>password</samp></dt>
616 <dd><p>An optional password (mostly for publishing).
617 </p>
618 </dd>
619 <dt><samp>server</samp></dt>
620 <dd><p>The address of the RTMP server.
621 </p>
622 </dd>
623 <dt><samp>port</samp></dt>
624 <dd><p>The number of the TCP port to use (by default is 1935).
625 </p>
626 </dd>
627 <dt><samp>app</samp></dt>
628 <dd><p>It is the name of the application to access. It usually corresponds to
629 the path where the application is installed on the RTMP server
630 (e.g. <samp>/ondemand/</samp>, <samp>/flash/live/</samp>, etc.). You can override
631 the value parsed from the URI through the <code>rtmp_app</code> option, too.
632 </p>
633 </dd>
634 <dt><samp>playpath</samp></dt>
635 <dd><p>It is the path or name of the resource to play with reference to the
636 application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;. You
637 can override the value parsed from the URI through the <code>rtmp_playpath</code>
638 option, too.
639 </p>
640 </dd>
641 <dt><samp>listen</samp></dt>
642 <dd><p>Act as a server, listening for an incoming connection.
643 </p>
644 </dd>
645 <dt><samp>timeout</samp></dt>
646 <dd><p>Maximum time to wait for the incoming connection. Implies listen.
647 </p></dd>
648 </dl>
649
650 <p>Additionally, the following parameters can be set via command line options
651 (or in code via <code>AVOption</code>s):
652 </p><dl compact="compact">
653 <dt><samp>rtmp_app</samp></dt>
654 <dd><p>Name of application to connect on the RTMP server. This option
655 overrides the parameter specified in the URI.
656 </p>
657 </dd>
658 <dt><samp>rtmp_buffer</samp></dt>
659 <dd><p>Set the client buffer time in milliseconds. The default is 3000.
660 </p>
661 </dd>
662 <dt><samp>rtmp_conn</samp></dt>
663 <dd><p>Extra arbitrary AMF connection parameters, parsed from a string,
664 e.g. like <code>B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.
665 Each value is prefixed by a single character denoting the type,
666 B for Boolean, N for number, S for string, O for object, or Z for null,
667 followed by a colon. For Booleans the data must be either 0 or 1 for
668 FALSE or TRUE, respectively.  Likewise for Objects the data must be 0 or
669 1 to end or begin an object, respectively. Data items in subobjects may
670 be named, by prefixing the type with &rsquo;N&rsquo; and specifying the name before
671 the value (i.e. <code>NB:myFlag:1</code>). This option may be used multiple
672 times to construct arbitrary AMF sequences.
673 </p>
674 </dd>
675 <dt><samp>rtmp_flashver</samp></dt>
676 <dd><p>Version of the Flash plugin used to run the SWF player. The default
677 is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
678 &lt;libavformat version&gt;).)
679 </p>
680 </dd>
681 <dt><samp>rtmp_flush_interval</samp></dt>
682 <dd><p>Number of packets flushed in the same request (RTMPT only). The default
683 is 10.
684 </p>
685 </dd>
686 <dt><samp>rtmp_live</samp></dt>
687 <dd><p>Specify that the media is a live stream. No resuming or seeking in
688 live streams is possible. The default value is <code>any</code>, which means the
689 subscriber first tries to play the live stream specified in the
690 playpath. If a live stream of that name is not found, it plays the
691 recorded stream. The other possible values are <code>live</code> and
692 <code>recorded</code>.
693 </p>
694 </dd>
695 <dt><samp>rtmp_pageurl</samp></dt>
696 <dd><p>URL of the web page in which the media was embedded. By default no
697 value will be sent.
698 </p>
699 </dd>
700 <dt><samp>rtmp_playpath</samp></dt>
701 <dd><p>Stream identifier to play or to publish. This option overrides the
702 parameter specified in the URI.
703 </p>
704 </dd>
705 <dt><samp>rtmp_subscribe</samp></dt>
706 <dd><p>Name of live stream to subscribe to. By default no value will be sent.
707 It is only sent if the option is specified or if rtmp_live
708 is set to live.
709 </p>
710 </dd>
711 <dt><samp>rtmp_swfhash</samp></dt>
712 <dd><p>SHA256 hash of the decompressed SWF file (32 bytes).
713 </p>
714 </dd>
715 <dt><samp>rtmp_swfsize</samp></dt>
716 <dd><p>Size of the decompressed SWF file, required for SWFVerification.
717 </p>
718 </dd>
719 <dt><samp>rtmp_swfurl</samp></dt>
720 <dd><p>URL of the SWF player for the media. By default no value will be sent.
721 </p>
722 </dd>
723 <dt><samp>rtmp_swfverify</samp></dt>
724 <dd><p>URL to player swf file, compute hash/size automatically.
725 </p>
726 </dd>
727 <dt><samp>rtmp_tcurl</samp></dt>
728 <dd><p>URL of the target stream. Defaults to proto://host[:port]/app.
729 </p>
730 </dd>
731 </dl>
732
733 <p>For example to read with <code>ffplay</code> a multimedia resource named
734 &quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
735 </p><div class="example">
736 <pre class="example">ffplay rtmp://myserver/vod/sample
737 </pre></div>
738
739 <p>To publish to a password protected server, passing the playpath and
740 app names separately:
741 </p><div class="example">
742 <pre class="example">ffmpeg -re -i &lt;input&gt; -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
743 </pre></div>
744
745 <a name="rtmpe"></a>
746 <h3 class="section">2.17 rtmpe<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpe" aria-hidden="true">TOC</a></span></h3>
747
748 <p>Encrypted Real-Time Messaging Protocol.
749 </p>
750 <p>The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
751 streaming multimedia content within standard cryptographic primitives,
752 consisting of Diffie-Hellman key exchange and HMACSHA256, generating
753 a pair of RC4 keys.
754 </p>
755 <a name="rtmps"></a>
756 <h3 class="section">2.18 rtmps<span class="pull-right"><a class="anchor hidden-xs" href="#rtmps" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmps" aria-hidden="true">TOC</a></span></h3>
757
758 <p>Real-Time Messaging Protocol over a secure SSL connection.
759 </p>
760 <p>The Real-Time Messaging Protocol (RTMPS) is used for streaming
761 multimedia content across an encrypted connection.
762 </p>
763 <a name="rtmpt"></a>
764 <h3 class="section">2.19 rtmpt<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpt" aria-hidden="true">TOC</a></span></h3>
765
766 <p>Real-Time Messaging Protocol tunneled through HTTP.
767 </p>
768 <p>The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
769 for streaming multimedia content within HTTP requests to traverse
770 firewalls.
771 </p>
772 <a name="rtmpte"></a>
773 <h3 class="section">2.20 rtmpte<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpte" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpte" aria-hidden="true">TOC</a></span></h3>
774
775 <p>Encrypted Real-Time Messaging Protocol tunneled through HTTP.
776 </p>
777 <p>The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
778 is used for streaming multimedia content within HTTP requests to traverse
779 firewalls.
780 </p>
781 <a name="rtmpts"></a>
782 <h3 class="section">2.21 rtmpts<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpts" aria-hidden="true">TOC</a></span></h3>
783
784 <p>Real-Time Messaging Protocol tunneled through HTTPS.
785 </p>
786 <p>The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
787 for streaming multimedia content within HTTPS requests to traverse
788 firewalls.
789 </p>
790 <a name="libsmbclient"></a>
791 <h3 class="section">2.22 libsmbclient<span class="pull-right"><a class="anchor hidden-xs" href="#libsmbclient" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libsmbclient" aria-hidden="true">TOC</a></span></h3>
792
793 <p>libsmbclient permits one to manipulate CIFS/SMB network resources.
794 </p>
795 <p>Following syntax is required.
796 </p>
797 <div class="example">
798 <pre class="example">smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
799 </pre></div>
800
801 <p>This protocol accepts the following options.
802 </p>
803 <dl compact="compact">
804 <dt><samp>timeout</samp></dt>
805 <dd><p>Set timeout in miliseconds of socket I/O operations used by the underlying
806 low level operation. By default it is set to -1, which means that the timeout
807 is not specified.
808 </p>
809 </dd>
810 <dt><samp>truncate</samp></dt>
811 <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
812 truncating. Default value is 1.
813 </p>
814 </dd>
815 <dt><samp>workgroup</samp></dt>
816 <dd><p>Set the workgroup used for making connections. By default workgroup is not specified.
817 </p>
818 </dd>
819 </dl>
820
821 <p>For more information see: <a href="http://www.samba.org/">http://www.samba.org/</a>.
822 </p>
823 <a name="libssh"></a>
824 <h3 class="section">2.23 libssh<span class="pull-right"><a class="anchor hidden-xs" href="#libssh" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libssh" aria-hidden="true">TOC</a></span></h3>
825
826 <p>Secure File Transfer Protocol via libssh
827 </p>
828 <p>Read from or write to remote resources using SFTP protocol.
829 </p>
830 <p>Following syntax is required.
831 </p>
832 <div class="example">
833 <pre class="example">sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
834 </pre></div>
835
836 <p>This protocol accepts the following options.
837 </p>
838 <dl compact="compact">
839 <dt><samp>timeout</samp></dt>
840 <dd><p>Set timeout of socket I/O operations used by the underlying low level
841 operation. By default it is set to -1, which means that the timeout
842 is not specified.
843 </p>
844 </dd>
845 <dt><samp>truncate</samp></dt>
846 <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
847 truncating. Default value is 1.
848 </p>
849 </dd>
850 <dt><samp>private_key</samp></dt>
851 <dd><p>Specify the path of the file containing private key to use during authorization.
852 By default libssh searches for keys in the <samp>~/.ssh/</samp> directory.
853 </p>
854 </dd>
855 </dl>
856
857 <p>Example: Play a file stored on remote server.
858 </p>
859 <div class="example">
860 <pre class="example">ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
861 </pre></div>
862
863 <a name="librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
864 <h3 class="section">2.24 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte<span class="pull-right"><a class="anchor hidden-xs" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" aria-hidden="true">TOC</a></span></h3>
865
866 <p>Real-Time Messaging Protocol and its variants supported through
867 librtmp.
868 </p>
869 <p>Requires the presence of the librtmp headers and library during
870 configuration. You need to explicitly configure the build with
871 &quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
872 protocol.
873 </p>
874 <p>This protocol provides most client functions and a few server
875 functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
876 encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
877 variants of these encrypted types (RTMPTE, RTMPTS).
878 </p>
879 <p>The required syntax is:
880 </p><div class="example">
881 <pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
882 </pre></div>
883
884 <p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
885 &quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
886 <var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
887 meaning as specified for the RTMP native protocol.
888 <var>options</var> contains a list of space-separated options of the form
889 <var>key</var>=<var>val</var>.
890 </p>
891 <p>See the librtmp manual page (man 3 librtmp) for more information.
892 </p>
893 <p>For example, to stream a file in real-time to an RTMP server using
894 <code>ffmpeg</code>:
895 </p><div class="example">
896 <pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
897 </pre></div>
898
899 <p>To play the same stream using <code>ffplay</code>:
900 </p><div class="example">
901 <pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
902 </pre></div>
903
904 <a name="rtp"></a>
905 <h3 class="section">2.25 rtp<span class="pull-right"><a class="anchor hidden-xs" href="#rtp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtp" aria-hidden="true">TOC</a></span></h3>
906
907 <p>Real-time Transport Protocol.
908 </p>
909 <p>The required syntax for an RTP URL is:
910 rtp://<var>hostname</var>[:<var>port</var>][?<var>option</var>=<var>val</var>...]
911 </p>
912 <p><var>port</var> specifies the RTP port to use.
913 </p>
914 <p>The following URL options are supported:
915 </p>
916 <dl compact="compact">
917 <dt><samp>ttl=<var>n</var></samp></dt>
918 <dd><p>Set the TTL (Time-To-Live) value (for multicast only).
919 </p>
920 </dd>
921 <dt><samp>rtcpport=<var>n</var></samp></dt>
922 <dd><p>Set the remote RTCP port to <var>n</var>.
923 </p>
924 </dd>
925 <dt><samp>localrtpport=<var>n</var></samp></dt>
926 <dd><p>Set the local RTP port to <var>n</var>.
927 </p>
928 </dd>
929 <dt><samp>localrtcpport=<var>n</var>'</samp></dt>
930 <dd><p>Set the local RTCP port to <var>n</var>.
931 </p>
932 </dd>
933 <dt><samp>pkt_size=<var>n</var></samp></dt>
934 <dd><p>Set max packet size (in bytes) to <var>n</var>.
935 </p>
936 </dd>
937 <dt><samp>connect=0|1</samp></dt>
938 <dd><p>Do a <code>connect()</code> on the UDP socket (if set to 1) or not (if set
939 to 0).
940 </p>
941 </dd>
942 <dt><samp>sources=<var>ip</var>[,<var>ip</var>]</samp></dt>
943 <dd><p>List allowed source IP addresses.
944 </p>
945 </dd>
946 <dt><samp>block=<var>ip</var>[,<var>ip</var>]</samp></dt>
947 <dd><p>List disallowed (blocked) source IP addresses.
948 </p>
949 </dd>
950 <dt><samp>write_to_source=0|1</samp></dt>
951 <dd><p>Send packets to the source address of the latest received packet (if
952 set to 1) or to a default remote address (if set to 0).
953 </p>
954 </dd>
955 <dt><samp>localport=<var>n</var></samp></dt>
956 <dd><p>Set the local RTP port to <var>n</var>.
957 </p>
958 <p>This is a deprecated option. Instead, <samp>localrtpport</samp> should be
959 used.
960 </p>
961 </dd>
962 </dl>
963
964 <p>Important notes:
965 </p>
966 <ol>
967 <li> If <samp>rtcpport</samp> is not set the RTCP port will be set to the RTP
968 port value plus 1.
969
970 </li><li> If <samp>localrtpport</samp> (the local RTP port) is not set any available
971 port will be used for the local RTP and RTCP ports.
972
973 </li><li> If <samp>localrtcpport</samp> (the local RTCP port) is not set it will be
974 set to the local RTP port value plus 1.
975 </li></ol>
976
977 <a name="rtsp"></a>
978 <h3 class="section">2.26 rtsp<span class="pull-right"><a class="anchor hidden-xs" href="#rtsp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtsp" aria-hidden="true">TOC</a></span></h3>
979
980 <p>Real-Time Streaming Protocol.
981 </p>
982 <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
983 and muxer. The demuxer supports both normal RTSP (with data transferred
984 over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
985 data transferred over RDT).
986 </p>
987 <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
988 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
989 <a href="https://github.com/revmischa/rtsp-server">RTSP server</a>).
990 </p>
991 <p>The required syntax for a RTSP url is:
992 </p><div class="example">
993 <pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>
994 </pre></div>
995
996 <p>Options can be set on the <code>ffmpeg</code>/<code>ffplay</code> command
997 line, or set in code via <code>AVOption</code>s or in
998 <code>avformat_open_input</code>.
999 </p>
1000 <p>The following options are supported.
1001 </p>
1002 <dl compact="compact">
1003 <dt><samp>initial_pause</samp></dt>
1004 <dd><p>Do not start playing the stream immediately if set to 1. Default value
1005 is 0.
1006 </p>
1007 </dd>
1008 <dt><samp>rtsp_transport</samp></dt>
1009 <dd><p>Set RTSP transport protocols.
1010 </p>
1011 <p>It accepts the following values:
1012 </p><dl compact="compact">
1013 <dt>&lsquo;<samp>udp</samp>&rsquo;</dt>
1014 <dd><p>Use UDP as lower transport protocol.
1015 </p>
1016 </dd>
1017 <dt>&lsquo;<samp>tcp</samp>&rsquo;</dt>
1018 <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
1019 transport protocol.
1020 </p>
1021 </dd>
1022 <dt>&lsquo;<samp>udp_multicast</samp>&rsquo;</dt>
1023 <dd><p>Use UDP multicast as lower transport protocol.
1024 </p>
1025 </dd>
1026 <dt>&lsquo;<samp>http</samp>&rsquo;</dt>
1027 <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
1028 passing proxies.
1029 </p></dd>
1030 </dl>
1031
1032 <p>Multiple lower transport protocols may be specified, in that case they are
1033 tried one at a time (if the setup of one fails, the next one is tried).
1034 For the muxer, only the &lsquo;<samp>tcp</samp>&rsquo; and &lsquo;<samp>udp</samp>&rsquo; options are supported.
1035 </p>
1036 </dd>
1037 <dt><samp>rtsp_flags</samp></dt>
1038 <dd><p>Set RTSP flags.
1039 </p>
1040 <p>The following values are accepted:
1041 </p><dl compact="compact">
1042 <dt>&lsquo;<samp>filter_src</samp>&rsquo;</dt>
1043 <dd><p>Accept packets only from negotiated peer address and port.
1044 </p></dd>
1045 <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
1046 <dd><p>Act as a server, listening for an incoming connection.
1047 </p></dd>
1048 <dt>&lsquo;<samp>prefer_tcp</samp>&rsquo;</dt>
1049 <dd><p>Try TCP for RTP transport first, if TCP is available as RTSP RTP transport.
1050 </p></dd>
1051 </dl>
1052
1053 <p>Default value is &lsquo;<samp>none</samp>&rsquo;.
1054 </p>
1055 </dd>
1056 <dt><samp>allowed_media_types</samp></dt>
1057 <dd><p>Set media types to accept from the server.
1058 </p>
1059 <p>The following flags are accepted:
1060 </p><dl compact="compact">
1061 <dt>&lsquo;<samp>video</samp>&rsquo;</dt>
1062 <dt>&lsquo;<samp>audio</samp>&rsquo;</dt>
1063 <dt>&lsquo;<samp>data</samp>&rsquo;</dt>
1064 </dl>
1065
1066 <p>By default it accepts all media types.
1067 </p>
1068 </dd>
1069 <dt><samp>min_port</samp></dt>
1070 <dd><p>Set minimum local UDP port. Default value is 5000.
1071 </p>
1072 </dd>
1073 <dt><samp>max_port</samp></dt>
1074 <dd><p>Set maximum local UDP port. Default value is 65000.
1075 </p>
1076 </dd>
1077 <dt><samp>timeout</samp></dt>
1078 <dd><p>Set maximum timeout (in seconds) to wait for incoming connections.
1079 </p>
1080 <p>A value of -1 means infinite (default). This option implies the
1081 <samp>rtsp_flags</samp> set to &lsquo;<samp>listen</samp>&rsquo;.
1082 </p>
1083 </dd>
1084 <dt><samp>reorder_queue_size</samp></dt>
1085 <dd><p>Set number of packets to buffer for handling of reordered packets.
1086 </p>
1087 </dd>
1088 <dt><samp>stimeout</samp></dt>
1089 <dd><p>Set socket TCP I/O timeout in microseconds.
1090 </p>
1091 </dd>
1092 <dt><samp>user-agent</samp></dt>
1093 <dd><p>Override User-Agent header. If not specified, it defaults to the
1094 libavformat identifier string.
1095 </p></dd>
1096 </dl>
1097
1098 <p>When receiving data over UDP, the demuxer tries to reorder received packets
1099 (since they may arrive out of order, or packets may get lost totally). This
1100 can be disabled by setting the maximum demuxing delay to zero (via
1101 the <code>max_delay</code> field of AVFormatContext).
1102 </p>
1103 <p>When watching multi-bitrate Real-RTSP streams with <code>ffplay</code>, the
1104 streams to display can be chosen with <code>-vst</code> <var>n</var> and
1105 <code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
1106 on the fly by pressing <code>v</code> and <code>a</code>.
1107 </p>
1108 <a name="Examples"></a>
1109 <h4 class="subsection">2.26.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples" aria-hidden="true">TOC</a></span></h4>
1110
1111 <p>The following examples all make use of the <code>ffplay</code> and
1112 <code>ffmpeg</code> tools.
1113 </p>
1114 <ul>
1115 <li> Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
1116 <div class="example">
1117 <pre class="example">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
1118 </pre></div>
1119
1120 </li><li> Watch a stream tunneled over HTTP:
1121 <div class="example">
1122 <pre class="example">ffplay -rtsp_transport http rtsp://server/video.mp4
1123 </pre></div>
1124
1125 </li><li> Send a stream in realtime to a RTSP server, for others to watch:
1126 <div class="example">
1127 <pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
1128 </pre></div>
1129
1130 </li><li> Receive a stream in realtime:
1131 <div class="example">
1132 <pre class="example">ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <var>output</var>
1133 </pre></div>
1134 </li></ul>
1135
1136 <a name="sap"></a>
1137 <h3 class="section">2.27 sap<span class="pull-right"><a class="anchor hidden-xs" href="#sap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sap" aria-hidden="true">TOC</a></span></h3>
1138
1139 <p>Session Announcement Protocol (RFC 2974). This is not technically a
1140 protocol handler in libavformat, it is a muxer and demuxer.
1141 It is used for signalling of RTP streams, by announcing the SDP for the
1142 streams regularly on a separate port.
1143 </p>
1144 <a name="Muxer"></a>
1145 <h4 class="subsection">2.27.1 Muxer<span class="pull-right"><a class="anchor hidden-xs" href="#Muxer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Muxer" aria-hidden="true">TOC</a></span></h4>
1146
1147 <p>The syntax for a SAP url given to the muxer is:
1148 </p><div class="example">
1149 <pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
1150 </pre></div>
1151
1152 <p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
1153 or to port 5004 if no port is specified.
1154 <var>options</var> is a <code>&amp;</code>-separated list. The following options
1155 are supported:
1156 </p>
1157 <dl compact="compact">
1158 <dt><samp>announce_addr=<var>address</var></samp></dt>
1159 <dd><p>Specify the destination IP address for sending the announcements to.
1160 If omitted, the announcements are sent to the commonly used SAP
1161 announcement multicast address 224.2.127.254 (sap.mcast.net), or
1162 ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
1163 </p>
1164 </dd>
1165 <dt><samp>announce_port=<var>port</var></samp></dt>
1166 <dd><p>Specify the port to send the announcements on, defaults to
1167 9875 if not specified.
1168 </p>
1169 </dd>
1170 <dt><samp>ttl=<var>ttl</var></samp></dt>
1171 <dd><p>Specify the time to live value for the announcements and RTP packets,
1172 defaults to 255.
1173 </p>
1174 </dd>
1175 <dt><samp>same_port=<var>0|1</var></samp></dt>
1176 <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
1177 default), all streams are sent on unique ports, with each stream on a
1178 port 2 numbers higher than the previous.
1179 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
1180 The RTP stack in libavformat for receiving requires all streams to be sent
1181 on unique ports.
1182 </p></dd>
1183 </dl>
1184
1185 <p>Example command lines follow.
1186 </p>
1187 <p>To broadcast a stream on the local subnet, for watching in VLC:
1188 </p>
1189 <div class="example">
1190 <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
1191 </pre></div>
1192
1193 <p>Similarly, for watching in <code>ffplay</code>:
1194 </p>
1195 <div class="example">
1196 <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
1197 </pre></div>
1198
1199 <p>And for watching in <code>ffplay</code>, over IPv6:
1200 </p>
1201 <div class="example">
1202 <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
1203 </pre></div>
1204
1205 <a name="Demuxer"></a>
1206 <h4 class="subsection">2.27.2 Demuxer<span class="pull-right"><a class="anchor hidden-xs" href="#Demuxer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Demuxer" aria-hidden="true">TOC</a></span></h4>
1207
1208 <p>The syntax for a SAP url given to the demuxer is:
1209 </p><div class="example">
1210 <pre class="example">sap://[<var>address</var>][:<var>port</var>]
1211 </pre></div>
1212
1213 <p><var>address</var> is the multicast address to listen for announcements on,
1214 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
1215 is the port that is listened on, 9875 if omitted.
1216 </p>
1217 <p>The demuxers listens for announcements on the given address and port.
1218 Once an announcement is received, it tries to receive that particular stream.
1219 </p>
1220 <p>Example command lines follow.
1221 </p>
1222 <p>To play back the first stream announced on the normal SAP multicast address:
1223 </p>
1224 <div class="example">
1225 <pre class="example">ffplay sap://
1226 </pre></div>
1227
1228 <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
1229 </p>
1230 <div class="example">
1231 <pre class="example">ffplay sap://[ff0e::2:7ffe]
1232 </pre></div>
1233
1234 <a name="sctp"></a>
1235 <h3 class="section">2.28 sctp<span class="pull-right"><a class="anchor hidden-xs" href="#sctp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sctp" aria-hidden="true">TOC</a></span></h3>
1236
1237 <p>Stream Control Transmission Protocol.
1238 </p>
1239 <p>The accepted URL syntax is:
1240 </p><div class="example">
1241 <pre class="example">sctp://<var>host</var>:<var>port</var>[?<var>options</var>]
1242 </pre></div>
1243
1244 <p>The protocol accepts the following options:
1245 </p><dl compact="compact">
1246 <dt><samp>listen</samp></dt>
1247 <dd><p>If set to any value, listen for an incoming connection. Outgoing connection is done by default.
1248 </p>
1249 </dd>
1250 <dt><samp>max_streams</samp></dt>
1251 <dd><p>Set the maximum number of streams. By default no limit is set.
1252 </p></dd>
1253 </dl>
1254
1255 <a name="srtp"></a>
1256 <h3 class="section">2.29 srtp<span class="pull-right"><a class="anchor hidden-xs" href="#srtp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-srtp" aria-hidden="true">TOC</a></span></h3>
1257
1258 <p>Secure Real-time Transport Protocol.
1259 </p>
1260 <p>The accepted options are:
1261 </p><dl compact="compact">
1262 <dt><samp>srtp_in_suite</samp></dt>
1263 <dt><samp>srtp_out_suite</samp></dt>
1264 <dd><p>Select input and output encoding suites.
1265 </p>
1266 <p>Supported values:
1267 </p><dl compact="compact">
1268 <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_80</samp>&rsquo;</dt>
1269 <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_80</samp>&rsquo;</dt>
1270 <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_32</samp>&rsquo;</dt>
1271 <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_32</samp>&rsquo;</dt>
1272 </dl>
1273
1274 </dd>
1275 <dt><samp>srtp_in_params</samp></dt>
1276 <dt><samp>srtp_out_params</samp></dt>
1277 <dd><p>Set input and output encoding parameters, which are expressed by a
1278 base64-encoded representation of a binary block. The first 16 bytes of
1279 this binary block are used as master key, the following 14 bytes are
1280 used as master salt.
1281 </p></dd>
1282 </dl>
1283
1284 <a name="subfile"></a>
1285 <h3 class="section">2.30 subfile<span class="pull-right"><a class="anchor hidden-xs" href="#subfile" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-subfile" aria-hidden="true">TOC</a></span></h3>
1286
1287 <p>Virtually extract a segment of a file or another stream.
1288 The underlying stream must be seekable.
1289 </p>
1290 <p>Accepted options:
1291 </p><dl compact="compact">
1292 <dt><samp>start</samp></dt>
1293 <dd><p>Start offset of the extracted segment, in bytes.
1294 </p></dd>
1295 <dt><samp>end</samp></dt>
1296 <dd><p>End offset of the extracted segment, in bytes.
1297 </p></dd>
1298 </dl>
1299
1300 <p>Examples:
1301 </p>
1302 <p>Extract a chapter from a DVD VOB file (start and end sectors obtained
1303 externally and multiplied by 2048):
1304 </p><div class="example">
1305 <pre class="example">subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
1306 </pre></div>
1307
1308 <p>Play an AVI file directly from a TAR archive:
1309 </p><div class="example">
1310 <pre class="example">subfile,,start,183241728,end,366490624,,:archive.tar
1311 </pre></div>
1312
1313 <a name="tcp"></a>
1314 <h3 class="section">2.31 tcp<span class="pull-right"><a class="anchor hidden-xs" href="#tcp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tcp" aria-hidden="true">TOC</a></span></h3>
1315
1316 <p>Transmission Control Protocol.
1317 </p>
1318 <p>The required syntax for a TCP url is:
1319 </p><div class="example">
1320 <pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
1321 </pre></div>
1322
1323 <p><var>options</var> contains a list of &amp;-separated options of the form
1324 <var>key</var>=<var>val</var>.
1325 </p>
1326 <p>The list of supported options follows.
1327 </p>
1328 <dl compact="compact">
1329 <dt><samp>listen=<var>1|0</var></samp></dt>
1330 <dd><p>Listen for an incoming connection. Default value is 0.
1331 </p>
1332 </dd>
1333 <dt><samp>timeout=<var>microseconds</var></samp></dt>
1334 <dd><p>Set raise error timeout, expressed in microseconds.
1335 </p>
1336 <p>This option is only relevant in read mode: if no data arrived in more
1337 than this time interval, raise error.
1338 </p>
1339 </dd>
1340 <dt><samp>listen_timeout=<var>milliseconds</var></samp></dt>
1341 <dd><p>Set listen timeout, expressed in milliseconds.
1342 </p></dd>
1343 </dl>
1344
1345 <p>The following example shows how to setup a listening TCP connection
1346 with <code>ffmpeg</code>, which is then accessed with <code>ffplay</code>:
1347 </p><div class="example">
1348 <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
1349 ffplay tcp://<var>hostname</var>:<var>port</var>
1350 </pre></div>
1351
1352 <a name="tls"></a>
1353 <h3 class="section">2.32 tls<span class="pull-right"><a class="anchor hidden-xs" href="#tls" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tls" aria-hidden="true">TOC</a></span></h3>
1354
1355 <p>Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
1356 </p>
1357 <p>The required syntax for a TLS/SSL url is:
1358 </p><div class="example">
1359 <pre class="example">tls://<var>hostname</var>:<var>port</var>[?<var>options</var>]
1360 </pre></div>
1361
1362 <p>The following parameters can be set via command line options
1363 (or in code via <code>AVOption</code>s):
1364 </p>
1365 <dl compact="compact">
1366 <dt><samp>ca_file, cafile=<var>filename</var></samp></dt>
1367 <dd><p>A file containing certificate authority (CA) root certificates to treat
1368 as trusted. If the linked TLS library contains a default this might not
1369 need to be specified for verification to work, but not all libraries and
1370 setups have defaults built in.
1371 The file must be in OpenSSL PEM format.
1372 </p>
1373 </dd>
1374 <dt><samp>tls_verify=<var>1|0</var></samp></dt>
1375 <dd><p>If enabled, try to verify the peer that we are communicating with.
1376 Note, if using OpenSSL, this currently only makes sure that the
1377 peer certificate is signed by one of the root certificates in the CA
1378 database, but it does not validate that the certificate actually
1379 matches the host name we are trying to connect to. (With GnuTLS,
1380 the host name is validated as well.)
1381 </p>
1382 <p>This is disabled by default since it requires a CA database to be
1383 provided by the caller in many cases.
1384 </p>
1385 </dd>
1386 <dt><samp>cert_file, cert=<var>filename</var></samp></dt>
1387 <dd><p>A file containing a certificate to use in the handshake with the peer.
1388 (When operating as server, in listen mode, this is more often required
1389 by the peer, while client certificates only are mandated in certain
1390 setups.)
1391 </p>
1392 </dd>
1393 <dt><samp>key_file, key=<var>filename</var></samp></dt>
1394 <dd><p>A file containing the private key for the certificate.
1395 </p>
1396 </dd>
1397 <dt><samp>listen=<var>1|0</var></samp></dt>
1398 <dd><p>If enabled, listen for connections on the provided port, and assume
1399 the server role in the handshake instead of the client role.
1400 </p>
1401 </dd>
1402 </dl>
1403
1404 <p>Example command lines:
1405 </p>
1406 <p>To create a TLS/SSL server that serves an input stream.
1407 </p>
1408 <div class="example">
1409 <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>
1410 </pre></div>
1411
1412 <p>To play back a stream from the TLS/SSL server using <code>ffplay</code>:
1413 </p>
1414 <div class="example">
1415 <pre class="example">ffplay tls://<var>hostname</var>:<var>port</var>
1416 </pre></div>
1417
1418 <a name="udp"></a>
1419 <h3 class="section">2.33 udp<span class="pull-right"><a class="anchor hidden-xs" href="#udp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-udp" aria-hidden="true">TOC</a></span></h3>
1420
1421 <p>User Datagram Protocol.
1422 </p>
1423 <p>The required syntax for an UDP URL is:
1424 </p><div class="example">
1425 <pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
1426 </pre></div>
1427
1428 <p><var>options</var> contains a list of &amp;-separated options of the form <var>key</var>=<var>val</var>.
1429 </p>
1430 <p>In case threading is enabled on the system, a circular buffer is used
1431 to store the incoming data, which allows one to reduce loss of data due to
1432 UDP socket buffer overruns. The <var>fifo_size</var> and
1433 <var>overrun_nonfatal</var> options are related to this buffer.
1434 </p>
1435 <p>The list of supported options follows.
1436 </p>
1437 <dl compact="compact">
1438 <dt><samp>buffer_size=<var>size</var></samp></dt>
1439 <dd><p>Set the UDP maximum socket buffer size in bytes. This is used to set either
1440 the receive or send buffer size, depending on what the socket is used for.
1441 Default is 64KB.  See also <var>fifo_size</var>.
1442 </p>
1443 </dd>
1444 <dt><samp>localport=<var>port</var></samp></dt>
1445 <dd><p>Override the local UDP port to bind with.
1446 </p>
1447 </dd>
1448 <dt><samp>localaddr=<var>addr</var></samp></dt>
1449 <dd><p>Choose the local IP address. This is useful e.g. if sending multicast
1450 and the host has multiple interfaces, where the user can choose
1451 which interface to send on by specifying the IP address of that interface.
1452 </p>
1453 </dd>
1454 <dt><samp>pkt_size=<var>size</var></samp></dt>
1455 <dd><p>Set the size in bytes of UDP packets.
1456 </p>
1457 </dd>
1458 <dt><samp>reuse=<var>1|0</var></samp></dt>
1459 <dd><p>Explicitly allow or disallow reusing UDP sockets.
1460 </p>
1461 </dd>
1462 <dt><samp>ttl=<var>ttl</var></samp></dt>
1463 <dd><p>Set the time to live value (for multicast only).
1464 </p>
1465 </dd>
1466 <dt><samp>connect=<var>1|0</var></samp></dt>
1467 <dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
1468 destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
1469 If the destination address isn&rsquo;t known at the start, this option can
1470 be specified in ff_udp_set_remote_url, too.
1471 This allows finding out the source address for the packets with getsockname,
1472 and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
1473 unreachable&quot; is received.
1474 For receiving, this gives the benefit of only receiving packets from
1475 the specified peer address/port.
1476 </p>
1477 </dd>
1478 <dt><samp>sources=<var>address</var>[,<var>address</var>]</samp></dt>
1479 <dd><p>Only receive packets sent to the multicast group from one of the
1480 specified sender IP addresses.
1481 </p>
1482 </dd>
1483 <dt><samp>block=<var>address</var>[,<var>address</var>]</samp></dt>
1484 <dd><p>Ignore packets sent to the multicast group from the specified
1485 sender IP addresses.
1486 </p>
1487 </dd>
1488 <dt><samp>fifo_size=<var>units</var></samp></dt>
1489 <dd><p>Set the UDP receiving circular buffer size, expressed as a number of
1490 packets with size of 188 bytes. If not specified defaults to 7*4096.
1491 </p>
1492 </dd>
1493 <dt><samp>overrun_nonfatal=<var>1|0</var></samp></dt>
1494 <dd><p>Survive in case of UDP receiving circular buffer overrun. Default
1495 value is 0.
1496 </p>
1497 </dd>
1498 <dt><samp>timeout=<var>microseconds</var></samp></dt>
1499 <dd><p>Set raise error timeout, expressed in microseconds.
1500 </p>
1501 <p>This option is only relevant in read mode: if no data arrived in more
1502 than this time interval, raise error.
1503 </p>
1504 </dd>
1505 <dt><samp>broadcast=<var>1|0</var></samp></dt>
1506 <dd><p>Explicitly allow or disallow UDP broadcasting.
1507 </p>
1508 <p>Note that broadcasting may not work properly on networks having
1509 a broadcast storm protection.
1510 </p></dd>
1511 </dl>
1512
1513 <a name="Examples-1"></a>
1514 <h4 class="subsection">2.33.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-1" aria-hidden="true">TOC</a></span></h4>
1515
1516 <ul>
1517 <li> Use <code>ffmpeg</code> to stream over UDP to a remote endpoint:
1518 <div class="example">
1519 <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
1520 </pre></div>
1521
1522 </li><li> Use <code>ffmpeg</code> to stream in mpegts format over UDP using 188
1523 sized UDP packets, using a large input buffer:
1524 <div class="example">
1525 <pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
1526 </pre></div>
1527
1528 </li><li> Use <code>ffmpeg</code> to receive over UDP from a remote endpoint:
1529 <div class="example">
1530 <pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var> ...
1531 </pre></div>
1532 </li></ul>
1533
1534 <a name="unix"></a>
1535 <h3 class="section">2.34 unix<span class="pull-right"><a class="anchor hidden-xs" href="#unix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-unix" aria-hidden="true">TOC</a></span></h3>
1536
1537 <p>Unix local socket
1538 </p>
1539 <p>The required syntax for a Unix socket URL is:
1540 </p>
1541 <div class="example">
1542 <pre class="example">unix://<var>filepath</var>
1543 </pre></div>
1544
1545 <p>The following parameters can be set via command line options
1546 (or in code via <code>AVOption</code>s):
1547 </p>
1548 <dl compact="compact">
1549 <dt><samp>timeout</samp></dt>
1550 <dd><p>Timeout in ms.
1551 </p></dd>
1552 <dt><samp>listen</samp></dt>
1553 <dd><p>Create the Unix socket in listening mode.
1554 </p></dd>
1555 </dl>
1556
1557
1558 <a name="See-Also"></a>
1559 <h2 class="chapter">3 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
1560
1561 <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>,
1562 <a href="libavformat.html">libavformat</a>
1563 </p>
1564
1565 <a name="Authors"></a>
1566 <h2 class="chapter">4 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
1567
1568 <p>The FFmpeg developers.
1569 </p>
1570 <p>For details about the authorship, see the Git history of the project
1571 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
1572 <code>git log</code> in the FFmpeg source directory, or browsing the
1573 online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
1574 </p>
1575 <p>Maintainers for the specific components are listed in the file
1576 <samp>MAINTAINERS</samp> in the source code tree.
1577 </p>
1578
1579
1580       <p style="font-size: small;">
1581         This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
1582       </p>
1583     </div>
1584   </body>
1585 </html>