yading@10: .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) yading@10: .\" yading@10: .\" Standard preamble: yading@10: .\" ======================================================================== yading@10: .de Sp \" Vertical space (when we can't use .PP) yading@10: .if t .sp .5v yading@10: .if n .sp yading@10: .. yading@10: .de Vb \" Begin verbatim text yading@10: .ft CW yading@10: .nf yading@10: .ne \\$1 yading@10: .. yading@10: .de Ve \" End verbatim text yading@10: .ft R yading@10: .fi yading@10: .. yading@10: .\" Set up some character translations and predefined strings. \*(-- will yading@10: .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left yading@10: .\" double quote, and \*(R" will give a right double quote. \*(C+ will yading@10: .\" give a nicer C++. Capital omega is used to do unbreakable dashes and yading@10: .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, yading@10: .\" nothing in troff, for use with C<>. yading@10: .tr \(*W- yading@10: .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' yading@10: .ie n \{\ yading@10: . ds -- \(*W- yading@10: . ds PI pi yading@10: . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch yading@10: . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch yading@10: . ds L" "" yading@10: . ds R" "" yading@10: . ds C` "" yading@10: . ds C' "" yading@10: 'br\} yading@10: .el\{\ yading@10: . ds -- \|\(em\| yading@10: . ds PI \(*p yading@10: . ds L" `` yading@10: . ds R" '' yading@10: 'br\} yading@10: .\" yading@10: .\" Escape single quotes in literal strings from groff's Unicode transform. yading@10: .ie \n(.g .ds Aq \(aq yading@10: .el .ds Aq ' yading@10: .\" yading@10: .\" If the F register is turned on, we'll generate index entries on stderr for yading@10: .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index yading@10: .\" entries marked with X<> in POD. Of course, you'll have to process the yading@10: .\" output yourself in some meaningful fashion. yading@10: .ie \nF \{\ yading@10: . de IX yading@10: . tm Index:\\$1\t\\n%\t"\\$2" yading@10: .. yading@10: . nr % 0 yading@10: . rr F yading@10: .\} yading@10: .el \{\ yading@10: . de IX yading@10: .. yading@10: .\} yading@10: .\" yading@10: .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). yading@10: .\" Fear. Run. Save yourself. No user-serviceable parts. yading@10: . \" fudge factors for nroff and troff yading@10: .if n \{\ yading@10: . ds #H 0 yading@10: . ds #V .8m yading@10: . ds #F .3m yading@10: . ds #[ \f1 yading@10: . ds #] \fP yading@10: .\} yading@10: .if t \{\ yading@10: . ds #H ((1u-(\\\\n(.fu%2u))*.13m) yading@10: . ds #V .6m yading@10: . ds #F 0 yading@10: . ds #[ \& yading@10: . ds #] \& yading@10: .\} yading@10: . \" simple accents for nroff and troff yading@10: .if n \{\ yading@10: . ds ' \& yading@10: . ds ` \& yading@10: . ds ^ \& yading@10: . ds , \& yading@10: . ds ~ ~ yading@10: . ds / yading@10: .\} yading@10: .if t \{\ yading@10: . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" yading@10: . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' yading@10: . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' yading@10: . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' yading@10: . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' yading@10: . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' yading@10: .\} yading@10: . \" troff and (daisy-wheel) nroff accents yading@10: .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' yading@10: .ds 8 \h'\*(#H'\(*b\h'-\*(#H' yading@10: .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] yading@10: .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' yading@10: .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' yading@10: .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] yading@10: .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] yading@10: .ds ae a\h'-(\w'a'u*4/10)'e yading@10: .ds Ae A\h'-(\w'A'u*4/10)'E yading@10: . \" corrections for vroff yading@10: .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' yading@10: .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' yading@10: . \" for low resolution devices (crt and lpr) yading@10: .if \n(.H>23 .if \n(.V>19 \ yading@10: \{\ yading@10: . ds : e yading@10: . ds 8 ss yading@10: . ds o a yading@10: . ds d- d\h'-1'\(ga yading@10: . ds D- D\h'-1'\(hy yading@10: . ds th \o'bp' yading@10: . ds Th \o'LP' yading@10: . ds ae ae yading@10: . ds Ae AE yading@10: .\} yading@10: .rm #[ #] #H #V #F C yading@10: .\" ======================================================================== yading@10: .\" yading@10: .IX Title "FFMPEG-PROTOCOLS 1" yading@10: .TH FFMPEG-PROTOCOLS 1 "2013-04-21" " " " " yading@10: .\" For nroff, turn off justification. Always turn off hyphenation; it makes yading@10: .\" way too many mistakes in technical documents. yading@10: .if n .ad l yading@10: .nh yading@10: .SH "NAME" yading@10: ffmpeg\-protocols \- FFmpeg protocols yading@10: .SH "DESCRIPTION" yading@10: .IX Header "DESCRIPTION" yading@10: This document describes the input and output protocols provided by the yading@10: libavformat library. yading@10: .SH "PROTOCOLS" yading@10: .IX Header "PROTOCOLS" yading@10: Protocols are configured elements in FFmpeg which allow to access yading@10: resources which require the use of a particular protocol. yading@10: .PP yading@10: When you configure your FFmpeg build, all the supported protocols are yading@10: enabled by default. You can list all available ones using the yading@10: configure option \*(L"\-\-list\-protocols\*(R". yading@10: .PP yading@10: You can disable all the protocols using the configure option yading@10: \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the yading@10: option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a yading@10: particular protocol using the option yading@10: \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR". yading@10: .PP yading@10: The option \*(L"\-protocols\*(R" of the ff* tools will display the list of yading@10: supported protocols. yading@10: .PP yading@10: A description of the currently available protocols follows. yading@10: .SS "bluray" yading@10: .IX Subsection "bluray" yading@10: Read BluRay playlist. yading@10: .PP yading@10: The accepted options are: yading@10: .IP "\fBangle\fR" 4 yading@10: .IX Item "angle" yading@10: BluRay angle yading@10: .IP "\fBchapter\fR" 4 yading@10: .IX Item "chapter" yading@10: Start chapter (1...N) yading@10: .IP "\fBplaylist\fR" 4 yading@10: .IX Item "playlist" yading@10: Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls) yading@10: .PP yading@10: Examples: yading@10: .PP yading@10: Read longest playlist from BluRay mounted to /mnt/bluray: yading@10: .PP yading@10: .Vb 1 yading@10: \& bluray:/mnt/bluray yading@10: .Ve yading@10: .PP yading@10: Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2: yading@10: .PP yading@10: .Vb 1 yading@10: \& \-playlist 4 \-angle 2 \-chapter 2 bluray:/mnt/bluray yading@10: .Ve yading@10: .SS "concat" yading@10: .IX Subsection "concat" yading@10: Physical concatenation protocol. yading@10: .PP yading@10: Allow to read and seek from many resource in sequence as if they were yading@10: a unique resource. yading@10: .PP yading@10: A \s-1URL\s0 accepted by this protocol has the syntax: yading@10: .PP yading@10: .Vb 1 yading@10: \& concat:||...| yading@10: .Ve yading@10: .PP yading@10: where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the yading@10: resource to be concatenated, each one possibly specifying a distinct yading@10: protocol. yading@10: .PP yading@10: For example to read a sequence of files \fIsplit1.mpeg\fR, yading@10: \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the yading@10: command: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg yading@10: .Ve yading@10: .PP yading@10: Note that you may need to escape the character \*(L"|\*(R" which is special for yading@10: many shells. yading@10: .SS "data" yading@10: .IX Subsection "data" yading@10: Data in-line in the \s-1URI\s0. See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>. yading@10: .PP yading@10: For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png yading@10: .Ve yading@10: .SS "file" yading@10: .IX Subsection "file" yading@10: File access protocol. yading@10: .PP yading@10: Allow to read from or read to a file. yading@10: .PP yading@10: For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR yading@10: use the command: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i file:input.mpeg output.mpeg yading@10: .Ve yading@10: .PP yading@10: The ff* tools default to the file protocol, that is a resource yading@10: specified with the name \*(L"\s-1FILE\s0.mpeg\*(R" is interpreted as the \s-1URL\s0 yading@10: \&\*(L"file:FILE.mpeg\*(R". yading@10: .SS "gopher" yading@10: .IX Subsection "gopher" yading@10: Gopher protocol. yading@10: .SS "hls" yading@10: .IX Subsection "hls" yading@10: Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as yading@10: a uniform one. The M3U8 playlists describing the segments can be yading@10: remote \s-1HTTP\s0 resources or local files, accessed using the standard yading@10: file protocol. yading@10: The nested protocol is declared by specifying yading@10: "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR yading@10: is either \*(L"file\*(R" or \*(L"http\*(R". yading@10: .PP yading@10: .Vb 2 yading@10: \& hls+http://host/path/to/remote/resource.m3u8 yading@10: \& hls+file://path/to/local/resource.m3u8 yading@10: .Ve yading@10: .PP yading@10: Using this protocol is discouraged \- the hls demuxer should work yading@10: just as well (if not, please report the issues) and is more complete. yading@10: To use the hls demuxer instead, simply use the direct URLs to the yading@10: m3u8 files. yading@10: .SS "http" yading@10: .IX Subsection "http" yading@10: \&\s-1HTTP\s0 (Hyper Text Transfer Protocol). yading@10: .PP yading@10: This protocol accepts the following options. yading@10: .IP "\fBseekable\fR" 4 yading@10: .IX Item "seekable" yading@10: Control seekability of connection. If set to 1 the resource is yading@10: supposed to be seekable, if set to 0 it is assumed not to be seekable, yading@10: if set to \-1 it will try to autodetect if it is seekable. Default yading@10: value is \-1. yading@10: .IP "\fBchunked_post\fR" 4 yading@10: .IX Item "chunked_post" yading@10: If set to 1 use chunked transfer-encoding for posts, default is 1. yading@10: .IP "\fBheaders\fR" 4 yading@10: .IX Item "headers" yading@10: Set custom \s-1HTTP\s0 headers, can override built in default headers. The yading@10: value must be a string encoding the headers. yading@10: .IP "\fBcontent_type\fR" 4 yading@10: .IX Item "content_type" yading@10: Force a content type. yading@10: .IP "\fBuser-agent\fR" 4 yading@10: .IX Item "user-agent" yading@10: Override User-Agent header. If not specified the protocol will use a yading@10: string describing the libavformat build. yading@10: .IP "\fBmultiple_requests\fR" 4 yading@10: .IX Item "multiple_requests" yading@10: Use persistent connections if set to 1. By default it is 0. yading@10: .IP "\fBpost_data\fR" 4 yading@10: .IX Item "post_data" yading@10: Set custom \s-1HTTP\s0 post data. yading@10: .IP "\fBtimeout\fR" 4 yading@10: .IX Item "timeout" yading@10: Set timeout of socket I/O operations used by the underlying low level yading@10: operation. By default it is set to \-1, which means that the timeout is yading@10: not specified. yading@10: .IP "\fBmime_type\fR" 4 yading@10: .IX Item "mime_type" yading@10: Set \s-1MIME\s0 type. yading@10: .IP "\fBcookies\fR" 4 yading@10: .IX Item "cookies" yading@10: Set the cookies to be sent in future requests. The format of each cookie is the yading@10: same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be yading@10: delimited by a newline character. yading@10: .PP yading@10: \fI\s-1HTTP\s0 Cookies\fR yading@10: .IX Subsection "HTTP Cookies" yading@10: .PP yading@10: Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the yading@10: request. The \fBcookies\fR option allows these cookies to be specified. At yading@10: the very least, each cookie must specify a value along with a path and domain. yading@10: \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the yading@10: cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited yading@10: by a newline. yading@10: .PP yading@10: The required syntax to play a stream specifying a cookie is: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay \-cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 yading@10: .Ve yading@10: .SS "mmst" yading@10: .IX Subsection "mmst" yading@10: \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0. yading@10: .SS "mmsh" yading@10: .IX Subsection "mmsh" yading@10: \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0. yading@10: .PP yading@10: The required syntax is: yading@10: .PP yading@10: .Vb 1 yading@10: \& mmsh://[:][/][/] yading@10: .Ve yading@10: .SS "md5" yading@10: .IX Subsection "md5" yading@10: \&\s-1MD5\s0 output protocol. yading@10: .PP yading@10: Computes the \s-1MD5\s0 hash of the data to be written, and on close writes yading@10: this to the designated output or stdout if none is specified. It can yading@10: be used to test muxers without writing an actual file. yading@10: .PP yading@10: Some examples follow. yading@10: .PP yading@10: .Vb 2 yading@10: \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. yading@10: \& ffmpeg \-i input.flv \-f avi \-y md5:output.avi.md5 yading@10: \& yading@10: \& # Write the MD5 hash of the encoded AVI file to stdout. yading@10: \& ffmpeg \-i input.flv \-f avi \-y md5: yading@10: .Ve yading@10: .PP yading@10: Note that some formats (typically \s-1MOV\s0) require the output protocol to yading@10: be seekable, so they will fail with the \s-1MD5\s0 output protocol. yading@10: .SS "pipe" yading@10: .IX Subsection "pipe" yading@10: \&\s-1UNIX\s0 pipe access protocol. yading@10: .PP yading@10: Allow to read and write from \s-1UNIX\s0 pipes. yading@10: .PP yading@10: The accepted syntax is: yading@10: .PP yading@10: .Vb 1 yading@10: \& pipe:[] yading@10: .Ve yading@10: .PP yading@10: \&\fInumber\fR is the number corresponding to the file descriptor of the yading@10: pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR yading@10: is not specified, by default the stdout file descriptor will be used yading@10: for writing, stdin for reading. yading@10: .PP yading@10: For example to read from stdin with \fBffmpeg\fR: yading@10: .PP yading@10: .Vb 3 yading@10: \& cat test.wav | ffmpeg \-i pipe:0 yading@10: \& # ...this is the same as... yading@10: \& cat test.wav | ffmpeg \-i pipe: yading@10: .Ve yading@10: .PP yading@10: For writing to stdout with \fBffmpeg\fR: yading@10: .PP yading@10: .Vb 3 yading@10: \& ffmpeg \-i test.wav \-f avi pipe:1 | cat > test.avi yading@10: \& # ...this is the same as... yading@10: \& ffmpeg \-i test.wav \-f avi pipe: | cat > test.avi yading@10: .Ve yading@10: .PP yading@10: Note that some formats (typically \s-1MOV\s0), require the output protocol to yading@10: be seekable, so they will fail with the pipe output protocol. yading@10: .SS "rtmp" yading@10: .IX Subsection "rtmp" yading@10: Real-Time Messaging Protocol. yading@10: .PP yading@10: The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia yading@10: content across a \s-1TCP/IP\s0 network. yading@10: .PP yading@10: The required syntax is: yading@10: .PP yading@10: .Vb 1 yading@10: \& rtmp://[:][/][/][/] yading@10: .Ve yading@10: .PP yading@10: The accepted parameters are: yading@10: .IP "\fBserver\fR" 4 yading@10: .IX Item "server" yading@10: The address of the \s-1RTMP\s0 server. yading@10: .IP "\fBport\fR" 4 yading@10: .IX Item "port" yading@10: The number of the \s-1TCP\s0 port to use (by default is 1935). yading@10: .IP "\fBapp\fR" 4 yading@10: .IX Item "app" yading@10: It is the name of the application to access. It usually corresponds to yading@10: the path where the application is installed on the \s-1RTMP\s0 server yading@10: (e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). You can override yading@10: the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too. yading@10: .IP "\fBplaypath\fR" 4 yading@10: .IX Item "playpath" yading@10: It is the path or name of the resource to play with reference to the yading@10: application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". You yading@10: can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR yading@10: option, too. yading@10: .IP "\fBlisten\fR" 4 yading@10: .IX Item "listen" yading@10: Act as a server, listening for an incoming connection. yading@10: .IP "\fBtimeout\fR" 4 yading@10: .IX Item "timeout" yading@10: Maximum time to wait for the incoming connection. Implies listen. yading@10: .PP yading@10: Additionally, the following parameters can be set via command line options yading@10: (or in code via \f(CW\*(C`AVOption\*(C'\fRs): yading@10: .IP "\fBrtmp_app\fR" 4 yading@10: .IX Item "rtmp_app" yading@10: Name of application to connect on the \s-1RTMP\s0 server. This option yading@10: overrides the parameter specified in the \s-1URI\s0. yading@10: .IP "\fBrtmp_buffer\fR" 4 yading@10: .IX Item "rtmp_buffer" yading@10: Set the client buffer time in milliseconds. The default is 3000. yading@10: .IP "\fBrtmp_conn\fR" 4 yading@10: .IX Item "rtmp_conn" yading@10: Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string, yading@10: 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: Each value is prefixed by a single character denoting the type, yading@10: B for Boolean, N for number, S for string, O for object, or Z for null, yading@10: followed by a colon. For Booleans the data must be either 0 or 1 for yading@10: \&\s-1FALSE\s0 or \s-1TRUE\s0, respectively. Likewise for Objects the data must be 0 or yading@10: 1 to end or begin an object, respectively. Data items in subobjects may yading@10: be named, by prefixing the type with 'N' and specifying the name before yading@10: the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple yading@10: times to construct arbitrary \s-1AMF\s0 sequences. yading@10: .IP "\fBrtmp_flashver\fR" 4 yading@10: .IX Item "rtmp_flashver" yading@10: Version of the Flash plugin used to run the \s-1SWF\s0 player. The default yading@10: is \s-1LNX\s0 9,0,124,2. yading@10: .IP "\fBrtmp_flush_interval\fR" 4 yading@10: .IX Item "rtmp_flush_interval" yading@10: Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default yading@10: is 10. yading@10: .IP "\fBrtmp_live\fR" 4 yading@10: .IX Item "rtmp_live" yading@10: Specify that the media is a live stream. No resuming or seeking in yading@10: live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the yading@10: subscriber first tries to play the live stream specified in the yading@10: playpath. If a live stream of that name is not found, it plays the yading@10: recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and yading@10: \&\f(CW\*(C`recorded\*(C'\fR. yading@10: .IP "\fBrtmp_pageurl\fR" 4 yading@10: .IX Item "rtmp_pageurl" yading@10: \&\s-1URL\s0 of the web page in which the media was embedded. By default no yading@10: value will be sent. yading@10: .IP "\fBrtmp_playpath\fR" 4 yading@10: .IX Item "rtmp_playpath" yading@10: Stream identifier to play or to publish. This option overrides the yading@10: parameter specified in the \s-1URI\s0. yading@10: .IP "\fBrtmp_subscribe\fR" 4 yading@10: .IX Item "rtmp_subscribe" yading@10: Name of live stream to subscribe to. By default no value will be sent. yading@10: It is only sent if the option is specified or if rtmp_live yading@10: is set to live. yading@10: .IP "\fBrtmp_swfhash\fR" 4 yading@10: .IX Item "rtmp_swfhash" yading@10: \&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes). yading@10: .IP "\fBrtmp_swfsize\fR" 4 yading@10: .IX Item "rtmp_swfsize" yading@10: Size of the decompressed \s-1SWF\s0 file, required for SWFVerification. yading@10: .IP "\fBrtmp_swfurl\fR" 4 yading@10: .IX Item "rtmp_swfurl" yading@10: \&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent. yading@10: .IP "\fBrtmp_swfverify\fR" 4 yading@10: .IX Item "rtmp_swfverify" yading@10: \&\s-1URL\s0 to player swf file, compute hash/size automatically. yading@10: .IP "\fBrtmp_tcurl\fR" 4 yading@10: .IX Item "rtmp_tcurl" yading@10: \&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app. yading@10: .PP yading@10: For example to read with \fBffplay\fR a multimedia resource named yading@10: \&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R": yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay rtmp://myserver/vod/sample yading@10: .Ve yading@10: .SS "rtmpe" yading@10: .IX Subsection "rtmpe" yading@10: Encrypted Real-Time Messaging Protocol. yading@10: .PP yading@10: The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for yading@10: streaming multimedia content within standard cryptographic primitives, yading@10: consisting of Diffie-Hellman key exchange and \s-1HMACSHA256\s0, generating yading@10: a pair of \s-1RC4\s0 keys. yading@10: .SS "rtmps" yading@10: .IX Subsection "rtmps" yading@10: Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection. yading@10: .PP yading@10: The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming yading@10: multimedia content across an encrypted connection. yading@10: .SS "rtmpt" yading@10: .IX Subsection "rtmpt" yading@10: Real-Time Messaging Protocol tunneled through \s-1HTTP\s0. yading@10: .PP yading@10: The Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPT\s0) is used yading@10: for streaming multimedia content within \s-1HTTP\s0 requests to traverse yading@10: firewalls. yading@10: .SS "rtmpte" yading@10: .IX Subsection "rtmpte" yading@10: Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0. yading@10: .PP yading@10: The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPTE\s0) yading@10: is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse yading@10: firewalls. yading@10: .SS "rtmpts" yading@10: .IX Subsection "rtmpts" yading@10: Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0. yading@10: .PP yading@10: The Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0 (\s-1RTMPTS\s0) is used yading@10: for streaming multimedia content within \s-1HTTPS\s0 requests to traverse yading@10: firewalls. yading@10: .SS "rtmp, rtmpe, rtmps, rtmpt, rtmpte" yading@10: .IX Subsection "rtmp, rtmpe, rtmps, rtmpt, rtmpte" yading@10: Real-Time Messaging Protocol and its variants supported through yading@10: librtmp. yading@10: .PP yading@10: Requires the presence of the librtmp headers and library during yading@10: configuration. You need to explicitly configure the build with yading@10: \&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0 yading@10: protocol. yading@10: .PP yading@10: This protocol provides most client functions and a few server yading@10: functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0), yading@10: encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled yading@10: variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0). yading@10: .PP yading@10: The required syntax is: yading@10: .PP yading@10: .Vb 1 yading@10: \& ://[:][/][/] yading@10: .Ve yading@10: .PP yading@10: where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R", yading@10: \&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and yading@10: \&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same yading@10: meaning as specified for the \s-1RTMP\s0 native protocol. yading@10: \&\fIoptions\fR contains a list of space-separated options of the form yading@10: \&\fIkey\fR=\fIval\fR. yading@10: .PP yading@10: See the librtmp manual page (man 3 librtmp) for more information. yading@10: .PP yading@10: For example, to stream a file in real-time to an \s-1RTMP\s0 server using yading@10: \&\fBffmpeg\fR: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-re \-i myfile \-f flv rtmp://myserver/live/mystream yading@10: .Ve yading@10: .PP yading@10: To play the same stream using \fBffplay\fR: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay "rtmp://myserver/live/mystream live=1" yading@10: .Ve yading@10: .SS "rtp" yading@10: .IX Subsection "rtp" yading@10: Real-Time Protocol. yading@10: .SS "rtsp" yading@10: .IX Subsection "rtsp" yading@10: \&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer yading@10: and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred yading@10: over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with yading@10: data transferred over \s-1RDT\s0). yading@10: .PP yading@10: The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server yading@10: supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's yading@10: <\fBhttp://github.com/revmischa/rtsp\-server\fR>). yading@10: .PP yading@10: The required syntax for a \s-1RTSP\s0 url is: yading@10: .PP yading@10: .Vb 1 yading@10: \& rtsp://[:]/ yading@10: .Ve yading@10: .PP yading@10: The following options (set on the \fBffmpeg\fR/\fBffplay\fR command yading@10: line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in \f(CW\*(C`avformat_open_input\*(C'\fR), yading@10: are supported: yading@10: .PP yading@10: Flags for \f(CW\*(C`rtsp_transport\*(C'\fR: yading@10: .IP "\fBudp\fR" 4 yading@10: .IX Item "udp" yading@10: Use \s-1UDP\s0 as lower transport protocol. yading@10: .IP "\fBtcp\fR" 4 yading@10: .IX Item "tcp" yading@10: Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower yading@10: transport protocol. yading@10: .IP "\fBudp_multicast\fR" 4 yading@10: .IX Item "udp_multicast" yading@10: Use \s-1UDP\s0 multicast as lower transport protocol. yading@10: .IP "\fBhttp\fR" 4 yading@10: .IX Item "http" yading@10: Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for yading@10: passing proxies. yading@10: .PP yading@10: Multiple lower transport protocols may be specified, in that case they are yading@10: tried one at a time (if the setup of one fails, the next one is tried). yading@10: For the muxer, only the \f(CW\*(C`tcp\*(C'\fR and \f(CW\*(C`udp\*(C'\fR options are supported. yading@10: .PP yading@10: Flags for \f(CW\*(C`rtsp_flags\*(C'\fR: yading@10: .IP "\fBfilter_src\fR" 4 yading@10: .IX Item "filter_src" yading@10: Accept packets only from negotiated peer address and port. yading@10: .IP "\fBlisten\fR" 4 yading@10: .IX Item "listen" yading@10: Act as a server, listening for an incoming connection. yading@10: .PP yading@10: When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets yading@10: (since they may arrive out of order, or packets may get lost totally). This yading@10: can be disabled by setting the maximum demuxing delay to zero (via yading@10: the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext). yading@10: .PP yading@10: When watching multi-bitrate Real-RTSP streams with \fBffplay\fR, the yading@10: streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and yading@10: \&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched yading@10: on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR. yading@10: .PP yading@10: Example command lines: yading@10: .PP yading@10: To watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay \-max_delay 500000 \-rtsp_transport udp rtsp://server/video.mp4 yading@10: .Ve yading@10: .PP yading@10: To watch a stream tunneled over \s-1HTTP:\s0 yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay \-rtsp_transport http rtsp://server/video.mp4 yading@10: .Ve yading@10: .PP yading@10: To send a stream in realtime to a \s-1RTSP\s0 server, for others to watch: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-re \-i \-f rtsp \-muxdelay 0.1 rtsp://server/live.sdp yading@10: .Ve yading@10: .PP yading@10: To receive a stream in realtime: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-rtsp_flags listen \-i rtsp://ownaddress/live.sdp yading@10: .Ve yading@10: .IP "\fBstimeout\fR" 4 yading@10: .IX Item "stimeout" yading@10: Socket \s-1IO\s0 timeout in micro seconds. yading@10: .SS "sap" yading@10: .IX Subsection "sap" yading@10: Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a yading@10: protocol handler in libavformat, it is a muxer and demuxer. yading@10: It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the yading@10: streams regularly on a separate port. yading@10: .PP yading@10: \fIMuxer\fR yading@10: .IX Subsection "Muxer" yading@10: .PP yading@10: The syntax for a \s-1SAP\s0 url given to the muxer is: yading@10: .PP yading@10: .Vb 1 yading@10: \& sap://[:][?] yading@10: .Ve yading@10: .PP yading@10: The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR, yading@10: or to port 5004 if no port is specified. yading@10: \&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options yading@10: are supported: yading@10: .IP "\fBannounce_addr=\fR\fIaddress\fR" 4 yading@10: .IX Item "announce_addr=address" yading@10: Specify the destination \s-1IP\s0 address for sending the announcements to. yading@10: If omitted, the announcements are sent to the commonly used \s-1SAP\s0 yading@10: announcement multicast address 224.2.127.254 (sap.mcast.net), or yading@10: ff0e::2:7ffe if \fIdestination\fR is an IPv6 address. yading@10: .IP "\fBannounce_port=\fR\fIport\fR" 4 yading@10: .IX Item "announce_port=port" yading@10: Specify the port to send the announcements on, defaults to yading@10: 9875 if not specified. yading@10: .IP "\fBttl=\fR\fIttl\fR" 4 yading@10: .IX Item "ttl=ttl" yading@10: Specify the time to live value for the announcements and \s-1RTP\s0 packets, yading@10: defaults to 255. yading@10: .IP "\fBsame_port=\fR\fI0|1\fR" 4 yading@10: .IX Item "same_port=0|1" yading@10: If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the yading@10: default), all streams are sent on unique ports, with each stream on a yading@10: port 2 numbers higher than the previous. yading@10: VLC/Live555 requires this to be set to 1, to be able to receive the stream. yading@10: The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent yading@10: on unique ports. yading@10: .PP yading@10: Example command lines follow. yading@10: .PP yading@10: To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0 yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-re \-i \-f sap sap://224.0.0.255?same_port=1 yading@10: .Ve yading@10: .PP yading@10: Similarly, for watching in \fBffplay\fR: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-re \-i \-f sap sap://224.0.0.255 yading@10: .Ve yading@10: .PP yading@10: And for watching in \fBffplay\fR, over IPv6: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-re \-i \-f sap sap://[ff0e::1:2:3:4] yading@10: .Ve yading@10: .PP yading@10: \fIDemuxer\fR yading@10: .IX Subsection "Demuxer" yading@10: .PP yading@10: The syntax for a \s-1SAP\s0 url given to the demuxer is: yading@10: .PP yading@10: .Vb 1 yading@10: \& sap://[
][:] yading@10: .Ve yading@10: .PP yading@10: \&\fIaddress\fR is the multicast address to listen for announcements on, yading@10: if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR yading@10: is the port that is listened on, 9875 if omitted. yading@10: .PP yading@10: The demuxers listens for announcements on the given address and port. yading@10: Once an announcement is received, it tries to receive that particular stream. yading@10: .PP yading@10: Example command lines follow. yading@10: .PP yading@10: To play back the first stream announced on the normal \s-1SAP\s0 multicast address: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay sap:// yading@10: .Ve yading@10: .PP yading@10: To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay sap://[ff0e::2:7ffe] yading@10: .Ve yading@10: .SS "tcp" yading@10: .IX Subsection "tcp" yading@10: Trasmission Control Protocol. yading@10: .PP yading@10: The required syntax for a \s-1TCP\s0 url is: yading@10: .PP yading@10: .Vb 1 yading@10: \& tcp://:[?] yading@10: .Ve yading@10: .IP "\fBlisten\fR" 4 yading@10: .IX Item "listen" yading@10: Listen for an incoming connection yading@10: .IP "\fBtimeout=\fR\fImicroseconds\fR" 4 yading@10: .IX Item "timeout=microseconds" yading@10: In read mode: if no data arrived in more than this time interval, raise error. yading@10: In write mode: if socket cannot be written in more than this time interval, raise error. yading@10: This also sets timeout on \s-1TCP\s0 connection establishing. yading@10: .Sp yading@10: .Vb 2 yading@10: \& ffmpeg \-i \-f tcp://:?listen yading@10: \& ffplay tcp://: yading@10: .Ve yading@10: .SS "tls" yading@10: .IX Subsection "tls" yading@10: Transport Layer Security/Secure Sockets Layer yading@10: .PP yading@10: The required syntax for a \s-1TLS/SSL\s0 url is: yading@10: .PP yading@10: .Vb 1 yading@10: \& tls://:[?] yading@10: .Ve yading@10: .IP "\fBlisten\fR" 4 yading@10: .IX Item "listen" yading@10: Act as a server, listening for an incoming connection. yading@10: .IP "\fBcafile=\fR\fIfilename\fR" 4 yading@10: .IX Item "cafile=filename" yading@10: Certificate authority file. The file must be in OpenSSL \s-1PEM\s0 format. yading@10: .IP "\fBcert=\fR\fIfilename\fR" 4 yading@10: .IX Item "cert=filename" yading@10: Certificate file. The file must be in OpenSSL \s-1PEM\s0 format. yading@10: .IP "\fBkey=\fR\fIfilename\fR" 4 yading@10: .IX Item "key=filename" yading@10: Private key file. yading@10: .IP "\fBverify=\fR\fI0|1\fR" 4 yading@10: .IX Item "verify=0|1" yading@10: Verify the peer's certificate. yading@10: .PP yading@10: Example command lines: yading@10: .PP yading@10: To create a \s-1TLS/SSL\s0 server that serves an input stream. yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i \-f tls://:?listen&cert=&key= yading@10: .Ve yading@10: .PP yading@10: To play back a stream from the \s-1TLS/SSL\s0 server using \fBffplay\fR: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffplay tls://: yading@10: .Ve yading@10: .SS "udp" yading@10: .IX Subsection "udp" yading@10: User Datagram Protocol. yading@10: .PP yading@10: The required syntax for a \s-1UDP\s0 url is: yading@10: .PP yading@10: .Vb 1 yading@10: \& udp://:[?] yading@10: .Ve yading@10: .PP yading@10: \&\fIoptions\fR contains a list of &\-separated options of the form \fIkey\fR=\fIval\fR. yading@10: .PP yading@10: In case threading is enabled on the system, a circular buffer is used yading@10: to store the incoming data, which allows to reduce loss of data due to yading@10: \&\s-1UDP\s0 socket buffer overruns. The \fIfifo_size\fR and yading@10: \&\fIoverrun_nonfatal\fR options are related to this buffer. yading@10: .PP yading@10: The list of supported options follows. yading@10: .IP "\fBbuffer_size=\fR\fIsize\fR" 4 yading@10: .IX Item "buffer_size=size" yading@10: Set the \s-1UDP\s0 socket buffer size in bytes. This is used both for the yading@10: receiving and the sending buffer size. yading@10: .IP "\fBlocalport=\fR\fIport\fR" 4 yading@10: .IX Item "localport=port" yading@10: Override the local \s-1UDP\s0 port to bind with. yading@10: .IP "\fBlocaladdr=\fR\fIaddr\fR" 4 yading@10: .IX Item "localaddr=addr" yading@10: Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast yading@10: and the host has multiple interfaces, where the user can choose yading@10: which interface to send on by specifying the \s-1IP\s0 address of that interface. yading@10: .IP "\fBpkt_size=\fR\fIsize\fR" 4 yading@10: .IX Item "pkt_size=size" yading@10: Set the size in bytes of \s-1UDP\s0 packets. yading@10: .IP "\fBreuse=\fR\fI1|0\fR" 4 yading@10: .IX Item "reuse=1|0" yading@10: Explicitly allow or disallow reusing \s-1UDP\s0 sockets. yading@10: .IP "\fBttl=\fR\fIttl\fR" 4 yading@10: .IX Item "ttl=ttl" yading@10: Set the time to live value (for multicast only). yading@10: .IP "\fBconnect=\fR\fI1|0\fR" 4 yading@10: .IX Item "connect=1|0" yading@10: Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the yading@10: destination address can't be changed with ff_udp_set_remote_url later. yading@10: If the destination address isn't known at the start, this option can yading@10: be specified in ff_udp_set_remote_url, too. yading@10: This allows finding out the source address for the packets with getsockname, yading@10: and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination yading@10: unreachable\*(R" is received. yading@10: For receiving, this gives the benefit of only receiving packets from yading@10: the specified peer address/port. yading@10: .IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4 yading@10: .IX Item "sources=address[,address]" yading@10: Only receive packets sent to the multicast group from one of the yading@10: specified sender \s-1IP\s0 addresses. yading@10: .IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4 yading@10: .IX Item "block=address[,address]" yading@10: Ignore packets sent to the multicast group from the specified yading@10: sender \s-1IP\s0 addresses. yading@10: .IP "\fBfifo_size=\fR\fIunits\fR" 4 yading@10: .IX Item "fifo_size=units" yading@10: Set the \s-1UDP\s0 receiving circular buffer size, expressed as a number of yading@10: packets with size of 188 bytes. If not specified defaults to 7*4096. yading@10: .IP "\fBoverrun_nonfatal=\fR\fI1|0\fR" 4 yading@10: .IX Item "overrun_nonfatal=1|0" yading@10: Survive in case of \s-1UDP\s0 receiving circular buffer overrun. Default yading@10: value is 0. yading@10: .IP "\fBtimeout=\fR\fImicroseconds\fR" 4 yading@10: .IX Item "timeout=microseconds" yading@10: In read mode: if no data arrived in more than this time interval, raise error. yading@10: .PP yading@10: Some usage examples of the \s-1UDP\s0 protocol with \fBffmpeg\fR follow. yading@10: .PP yading@10: To stream over \s-1UDP\s0 to a remote endpoint: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i \-f udp://: yading@10: .Ve yading@10: .PP yading@10: To stream in mpegts format over \s-1UDP\s0 using 188 sized \s-1UDP\s0 packets, using a large input buffer: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i \-f mpegts udp://:?pkt_size=188&buffer_size=65535 yading@10: .Ve yading@10: .PP yading@10: To receive over \s-1UDP\s0 from a remote endpoint: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i udp://[]: yading@10: .Ve yading@10: .SH "SEE ALSO" yading@10: .IX Header "SEE ALSO" yading@10: \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavformat\fR\|(3) yading@10: .SH "AUTHORS" yading@10: .IX Header "AUTHORS" yading@10: The FFmpeg developers. yading@10: .PP yading@10: For details about the authorship, see the Git history of the project yading@10: (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command yading@10: \&\fBgit log\fR in the FFmpeg source directory, or browsing the yading@10: online repository at <\fBhttp://source.ffmpeg.org\fR>. yading@10: .PP yading@10: Maintainers for the specific components are listed in the file yading@10: \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.