X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fprotocols.texi;h=eab4a6aff973648fadb7f390f4a64a38aa883f3c;hb=f2f8632aa5584438a09983b64c67908a96f029b9;hp=991ec888afa094c0ab7974f5eb23986a40c882d3;hpb=3ee83f46058449913abeca7ba82e8e2909828209;p=ffmpeg diff --git a/doc/protocols.texi b/doc/protocols.texi index 991ec888afa..eab4a6aff97 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -67,7 +67,7 @@ File access protocol. Allow to read from or read to a file. -For example to read from a file @file{input.mpeg} with @file{ffmpeg} +For example to read from a file @file{input.mpeg} with @command{ffmpeg} use the command: @example ffmpeg -i file:input.mpeg output.mpeg @@ -134,14 +134,14 @@ pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number} is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. -For example to read from stdin with @file{ffmpeg}: +For example to read from stdin with @command{ffmpeg}: @example cat test.wav | ffmpeg -i pipe:0 # ...this is the same as... cat test.wav | ffmpeg -i pipe: @end example -For writing to stdout with @file{ffmpeg}: +For writing to stdout with @command{ffmpeg}: @example ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi # ...this is the same as... @@ -155,8 +155,8 @@ be seekable, so they will fail with the pipe output protocol. Real-Time Messaging Protocol. -The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐ -dia content across a TCP/IP network. +The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia +content across a TCP/IP network. The required syntax is: @example @@ -195,7 +195,7 @@ Real-Time Messaging Protocol and its variants supported through librtmp. Requires the presence of the librtmp headers and library during -configuration. You need to explicitely configure the build with +configuration. You need to explicitly configure the build with "--enable-librtmp". If enabled this will replace the native RTMP protocol. @@ -219,7 +219,7 @@ meaning as specified for the RTMP native protocol. See the librtmp manual page (man 3 librtmp) for more information. For example, to stream a file in real-time to an RTMP server using -@file{ffmpeg}: +@command{ffmpeg}: @example ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream @end example @@ -246,12 +246,15 @@ supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's The required syntax for a RTSP url is: @example -rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}] +rtsp://@var{hostname}[:@var{port}]/@var{path} @end example -@var{options} is a @code{&}-separated list. The following options +The following options (set on the @command{ffmpeg}/@file{ffplay} command +line, or set in code via @code{AVOption}s or in @code{avformat_open_input}), are supported: +Flags for @code{rtsp_transport}: + @table @option @item udp @@ -261,21 +264,25 @@ Use UDP as lower transport protocol. Use TCP (interleaving within the RTSP control channel) as lower transport protocol. -@item multicast +@item udp_multicast Use UDP multicast as lower transport protocol. @item http Use HTTP tunneling as lower transport protocol, which is useful for passing proxies. - -@item filter_src -Accept packets only from negotiated peer address and port. @end table Multiple lower transport protocols may be specified, in that case they are tried one at a time (if the setup of one fails, the next one is tried). For the muxer, only the @code{tcp} and @code{udp} options are supported. +Flags for @code{rtsp_flags}: + +@table @option +@item filter_src +Accept packets only from negotiated peer address and port. +@end table + When receiving data over UDP, the demuxer tries to reorder received packets (since they may arrive out of order, or packets may get lost totally). In order for this to be enabled, a maximum delay must be specified in the @@ -291,13 +298,13 @@ Example command lines: To watch a stream over UDP, with a max reordering delay of 0.5 seconds: @example -ffplay -max_delay 500000 rtsp://server/video.mp4?udp +ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4 @end example To watch a stream tunneled over HTTP: @example -ffplay rtsp://server/video.mp4?http +ffplay -rtsp_transport http rtsp://server/video.mp4 @end example To send a stream in realtime to a RTSP server, for others to watch: @@ -439,6 +446,11 @@ set the UDP buffer size in bytes @item localport=@var{port} override the local UDP port to bind with +@item localaddr=@var{addr} +Choose the local IP address. This is useful e.g. if sending multicast +and the host has multiple interfaces, where the user can choose +which interface to send on by specifying the IP address of that interface. + @item pkt_size=@var{size} set the size in bytes of UDP packets @@ -460,7 +472,7 @@ For receiving, this gives the benefit of only receiving packets from the specified peer address/port. @end table -Some usage examples of the udp protocol with @file{ffmpeg} follow. +Some usage examples of the udp protocol with @command{ffmpeg} follow. To stream over UDP to a remote endpoint: @example