Browse code

Add protocols.texi.

Originally committed as revision 24616 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini authored on 2010/08/01 00:45:29
Showing 5 changed files
... ...
@@ -115,9 +115,9 @@ documentation: $(addprefix doc/, developer.html faq.html general.html libavfilte
115 115
 
116 116
 $(HTMLPAGES) $(MANPAGES): doc/fftools-common-opts.texi
117 117
 
118
-doc/ffmpeg.pod doc/ffmpeg-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi
119
-doc/ffplay.pod doc/ffplay-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi
120
-doc/ffprobe.pod doc/ffprobe-doc.html: doc/indevs.texi
118
+doc/ffmpeg.pod doc/ffmpeg-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi doc/protocols.texi
119
+doc/ffplay.pod doc/ffplay-doc.html: doc/indevs.texi doc/filters.texi doc/outdevs.texi doc/protocols.texi
120
+doc/ffprobe.pod doc/ffprobe-doc.html: doc/indevs.texi doc/protocols.texi
121 121
 
122 122
 doc/%.html: TAG = HTML
123 123
 doc/%.html: doc/%.texi
... ...
@@ -745,19 +745,6 @@ The following constants are available:
745 745
 
746 746
 @c man end
747 747
 
748
-@section Protocols
749
-
750
-The file name can be @file{-} to read from standard input or to write
751
-to standard output.
752
-
753
-FFmpeg also handles many protocols specified with an URL syntax.
754
-
755
-Use 'ffmpeg -protocols' to see a list of the supported protocols.
756
-
757
-The protocol @code{http:} is currently used only to communicate with
758
-FFserver (see the FFserver documentation). When FFmpeg will be a
759
-video player it will also be used for streaming :-)
760
-
761 748
 @chapter Tips
762 749
 @c man begin TIPS
763 750
 
... ...
@@ -966,6 +953,7 @@ file to which you want to add them.
966 966
 
967 967
 @include indevs.texi
968 968
 @include outdevs.texi
969
+@include protocols.texi
969 970
 @include filters.texi
970 971
 
971 972
 @ignore
... ...
@@ -155,6 +155,7 @@ Seek to percentage in file corresponding to fraction of width.
155 155
 
156 156
 @include indevs.texi
157 157
 @include outdevs.texi
158
+@include protocols.texi
158 159
 @include filters.texi
159 160
 
160 161
 @ignore
... ...
@@ -112,6 +112,7 @@ with name ``STREAM''.
112 112
 @end table
113 113
 @c man end
114 114
 
115
+@include protocols.texi
115 116
 @include indevs.texi
116 117
 
117 118
 @ignore
