yading@10
|
1 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
|
yading@10
|
2 .\"
|
yading@10
|
3 .\" Standard preamble:
|
yading@10
|
4 .\" ========================================================================
|
yading@10
|
5 .de Sp \" Vertical space (when we can't use .PP)
|
yading@10
|
6 .if t .sp .5v
|
yading@10
|
7 .if n .sp
|
yading@10
|
8 ..
|
yading@10
|
9 .de Vb \" Begin verbatim text
|
yading@10
|
10 .ft CW
|
yading@10
|
11 .nf
|
yading@10
|
12 .ne \\$1
|
yading@10
|
13 ..
|
yading@10
|
14 .de Ve \" End verbatim text
|
yading@10
|
15 .ft R
|
yading@10
|
16 .fi
|
yading@10
|
17 ..
|
yading@10
|
18 .\" Set up some character translations and predefined strings. \*(-- will
|
yading@10
|
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
yading@10
|
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
yading@10
|
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
yading@10
|
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
yading@10
|
23 .\" nothing in troff, for use with C<>.
|
yading@10
|
24 .tr \(*W-
|
yading@10
|
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
yading@10
|
26 .ie n \{\
|
yading@10
|
27 . ds -- \(*W-
|
yading@10
|
28 . ds PI pi
|
yading@10
|
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
yading@10
|
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
yading@10
|
31 . ds L" ""
|
yading@10
|
32 . ds R" ""
|
yading@10
|
33 . ds C` ""
|
yading@10
|
34 . ds C' ""
|
yading@10
|
35 'br\}
|
yading@10
|
36 .el\{\
|
yading@10
|
37 . ds -- \|\(em\|
|
yading@10
|
38 . ds PI \(*p
|
yading@10
|
39 . ds L" ``
|
yading@10
|
40 . ds R" ''
|
yading@10
|
41 'br\}
|
yading@10
|
42 .\"
|
yading@10
|
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
|
yading@10
|
44 .ie \n(.g .ds Aq \(aq
|
yading@10
|
45 .el .ds Aq '
|
yading@10
|
46 .\"
|
yading@10
|
47 .\" If the F register is turned on, we'll generate index entries on stderr for
|
yading@10
|
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
yading@10
|
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
|
yading@10
|
50 .\" output yourself in some meaningful fashion.
|
yading@10
|
51 .ie \nF \{\
|
yading@10
|
52 . de IX
|
yading@10
|
53 . tm Index:\\$1\t\\n%\t"\\$2"
|
yading@10
|
54 ..
|
yading@10
|
55 . nr % 0
|
yading@10
|
56 . rr F
|
yading@10
|
57 .\}
|
yading@10
|
58 .el \{\
|
yading@10
|
59 . de IX
|
yading@10
|
60 ..
|
yading@10
|
61 .\}
|
yading@10
|
62 .\"
|
yading@10
|
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
yading@10
|
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
|
yading@10
|
65 . \" fudge factors for nroff and troff
|
yading@10
|
66 .if n \{\
|
yading@10
|
67 . ds #H 0
|
yading@10
|
68 . ds #V .8m
|
yading@10
|
69 . ds #F .3m
|
yading@10
|
70 . ds #[ \f1
|
yading@10
|
71 . ds #] \fP
|
yading@10
|
72 .\}
|
yading@10
|
73 .if t \{\
|
yading@10
|
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
yading@10
|
75 . ds #V .6m
|
yading@10
|
76 . ds #F 0
|
yading@10
|
77 . ds #[ \&
|
yading@10
|
78 . ds #] \&
|
yading@10
|
79 .\}
|
yading@10
|
80 . \" simple accents for nroff and troff
|
yading@10
|
81 .if n \{\
|
yading@10
|
82 . ds ' \&
|
yading@10
|
83 . ds ` \&
|
yading@10
|
84 . ds ^ \&
|
yading@10
|
85 . ds , \&
|
yading@10
|
86 . ds ~ ~
|
yading@10
|
87 . ds /
|
yading@10
|
88 .\}
|
yading@10
|
89 .if t \{\
|
yading@10
|
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
yading@10
|
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
yading@10
|
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
yading@10
|
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
yading@10
|
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
yading@10
|
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
yading@10
|
96 .\}
|
yading@10
|
97 . \" troff and (daisy-wheel) nroff accents
|
yading@10
|
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
yading@10
|
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
yading@10
|
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
yading@10
|
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
yading@10
|
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
yading@10
|
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
yading@10
|
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
yading@10
|
105 .ds ae a\h'-(\w'a'u*4/10)'e
|
yading@10
|
106 .ds Ae A\h'-(\w'A'u*4/10)'E
|
yading@10
|
107 . \" corrections for vroff
|
yading@10
|
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
yading@10
|
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
yading@10
|
110 . \" for low resolution devices (crt and lpr)
|
yading@10
|
111 .if \n(.H>23 .if \n(.V>19 \
|
yading@10
|
112 \{\
|
yading@10
|
113 . ds : e
|
yading@10
|
114 . ds 8 ss
|
yading@10
|
115 . ds o a
|
yading@10
|
116 . ds d- d\h'-1'\(ga
|
yading@10
|
117 . ds D- D\h'-1'\(hy
|
yading@10
|
118 . ds th \o'bp'
|
yading@10
|
119 . ds Th \o'LP'
|
yading@10
|
120 . ds ae ae
|
yading@10
|
121 . ds Ae AE
|
yading@10
|
122 .\}
|
yading@10
|
123 .rm #[ #] #H #V #F C
|
yading@10
|
124 .\" ========================================================================
|
yading@10
|
125 .\"
|
yading@10
|
126 .IX Title "FFMPEG-PROTOCOLS 1"
|
yading@10
|
127 .TH FFMPEG-PROTOCOLS 1 "2013-04-21" " " " "
|
yading@10
|
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
yading@10
|
129 .\" way too many mistakes in technical documents.
|
yading@10
|
130 .if n .ad l
|
yading@10
|
131 .nh
|
yading@10
|
132 .SH "NAME"
|
yading@10
|
133 ffmpeg\-protocols \- FFmpeg protocols
|
yading@10
|
134 .SH "DESCRIPTION"
|
yading@10
|
135 .IX Header "DESCRIPTION"
|
yading@10
|
136 This document describes the input and output protocols provided by the
|
yading@10
|
137 libavformat library.
|
yading@10
|
138 .SH "PROTOCOLS"
|
yading@10
|
139 .IX Header "PROTOCOLS"
|
yading@10
|
140 Protocols are configured elements in FFmpeg which allow to access
|
yading@10
|
141 resources which require the use of a particular protocol.
|
yading@10
|
142 .PP
|
yading@10
|
143 When you configure your FFmpeg build, all the supported protocols are
|
yading@10
|
144 enabled by default. You can list all available ones using the
|
yading@10
|
145 configure option \*(L"\-\-list\-protocols\*(R".
|
yading@10
|
146 .PP
|
yading@10
|
147 You can disable all the protocols using the configure option
|
yading@10
|
148 \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the
|
yading@10
|
149 option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a
|
yading@10
|
150 particular protocol using the option
|
yading@10
|
151 \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR".
|
yading@10
|
152 .PP
|
yading@10
|
153 The option \*(L"\-protocols\*(R" of the ff* tools will display the list of
|
yading@10
|
154 supported protocols.
|
yading@10
|
155 .PP
|
yading@10
|
156 A description of the currently available protocols follows.
|
yading@10
|
157 .SS "bluray"
|
yading@10
|
158 .IX Subsection "bluray"
|
yading@10
|
159 Read BluRay playlist.
|
yading@10
|
160 .PP
|
yading@10
|
161 The accepted options are:
|
yading@10
|
162 .IP "\fBangle\fR" 4
|
yading@10
|
163 .IX Item "angle"
|
yading@10
|
164 BluRay angle
|
yading@10
|
165 .IP "\fBchapter\fR" 4
|
yading@10
|
166 .IX Item "chapter"
|
yading@10
|
167 Start chapter (1...N)
|
yading@10
|
168 .IP "\fBplaylist\fR" 4
|
yading@10
|
169 .IX Item "playlist"
|
yading@10
|
170 Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls)
|
yading@10
|
171 .PP
|
yading@10
|
172 Examples:
|
yading@10
|
173 .PP
|
yading@10
|
174 Read longest playlist from BluRay mounted to /mnt/bluray:
|
yading@10
|
175 .PP
|
yading@10
|
176 .Vb 1
|
yading@10
|
177 \& bluray:/mnt/bluray
|
yading@10
|
178 .Ve
|
yading@10
|
179 .PP
|
yading@10
|
180 Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
|
yading@10
|
181 .PP
|
yading@10
|
182 .Vb 1
|
yading@10
|
183 \& \-playlist 4 \-angle 2 \-chapter 2 bluray:/mnt/bluray
|
yading@10
|
184 .Ve
|
yading@10
|
185 .SS "concat"
|
yading@10
|
186 .IX Subsection "concat"
|
yading@10
|
187 Physical concatenation protocol.
|
yading@10
|
188 .PP
|
yading@10
|
189 Allow to read and seek from many resource in sequence as if they were
|
yading@10
|
190 a unique resource.
|
yading@10
|
191 .PP
|
yading@10
|
192 A \s-1URL\s0 accepted by this protocol has the syntax:
|
yading@10
|
193 .PP
|
yading@10
|
194 .Vb 1
|
yading@10
|
195 \& concat:<URL1>|<URL2>|...|<URLN>
|
yading@10
|
196 .Ve
|
yading@10
|
197 .PP
|
yading@10
|
198 where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the
|
yading@10
|
199 resource to be concatenated, each one possibly specifying a distinct
|
yading@10
|
200 protocol.
|
yading@10
|
201 .PP
|
yading@10
|
202 For example to read a sequence of files \fIsplit1.mpeg\fR,
|
yading@10
|
203 \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the
|
yading@10
|
204 command:
|
yading@10
|
205 .PP
|
yading@10
|
206 .Vb 1
|
yading@10
|
207 \& ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg
|
yading@10
|
208 .Ve
|
yading@10
|
209 .PP
|
yading@10
|
210 Note that you may need to escape the character \*(L"|\*(R" which is special for
|
yading@10
|
211 many shells.
|
yading@10
|
212 .SS "data"
|
yading@10
|
213 .IX Subsection "data"
|
yading@10
|
214 Data in-line in the \s-1URI\s0. See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>.
|
yading@10
|
215 .PP
|
yading@10
|
216 For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR:
|
yading@10
|
217 .PP
|
yading@10
|
218 .Vb 1
|
yading@10
|
219 \& ffmpeg \-i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
|
yading@10
|
220 .Ve
|
yading@10
|
221 .SS "file"
|
yading@10
|
222 .IX Subsection "file"
|
yading@10
|
223 File access protocol.
|
yading@10
|
224 .PP
|
yading@10
|
225 Allow to read from or read to a file.
|
yading@10
|
226 .PP
|
yading@10
|
227 For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR
|
yading@10
|
228 use the command:
|
yading@10
|
229 .PP
|
yading@10
|
230 .Vb 1
|
yading@10
|
231 \& ffmpeg \-i file:input.mpeg output.mpeg
|
yading@10
|
232 .Ve
|
yading@10
|
233 .PP
|
yading@10
|
234 The ff* tools default to the file protocol, that is a resource
|
yading@10
|
235 specified with the name \*(L"\s-1FILE\s0.mpeg\*(R" is interpreted as the \s-1URL\s0
|
yading@10
|
236 \&\*(L"file:FILE.mpeg\*(R".
|
yading@10
|
237 .SS "gopher"
|
yading@10
|
238 .IX Subsection "gopher"
|
yading@10
|
239 Gopher protocol.
|
yading@10
|
240 .SS "hls"
|
yading@10
|
241 .IX Subsection "hls"
|
yading@10
|
242 Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as
|
yading@10
|
243 a uniform one. The M3U8 playlists describing the segments can be
|
yading@10
|
244 remote \s-1HTTP\s0 resources or local files, accessed using the standard
|
yading@10
|
245 file protocol.
|
yading@10
|
246 The nested protocol is declared by specifying
|
yading@10
|
247 "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR
|
yading@10
|
248 is either \*(L"file\*(R" or \*(L"http\*(R".
|
yading@10
|
249 .PP
|
yading@10
|
250 .Vb 2
|
yading@10
|
251 \& hls+http://host/path/to/remote/resource.m3u8
|
yading@10
|
252 \& hls+file://path/to/local/resource.m3u8
|
yading@10
|
253 .Ve
|
yading@10
|
254 .PP
|
yading@10
|
255 Using this protocol is discouraged \- the hls demuxer should work
|
yading@10
|
256 just as well (if not, please report the issues) and is more complete.
|
yading@10
|
257 To use the hls demuxer instead, simply use the direct URLs to the
|
yading@10
|
258 m3u8 files.
|
yading@10
|
259 .SS "http"
|
yading@10
|
260 .IX Subsection "http"
|
yading@10
|
261 \&\s-1HTTP\s0 (Hyper Text Transfer Protocol).
|
yading@10
|
262 .PP
|
yading@10
|
263 This protocol accepts the following options.
|
yading@10
|
264 .IP "\fBseekable\fR" 4
|
yading@10
|
265 .IX Item "seekable"
|
yading@10
|
266 Control seekability of connection. If set to 1 the resource is
|
yading@10
|
267 supposed to be seekable, if set to 0 it is assumed not to be seekable,
|
yading@10
|
268 if set to \-1 it will try to autodetect if it is seekable. Default
|
yading@10
|
269 value is \-1.
|
yading@10
|
270 .IP "\fBchunked_post\fR" 4
|
yading@10
|
271 .IX Item "chunked_post"
|
yading@10
|
272 If set to 1 use chunked transfer-encoding for posts, default is 1.
|
yading@10
|
273 .IP "\fBheaders\fR" 4
|
yading@10
|
274 .IX Item "headers"
|
yading@10
|
275 Set custom \s-1HTTP\s0 headers, can override built in default headers. The
|
yading@10
|
276 value must be a string encoding the headers.
|
yading@10
|
277 .IP "\fBcontent_type\fR" 4
|
yading@10
|
278 .IX Item "content_type"
|
yading@10
|
279 Force a content type.
|
yading@10
|
280 .IP "\fBuser-agent\fR" 4
|
yading@10
|
281 .IX Item "user-agent"
|
yading@10
|
282 Override User-Agent header. If not specified the protocol will use a
|
yading@10
|
283 string describing the libavformat build.
|
yading@10
|
284 .IP "\fBmultiple_requests\fR" 4
|
yading@10
|
285 .IX Item "multiple_requests"
|
yading@10
|
286 Use persistent connections if set to 1. By default it is 0.
|
yading@10
|
287 .IP "\fBpost_data\fR" 4
|
yading@10
|
288 .IX Item "post_data"
|
yading@10
|
289 Set custom \s-1HTTP\s0 post data.
|
yading@10
|
290 .IP "\fBtimeout\fR" 4
|
yading@10
|
291 .IX Item "timeout"
|
yading@10
|
292 Set timeout of socket I/O operations used by the underlying low level
|
yading@10
|
293 operation. By default it is set to \-1, which means that the timeout is
|
yading@10
|
294 not specified.
|
yading@10
|
295 .IP "\fBmime_type\fR" 4
|
yading@10
|
296 .IX Item "mime_type"
|
yading@10
|
297 Set \s-1MIME\s0 type.
|
yading@10
|
298 .IP "\fBcookies\fR" 4
|
yading@10
|
299 .IX Item "cookies"
|
yading@10
|
300 Set the cookies to be sent in future requests. The format of each cookie is the
|
yading@10
|
301 same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be
|
yading@10
|
302 delimited by a newline character.
|
yading@10
|
303 .PP
|
yading@10
|
304 \fI\s-1HTTP\s0 Cookies\fR
|
yading@10
|
305 .IX Subsection "HTTP Cookies"
|
yading@10
|
306 .PP
|
yading@10
|
307 Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the
|
yading@10
|
308 request. The \fBcookies\fR option allows these cookies to be specified. At
|
yading@10
|
309 the very least, each cookie must specify a value along with a path and domain.
|
yading@10
|
310 \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the
|
yading@10
|
311 cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited
|
yading@10
|
312 by a newline.
|
yading@10
|
313 .PP
|
yading@10
|
314 The required syntax to play a stream specifying a cookie is:
|
yading@10
|
315 .PP
|
yading@10
|
316 .Vb 1
|
yading@10
|
317 \& ffplay \-cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
|
yading@10
|
318 .Ve
|
yading@10
|
319 .SS "mmst"
|
yading@10
|
320 .IX Subsection "mmst"
|
yading@10
|
321 \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0.
|
yading@10
|
322 .SS "mmsh"
|
yading@10
|
323 .IX Subsection "mmsh"
|
yading@10
|
324 \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0.
|
yading@10
|
325 .PP
|
yading@10
|
326 The required syntax is:
|
yading@10
|
327 .PP
|
yading@10
|
328 .Vb 1
|
yading@10
|
329 \& mmsh://<server>[:<port>][/<app>][/<playpath>]
|
yading@10
|
330 .Ve
|
yading@10
|
331 .SS "md5"
|
yading@10
|
332 .IX Subsection "md5"
|
yading@10
|
333 \&\s-1MD5\s0 output protocol.
|
yading@10
|
334 .PP
|
yading@10
|
335 Computes the \s-1MD5\s0 hash of the data to be written, and on close writes
|
yading@10
|
336 this to the designated output or stdout if none is specified. It can
|
yading@10
|
337 be used to test muxers without writing an actual file.
|
yading@10
|
338 .PP
|
yading@10
|
339 Some examples follow.
|
yading@10
|
340 .PP
|
yading@10
|
341 .Vb 2
|
yading@10
|
342 \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
|
yading@10
|
343 \& ffmpeg \-i input.flv \-f avi \-y md5:output.avi.md5
|
yading@10
|
344 \&
|
yading@10
|
345 \& # Write the MD5 hash of the encoded AVI file to stdout.
|
yading@10
|
346 \& ffmpeg \-i input.flv \-f avi \-y md5:
|
yading@10
|
347 .Ve
|
yading@10
|
348 .PP
|
yading@10
|
349 Note that some formats (typically \s-1MOV\s0) require the output protocol to
|
yading@10
|
350 be seekable, so they will fail with the \s-1MD5\s0 output protocol.
|
yading@10
|
351 .SS "pipe"
|
yading@10
|
352 .IX Subsection "pipe"
|
yading@10
|
353 \&\s-1UNIX\s0 pipe access protocol.
|
yading@10
|
354 .PP
|
yading@10
|
355 Allow to read and write from \s-1UNIX\s0 pipes.
|
yading@10
|
356 .PP
|
yading@10
|
357 The accepted syntax is:
|
yading@10
|
358 .PP
|
yading@10
|
359 .Vb 1
|
yading@10
|
360 \& pipe:[<number>]
|
yading@10
|
361 .Ve
|
yading@10
|
362 .PP
|
yading@10
|
363 \&\fInumber\fR is the number corresponding to the file descriptor of the
|
yading@10
|
364 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR
|
yading@10
|
365 is not specified, by default the stdout file descriptor will be used
|
yading@10
|
366 for writing, stdin for reading.
|
yading@10
|
367 .PP
|
yading@10
|
368 For example to read from stdin with \fBffmpeg\fR:
|
yading@10
|
369 .PP
|
yading@10
|
370 .Vb 3
|
yading@10
|
371 \& cat test.wav | ffmpeg \-i pipe:0
|
yading@10
|
372 \& # ...this is the same as...
|
yading@10
|
373 \& cat test.wav | ffmpeg \-i pipe:
|
yading@10
|
374 .Ve
|
yading@10
|
375 .PP
|
yading@10
|
376 For writing to stdout with \fBffmpeg\fR:
|
yading@10
|
377 .PP
|
yading@10
|
378 .Vb 3
|
yading@10
|
379 \& ffmpeg \-i test.wav \-f avi pipe:1 | cat > test.avi
|
yading@10
|
380 \& # ...this is the same as...
|
yading@10
|
381 \& ffmpeg \-i test.wav \-f avi pipe: | cat > test.avi
|
yading@10
|
382 .Ve
|
yading@10
|
383 .PP
|
yading@10
|
384 Note that some formats (typically \s-1MOV\s0), require the output protocol to
|
yading@10
|
385 be seekable, so they will fail with the pipe output protocol.
|
yading@10
|
386 .SS "rtmp"
|
yading@10
|
387 .IX Subsection "rtmp"
|
yading@10
|
388 Real-Time Messaging Protocol.
|
yading@10
|
389 .PP
|
yading@10
|
390 The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia
|
yading@10
|
391 content across a \s-1TCP/IP\s0 network.
|
yading@10
|
392 .PP
|
yading@10
|
393 The required syntax is:
|
yading@10
|
394 .PP
|
yading@10
|
395 .Vb 1
|
yading@10
|
396 \& rtmp://<server>[:<port>][/<app>][/<instance>][/<playpath>]
|
yading@10
|
397 .Ve
|
yading@10
|
398 .PP
|
yading@10
|
399 The accepted parameters are:
|
yading@10
|
400 .IP "\fBserver\fR" 4
|
yading@10
|
401 .IX Item "server"
|
yading@10
|
402 The address of the \s-1RTMP\s0 server.
|
yading@10
|
403 .IP "\fBport\fR" 4
|
yading@10
|
404 .IX Item "port"
|
yading@10
|
405 The number of the \s-1TCP\s0 port to use (by default is 1935).
|
yading@10
|
406 .IP "\fBapp\fR" 4
|
yading@10
|
407 .IX Item "app"
|
yading@10
|
408 It is the name of the application to access. It usually corresponds to
|
yading@10
|
409 the path where the application is installed on the \s-1RTMP\s0 server
|
yading@10
|
410 (e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). You can override
|
yading@10
|
411 the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too.
|
yading@10
|
412 .IP "\fBplaypath\fR" 4
|
yading@10
|
413 .IX Item "playpath"
|
yading@10
|
414 It is the path or name of the resource to play with reference to the
|
yading@10
|
415 application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". You
|
yading@10
|
416 can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR
|
yading@10
|
417 option, too.
|
yading@10
|
418 .IP "\fBlisten\fR" 4
|
yading@10
|
419 .IX Item "listen"
|
yading@10
|
420 Act as a server, listening for an incoming connection.
|
yading@10
|
421 .IP "\fBtimeout\fR" 4
|
yading@10
|
422 .IX Item "timeout"
|
yading@10
|
423 Maximum time to wait for the incoming connection. Implies listen.
|
yading@10
|
424 .PP
|
yading@10
|
425 Additionally, the following parameters can be set via command line options
|
yading@10
|
426 (or in code via \f(CW\*(C`AVOption\*(C'\fRs):
|
yading@10
|
427 .IP "\fBrtmp_app\fR" 4
|
yading@10
|
428 .IX Item "rtmp_app"
|
yading@10
|
429 Name of application to connect on the \s-1RTMP\s0 server. This option
|
yading@10
|
430 overrides the parameter specified in the \s-1URI\s0.
|
yading@10
|
431 .IP "\fBrtmp_buffer\fR" 4
|
yading@10
|
432 .IX Item "rtmp_buffer"
|
yading@10
|
433 Set the client buffer time in milliseconds. The default is 3000.
|
yading@10
|
434 .IP "\fBrtmp_conn\fR" 4
|
yading@10
|
435 .IX Item "rtmp_conn"
|
yading@10
|
436 Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string,
|
yading@10
|
437 e.g. like \f(CW\*(C`B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0\*(C'\fR.
|
yading@10
|
438 Each value is prefixed by a single character denoting the type,
|
yading@10
|
439 B for Boolean, N for number, S for string, O for object, or Z for null,
|
yading@10
|
440 followed by a colon. For Booleans the data must be either 0 or 1 for
|
yading@10
|
441 \&\s-1FALSE\s0 or \s-1TRUE\s0, respectively. Likewise for Objects the data must be 0 or
|
yading@10
|
442 1 to end or begin an object, respectively. Data items in subobjects may
|
yading@10
|
443 be named, by prefixing the type with 'N' and specifying the name before
|
yading@10
|
444 the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple
|
yading@10
|
445 times to construct arbitrary \s-1AMF\s0 sequences.
|
yading@10
|
446 .IP "\fBrtmp_flashver\fR" 4
|
yading@10
|
447 .IX Item "rtmp_flashver"
|
yading@10
|
448 Version of the Flash plugin used to run the \s-1SWF\s0 player. The default
|
yading@10
|
449 is \s-1LNX\s0 9,0,124,2.
|
yading@10
|
450 .IP "\fBrtmp_flush_interval\fR" 4
|
yading@10
|
451 .IX Item "rtmp_flush_interval"
|
yading@10
|
452 Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default
|
yading@10
|
453 is 10.
|
yading@10
|
454 .IP "\fBrtmp_live\fR" 4
|
yading@10
|
455 .IX Item "rtmp_live"
|
yading@10
|
456 Specify that the media is a live stream. No resuming or seeking in
|
yading@10
|
457 live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the
|
yading@10
|
458 subscriber first tries to play the live stream specified in the
|
yading@10
|
459 playpath. If a live stream of that name is not found, it plays the
|
yading@10
|
460 recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and
|
yading@10
|
461 \&\f(CW\*(C`recorded\*(C'\fR.
|
yading@10
|
462 .IP "\fBrtmp_pageurl\fR" 4
|
yading@10
|
463 .IX Item "rtmp_pageurl"
|
yading@10
|
464 \&\s-1URL\s0 of the web page in which the media was embedded. By default no
|
yading@10
|
465 value will be sent.
|
yading@10
|
466 .IP "\fBrtmp_playpath\fR" 4
|
yading@10
|
467 .IX Item "rtmp_playpath"
|
yading@10
|
468 Stream identifier to play or to publish. This option overrides the
|
yading@10
|
469 parameter specified in the \s-1URI\s0.
|
yading@10
|
470 .IP "\fBrtmp_subscribe\fR" 4
|
yading@10
|
471 .IX Item "rtmp_subscribe"
|
yading@10
|
472 Name of live stream to subscribe to. By default no value will be sent.
|
yading@10
|
473 It is only sent if the option is specified or if rtmp_live
|
yading@10
|
474 is set to live.
|
yading@10
|
475 .IP "\fBrtmp_swfhash\fR" 4
|
yading@10
|
476 .IX Item "rtmp_swfhash"
|
yading@10
|
477 \&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes).
|
yading@10
|
478 .IP "\fBrtmp_swfsize\fR" 4
|
yading@10
|
479 .IX Item "rtmp_swfsize"
|
yading@10
|
480 Size of the decompressed \s-1SWF\s0 file, required for SWFVerification.
|
yading@10
|
481 .IP "\fBrtmp_swfurl\fR" 4
|
yading@10
|
482 .IX Item "rtmp_swfurl"
|
yading@10
|
483 \&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent.
|
yading@10
|
484 .IP "\fBrtmp_swfverify\fR" 4
|
yading@10
|
485 .IX Item "rtmp_swfverify"
|
yading@10
|
486 \&\s-1URL\s0 to player swf file, compute hash/size automatically.
|
yading@10
|
487 .IP "\fBrtmp_tcurl\fR" 4
|
yading@10
|
488 .IX Item "rtmp_tcurl"
|
yading@10
|
489 \&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app.
|
yading@10
|
490 .PP
|
yading@10
|
491 For example to read with \fBffplay\fR a multimedia resource named
|
yading@10
|
492 \&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R":
|
yading@10
|
493 .PP
|
yading@10
|
494 .Vb 1
|
yading@10
|
495 \& ffplay rtmp://myserver/vod/sample
|
yading@10
|
496 .Ve
|
yading@10
|
497 .SS "rtmpe"
|
yading@10
|
498 .IX Subsection "rtmpe"
|
yading@10
|
499 Encrypted Real-Time Messaging Protocol.
|
yading@10
|
500 .PP
|
yading@10
|
501 The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for
|
yading@10
|
502 streaming multimedia content within standard cryptographic primitives,
|
yading@10
|
503 consisting of Diffie-Hellman key exchange and \s-1HMACSHA256\s0, generating
|
yading@10
|
504 a pair of \s-1RC4\s0 keys.
|
yading@10
|
505 .SS "rtmps"
|
yading@10
|
506 .IX Subsection "rtmps"
|
yading@10
|
507 Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection.
|
yading@10
|
508 .PP
|
yading@10
|
509 The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming
|
yading@10
|
510 multimedia content across an encrypted connection.
|
yading@10
|
511 .SS "rtmpt"
|
yading@10
|
512 .IX Subsection "rtmpt"
|
yading@10
|
513 Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
|
yading@10
|
514 .PP
|
yading@10
|
515 The Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPT\s0) is used
|
yading@10
|
516 for streaming multimedia content within \s-1HTTP\s0 requests to traverse
|
yading@10
|
517 firewalls.
|
yading@10
|
518 .SS "rtmpte"
|
yading@10
|
519 .IX Subsection "rtmpte"
|
yading@10
|
520 Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
|
yading@10
|
521 .PP
|
yading@10
|
522 The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPTE\s0)
|
yading@10
|
523 is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse
|
yading@10
|
524 firewalls.
|
yading@10
|
525 .SS "rtmpts"
|
yading@10
|
526 .IX Subsection "rtmpts"
|
yading@10
|
527 Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0.
|
yading@10
|
528 .PP
|
yading@10
|
529 The Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0 (\s-1RTMPTS\s0) is used
|
yading@10
|
530 for streaming multimedia content within \s-1HTTPS\s0 requests to traverse
|
yading@10
|
531 firewalls.
|
yading@10
|
532 .SS "rtmp, rtmpe, rtmps, rtmpt, rtmpte"
|
yading@10
|
533 .IX Subsection "rtmp, rtmpe, rtmps, rtmpt, rtmpte"
|
yading@10
|
534 Real-Time Messaging Protocol and its variants supported through
|
yading@10
|
535 librtmp.
|
yading@10
|
536 .PP
|
yading@10
|
537 Requires the presence of the librtmp headers and library during
|
yading@10
|
538 configuration. You need to explicitly configure the build with
|
yading@10
|
539 \&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0
|
yading@10
|
540 protocol.
|
yading@10
|
541 .PP
|
yading@10
|
542 This protocol provides most client functions and a few server
|
yading@10
|
543 functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0),
|
yading@10
|
544 encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled
|
yading@10
|
545 variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0).
|
yading@10
|
546 .PP
|
yading@10
|
547 The required syntax is:
|
yading@10
|
548 .PP
|
yading@10
|
549 .Vb 1
|
yading@10
|
550 \& <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
|
yading@10
|
551 .Ve
|
yading@10
|
552 .PP
|
yading@10
|
553 where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R",
|
yading@10
|
554 \&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and
|
yading@10
|
555 \&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same
|
yading@10
|
556 meaning as specified for the \s-1RTMP\s0 native protocol.
|
yading@10
|
557 \&\fIoptions\fR contains a list of space-separated options of the form
|
yading@10
|
558 \&\fIkey\fR=\fIval\fR.
|
yading@10
|
559 .PP
|
yading@10
|
560 See the librtmp manual page (man 3 librtmp) for more information.
|
yading@10
|
561 .PP
|
yading@10
|
562 For example, to stream a file in real-time to an \s-1RTMP\s0 server using
|
yading@10
|
563 \&\fBffmpeg\fR:
|
yading@10
|
564 .PP
|
yading@10
|
565 .Vb 1
|
yading@10
|
566 \& ffmpeg \-re \-i myfile \-f flv rtmp://myserver/live/mystream
|
yading@10
|
567 .Ve
|
yading@10
|
568 .PP
|
yading@10
|
569 To play the same stream using \fBffplay\fR:
|
yading@10
|
570 .PP
|
yading@10
|
571 .Vb 1
|
yading@10
|
572 \& ffplay "rtmp://myserver/live/mystream live=1"
|
yading@10
|
573 .Ve
|
yading@10
|
574 .SS "rtp"
|
yading@10
|
575 .IX Subsection "rtp"
|
yading@10
|
576 Real-Time Protocol.
|
yading@10
|
577 .SS "rtsp"
|
yading@10
|
578 .IX Subsection "rtsp"
|
yading@10
|
579 \&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer
|
yading@10
|
580 and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred
|
yading@10
|
581 over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
|
yading@10
|
582 data transferred over \s-1RDT\s0).
|
yading@10
|
583 .PP
|
yading@10
|
584 The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server
|
yading@10
|
585 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
yading@10
|
586 <\fBhttp://github.com/revmischa/rtsp\-server\fR>).
|
yading@10
|
587 .PP
|
yading@10
|
588 The required syntax for a \s-1RTSP\s0 url is:
|
yading@10
|
589 .PP
|
yading@10
|
590 .Vb 1
|
yading@10
|
591 \& rtsp://<hostname>[:<port>]/<path>
|
yading@10
|
592 .Ve
|
yading@10
|
593 .PP
|
yading@10
|
594 The following options (set on the \fBffmpeg\fR/\fBffplay\fR command
|
yading@10
|
595 line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in \f(CW\*(C`avformat_open_input\*(C'\fR),
|
yading@10
|
596 are supported:
|
yading@10
|
597 .PP
|
yading@10
|
598 Flags for \f(CW\*(C`rtsp_transport\*(C'\fR:
|
yading@10
|
599 .IP "\fBudp\fR" 4
|
yading@10
|
600 .IX Item "udp"
|
yading@10
|
601 Use \s-1UDP\s0 as lower transport protocol.
|
yading@10
|
602 .IP "\fBtcp\fR" 4
|
yading@10
|
603 .IX Item "tcp"
|
yading@10
|
604 Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower
|
yading@10
|
605 transport protocol.
|
yading@10
|
606 .IP "\fBudp_multicast\fR" 4
|
yading@10
|
607 .IX Item "udp_multicast"
|
yading@10
|
608 Use \s-1UDP\s0 multicast as lower transport protocol.
|
yading@10
|
609 .IP "\fBhttp\fR" 4
|
yading@10
|
610 .IX Item "http"
|
yading@10
|
611 Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for
|
yading@10
|
612 passing proxies.
|
yading@10
|
613 .PP
|
yading@10
|
614 Multiple lower transport protocols may be specified, in that case they are
|
yading@10
|
615 tried one at a time (if the setup of one fails, the next one is tried).
|
yading@10
|
616 For the muxer, only the \f(CW\*(C`tcp\*(C'\fR and \f(CW\*(C`udp\*(C'\fR options are supported.
|
yading@10
|
617 .PP
|
yading@10
|
618 Flags for \f(CW\*(C`rtsp_flags\*(C'\fR:
|
yading@10
|
619 .IP "\fBfilter_src\fR" 4
|
yading@10
|
620 .IX Item "filter_src"
|
yading@10
|
621 Accept packets only from negotiated peer address and port.
|
yading@10
|
622 .IP "\fBlisten\fR" 4
|
yading@10
|
623 .IX Item "listen"
|
yading@10
|
624 Act as a server, listening for an incoming connection.
|
yading@10
|
625 .PP
|
yading@10
|
626 When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets
|
yading@10
|
627 (since they may arrive out of order, or packets may get lost totally). This
|
yading@10
|
628 can be disabled by setting the maximum demuxing delay to zero (via
|
yading@10
|
629 the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext).
|
yading@10
|
630 .PP
|
yading@10
|
631 When watching multi-bitrate Real-RTSP streams with \fBffplay\fR, the
|
yading@10
|
632 streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and
|
yading@10
|
633 \&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched
|
yading@10
|
634 on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR.
|
yading@10
|
635 .PP
|
yading@10
|
636 Example command lines:
|
yading@10
|
637 .PP
|
yading@10
|
638 To watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds:
|
yading@10
|
639 .PP
|
yading@10
|
640 .Vb 1
|
yading@10
|
641 \& ffplay \-max_delay 500000 \-rtsp_transport udp rtsp://server/video.mp4
|
yading@10
|
642 .Ve
|
yading@10
|
643 .PP
|
yading@10
|
644 To watch a stream tunneled over \s-1HTTP:\s0
|
yading@10
|
645 .PP
|
yading@10
|
646 .Vb 1
|
yading@10
|
647 \& ffplay \-rtsp_transport http rtsp://server/video.mp4
|
yading@10
|
648 .Ve
|
yading@10
|
649 .PP
|
yading@10
|
650 To send a stream in realtime to a \s-1RTSP\s0 server, for others to watch:
|
yading@10
|
651 .PP
|
yading@10
|
652 .Vb 1
|
yading@10
|
653 \& ffmpeg \-re \-i <input> \-f rtsp \-muxdelay 0.1 rtsp://server/live.sdp
|
yading@10
|
654 .Ve
|
yading@10
|
655 .PP
|
yading@10
|
656 To receive a stream in realtime:
|
yading@10
|
657 .PP
|
yading@10
|
658 .Vb 1
|
yading@10
|
659 \& ffmpeg \-rtsp_flags listen \-i rtsp://ownaddress/live.sdp <output>
|
yading@10
|
660 .Ve
|
yading@10
|
661 .IP "\fBstimeout\fR" 4
|
yading@10
|
662 .IX Item "stimeout"
|
yading@10
|
663 Socket \s-1IO\s0 timeout in micro seconds.
|
yading@10
|
664 .SS "sap"
|
yading@10
|
665 .IX Subsection "sap"
|
yading@10
|
666 Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a
|
yading@10
|
667 protocol handler in libavformat, it is a muxer and demuxer.
|
yading@10
|
668 It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the
|
yading@10
|
669 streams regularly on a separate port.
|
yading@10
|
670 .PP
|
yading@10
|
671 \fIMuxer\fR
|
yading@10
|
672 .IX Subsection "Muxer"
|
yading@10
|
673 .PP
|
yading@10
|
674 The syntax for a \s-1SAP\s0 url given to the muxer is:
|
yading@10
|
675 .PP
|
yading@10
|
676 .Vb 1
|
yading@10
|
677 \& sap://<destination>[:<port>][?<options>]
|
yading@10
|
678 .Ve
|
yading@10
|
679 .PP
|
yading@10
|
680 The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR,
|
yading@10
|
681 or to port 5004 if no port is specified.
|
yading@10
|
682 \&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options
|
yading@10
|
683 are supported:
|
yading@10
|
684 .IP "\fBannounce_addr=\fR\fIaddress\fR" 4
|
yading@10
|
685 .IX Item "announce_addr=address"
|
yading@10
|
686 Specify the destination \s-1IP\s0 address for sending the announcements to.
|
yading@10
|
687 If omitted, the announcements are sent to the commonly used \s-1SAP\s0
|
yading@10
|
688 announcement multicast address 224.2.127.254 (sap.mcast.net), or
|
yading@10
|
689 ff0e::2:7ffe if \fIdestination\fR is an IPv6 address.
|
yading@10
|
690 .IP "\fBannounce_port=\fR\fIport\fR" 4
|
yading@10
|
691 .IX Item "announce_port=port"
|
yading@10
|
692 Specify the port to send the announcements on, defaults to
|
yading@10
|
693 9875 if not specified.
|
yading@10
|
694 .IP "\fBttl=\fR\fIttl\fR" 4
|
yading@10
|
695 .IX Item "ttl=ttl"
|
yading@10
|
696 Specify the time to live value for the announcements and \s-1RTP\s0 packets,
|
yading@10
|
697 defaults to 255.
|
yading@10
|
698 .IP "\fBsame_port=\fR\fI0|1\fR" 4
|
yading@10
|
699 .IX Item "same_port=0|1"
|
yading@10
|
700 If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the
|
yading@10
|
701 default), all streams are sent on unique ports, with each stream on a
|
yading@10
|
702 port 2 numbers higher than the previous.
|
yading@10
|
703 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
|
yading@10
|
704 The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent
|
yading@10
|
705 on unique ports.
|
yading@10
|
706 .PP
|
yading@10
|
707 Example command lines follow.
|
yading@10
|
708 .PP
|
yading@10
|
709 To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0
|
yading@10
|
710 .PP
|
yading@10
|
711 .Vb 1
|
yading@10
|
712 \& ffmpeg \-re \-i <input> \-f sap sap://224.0.0.255?same_port=1
|
yading@10
|
713 .Ve
|
yading@10
|
714 .PP
|
yading@10
|
715 Similarly, for watching in \fBffplay\fR:
|
yading@10
|
716 .PP
|
yading@10
|
717 .Vb 1
|
yading@10
|
718 \& ffmpeg \-re \-i <input> \-f sap sap://224.0.0.255
|
yading@10
|
719 .Ve
|
yading@10
|
720 .PP
|
yading@10
|
721 And for watching in \fBffplay\fR, over IPv6:
|
yading@10
|
722 .PP
|
yading@10
|
723 .Vb 1
|
yading@10
|
724 \& ffmpeg \-re \-i <input> \-f sap sap://[ff0e::1:2:3:4]
|
yading@10
|
725 .Ve
|
yading@10
|
726 .PP
|
yading@10
|
727 \fIDemuxer\fR
|
yading@10
|
728 .IX Subsection "Demuxer"
|
yading@10
|
729 .PP
|
yading@10
|
730 The syntax for a \s-1SAP\s0 url given to the demuxer is:
|
yading@10
|
731 .PP
|
yading@10
|
732 .Vb 1
|
yading@10
|
733 \& sap://[<address>][:<port>]
|
yading@10
|
734 .Ve
|
yading@10
|
735 .PP
|
yading@10
|
736 \&\fIaddress\fR is the multicast address to listen for announcements on,
|
yading@10
|
737 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR
|
yading@10
|
738 is the port that is listened on, 9875 if omitted.
|
yading@10
|
739 .PP
|
yading@10
|
740 The demuxers listens for announcements on the given address and port.
|
yading@10
|
741 Once an announcement is received, it tries to receive that particular stream.
|
yading@10
|
742 .PP
|
yading@10
|
743 Example command lines follow.
|
yading@10
|
744 .PP
|
yading@10
|
745 To play back the first stream announced on the normal \s-1SAP\s0 multicast address:
|
yading@10
|
746 .PP
|
yading@10
|
747 .Vb 1
|
yading@10
|
748 \& ffplay sap://
|
yading@10
|
749 .Ve
|
yading@10
|
750 .PP
|
yading@10
|
751 To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address:
|
yading@10
|
752 .PP
|
yading@10
|
753 .Vb 1
|
yading@10
|
754 \& ffplay sap://[ff0e::2:7ffe]
|
yading@10
|
755 .Ve
|
yading@10
|
756 .SS "tcp"
|
yading@10
|
757 .IX Subsection "tcp"
|
yading@10
|
758 Trasmission Control Protocol.
|
yading@10
|
759 .PP
|
yading@10
|
760 The required syntax for a \s-1TCP\s0 url is:
|
yading@10
|
761 .PP
|
yading@10
|
762 .Vb 1
|
yading@10
|
763 \& tcp://<hostname>:<port>[?<options>]
|
yading@10
|
764 .Ve
|
yading@10
|
765 .IP "\fBlisten\fR" 4
|
yading@10
|
766 .IX Item "listen"
|
yading@10
|
767 Listen for an incoming connection
|
yading@10
|
768 .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
|
yading@10
|
769 .IX Item "timeout=microseconds"
|
yading@10
|
770 In read mode: if no data arrived in more than this time interval, raise error.
|
yading@10
|
771 In write mode: if socket cannot be written in more than this time interval, raise error.
|
yading@10
|
772 This also sets timeout on \s-1TCP\s0 connection establishing.
|
yading@10
|
773 .Sp
|
yading@10
|
774 .Vb 2
|
yading@10
|
775 \& ffmpeg \-i <input> \-f <format> tcp://<hostname>:<port>?listen
|
yading@10
|
776 \& ffplay tcp://<hostname>:<port>
|
yading@10
|
777 .Ve
|
yading@10
|
778 .SS "tls"
|
yading@10
|
779 .IX Subsection "tls"
|
yading@10
|
780 Transport Layer Security/Secure Sockets Layer
|
yading@10
|
781 .PP
|
yading@10
|
782 The required syntax for a \s-1TLS/SSL\s0 url is:
|
yading@10
|
783 .PP
|
yading@10
|
784 .Vb 1
|
yading@10
|
785 \& tls://<hostname>:<port>[?<options>]
|
yading@10
|
786 .Ve
|
yading@10
|
787 .IP "\fBlisten\fR" 4
|
yading@10
|
788 .IX Item "listen"
|
yading@10
|
789 Act as a server, listening for an incoming connection.
|
yading@10
|
790 .IP "\fBcafile=\fR\fIfilename\fR" 4
|
yading@10
|
791 .IX Item "cafile=filename"
|
yading@10
|
792 Certificate authority file. The file must be in OpenSSL \s-1PEM\s0 format.
|
yading@10
|
793 .IP "\fBcert=\fR\fIfilename\fR" 4
|
yading@10
|
794 .IX Item "cert=filename"
|
yading@10
|
795 Certificate file. The file must be in OpenSSL \s-1PEM\s0 format.
|
yading@10
|
796 .IP "\fBkey=\fR\fIfilename\fR" 4
|
yading@10
|
797 .IX Item "key=filename"
|
yading@10
|
798 Private key file.
|
yading@10
|
799 .IP "\fBverify=\fR\fI0|1\fR" 4
|
yading@10
|
800 .IX Item "verify=0|1"
|
yading@10
|
801 Verify the peer's certificate.
|
yading@10
|
802 .PP
|
yading@10
|
803 Example command lines:
|
yading@10
|
804 .PP
|
yading@10
|
805 To create a \s-1TLS/SSL\s0 server that serves an input stream.
|
yading@10
|
806 .PP
|
yading@10
|
807 .Vb 1
|
yading@10
|
808 \& ffmpeg \-i <input> \-f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
|
yading@10
|
809 .Ve
|
yading@10
|
810 .PP
|
yading@10
|
811 To play back a stream from the \s-1TLS/SSL\s0 server using \fBffplay\fR:
|
yading@10
|
812 .PP
|
yading@10
|
813 .Vb 1
|
yading@10
|
814 \& ffplay tls://<hostname>:<port>
|
yading@10
|
815 .Ve
|
yading@10
|
816 .SS "udp"
|
yading@10
|
817 .IX Subsection "udp"
|
yading@10
|
818 User Datagram Protocol.
|
yading@10
|
819 .PP
|
yading@10
|
820 The required syntax for a \s-1UDP\s0 url is:
|
yading@10
|
821 .PP
|
yading@10
|
822 .Vb 1
|
yading@10
|
823 \& udp://<hostname>:<port>[?<options>]
|
yading@10
|
824 .Ve
|
yading@10
|
825 .PP
|
yading@10
|
826 \&\fIoptions\fR contains a list of &\-separated options of the form \fIkey\fR=\fIval\fR.
|
yading@10
|
827 .PP
|
yading@10
|
828 In case threading is enabled on the system, a circular buffer is used
|
yading@10
|
829 to store the incoming data, which allows to reduce loss of data due to
|
yading@10
|
830 \&\s-1UDP\s0 socket buffer overruns. The \fIfifo_size\fR and
|
yading@10
|
831 \&\fIoverrun_nonfatal\fR options are related to this buffer.
|
yading@10
|
832 .PP
|
yading@10
|
833 The list of supported options follows.
|
yading@10
|
834 .IP "\fBbuffer_size=\fR\fIsize\fR" 4
|
yading@10
|
835 .IX Item "buffer_size=size"
|
yading@10
|
836 Set the \s-1UDP\s0 socket buffer size in bytes. This is used both for the
|
yading@10
|
837 receiving and the sending buffer size.
|
yading@10
|
838 .IP "\fBlocalport=\fR\fIport\fR" 4
|
yading@10
|
839 .IX Item "localport=port"
|
yading@10
|
840 Override the local \s-1UDP\s0 port to bind with.
|
yading@10
|
841 .IP "\fBlocaladdr=\fR\fIaddr\fR" 4
|
yading@10
|
842 .IX Item "localaddr=addr"
|
yading@10
|
843 Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast
|
yading@10
|
844 and the host has multiple interfaces, where the user can choose
|
yading@10
|
845 which interface to send on by specifying the \s-1IP\s0 address of that interface.
|
yading@10
|
846 .IP "\fBpkt_size=\fR\fIsize\fR" 4
|
yading@10
|
847 .IX Item "pkt_size=size"
|
yading@10
|
848 Set the size in bytes of \s-1UDP\s0 packets.
|
yading@10
|
849 .IP "\fBreuse=\fR\fI1|0\fR" 4
|
yading@10
|
850 .IX Item "reuse=1|0"
|
yading@10
|
851 Explicitly allow or disallow reusing \s-1UDP\s0 sockets.
|
yading@10
|
852 .IP "\fBttl=\fR\fIttl\fR" 4
|
yading@10
|
853 .IX Item "ttl=ttl"
|
yading@10
|
854 Set the time to live value (for multicast only).
|
yading@10
|
855 .IP "\fBconnect=\fR\fI1|0\fR" 4
|
yading@10
|
856 .IX Item "connect=1|0"
|
yading@10
|
857 Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the
|
yading@10
|
858 destination address can't be changed with ff_udp_set_remote_url later.
|
yading@10
|
859 If the destination address isn't known at the start, this option can
|
yading@10
|
860 be specified in ff_udp_set_remote_url, too.
|
yading@10
|
861 This allows finding out the source address for the packets with getsockname,
|
yading@10
|
862 and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination
|
yading@10
|
863 unreachable\*(R" is received.
|
yading@10
|
864 For receiving, this gives the benefit of only receiving packets from
|
yading@10
|
865 the specified peer address/port.
|
yading@10
|
866 .IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
|
yading@10
|
867 .IX Item "sources=address[,address]"
|
yading@10
|
868 Only receive packets sent to the multicast group from one of the
|
yading@10
|
869 specified sender \s-1IP\s0 addresses.
|
yading@10
|
870 .IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
|
yading@10
|
871 .IX Item "block=address[,address]"
|
yading@10
|
872 Ignore packets sent to the multicast group from the specified
|
yading@10
|
873 sender \s-1IP\s0 addresses.
|
yading@10
|
874 .IP "\fBfifo_size=\fR\fIunits\fR" 4
|
yading@10
|
875 .IX Item "fifo_size=units"
|
yading@10
|
876 Set the \s-1UDP\s0 receiving circular buffer size, expressed as a number of
|
yading@10
|
877 packets with size of 188 bytes. If not specified defaults to 7*4096.
|
yading@10
|
878 .IP "\fBoverrun_nonfatal=\fR\fI1|0\fR" 4
|
yading@10
|
879 .IX Item "overrun_nonfatal=1|0"
|
yading@10
|
880 Survive in case of \s-1UDP\s0 receiving circular buffer overrun. Default
|
yading@10
|
881 value is 0.
|
yading@10
|
882 .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
|
yading@10
|
883 .IX Item "timeout=microseconds"
|
yading@10
|
884 In read mode: if no data arrived in more than this time interval, raise error.
|
yading@10
|
885 .PP
|
yading@10
|
886 Some usage examples of the \s-1UDP\s0 protocol with \fBffmpeg\fR follow.
|
yading@10
|
887 .PP
|
yading@10
|
888 To stream over \s-1UDP\s0 to a remote endpoint:
|
yading@10
|
889 .PP
|
yading@10
|
890 .Vb 1
|
yading@10
|
891 \& ffmpeg \-i <input> \-f <format> udp://<hostname>:<port>
|
yading@10
|
892 .Ve
|
yading@10
|
893 .PP
|
yading@10
|
894 To stream in mpegts format over \s-1UDP\s0 using 188 sized \s-1UDP\s0 packets, using a large input buffer:
|
yading@10
|
895 .PP
|
yading@10
|
896 .Vb 1
|
yading@10
|
897 \& ffmpeg \-i <input> \-f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
|
yading@10
|
898 .Ve
|
yading@10
|
899 .PP
|
yading@10
|
900 To receive over \s-1UDP\s0 from a remote endpoint:
|
yading@10
|
901 .PP
|
yading@10
|
902 .Vb 1
|
yading@10
|
903 \& ffmpeg \-i udp://[<multicast\-address>]:<port>
|
yading@10
|
904 .Ve
|
yading@10
|
905 .SH "SEE ALSO"
|
yading@10
|
906 .IX Header "SEE ALSO"
|
yading@10
|
907 \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavformat\fR\|(3)
|
yading@10
|
908 .SH "AUTHORS"
|
yading@10
|
909 .IX Header "AUTHORS"
|
yading@10
|
910 The FFmpeg developers.
|
yading@10
|
911 .PP
|
yading@10
|
912 For details about the authorship, see the Git history of the project
|
yading@10
|
913 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
|
yading@10
|
914 \&\fBgit log\fR in the FFmpeg source directory, or browsing the
|
yading@10
|
915 online repository at <\fBhttp://source.ffmpeg.org\fR>.
|
yading@10
|
916 .PP
|
yading@10
|
917 Maintainers for the specific components are listed in the file
|
yading@10
|
918 \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.
|