yading@10: =head1 NAME yading@10: yading@10: ffmpeg-protocols - FFmpeg protocols yading@10: yading@10: =head1 DESCRIPTION yading@10: yading@10: yading@10: This document describes the input and output protocols provided by the yading@10: libavformat library. yading@10: yading@10: yading@10: yading@10: =head1 PROTOCOLS yading@10: yading@10: 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: 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 "--list-protocols". yading@10: yading@10: You can disable all the protocols using the configure option yading@10: "--disable-protocols", and selectively enable a protocol using the yading@10: option "--enable-protocol=I", or you can disable a yading@10: particular protocol using the option yading@10: "--disable-protocol=I". yading@10: yading@10: The option "-protocols" of the ff* tools will display the list of yading@10: supported protocols. yading@10: yading@10: A description of the currently available protocols follows. yading@10: yading@10: yading@10: =head2 bluray yading@10: yading@10: yading@10: Read BluRay playlist. yading@10: yading@10: The accepted options are: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: BluRay angle yading@10: yading@10: yading@10: =item B yading@10: yading@10: Start chapter (1...N) yading@10: yading@10: yading@10: =item B yading@10: yading@10: Playlist to read (BDMV/PLAYLIST/?????.mpls) yading@10: yading@10: yading@10: =back yading@10: yading@10: yading@10: Examples: yading@10: yading@10: Read longest playlist from BluRay mounted to /mnt/bluray: yading@10: yading@10: bluray:/mnt/bluray yading@10: yading@10: yading@10: Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2: yading@10: yading@10: -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray yading@10: yading@10: yading@10: yading@10: =head2 concat yading@10: yading@10: yading@10: Physical concatenation protocol. yading@10: yading@10: Allow to read and seek from many resource in sequence as if they were yading@10: a unique resource. yading@10: yading@10: A URL accepted by this protocol has the syntax: yading@10: yading@10: concat:||...| yading@10: yading@10: yading@10: where I, I, ..., I are the urls of the yading@10: resource to be concatenated, each one possibly specifying a distinct yading@10: protocol. yading@10: yading@10: For example to read a sequence of files F, yading@10: F, F with B use the yading@10: command: yading@10: yading@10: ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg yading@10: yading@10: yading@10: Note that you may need to escape the character "|" which is special for yading@10: many shells. yading@10: yading@10: yading@10: =head2 data yading@10: yading@10: yading@10: Data in-line in the URI. See EBE. yading@10: yading@10: For example, to convert a GIF file given inline with B: yading@10: yading@10: ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png yading@10: yading@10: yading@10: yading@10: =head2 file yading@10: yading@10: yading@10: File access protocol. yading@10: yading@10: Allow to read from or read to a file. yading@10: yading@10: For example to read from a file F with B yading@10: use the command: yading@10: yading@10: ffmpeg -i file:input.mpeg output.mpeg yading@10: yading@10: yading@10: The ff* tools default to the file protocol, that is a resource yading@10: specified with the name "FILE.mpeg" is interpreted as the URL yading@10: "file:FILE.mpeg". yading@10: yading@10: yading@10: =head2 gopher yading@10: yading@10: yading@10: Gopher protocol. yading@10: yading@10: yading@10: =head2 hls yading@10: yading@10: yading@10: Read Apple HTTP Live Streaming compliant segmented stream as yading@10: a uniform one. The M3U8 playlists describing the segments can be yading@10: remote HTTP resources or local files, accessed using the standard yading@10: file protocol. yading@10: The nested protocol is declared by specifying yading@10: "+I" after the hls URI scheme name, where I yading@10: is either "file" or "http". yading@10: yading@10: yading@10: hls+http://host/path/to/remote/resource.m3u8 yading@10: hls+file://path/to/local/resource.m3u8 yading@10: yading@10: 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: yading@10: yading@10: =head2 http yading@10: yading@10: yading@10: HTTP (Hyper Text Transfer Protocol). yading@10: yading@10: This protocol accepts the following options. yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: =item B yading@10: 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: yading@10: yading@10: =item B yading@10: yading@10: If set to 1 use chunked transfer-encoding for posts, default is 1. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Set custom HTTP headers, can override built in default headers. The yading@10: value must be a string encoding the headers. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Force a content type. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Override User-Agent header. If not specified the protocol will use a yading@10: string describing the libavformat build. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Use persistent connections if set to 1. By default it is 0. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Set custom HTTP post data. yading@10: yading@10: yading@10: =item B yading@10: 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: yading@10: yading@10: =item B yading@10: yading@10: Set MIME type. yading@10: yading@10: yading@10: =item B yading@10: 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 HTTP response field. Multiple cookies can be yading@10: delimited by a newline character. yading@10: yading@10: =back yading@10: yading@10: yading@10: yading@10: =head3 HTTP Cookies yading@10: yading@10: yading@10: Some HTTP requests will be denied unless cookie values are passed in with the yading@10: request. The B 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: HTTP requests that match both the domain and path will automatically include the yading@10: cookie value in the HTTP Cookie header field. Multiple cookies can be delimited yading@10: by a newline. yading@10: yading@10: The required syntax to play a stream specifying a cookie is: yading@10: yading@10: ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 yading@10: yading@10: yading@10: yading@10: =head2 mmst yading@10: yading@10: yading@10: MMS (Microsoft Media Server) protocol over TCP. yading@10: yading@10: yading@10: =head2 mmsh yading@10: yading@10: yading@10: MMS (Microsoft Media Server) protocol over HTTP. yading@10: yading@10: The required syntax is: yading@10: yading@10: mmsh://[:][/][/] yading@10: yading@10: yading@10: yading@10: =head2 md5 yading@10: yading@10: yading@10: MD5 output protocol. yading@10: yading@10: Computes the MD5 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: yading@10: Some examples follow. yading@10: 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: yading@10: yading@10: Note that some formats (typically MOV) require the output protocol to yading@10: be seekable, so they will fail with the MD5 output protocol. yading@10: yading@10: yading@10: =head2 pipe yading@10: yading@10: yading@10: UNIX pipe access protocol. yading@10: yading@10: Allow to read and write from UNIX pipes. yading@10: yading@10: The accepted syntax is: yading@10: yading@10: pipe:[] yading@10: yading@10: yading@10: I 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 I yading@10: is not specified, by default the stdout file descriptor will be used yading@10: for writing, stdin for reading. yading@10: yading@10: For example to read from stdin with B: yading@10: 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: yading@10: yading@10: For writing to stdout with B: yading@10: 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: yading@10: yading@10: Note that some formats (typically MOV), require the output protocol to yading@10: be seekable, so they will fail with the pipe output protocol. yading@10: yading@10: yading@10: =head2 rtmp yading@10: yading@10: yading@10: Real-Time Messaging Protocol. yading@10: yading@10: The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia yading@10: content across a TCP/IP network. yading@10: yading@10: The required syntax is: yading@10: yading@10: rtmp://[:][/][/][/] yading@10: yading@10: yading@10: The accepted parameters are: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: The address of the RTMP server. yading@10: yading@10: yading@10: =item B yading@10: yading@10: The number of the TCP port to use (by default is 1935). yading@10: yading@10: yading@10: =item B yading@10: 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 RTMP server yading@10: (e.g. F, F, etc.). You can override yading@10: the value parsed from the URI through the C option, too. yading@10: yading@10: yading@10: =item B yading@10: yading@10: It is the path or name of the resource to play with reference to the yading@10: application specified in I, may be prefixed by "mp4:". You yading@10: can override the value parsed from the URI through the C yading@10: option, too. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Act as a server, listening for an incoming connection. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Maximum time to wait for the incoming connection. Implies listen. yading@10: yading@10: =back yading@10: yading@10: yading@10: Additionally, the following parameters can be set via command line options yading@10: (or in code via Cs): yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: Name of application to connect on the RTMP server. This option yading@10: overrides the parameter specified in the URI. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Set the client buffer time in milliseconds. The default is 3000. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Extra arbitrary AMF connection parameters, parsed from a string, yading@10: e.g. like C. 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: FALSE or TRUE, 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. C). This option may be used multiple yading@10: times to construct arbitrary AMF sequences. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Version of the Flash plugin used to run the SWF player. The default yading@10: is LNX 9,0,124,2. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Number of packets flushed in the same request (RTMPT only). The default yading@10: is 10. yading@10: yading@10: yading@10: =item B yading@10: 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 C, 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 C and yading@10: C. yading@10: yading@10: yading@10: =item B yading@10: yading@10: URL of the web page in which the media was embedded. By default no yading@10: value will be sent. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Stream identifier to play or to publish. This option overrides the yading@10: parameter specified in the URI. yading@10: yading@10: yading@10: =item B yading@10: 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: yading@10: yading@10: =item B yading@10: yading@10: SHA256 hash of the decompressed SWF file (32 bytes). yading@10: yading@10: yading@10: =item B yading@10: yading@10: Size of the decompressed SWF file, required for SWFVerification. yading@10: yading@10: yading@10: =item B yading@10: yading@10: URL of the SWF player for the media. By default no value will be sent. yading@10: yading@10: yading@10: =item B yading@10: yading@10: URL to player swf file, compute hash/size automatically. yading@10: yading@10: yading@10: =item B yading@10: yading@10: URL of the target stream. Defaults to proto://host[:port]/app. yading@10: yading@10: yading@10: =back yading@10: yading@10: yading@10: For example to read with B a multimedia resource named yading@10: "sample" from the application "vod" from an RTMP server "myserver": yading@10: yading@10: ffplay rtmp://myserver/vod/sample yading@10: yading@10: yading@10: yading@10: =head2 rtmpe yading@10: yading@10: yading@10: Encrypted Real-Time Messaging Protocol. yading@10: yading@10: The Encrypted Real-Time Messaging Protocol (RTMPE) is used for yading@10: streaming multimedia content within standard cryptographic primitives, yading@10: consisting of Diffie-Hellman key exchange and HMACSHA256, generating yading@10: a pair of RC4 keys. yading@10: yading@10: yading@10: =head2 rtmps yading@10: yading@10: yading@10: Real-Time Messaging Protocol over a secure SSL connection. yading@10: yading@10: The Real-Time Messaging Protocol (RTMPS) is used for streaming yading@10: multimedia content across an encrypted connection. yading@10: yading@10: yading@10: =head2 rtmpt yading@10: yading@10: yading@10: Real-Time Messaging Protocol tunneled through HTTP. yading@10: yading@10: The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used yading@10: for streaming multimedia content within HTTP requests to traverse yading@10: firewalls. yading@10: yading@10: yading@10: =head2 rtmpte yading@10: yading@10: yading@10: Encrypted Real-Time Messaging Protocol tunneled through HTTP. yading@10: yading@10: The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE) yading@10: is used for streaming multimedia content within HTTP requests to traverse yading@10: firewalls. yading@10: yading@10: yading@10: =head2 rtmpts yading@10: yading@10: yading@10: Real-Time Messaging Protocol tunneled through HTTPS. yading@10: yading@10: The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used yading@10: for streaming multimedia content within HTTPS requests to traverse yading@10: firewalls. yading@10: yading@10: yading@10: =head2 rtmp, rtmpe, rtmps, rtmpt, rtmpte yading@10: yading@10: yading@10: Real-Time Messaging Protocol and its variants supported through yading@10: librtmp. yading@10: 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: "--enable-librtmp". If enabled this will replace the native RTMP yading@10: protocol. yading@10: yading@10: This protocol provides most client functions and a few server yading@10: functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT), yading@10: encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled yading@10: variants of these encrypted types (RTMPTE, RTMPTS). yading@10: yading@10: The required syntax is: yading@10: yading@10: ://[:][/][/] yading@10: yading@10: yading@10: where I is one of the strings "rtmp", "rtmpt", "rtmpe", yading@10: "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and yading@10: I, I, I and I have the same yading@10: meaning as specified for the RTMP native protocol. yading@10: I contains a list of space-separated options of the form yading@10: I=I. yading@10: yading@10: See the librtmp manual page (man 3 librtmp) for more information. yading@10: yading@10: For example, to stream a file in real-time to an RTMP server using yading@10: B: yading@10: yading@10: ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream yading@10: yading@10: yading@10: To play the same stream using B: yading@10: yading@10: ffplay "rtmp://myserver/live/mystream live=1" yading@10: yading@10: yading@10: yading@10: =head2 rtp yading@10: yading@10: yading@10: Real-Time Protocol. yading@10: yading@10: yading@10: =head2 rtsp yading@10: yading@10: yading@10: RTSP is not technically a protocol handler in libavformat, it is a demuxer yading@10: and muxer. The demuxer supports both normal RTSP (with data transferred yading@10: over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with yading@10: data transferred over RDT). yading@10: yading@10: The muxer can be used to send a stream using RTSP ANNOUNCE to a server yading@10: supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's yading@10: EBE). yading@10: yading@10: The required syntax for a RTSP url is: yading@10: yading@10: rtsp://[:]/ yading@10: yading@10: yading@10: The following options (set on the B/B command yading@10: line, or set in code via Cs or in C), yading@10: are supported: yading@10: yading@10: Flags for C: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: Use UDP as lower transport protocol. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Use TCP (interleaving within the RTSP control channel) as lower yading@10: transport protocol. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Use UDP multicast as lower transport protocol. yading@10: yading@10: yading@10: =item B yading@10: yading@10: Use HTTP tunneling as lower transport protocol, which is useful for yading@10: passing proxies. yading@10: yading@10: =back yading@10: yading@10: 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 C and C options are supported. yading@10: yading@10: Flags for C: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: =item B yading@10: yading@10: Accept packets only from negotiated peer address and port. yading@10: yading@10: =item B yading@10: yading@10: Act as a server, listening for an incoming connection. yading@10: yading@10: =back yading@10: yading@10: yading@10: When receiving data over UDP, 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 C field of AVFormatContext). yading@10: yading@10: When watching multi-bitrate Real-RTSP streams with B, the yading@10: streams to display can be chosen with C<-vst> I and yading@10: C<-ast> I for video and audio respectively, and can be switched yading@10: on the fly by pressing C and C. yading@10: yading@10: Example command lines: yading@10: yading@10: To watch a stream over UDP, with a max reordering delay of 0.5 seconds: yading@10: yading@10: yading@10: ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4 yading@10: yading@10: yading@10: To watch a stream tunneled over HTTP: yading@10: yading@10: yading@10: ffplay -rtsp_transport http rtsp://server/video.mp4 yading@10: yading@10: yading@10: To send a stream in realtime to a RTSP server, for others to watch: yading@10: yading@10: yading@10: ffmpeg -re -i -f rtsp -muxdelay 0.1 rtsp://server/live.sdp yading@10: yading@10: yading@10: To receive a stream in realtime: yading@10: yading@10: yading@10: ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp yading@10: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: =item B yading@10: yading@10: Socket IO timeout in micro seconds. yading@10: yading@10: =back yading@10: yading@10: yading@10: yading@10: =head2 sap yading@10: yading@10: yading@10: Session Announcement Protocol (RFC 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 RTP streams, by announcing the SDP for the yading@10: streams regularly on a separate port. yading@10: yading@10: yading@10: =head3 Muxer yading@10: yading@10: yading@10: The syntax for a SAP url given to the muxer is: yading@10: yading@10: sap://[:][?] yading@10: yading@10: yading@10: The RTP packets are sent to I on port I, yading@10: or to port 5004 if no port is specified. yading@10: I is a C<&>-separated list. The following options yading@10: are supported: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item BI
yading@10: yading@10: Specify the destination IP address for sending the announcements to. yading@10: If omitted, the announcements are sent to the commonly used SAP yading@10: announcement multicast address 224.2.127.254 (sap.mcast.net), or yading@10: ff0e::2:7ffe if I is an IPv6 address. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Specify the port to send the announcements on, defaults to yading@10: 9875 if not specified. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Specify the time to live value for the announcements and RTP packets, yading@10: defaults to 255. yading@10: yading@10: yading@10: =item BI<0|1> yading@10: yading@10: If set to 1, send all RTP 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 RTP stack in libavformat for receiving requires all streams to be sent yading@10: on unique ports. yading@10: yading@10: =back yading@10: yading@10: yading@10: Example command lines follow. yading@10: yading@10: To broadcast a stream on the local subnet, for watching in VLC: yading@10: yading@10: yading@10: ffmpeg -re -i -f sap sap://224.0.0.255?same_port=1 yading@10: yading@10: yading@10: Similarly, for watching in B: yading@10: yading@10: yading@10: ffmpeg -re -i -f sap sap://224.0.0.255 yading@10: yading@10: yading@10: And for watching in B, over IPv6: yading@10: yading@10: yading@10: ffmpeg -re -i -f sap sap://[ff0e::1:2:3:4] yading@10: yading@10: yading@10: yading@10: =head3 Demuxer yading@10: yading@10: yading@10: The syntax for a SAP url given to the demuxer is: yading@10: yading@10: sap://[
][:] yading@10: yading@10: yading@10: I
is the multicast address to listen for announcements on, yading@10: if omitted, the default 224.2.127.254 (sap.mcast.net) is used. I yading@10: is the port that is listened on, 9875 if omitted. yading@10: 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: yading@10: Example command lines follow. yading@10: yading@10: To play back the first stream announced on the normal SAP multicast address: yading@10: yading@10: yading@10: ffplay sap:// yading@10: yading@10: yading@10: To play back the first stream announced on one the default IPv6 SAP multicast address: yading@10: yading@10: yading@10: ffplay sap://[ff0e::2:7ffe] yading@10: yading@10: yading@10: yading@10: =head2 tcp yading@10: yading@10: yading@10: Trasmission Control Protocol. yading@10: yading@10: The required syntax for a TCP url is: yading@10: yading@10: tcp://:[?] yading@10: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: Listen for an incoming connection yading@10: yading@10: yading@10: =item BI yading@10: 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 TCP connection establishing. yading@10: yading@10: yading@10: ffmpeg -i -f tcp://:?listen yading@10: ffplay tcp://: yading@10: yading@10: yading@10: yading@10: =back yading@10: yading@10: yading@10: yading@10: =head2 tls yading@10: yading@10: yading@10: Transport Layer Security/Secure Sockets Layer yading@10: yading@10: The required syntax for a TLS/SSL url is: yading@10: yading@10: tls://:[?] yading@10: yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item B yading@10: yading@10: Act as a server, listening for an incoming connection. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Certificate authority file. The file must be in OpenSSL PEM format. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Certificate file. The file must be in OpenSSL PEM format. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Private key file. yading@10: yading@10: yading@10: =item BI<0|1> yading@10: yading@10: Verify the peer's certificate. yading@10: yading@10: yading@10: =back yading@10: yading@10: yading@10: Example command lines: yading@10: yading@10: To create a TLS/SSL server that serves an input stream. yading@10: yading@10: yading@10: ffmpeg -i -f tls://:?listen&cert=&key= yading@10: yading@10: yading@10: To play back a stream from the TLS/SSL server using B: yading@10: yading@10: yading@10: ffplay tls://: yading@10: yading@10: yading@10: yading@10: =head2 udp yading@10: yading@10: yading@10: User Datagram Protocol. yading@10: yading@10: The required syntax for a UDP url is: yading@10: yading@10: udp://:[?] yading@10: yading@10: yading@10: I contains a list of &-separated options of the form I=I. yading@10: 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: UDP socket buffer overruns. The I and yading@10: I options are related to this buffer. yading@10: yading@10: The list of supported options follows. yading@10: yading@10: yading@10: =over 4 yading@10: yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Set the UDP socket buffer size in bytes. This is used both for the yading@10: receiving and the sending buffer size. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Override the local UDP port to bind with. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Choose the local IP 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 IP address of that interface. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Set the size in bytes of UDP packets. yading@10: yading@10: yading@10: =item BI<1|0> yading@10: yading@10: Explicitly allow or disallow reusing UDP sockets. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Set the time to live value (for multicast only). yading@10: yading@10: yading@10: =item BI<1|0> yading@10: yading@10: Initialize the UDP socket with C. 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 AVERROR(ECONNREFUSED) if "destination yading@10: unreachable" is received. yading@10: For receiving, this gives the benefit of only receiving packets from yading@10: the specified peer address/port. yading@10: yading@10: yading@10: =item BI
B<[,>I
B<]> yading@10: yading@10: Only receive packets sent to the multicast group from one of the yading@10: specified sender IP addresses. yading@10: yading@10: yading@10: =item BI
B<[,>I
B<]> yading@10: yading@10: Ignore packets sent to the multicast group from the specified yading@10: sender IP addresses. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: Set the UDP 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: yading@10: yading@10: =item BI<1|0> yading@10: yading@10: Survive in case of UDP receiving circular buffer overrun. Default yading@10: value is 0. yading@10: yading@10: yading@10: =item BI yading@10: yading@10: In read mode: if no data arrived in more than this time interval, raise error. yading@10: yading@10: =back yading@10: yading@10: yading@10: Some usage examples of the UDP protocol with B follow. yading@10: yading@10: To stream over UDP to a remote endpoint: yading@10: yading@10: ffmpeg -i -f udp://: yading@10: yading@10: yading@10: To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer: yading@10: yading@10: ffmpeg -i -f mpegts udp://:?pkt_size=188&buffer_size=65535 yading@10: yading@10: yading@10: To receive over UDP from a remote endpoint: yading@10: yading@10: ffmpeg -i udp://[]: yading@10: yading@10: yading@10: yading@10: yading@10: =head1 SEE ALSO yading@10: yading@10: yading@10: yading@10: ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libavformat(3) yading@10: yading@10: yading@10: =head1 AUTHORS yading@10: yading@10: yading@10: The FFmpeg developers. yading@10: 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: B in the FFmpeg source directory, or browsing the yading@10: online repository at EBE. yading@10: yading@10: Maintainers for the specific components are listed in the file yading@10: F in the source code tree. yading@10: yading@10: yading@10: