4 Protocols are configured elements in FFmpeg which allow to access
5 resources which require the use of a particular protocol.
7 When you configure your FFmpeg build, all the supported protocols
8 are enabled by default. You can list them using the configure option
11 You can disable all the protocols using the configure option
12 "--disable-protocols", and selectively enable a protocol using the
13 option "--enable-protocol=@var{PROTOCOL}", or you can disable a
14 particular protocol using the option
15 "--disable-protocol=@var{PROTOCOL}".
17 The option "-protocols" of the ff* tools will display the list of
18 the supported protocols.
20 A description of the currently available protocols follows.
24 Physical concatenation protocol.
26 Allow to read and seek from many resource in sequence as they were an
29 An url accepted by this protocol has the syntax:
31 concat:@var{URL1}|@var{URL2}|...|@var{URLN}
34 where @var{URL1}, @var{URL2}, ..., @var{URLN} are the urls of the
35 resource to be concatenated, each one possibly specifying a distinct
38 For example to read a sequence of files @file{split1.mpeg},
39 @file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the
42 ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
45 Note that you may need to escape the character "|" which is special for
52 Allow to read from or read to a file.
54 For example to read from a file @file{input.mpeg} with @file{ffmpeg}
57 ffmpeg -i file:input.mpeg output.mpeg
60 Note that if not specified otherwise, the ff* tools will use the file
61 protocol by default, that is a resource specified with the name
62 "FILE.mpeg" is interpreted as it were the url "file:FILE.mpeg".
70 HTTP (Hyper Text Trasfer Protocol).
74 MMS (Microsoft Media Server) protocol over TCP.
80 Computes the MD5 hash of data written, and on close writes this to the
81 designated output or stdout if none is specified. It can be used to
82 test muxers without writing an actual file.
86 # write the MD5 hash of the encoded AVI file in the file output.avi.md5
87 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
89 # write the MD5 hash of the encoded AVI file to stdout
90 ffmpeg -i input.flv -f avi -y md5:
93 Note that some formats (typically mov) require the output protocol to
94 be seekable, so they will fail with the MD5 output protocol.
98 UNIX pipe access protocol.
100 Allow to read and write from UNIX pipes.
102 The accepted syntax is:
107 @var{number} is the number corresponding to the file descriptor of the
108 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).
109 If @var{number} is not specified will use by default stdout if the
110 protocol is used for writing, stdin if the protocol is used for
113 For example to read from stdin with @file{ffmpeg}:
115 cat test.wav | ffmpeg -i pipe:0
116 # this is the same as
117 cat test.wav | ffmpeg -i pipe:
120 For writing to stdout with @file{ffmpeg}:
122 ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
123 # this is the same as
124 ffmpeg -i test.wav -f avi pipe: | cat > test.avi
127 Note that some formats (typically mov), require the output protocol to
128 be seekable, so they will fail with the pipe output protocol.
132 Real-Time Messaging Protocol.
134 The Real-Time Messaging Protocol (RTMP) is used for streaming multimeā
135 dia content across a TCP/IP network.
137 The required syntax is:
139 rtmp://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
142 Follows the description of the accepted parameters.
146 It is the address of the RTMP server.
149 It is the number of the TCP port to use (by default is 1935).
152 It is the name of the application to acces. It usually corresponds to
153 the the path where the application is installed on the RTMP server
154 (e.g. @file{/ondemand/}, @file{/flash/live/}, etc.).
157 It is the path or name of the resource to play with reference to the
158 application specified in @var{app}, may be prefixed by "mp4:".
162 For example to read with @file{ffplay} a multimedia resource named
163 "sample" from the application "vod" from an RTMP server "myserver":
165 ffplay rtmp://myserver/vod/sample
168 @section rtmp, rtmpe, rtmps, rtmpt, rtmpte
170 Real-Time Messaging Protocol and its variants supported through
173 Require the presence of the headers and library of librtmp during
174 configuration. You need to explicitely configure the build with
175 "--enable-librtmp". If enabled this will replace the native RTMP
178 This protocol provides most client functions and a few server
179 functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
180 encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
181 variants of these encrypted types (RTMPTE, RTMPTS).
183 The required syntax is:
185 @var{rtmp_proto}://@var{server}[:@var{port}][/@var{app}][/@var{playpath}] @var{options}
188 where @var{rtmp_proto} is one of the strings "rtmp", "rtmpt", "rtmpe",
189 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
190 @var{server}, @var{port}, @var{app} and @var{playpath} have the same
191 meaning has specified for the RTMP native protocol.
192 @var{options} contains a list of space-separated options of the form
195 See the manual page of librtmp (man 3 librtmp) for more information.
197 For example, to stream a file in real-time to an RTMP server using
200 ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
203 To play the same stream using @file{ffplay}:
205 ffplay "rtmp://myserver/live/mystream live=1"
214 Trasmission Control Protocol.
218 User Datagram Protocol.