118 119
new file mode 100644
... ...
@@ -0,0 +1,220 @@
0
+@chapter Protocols
1
+@c man begin PROTOCOLS
2
+
3
+Protocols are configured elements in FFmpeg which allow to access
4
+resources which require the use of a particular protocol.
5
+
6
+When you configure your FFmpeg build, all the supported protocols
7
+are enabled by default. You can list them using the configure option
8
+"--list-protocols".
9
+
10
+You can disable all the protocols using the configure option
11
+"--disable-protocols", and selectively enable a protocol using the
12
+option "--enable-protocol=@var{PROTOCOL}", or you can disable a
13
+particular protocol using the option
14
+"--disable-protocol=@var{PROTOCOL}".
15
+
16
+The option "-protocols" of the ff* tools will display the list of
17
+the supported protocols.
18
+
19
+A description of the currently available protocols follows.
20
+
21
+@section concat
22
+
23
+Physical concatenation protocol.
24
+
25
+Allow to read and seek from many resource in sequence as they were an
26
+unique resource.
27
+
28
+An url accepted by this protocol has the syntax:
29
+@example
30
+concat:@var{URL1}|@var{URL2}|...|@var{URLN}
31
+@end example
32
+
33
+where @var{URL1}, @var{URL2}, ..., @var{URLN} are the urls of the
34
+resource to be concatenated, each one possibly specifying a distinct
35
+protocol.
36
+
37
+For example to read a sequence of files @file{split1.mpeg},
38
+@file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the
39
+command:
40
+@example
41
+ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
42
+@end example
43
+
44
+Note that you may need to escape the character "|" which is special for
45
+many shells.
46
+
47
+@section file
48
+
49
+File access protocol.
50
+
51
+Allow to read from or read to a file.
52
+
53
+For example to read from a file @file{input.mpeg} with @file{ffmpeg}
54
+use the command:
55
+@example
56
+ffmpeg -i file:input.mpeg output.mpeg
57
+@end example
58
+
59
+Note that if not specified otherwise, the ff* tools will use the file
60
+protocol by default, that is a resource specified with the name
61
+"FILE.mpeg" is interpreted as it were the url "file:FILE.mpeg".
62
+
63
+@section gopher
64
+
65
+Gopher protocol.
66
+
67
+@section http
68
+
69
+HTTP (Hyper Text Trasfer Protocol).
70
+
71
+@section mmst
72
+
73
+MMS (Microsoft Media Server) protocol over TCP.
74
+
75
+@section md5
76
+
77
+MD5 output protocol.
78
+
79
+Computes the MD5 hash of data written, and on close writes this to the
80
+designated output or stdout if none is specified. It can be used to
81
+test muxers without writing an actual file.
82
+
83
+Some examples follow.
84
+@example
85
+# write the MD5 hash of the encoded AVI file in the file output.avi.md5
86
+ffmpeg -i input.flv -f avi -y md5:output.avi.md5
87
+
88
+# write the MD5 hash of the encoded AVI file to stdout
89
+ffmpeg -i input.flv -f avi -y md5:
90
+@end example
91
+
92
+Note that some formats (typically mov) require the output protocol to
93
+be seekable, so they will fail with the MD5 output protocol.
94
+
95
+@section pipe
96
+
97
+UNIX pipe access protocol.
98
+
99
+Allow to read and write from UNIX pipes.
100
+
101
+The accepted syntax is:
102
+@example
103
+pipe:[@var{number}]
104
+@end example
105
+
106
+@var{number} is the number corresponding to the file descriptor of the
107
+pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).
108
+If @var{number} is not specified will use by default stdout if the
109
+protocol is used for writing, stdin if the protocol is used for
110
+reading.
111
+
112
+For example to read from stdin with @file{ffmpeg}:
113
+@example
114
+cat test.wav | ffmpeg -i pipe:0
115
+# this is the same as
116
+cat test.wav | ffmpeg -i pipe:
117
+@end example
118
+
119
+For writing to stdout with @file{ffmpeg}:
120
+@example
121
+ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
122
+# this is the same as
123
+ffmpeg -i test.wav -f avi pipe: | cat > test.avi
124
+@end example
125
+
126
+Note that some formats (typically mov), require the output protocol to
127
+be seekable, so they will fail with the pipe output protocol.
128
+
129
+@section rtmp
130
+
131
+Real-Time Messaging Protocol.
132
+
133
+The Real-Time Messaging Protocol (RTMP) is used for streaming multimeā€
134
+dia content across a TCP/IP network.
135
+
136
+The required syntax is:
137
+@example
138
+rtmp://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
139
+@end example
140
+
141
+Follows the description of the accepted parameters.
142
+@table @option
143
+
144
+@item server
145
+It is the address of the RTMP server.
146
+
147
+@item port
148
+It is the number of the TCP port to use (by default is 1935).
149
+
150
+@item app
151
+It is the name of the application to acces. It usually corresponds to
152
+the the path where the application is installed on the RTMP server
153
+(e.g. @file{/ondemand/}, @file{/flash/live/}, etc.).
154
+
155
+@item playpath
156
+It is the path or name of the resource to play with reference to the
157
+application specified in @var{app}, may be prefixed by "mp4:".
158
+
159
+@end table
160
+
161
+For example to read with @file{ffplay} a multimedia resource named
162
+"sample" from the application "vod" from an RTMP server "myserver":
163
+@example
164
+ffplay rtmp://myserver/vod/sample
165
+@end example
166
+
167
+@section rtmp, rtmpe, rtmps, rtmpt, rtmpte
168
+
169
+Real-Time Messaging Protocol and its variants supported through
170
+librtmp.
171
+
172
+Require the presence of the headers and library of librtmp during
173
+configuration. You need to explicitely configure the build with
174
+"--enable-librtmp". If enabled this will replace the native RTMP
175
+protocol.
176
+
177
+This protocol provides most client functions and a few server
178
+functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
179
+encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
180
+variants of these encrypted types (RTMPTE, RTMPTS).
181
+
182
+The required syntax is:
183
+@example
184
+@var{rtmp_proto}://@var{server}[:@var{port}][/@var{app}][/@var{playpath}] @var{options}
185
+@end example
186
+
187
+where @var{rtmp_proto} is one of the strings "rtmp", "rtmpt", "rtmpe",
188
+"rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
189
+@var{server}, @var{port}, @var{app} and @var{playpath} have the same
190
+meaning has specified for the RTMP native protocol.
191
+@var{options} contains a list of space-separated options of the form
192
+@var{key}=@var{val}.
193
+
194
+See the manual page of librtmp (man 3 librtmp) for more information.
195
+
196
+For example, to stream a file in real-time to an RTMP server using
197
+@file{ffmpeg}:
198
+@example
199
+ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
200
+@end example
201
+
202
+To play the same stream using @file{ffplay}:
203
+@example
204
+ffplay "rtmp://myserver/live/mystream live=1"
205
+@end example
206
+
207
+@section rtp
208
+
209
+Real-Time Protocol.
210
+
211
+@section tcp
212
+
213
+Trasmission Control Protocol.
214
+
215
+@section udp
216
+
217
+User Datagram Protocol.
218
+
219
+@c man end PROTOCOLS