Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4349 Serge 1
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2
.\"
3
.\" Standard preamble:
4
.\" ========================================================================
5
.de Sh \" Subsection heading
6
.br
7
.if t .Sp
8
.ne 5
9
.PP
10
\fB\\$1\fR
11
.PP
12
..
13
.de Sp \" Vertical space (when we can't use .PP)
14
.if t .sp .5v
15
.if n .sp
16
..
17
.de Vb \" Begin verbatim text
18
.ft CW
19
.nf
20
.ne \\$1
21
..
22
.de Ve \" End verbatim text
23
.ft R
24
.fi
25
..
26
.\" Set up some character translations and predefined strings.  \*(-- will
27
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28
.\" double quote, and \*(R" will give a right double quote.  | will give a
29
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31
.\" expand to `' in nroff, nothing in troff, for use with C<>.
32
.tr \(*W-|\(bv\*(Tr
33
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34
.ie n \{\
35
.    ds -- \(*W-
36
.    ds PI pi
37
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39
.    ds L" ""
40
.    ds R" ""
41
.    ds C` ""
42
.    ds C' ""
43
'br\}
44
.el\{\
45
.    ds -- \|\(em\|
46
.    ds PI \(*p
47
.    ds L" ``
48
.    ds R" ''
49
'br\}
50
.\"
51
.\" If the F register is turned on, we'll generate index entries on stderr for
52
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53
.\" entries marked with X<> in POD.  Of course, you'll have to process the
54
.\" output yourself in some meaningful fashion.
55
.if \nF \{\
56
.    de IX
57
.    tm Index:\\$1\t\\n%\t"\\$2"
58
..
59
.    nr % 0
60
.    rr F
61
.\}
62
.\"
63
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64
.\" way too many mistakes in technical documents.
65
.hy 0
66
.if n .na
67
.\"
68
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70
.    \" fudge factors for nroff and troff
71
.if n \{\
72
.    ds #H 0
73
.    ds #V .8m
74
.    ds #F .3m
75
.    ds #[ \f1
76
.    ds #] \fP
77
.\}
78
.if t \{\
79
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80
.    ds #V .6m
81
.    ds #F 0
82
.    ds #[ \&
83
.    ds #] \&
84
.\}
85
.    \" simple accents for nroff and troff
86
.if n \{\
87
.    ds ' \&
88
.    ds ` \&
89
.    ds ^ \&
90
.    ds , \&
91
.    ds ~ ~
92
.    ds /
93
.\}
94
.if t \{\
95
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101
.\}
102
.    \" troff and (daisy-wheel) nroff accents
103
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110
.ds ae a\h'-(\w'a'u*4/10)'e
111
.ds Ae A\h'-(\w'A'u*4/10)'E
112
.    \" corrections for vroff
113
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115
.    \" for low resolution devices (crt and lpr)
116
.if \n(.H>23 .if \n(.V>19 \
117
\{\
118
.    ds : e
119
.    ds 8 ss
120
.    ds o a
121
.    ds d- d\h'-1'\(ga
122
.    ds D- D\h'-1'\(hy
123
.    ds th \o'bp'
124
.    ds Th \o'LP'
125
.    ds ae ae
126
.    ds Ae AE
127
.\}
128
.rm #[ #] #H #V #F C
129
.\" ========================================================================
130
.\"
131
.IX Title "FFMPEG-PROTOCOLS 1"
132
.TH FFMPEG-PROTOCOLS 1 "2013-12-14" " " " "
133
.SH "NAME"
134
ffmpeg\-protocols \- FFmpeg protocols
135
.SH "DESCRIPTION"
136
.IX Header "DESCRIPTION"
137
This document describes the input and output protocols provided by the
138
libavformat library.
139
.SH "PROTOCOLS"
140
.IX Header "PROTOCOLS"
141
Protocols are configured elements in FFmpeg that enable access to
142
resources that require specific protocols.
143
.PP
144
When you configure your FFmpeg build, all the supported protocols are
145
enabled by default. You can list all available ones using the
146
configure option \*(L"\-\-list\-protocols\*(R".
147
.PP
148
You can disable all the protocols using the configure option
149
\&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the
150
option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a
151
particular protocol using the option
152
\&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR".
153
.PP
154
The option \*(L"\-protocols\*(R" of the ff* tools will display the list of
155
supported protocols.
156
.PP
157
A description of the currently available protocols follows.
158
.Sh "bluray"
159
.IX Subsection "bluray"
160
Read BluRay playlist.
161
.PP
162
The accepted options are:
163
.IP "\fBangle\fR" 4
164
.IX Item "angle"
165
BluRay angle
166
.IP "\fBchapter\fR" 4
167
.IX Item "chapter"
168
Start chapter (1...N)
169
.IP "\fBplaylist\fR" 4
170
.IX Item "playlist"
171
Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls)
172
.PP
173
Examples:
174
.PP
175
Read longest playlist from BluRay mounted to /mnt/bluray:
176
.PP
177
.Vb 1
178
\&        bluray:/mnt/bluray
179
.Ve
180
.PP
181
Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
182
.PP
183
.Vb 1
184
\&        -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
185
.Ve
186
.Sh "cache"
187
.IX Subsection "cache"
188
Caching wrapper for input stream.
189
.PP
190
Cache the input stream to temporary file. It brings seeking capability to live streams.
191
.PP
192
.Vb 1
193
\&        cache:
194
.Ve
195
.Sh "concat"
196
.IX Subsection "concat"
197
Physical concatenation protocol.
198
.PP
199
Allow to read and seek from many resource in sequence as if they were
200
a unique resource.
201
.PP
202
A \s-1URL\s0 accepted by this protocol has the syntax:
203
.PP
204
.Vb 1
205
\&        concat:||...|
206
.Ve
207
.PP
208
where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the
209
resource to be concatenated, each one possibly specifying a distinct
210
protocol.
211
.PP
212
For example to read a sequence of files \fIsplit1.mpeg\fR,
213
\&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the
214
command:
215
.PP
216
.Vb 1
217
\&        ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg
218
.Ve
219
.PP
220
Note that you may need to escape the character \*(L"|\*(R" which is special for
221
many shells.
222
.Sh "crypto"
223
.IX Subsection "crypto"
224
AES-encrypted stream reading protocol.
225
.PP
226
The accepted options are:
227
.IP "\fBkey\fR" 4
228
.IX Item "key"
229
Set the \s-1AES\s0 decryption key binary block from given hexadecimal representation.
230
.IP "\fBiv\fR" 4
231
.IX Item "iv"
232
Set the \s-1AES\s0 decryption initialization vector binary block from given hexadecimal representation.
233
.PP
234
Accepted \s-1URL\s0 formats:
235
.PP
236
.Vb 2
237
\&        crypto:
238
\&        crypto+
239
.Ve
240
.Sh "data"
241
.IX Subsection "data"
242
Data in-line in the \s-1URI\s0. See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>.
243
.PP
244
For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR:
245
.PP
246
.Vb 1
247
\&        ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
248
.Ve
249
.Sh "file"
250
.IX Subsection "file"
251
File access protocol.
252
.PP
253
Allow to read from or read to a file.
254
.PP
255
For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR
256
use the command:
257
.PP
258
.Vb 1
259
\&        ffmpeg -i file:input.mpeg output.mpeg
260
.Ve
261
.PP
262
The ff* tools default to the file protocol, that is a resource
263
specified with the name \*(L"\s-1FILE\s0.mpeg\*(R" is interpreted as the \s-1URL\s0
264
\&\*(L"file:FILE.mpeg\*(R".
265
.PP
266
This protocol accepts the following options:
267
.IP "\fBtruncate\fR" 4
268
.IX Item "truncate"
269
Truncate existing files on write, if set to 1. A value of 0 prevents
270
truncating. Default value is 1.
271
.IP "\fBblocksize\fR" 4
272
.IX Item "blocksize"
273
Set I/O operation maximum block size, in bytes. Default value is
274
\&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size.
275
Setting this value reasonably low improves user termination request reaction
276
time, which is valuable for files on slow medium.
277
.Sh "ftp"
278
.IX Subsection "ftp"
279
\&\s-1FTP\s0 (File Transfer Protocol).
280
.PP
281
Allow to read from or write to remote resources using \s-1FTP\s0 protocol.
282
.PP
283
Following syntax is required.
284
.PP
285
.Vb 1
286
\&        ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
287
.Ve
288
.PP
289
This protocol accepts the following options.
290
.IP "\fBtimeout\fR" 4
291
.IX Item "timeout"
292
Set timeout of socket I/O operations used by the underlying low level
293
operation. By default it is set to \-1, which means that the timeout is
294
not specified.
295
.IP "\fBftp-anonymous-password\fR" 4
296
.IX Item "ftp-anonymous-password"
297
Password used when login as anonymous user. Typically an e\-mail address
298
should be used.
299
.IP "\fBftp-write-seekable\fR" 4
300
.IX Item "ftp-write-seekable"
301
Control seekability of connection during encoding. If set to 1 the
302
resource is supposed to be seekable, if set to 0 it is assumed not
303
to be seekable. Default value is 0.
304
.PP
305
\&\s-1NOTE:\s0 Protocol can be used as output, but it is recommended to not do
306
it, unless special care is taken (tests, customized server configuration
307
etc.). Different \s-1FTP\s0 servers behave in different way during seek
308
operation. ff* tools may produce incomplete content due to server limitations.
309
.Sh "gopher"
310
.IX Subsection "gopher"
311
Gopher protocol.
312
.Sh "hls"
313
.IX Subsection "hls"
314
Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as
315
a uniform one. The M3U8 playlists describing the segments can be
316
remote \s-1HTTP\s0 resources or local files, accessed using the standard
317
file protocol.
318
The nested protocol is declared by specifying
319
"+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR
320
is either \*(L"file\*(R" or \*(L"http\*(R".
321
.PP
322
.Vb 2
323
\&        hls+http://host/path/to/remote/resource.m3u8
324
\&        hls+file://path/to/local/resource.m3u8
325
.Ve
326
.PP
327
Using this protocol is discouraged \- the hls demuxer should work
328
just as well (if not, please report the issues) and is more complete.
329
To use the hls demuxer instead, simply use the direct URLs to the
330
m3u8 files.
331
.Sh "http"
332
.IX Subsection "http"
333
\&\s-1HTTP\s0 (Hyper Text Transfer Protocol).
334
.PP
335
This protocol accepts the following options.
336
.IP "\fBseekable\fR" 4
337
.IX Item "seekable"
338
Control seekability of connection. If set to 1 the resource is
339
supposed to be seekable, if set to 0 it is assumed not to be seekable,
340
if set to \-1 it will try to autodetect if it is seekable. Default
341
value is \-1.
342
.IP "\fBchunked_post\fR" 4
343
.IX Item "chunked_post"
344
If set to 1 use chunked transfer-encoding for posts, default is 1.
345
.IP "\fBheaders\fR" 4
346
.IX Item "headers"
347
Set custom \s-1HTTP\s0 headers, can override built in default headers. The
348
value must be a string encoding the headers.
349
.IP "\fBcontent_type\fR" 4
350
.IX Item "content_type"
351
Force a content type.
352
.IP "\fBuser-agent\fR" 4
353
.IX Item "user-agent"
354
Override User-Agent header. If not specified the protocol will use a
355
string describing the libavformat build.
356
.IP "\fBmultiple_requests\fR" 4
357
.IX Item "multiple_requests"
358
Use persistent connections if set to 1. By default it is 0.
359
.IP "\fBpost_data\fR" 4
360
.IX Item "post_data"
361
Set custom \s-1HTTP\s0 post data.
362
.IP "\fBtimeout\fR" 4
363
.IX Item "timeout"
364
Set timeout of socket I/O operations used by the underlying low level
365
operation. By default it is set to \-1, which means that the timeout is
366
not specified.
367
.IP "\fBmime_type\fR" 4
368
.IX Item "mime_type"
369
Set \s-1MIME\s0 type.
370
.IP "\fBicy\fR" 4
371
.IX Item "icy"
372
If set to 1 request \s-1ICY\s0 (SHOUTcast) metadata from the server. If the server
373
supports this, the metadata has to be retrieved by the application by reading
374
the \fBicy_metadata_headers\fR and \fBicy_metadata_packet\fR options.
375
The default is 0.
376
.IP "\fBicy_metadata_headers\fR" 4
377
.IX Item "icy_metadata_headers"
378
If the server supports \s-1ICY\s0 metadata, this contains the \s-1ICY\s0 specific \s-1HTTP\s0 reply
379
headers, separated with newline characters.
380
.IP "\fBicy_metadata_packet\fR" 4
381
.IX Item "icy_metadata_packet"
382
If the server supports \s-1ICY\s0 metadata, and \fBicy\fR was set to 1, this
383
contains the last non-empty metadata packet sent by the server.
384
.IP "\fBcookies\fR" 4
385
.IX Item "cookies"
386
Set the cookies to be sent in future requests. The format of each cookie is the
387
same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be
388
delimited by a newline character.
389
.PP
390
\fI\s-1HTTP\s0 Cookies\fR
391
.IX Subsection "HTTP Cookies"
392
.PP
393
Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the
394
request. The \fBcookies\fR option allows these cookies to be specified. At
395
the very least, each cookie must specify a value along with a path and domain.
396
\&\s-1HTTP\s0 requests that match both the domain and path will automatically include the
397
cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited
398
by a newline.
399
.PP
400
The required syntax to play a stream specifying a cookie is:
401
.PP
402
.Vb 1
403
\&        ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
404
.Ve
405
.Sh "mmst"
406
.IX Subsection "mmst"
407
\&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0.
408
.Sh "mmsh"
409
.IX Subsection "mmsh"
410
\&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0.
411
.PP
412
The required syntax is:
413
.PP
414
.Vb 1
415
\&        mmsh://[:][/][/]
416
.Ve
417
.Sh "md5"
418
.IX Subsection "md5"
419
\&\s-1MD5\s0 output protocol.
420
.PP
421
Computes the \s-1MD5\s0 hash of the data to be written, and on close writes
422
this to the designated output or stdout if none is specified. It can
423
be used to test muxers without writing an actual file.
424
.PP
425
Some examples follow.
426
.PP
427
.Vb 2
428
\&        # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
429
\&        ffmpeg -i input.flv -f avi -y md5:output.avi.md5
430
.Ve
431
.PP
432
.Vb 2
433
\&        # Write the MD5 hash of the encoded AVI file to stdout.
434
\&        ffmpeg -i input.flv -f avi -y md5:
435
.Ve
436
.PP
437
Note that some formats (typically \s-1MOV\s0) require the output protocol to
438
be seekable, so they will fail with the \s-1MD5\s0 output protocol.
439
.Sh "pipe"
440
.IX Subsection "pipe"
441
\&\s-1UNIX\s0 pipe access protocol.
442
.PP
443
Allow to read and write from \s-1UNIX\s0 pipes.
444
.PP
445
The accepted syntax is:
446
.PP
447
.Vb 1
448
\&        pipe:[]
449
.Ve
450
.PP
451
\&\fInumber\fR is the number corresponding to the file descriptor of the
452
pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If \fInumber\fR
453
is not specified, by default the stdout file descriptor will be used
454
for writing, stdin for reading.
455
.PP
456
For example to read from stdin with \fBffmpeg\fR:
457
.PP
458
.Vb 3
459
\&        cat test.wav | ffmpeg -i pipe:0
460
\&        # ...this is the same as...
461
\&        cat test.wav | ffmpeg -i pipe:
462
.Ve
463
.PP
464
For writing to stdout with \fBffmpeg\fR:
465
.PP
466
.Vb 3
467
\&        ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
468
\&        # ...this is the same as...
469
\&        ffmpeg -i test.wav -f avi pipe: | cat > test.avi
470
.Ve
471
.PP
472
This protocol accepts the following options:
473
.IP "\fBblocksize\fR" 4
474
.IX Item "blocksize"
475
Set I/O operation maximum block size, in bytes. Default value is
476
\&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size.
477
Setting this value reasonably low improves user termination request reaction
478
time, which is valuable if data transmission is slow.
479
.PP
480
Note that some formats (typically \s-1MOV\s0), require the output protocol to
481
be seekable, so they will fail with the pipe output protocol.
482
.Sh "rtmp"
483
.IX Subsection "rtmp"
484
Real-Time Messaging Protocol.
485
.PP
486
The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia
487
content across a \s-1TCP/IP\s0 network.
488
.PP
489
The required syntax is:
490
.PP
491
.Vb 1
492
\&        rtmp://[:@][:][/][/][/]
493
.Ve
494
.PP
495
The accepted parameters are:
496
.IP "\fBusername\fR" 4
497
.IX Item "username"
498
An optional username (mostly for publishing).
499
.IP "\fBpassword\fR" 4
500
.IX Item "password"
501
An optional password (mostly for publishing).
502
.IP "\fBserver\fR" 4
503
.IX Item "server"
504
The address of the \s-1RTMP\s0 server.
505
.IP "\fBport\fR" 4
506
.IX Item "port"
507
The number of the \s-1TCP\s0 port to use (by default is 1935).
508
.IP "\fBapp\fR" 4
509
.IX Item "app"
510
It is the name of the application to access. It usually corresponds to
511
the path where the application is installed on the \s-1RTMP\s0 server
512
(e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). You can override
513
the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too.
514
.IP "\fBplaypath\fR" 4
515
.IX Item "playpath"
516
It is the path or name of the resource to play with reference to the
517
application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". You
518
can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR
519
option, too.
520
.IP "\fBlisten\fR" 4
521
.IX Item "listen"
522
Act as a server, listening for an incoming connection.
523
.IP "\fBtimeout\fR" 4
524
.IX Item "timeout"
525
Maximum time to wait for the incoming connection. Implies listen.
526
.PP
527
Additionally, the following parameters can be set via command line options
528
(or in code via \f(CW\*(C`AVOption\*(C'\fRs):
529
.IP "\fBrtmp_app\fR" 4
530
.IX Item "rtmp_app"
531
Name of application to connect on the \s-1RTMP\s0 server. This option
532
overrides the parameter specified in the \s-1URI\s0.
533
.IP "\fBrtmp_buffer\fR" 4
534
.IX Item "rtmp_buffer"
535
Set the client buffer time in milliseconds. The default is 3000.
536
.IP "\fBrtmp_conn\fR" 4
537
.IX Item "rtmp_conn"
538
Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string,
539
e.g. like \f(CW\*(C`B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0\*(C'\fR.
540
Each value is prefixed by a single character denoting the type,
541
B for Boolean, N for number, S for string, O for object, or Z for null,
542
followed by a colon. For Booleans the data must be either 0 or 1 for
543
\&\s-1FALSE\s0 or \s-1TRUE\s0, respectively.  Likewise for Objects the data must be 0 or
544
1 to end or begin an object, respectively. Data items in subobjects may
545
be named, by prefixing the type with 'N' and specifying the name before
546
the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple
547
times to construct arbitrary \s-1AMF\s0 sequences.
548
.IP "\fBrtmp_flashver\fR" 4
549
.IX Item "rtmp_flashver"
550
Version of the Flash plugin used to run the \s-1SWF\s0 player. The default
551
is \s-1LNX\s0 9,0,124,2. (When publishing, the default is \s-1FMLE/3\s0.0 (compatible;
552
).)
553
.IP "\fBrtmp_flush_interval\fR" 4
554
.IX Item "rtmp_flush_interval"
555
Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default
556
is 10.
557
.IP "\fBrtmp_live\fR" 4
558
.IX Item "rtmp_live"
559
Specify that the media is a live stream. No resuming or seeking in
560
live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the
561
subscriber first tries to play the live stream specified in the
562
playpath. If a live stream of that name is not found, it plays the
563
recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and
564
\&\f(CW\*(C`recorded\*(C'\fR.
565
.IP "\fBrtmp_pageurl\fR" 4
566
.IX Item "rtmp_pageurl"
567
\&\s-1URL\s0 of the web page in which the media was embedded. By default no
568
value will be sent.
569
.IP "\fBrtmp_playpath\fR" 4
570
.IX Item "rtmp_playpath"
571
Stream identifier to play or to publish. This option overrides the
572
parameter specified in the \s-1URI\s0.
573
.IP "\fBrtmp_subscribe\fR" 4
574
.IX Item "rtmp_subscribe"
575
Name of live stream to subscribe to. By default no value will be sent.
576
It is only sent if the option is specified or if rtmp_live
577
is set to live.
578
.IP "\fBrtmp_swfhash\fR" 4
579
.IX Item "rtmp_swfhash"
580
\&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes).
581
.IP "\fBrtmp_swfsize\fR" 4
582
.IX Item "rtmp_swfsize"
583
Size of the decompressed \s-1SWF\s0 file, required for SWFVerification.
584
.IP "\fBrtmp_swfurl\fR" 4
585
.IX Item "rtmp_swfurl"
586
\&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent.
587
.IP "\fBrtmp_swfverify\fR" 4
588
.IX Item "rtmp_swfverify"
589
\&\s-1URL\s0 to player swf file, compute hash/size automatically.
590
.IP "\fBrtmp_tcurl\fR" 4
591
.IX Item "rtmp_tcurl"
592
\&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app.
593
.PP
594
For example to read with \fBffplay\fR a multimedia resource named
595
\&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R":
596
.PP
597
.Vb 1
598
\&        ffplay rtmp://myserver/vod/sample
599
.Ve
600
.PP
601
To publish to a password protected server, passing the playpath and
602
app names separately:
603
.PP
604
.Vb 1
605
\&        ffmpeg -re -i  -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
606
.Ve
607
.Sh "rtmpe"
608
.IX Subsection "rtmpe"
609
Encrypted Real-Time Messaging Protocol.
610
.PP
611
The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for
612
streaming multimedia content within standard cryptographic primitives,
613
consisting of Diffie-Hellman key exchange and \s-1HMACSHA256\s0, generating
614
a pair of \s-1RC4\s0 keys.
615
.Sh "rtmps"
616
.IX Subsection "rtmps"
617
Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection.
618
.PP
619
The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming
620
multimedia content across an encrypted connection.
621
.Sh "rtmpt"
622
.IX Subsection "rtmpt"
623
Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
624
.PP
625
The Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPT\s0) is used
626
for streaming multimedia content within \s-1HTTP\s0 requests to traverse
627
firewalls.
628
.Sh "rtmpte"
629
.IX Subsection "rtmpte"
630
Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
631
.PP
632
The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPTE\s0)
633
is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse
634
firewalls.
635
.Sh "rtmpts"
636
.IX Subsection "rtmpts"
637
Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0.
638
.PP
639
The Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0 (\s-1RTMPTS\s0) is used
640
for streaming multimedia content within \s-1HTTPS\s0 requests to traverse
641
firewalls.
642
.Sh "libssh"
643
.IX Subsection "libssh"
644
Secure File Transfer Protocol via libssh
645
.PP
646
Allow to read from or write to remote resources using \s-1SFTP\s0 protocol.
647
.PP
648
Following syntax is required.
649
.PP
650
.Vb 1
651
\&        sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
652
.Ve
653
.PP
654
This protocol accepts the following options.
655
.IP "\fBtimeout\fR" 4
656
.IX Item "timeout"
657
Set timeout of socket I/O operations used by the underlying low level
658
operation. By default it is set to \-1, which means that the timeout
659
is not specified.
660
.IP "\fBtruncate\fR" 4
661
.IX Item "truncate"
662
Truncate existing files on write, if set to 1. A value of 0 prevents
663
truncating. Default value is 1.
664
.PP
665
Example: Play a file stored on remote server.
666
.PP
667
.Vb 1
668
\&        ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
669
.Ve
670
.Sh "librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte"
671
.IX Subsection "librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte"
672
Real-Time Messaging Protocol and its variants supported through
673
librtmp.
674
.PP
675
Requires the presence of the librtmp headers and library during
676
configuration. You need to explicitly configure the build with
677
\&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0
678
protocol.
679
.PP
680
This protocol provides most client functions and a few server
681
functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0),
682
encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled
683
variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0).
684
.PP
685
The required syntax is:
686
.PP
687
.Vb 1
688
\&        ://[:][/][/] 
689
.Ve
690
.PP
691
where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R",
692
\&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and
693
\&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same
694
meaning as specified for the \s-1RTMP\s0 native protocol.
695
\&\fIoptions\fR contains a list of space-separated options of the form
696
\&\fIkey\fR=\fIval\fR.
697
.PP
698
See the librtmp manual page (man 3 librtmp) for more information.
699
.PP
700
For example, to stream a file in real-time to an \s-1RTMP\s0 server using
701
\&\fBffmpeg\fR:
702
.PP
703
.Vb 1
704
\&        ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
705
.Ve
706
.PP
707
To play the same stream using \fBffplay\fR:
708
.PP
709
.Vb 1
710
\&        ffplay "rtmp://myserver/live/mystream live=1"
711
.Ve
712
.Sh "rtp"
713
.IX Subsection "rtp"
714
Real-time Transport Protocol.
715
.PP
716
The required syntax for an \s-1RTP\s0 \s-1URL\s0 is:
717
rtp://\fIhostname\fR[:\fIport\fR][?\fIoption\fR=\fIval\fR...]
718
.PP
719
\&\fIport\fR specifies the \s-1RTP\s0 port to use.
720
.PP
721
The following \s-1URL\s0 options are supported:
722
.IP "\fBttl=\fR\fIn\fR" 4
723
.IX Item "ttl=n"
724
Set the \s-1TTL\s0 (Time\-To\-Live) value (for multicast only).
725
.IP "\fBrtcpport=\fR\fIn\fR" 4
726
.IX Item "rtcpport=n"
727
Set the remote \s-1RTCP\s0 port to \fIn\fR.
728
.IP "\fBlocalrtpport=\fR\fIn\fR" 4
729
.IX Item "localrtpport=n"
730
Set the local \s-1RTP\s0 port to \fIn\fR.
731
.IP "\fBlocalrtcpport=\fR\fIn\fR\fB'\fR" 4
732
.IX Item "localrtcpport=n'"
733
Set the local \s-1RTCP\s0 port to \fIn\fR.
734
.IP "\fBpkt_size=\fR\fIn\fR" 4
735
.IX Item "pkt_size=n"
736
Set max packet size (in bytes) to \fIn\fR.
737
.IP "\fBconnect=0|1\fR" 4
738
.IX Item "connect=0|1"
739
Do a \f(CW\*(C`connect()\*(C'\fR on the \s-1UDP\s0 socket (if set to 1) or not (if set
740
to 0).
741
.IP "\fBsources=\fR\fIip\fR\fB[,\fR\fIip\fR\fB]\fR" 4
742
.IX Item "sources=ip[,ip]"
743
List allowed source \s-1IP\s0 addresses.
744
.IP "\fBblock=\fR\fIip\fR\fB[,\fR\fIip\fR\fB]\fR" 4
745
.IX Item "block=ip[,ip]"
746
List disallowed (blocked) source \s-1IP\s0 addresses.
747
.IP "\fBwrite_to_source=0|1\fR" 4
748
.IX Item "write_to_source=0|1"
749
Send packets to the source address of the latest received packet (if
750
set to 1) or to a default remote address (if set to 0).
751
.IP "\fBlocalport=\fR\fIn\fR" 4
752
.IX Item "localport=n"
753
Set the local \s-1RTP\s0 port to \fIn\fR.
754
.Sp
755
This is a deprecated option. Instead, \fBlocalrtpport\fR should be
756
used.
757
.PP
758
Important notes:
759
.IP "1." 4
760
If \fBrtcpport\fR is not set the \s-1RTCP\s0 port will be set to the \s-1RTP\s0
761
port value plus 1.
762
.IP "2." 4
763
If \fBlocalrtpport\fR (the local \s-1RTP\s0 port) is not set any available
764
port will be used for the local \s-1RTP\s0 and \s-1RTCP\s0 ports.
765
.IP "3." 4
766
If \fBlocalrtcpport\fR (the local \s-1RTCP\s0 port) is not set it will be
767
set to the the local \s-1RTP\s0 port value plus 1.
768
.Sh "rtsp"
769
.IX Subsection "rtsp"
770
\&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer
771
and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred
772
over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
773
data transferred over \s-1RDT\s0).
774
.PP
775
The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server
776
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
777
<\fBhttp://github.com/revmischa/rtsp\-server\fR>).
778
.PP
779
The required syntax for a \s-1RTSP\s0 url is:
780
.PP
781
.Vb 1
782
\&        rtsp://[:]/
783
.Ve
784
.PP
785
The following options (set on the \fBffmpeg\fR/\fBffplay\fR command
786
line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in \f(CW\*(C`avformat_open_input\*(C'\fR),
787
are supported:
788
.PP
789
Flags for \f(CW\*(C`rtsp_transport\*(C'\fR:
790
.IP "\fBudp\fR" 4
791
.IX Item "udp"
792
Use \s-1UDP\s0 as lower transport protocol.
793
.IP "\fBtcp\fR" 4
794
.IX Item "tcp"
795
Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower
796
transport protocol.
797
.IP "\fBudp_multicast\fR" 4
798
.IX Item "udp_multicast"
799
Use \s-1UDP\s0 multicast as lower transport protocol.
800
.IP "\fBhttp\fR" 4
801
.IX Item "http"
802
Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for
803
passing proxies.
804
.PP
805
Multiple lower transport protocols may be specified, in that case they are
806
tried one at a time (if the setup of one fails, the next one is tried).
807
For the muxer, only the \f(CW\*(C`tcp\*(C'\fR and \f(CW\*(C`udp\*(C'\fR options are supported.
808
.PP
809
Flags for \f(CW\*(C`rtsp_flags\*(C'\fR:
810
.IP "\fBfilter_src\fR" 4
811
.IX Item "filter_src"
812
Accept packets only from negotiated peer address and port.
813
.IP "\fBlisten\fR" 4
814
.IX Item "listen"
815
Act as a server, listening for an incoming connection.
816
.PP
817
When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets
818
(since they may arrive out of order, or packets may get lost totally). This
819
can be disabled by setting the maximum demuxing delay to zero (via
820
the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext).
821
.PP
822
When watching multi-bitrate Real-RTSP streams with \fBffplay\fR, the
823
streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and
824
\&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched
825
on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR.
826
.PP
827
Example command lines:
828
.PP
829
To watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds:
830
.PP
831
.Vb 1
832
\&        ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
833
.Ve
834
.PP
835
To watch a stream tunneled over \s-1HTTP:\s0
836
.PP
837
.Vb 1
838
\&        ffplay -rtsp_transport http rtsp://server/video.mp4
839
.Ve
840
.PP
841
To send a stream in realtime to a \s-1RTSP\s0 server, for others to watch:
842
.PP
843
.Vb 1
844
\&        ffmpeg -re -i  -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
845
.Ve
846
.PP
847
To receive a stream in realtime:
848
.PP
849
.Vb 1
850
\&        ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp 
851
.Ve
852
.IP "\fBstimeout\fR" 4
853
.IX Item "stimeout"
854
Socket \s-1IO\s0 timeout in micro seconds.
855
.Sh "sap"
856
.IX Subsection "sap"
857
Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a
858
protocol handler in libavformat, it is a muxer and demuxer.
859
It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the
860
streams regularly on a separate port.
861
.PP
862
\fIMuxer\fR
863
.IX Subsection "Muxer"
864
.PP
865
The syntax for a \s-1SAP\s0 url given to the muxer is:
866
.PP
867
.Vb 1
868
\&        sap://[:][?]
869
.Ve
870
.PP
871
The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR,
872
or to port 5004 if no port is specified.
873
\&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options
874
are supported:
875
.IP "\fBannounce_addr=\fR\fIaddress\fR" 4
876
.IX Item "announce_addr=address"
877
Specify the destination \s-1IP\s0 address for sending the announcements to.
878
If omitted, the announcements are sent to the commonly used \s-1SAP\s0
879
announcement multicast address 224.2.127.254 (sap.mcast.net), or
880
ff0e::2:7ffe if \fIdestination\fR is an IPv6 address.
881
.IP "\fBannounce_port=\fR\fIport\fR" 4
882
.IX Item "announce_port=port"
883
Specify the port to send the announcements on, defaults to
884
9875 if not specified.
885
.IP "\fBttl=\fR\fIttl\fR" 4
886
.IX Item "ttl=ttl"
887
Specify the time to live value for the announcements and \s-1RTP\s0 packets,
888
defaults to 255.
889
.IP "\fBsame_port=\fR\fI0|1\fR" 4
890
.IX Item "same_port=0|1"
891
If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the
892
default), all streams are sent on unique ports, with each stream on a
893
port 2 numbers higher than the previous.
894
VLC/Live555 requires this to be set to 1, to be able to receive the stream.
895
The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent
896
on unique ports.
897
.PP
898
Example command lines follow.
899
.PP
900
To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0
901
.PP
902
.Vb 1
903
\&        ffmpeg -re -i  -f sap sap://224.0.0.255?same_port=1
904
.Ve
905
.PP
906
Similarly, for watching in \fBffplay\fR:
907
.PP
908
.Vb 1
909
\&        ffmpeg -re -i  -f sap sap://224.0.0.255
910
.Ve
911
.PP
912
And for watching in \fBffplay\fR, over IPv6:
913
.PP
914
.Vb 1
915
\&        ffmpeg -re -i  -f sap sap://[ff0e::1:2:3:4]
916
.Ve
917
.PP
918
\fIDemuxer\fR
919
.IX Subsection "Demuxer"
920
.PP
921
The syntax for a \s-1SAP\s0 url given to the demuxer is:
922
.PP
923
.Vb 1
924
\&        sap://[
][:]
925
.Ve
926
.PP
927
\&\fIaddress\fR is the multicast address to listen for announcements on,
928
if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR
929
is the port that is listened on, 9875 if omitted.
930
.PP
931
The demuxers listens for announcements on the given address and port.
932
Once an announcement is received, it tries to receive that particular stream.
933
.PP
934
Example command lines follow.
935
.PP
936
To play back the first stream announced on the normal \s-1SAP\s0 multicast address:
937
.PP
938
.Vb 1
939
\&        ffplay sap://
940
.Ve
941
.PP
942
To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address:
943
.PP
944
.Vb 1
945
\&        ffplay sap://[ff0e::2:7ffe]
946
.Ve
947
.Sh "sctp"
948
.IX Subsection "sctp"
949
Stream Control Transmission Protocol.
950
.PP
951
The accepted \s-1URL\s0 syntax is:
952
.PP
953
.Vb 1
954
\&        sctp://:[?]
955
.Ve
956
.PP
957
The protocol accepts the following options:
958
.IP "\fBlisten\fR" 4
959
.IX Item "listen"
960
If set to any value, listen for an incoming connection. Outgoing connection is done by default.
961
.IP "\fBmax_streams\fR" 4
962
.IX Item "max_streams"
963
Set the maximum number of streams. By default no limit is set.
964
.Sh "srtp"
965
.IX Subsection "srtp"
966
Secure Real-time Transport Protocol.
967
.PP
968
The accepted options are:
969
.IP "\fBsrtp_in_suite\fR" 4
970
.IX Item "srtp_in_suite"
971
.PD 0
972
.IP "\fBsrtp_out_suite\fR" 4
973
.IX Item "srtp_out_suite"
974
.PD
975
Select input and output encoding suites.
976
.Sp
977
Supported values:
978
.RS 4
979
.IP "\fB\s-1AES_CM_128_HMAC_SHA1_80\s0\fR" 4
980
.IX Item "AES_CM_128_HMAC_SHA1_80"
981
.PD 0
982
.IP "\fB\s-1SRTP_AES128_CM_HMAC_SHA1_80\s0\fR" 4
983
.IX Item "SRTP_AES128_CM_HMAC_SHA1_80"
984
.IP "\fB\s-1AES_CM_128_HMAC_SHA1_32\s0\fR" 4
985
.IX Item "AES_CM_128_HMAC_SHA1_32"
986
.IP "\fB\s-1SRTP_AES128_CM_HMAC_SHA1_32\s0\fR" 4
987
.IX Item "SRTP_AES128_CM_HMAC_SHA1_32"
988
.RE
989
.RS 4
990
.RE
991
.IP "\fBsrtp_in_params\fR" 4
992
.IX Item "srtp_in_params"
993
.IP "\fBsrtp_out_params\fR" 4
994
.IX Item "srtp_out_params"
995
.PD
996
Set input and output encoding parameters, which are expressed by a
997
base64\-encoded representation of a binary block. The first 16 bytes of
998
this binary block are used as master key, the following 14 bytes are
999
used as master salt.
1000
.Sh "tcp"
1001
.IX Subsection "tcp"
1002
Trasmission Control Protocol.
1003
.PP
1004
The required syntax for a \s-1TCP\s0 url is:
1005
.PP
1006
.Vb 1
1007
\&        tcp://:[?]
1008
.Ve
1009
.IP "\fBlisten\fR" 4
1010
.IX Item "listen"
1011
Listen for an incoming connection
1012
.IP "\fBtimeout=\fR\fImicroseconds\fR" 4
1013
.IX Item "timeout=microseconds"
1014
In read mode: if no data arrived in more than this time interval, raise error.
1015
In write mode: if socket cannot be written in more than this time interval, raise error.
1016
This also sets timeout on \s-1TCP\s0 connection establishing.
1017
.Sp
1018
.Vb 2
1019
\&        ffmpeg -i  -f  tcp://:?listen
1020
\&        ffplay tcp://:
1021
.Ve
1022
.Sh "tls"
1023
.IX Subsection "tls"
1024
Transport Layer Security (\s-1TLS\s0) / Secure Sockets Layer (\s-1SSL\s0)
1025
.PP
1026
The required syntax for a \s-1TLS/SSL\s0 url is:
1027
.PP
1028
.Vb 1
1029
\&        tls://:[?]
1030
.Ve
1031
.PP
1032
The following parameters can be set via command line options
1033
(or in code via \f(CW\*(C`AVOption\*(C'\fRs):
1034
.IP "\fBca_file, cafile=\fR\fIfilename\fR" 4
1035
.IX Item "ca_file, cafile=filename"
1036
A file containing certificate authority (\s-1CA\s0) root certificates to treat
1037
as trusted. If the linked \s-1TLS\s0 library contains a default this might not
1038
need to be specified for verification to work, but not all libraries and
1039
setups have defaults built in.
1040
The file must be in OpenSSL \s-1PEM\s0 format.
1041
.IP "\fBtls_verify=\fR\fI1|0\fR" 4
1042
.IX Item "tls_verify=1|0"
1043
If enabled, try to verify the peer that we are communicating with.
1044
Note, if using OpenSSL, this currently only makes sure that the
1045
peer certificate is signed by one of the root certificates in the \s-1CA\s0
1046
database, but it does not validate that the certificate actually
1047
matches the host name we are trying to connect to. (With GnuTLS,
1048
the host name is validated as well.)
1049
.Sp
1050
This is disabled by default since it requires a \s-1CA\s0 database to be
1051
provided by the caller in many cases.
1052
.IP "\fBcert_file, cert=\fR\fIfilename\fR" 4
1053
.IX Item "cert_file, cert=filename"
1054
A file containing a certificate to use in the handshake with the peer.
1055
(When operating as server, in listen mode, this is more often required
1056
by the peer, while client certificates only are mandated in certain
1057
setups.)
1058
.IP "\fBkey_file, key=\fR\fIfilename\fR" 4
1059
.IX Item "key_file, key=filename"
1060
A file containing the private key for the certificate.
1061
.IP "\fBlisten=\fR\fI1|0\fR" 4
1062
.IX Item "listen=1|0"
1063
If enabled, listen for connections on the provided port, and assume
1064
the server role in the handshake instead of the client role.
1065
.PP
1066
Example command lines:
1067
.PP
1068
To create a \s-1TLS/SSL\s0 server that serves an input stream.
1069
.PP
1070
.Vb 1
1071
\&        ffmpeg -i  -f  tls://:?listen&cert=&key=
1072
.Ve
1073
.PP
1074
To play back a stream from the \s-1TLS/SSL\s0 server using \fBffplay\fR:
1075
.PP
1076
.Vb 1
1077
\&        ffplay tls://:
1078
.Ve
1079
.Sh "udp"
1080
.IX Subsection "udp"
1081
User Datagram Protocol.
1082
.PP
1083
The required syntax for a \s-1UDP\s0 url is:
1084
.PP
1085
.Vb 1
1086
\&        udp://:[?]
1087
.Ve
1088
.PP
1089
\&\fIoptions\fR contains a list of &\-separated options of the form \fIkey\fR=\fIval\fR.
1090
.PP
1091
In case threading is enabled on the system, a circular buffer is used
1092
to store the incoming data, which allows to reduce loss of data due to
1093
\&\s-1UDP\s0 socket buffer overruns. The \fIfifo_size\fR and
1094
\&\fIoverrun_nonfatal\fR options are related to this buffer.
1095
.PP
1096
The list of supported options follows.
1097
.IP "\fBbuffer_size=\fR\fIsize\fR" 4
1098
.IX Item "buffer_size=size"
1099
Set the \s-1UDP\s0 socket buffer size in bytes. This is used both for the
1100
receiving and the sending buffer size.
1101
.IP "\fBlocalport=\fR\fIport\fR" 4
1102
.IX Item "localport=port"
1103
Override the local \s-1UDP\s0 port to bind with.
1104
.IP "\fBlocaladdr=\fR\fIaddr\fR" 4
1105
.IX Item "localaddr=addr"
1106
Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast
1107
and the host has multiple interfaces, where the user can choose
1108
which interface to send on by specifying the \s-1IP\s0 address of that interface.
1109
.IP "\fBpkt_size=\fR\fIsize\fR" 4
1110
.IX Item "pkt_size=size"
1111
Set the size in bytes of \s-1UDP\s0 packets.
1112
.IP "\fBreuse=\fR\fI1|0\fR" 4
1113
.IX Item "reuse=1|0"
1114
Explicitly allow or disallow reusing \s-1UDP\s0 sockets.
1115
.IP "\fBttl=\fR\fIttl\fR" 4
1116
.IX Item "ttl=ttl"
1117
Set the time to live value (for multicast only).
1118
.IP "\fBconnect=\fR\fI1|0\fR" 4
1119
.IX Item "connect=1|0"
1120
Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the
1121
destination address can't be changed with ff_udp_set_remote_url later.
1122
If the destination address isn't known at the start, this option can
1123
be specified in ff_udp_set_remote_url, too.
1124
This allows finding out the source address for the packets with getsockname,
1125
and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination
1126
unreachable\*(R" is received.
1127
For receiving, this gives the benefit of only receiving packets from
1128
the specified peer address/port.
1129
.IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
1130
.IX Item "sources=address[,address]"
1131
Only receive packets sent to the multicast group from one of the
1132
specified sender \s-1IP\s0 addresses.
1133
.IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
1134
.IX Item "block=address[,address]"
1135
Ignore packets sent to the multicast group from the specified
1136
sender \s-1IP\s0 addresses.
1137
.IP "\fBfifo_size=\fR\fIunits\fR" 4
1138
.IX Item "fifo_size=units"
1139
Set the \s-1UDP\s0 receiving circular buffer size, expressed as a number of
1140
packets with size of 188 bytes. If not specified defaults to 7*4096.
1141
.IP "\fBoverrun_nonfatal=\fR\fI1|0\fR" 4
1142
.IX Item "overrun_nonfatal=1|0"
1143
Survive in case of \s-1UDP\s0 receiving circular buffer overrun. Default
1144
value is 0.
1145
.IP "\fBtimeout=\fR\fImicroseconds\fR" 4
1146
.IX Item "timeout=microseconds"
1147
In read mode: if no data arrived in more than this time interval, raise error.
1148
.PP
1149
Some usage examples of the \s-1UDP\s0 protocol with \fBffmpeg\fR follow.
1150
.PP
1151
To stream over \s-1UDP\s0 to a remote endpoint:
1152
.PP
1153
.Vb 1
1154
\&        ffmpeg -i  -f  udp://:
1155
.Ve
1156
.PP
1157
To stream in mpegts format over \s-1UDP\s0 using 188 sized \s-1UDP\s0 packets, using a large input buffer:
1158
.PP
1159
.Vb 1
1160
\&        ffmpeg -i  -f mpegts udp://:?pkt_size=188&buffer_size=65535
1161
.Ve
1162
.PP
1163
To receive over \s-1UDP\s0 from a remote endpoint:
1164
.PP
1165
.Vb 1
1166
\&        ffmpeg -i udp://[]:
1167
.Ve
1168
.Sh "unix"
1169
.IX Subsection "unix"
1170
Unix local socket
1171
.PP
1172
The required syntax for a Unix socket \s-1URL\s0 is:
1173
.PP
1174
.Vb 1
1175
\&        unix://
1176
.Ve
1177
.PP
1178
The following parameters can be set via command line options
1179
(or in code via \f(CW\*(C`AVOption\*(C'\fRs):
1180
.IP "\fBtimeout\fR" 4
1181
.IX Item "timeout"
1182
Timeout in ms.
1183
.IP "\fBlisten\fR" 4
1184
.IX Item "listen"
1185
Create the Unix socket in listening mode.
1186
.SH "SEE ALSO"
1187
.IX Header "SEE ALSO"
1188
\&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavformat\fR\|(3)
1189
.SH "AUTHORS"
1190
.IX Header "AUTHORS"
1191
The FFmpeg developers.
1192
.PP
1193
For details about the authorship, see the Git history of the project
1194
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
1195
\&\fBgit log\fR in the FFmpeg source directory, or browsing the
1196
online repository at <\fBhttp://source.ffmpeg.org\fR>.
1197
.PP
1198
Maintainers for the specific components are listed in the file
1199
\&\fI\s-1MAINTAINERS\s0\fR in the source code tree.