4 Protocols are configured elements in Libav which allow to access
5 resources which require the use of a particular protocol.
7 When you configure your Libav build, all the supported protocols are
8 enabled by default. You can list all available ones using the
9 configure option "--list-protocols".
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 av* tools will display the list of
20 All protocols accept the following options:
24 Maximum time to wait for (network) read/write operations to complete,
28 A description of the currently available protocols follows.
32 Physical concatenation protocol.
34 Allow to read and seek from many resource in sequence as if they were
37 A URL accepted by this protocol has the syntax:
39 concat:@var{URL1}|@var{URL2}|...|@var{URLN}
42 where @var{URL1}, @var{URL2}, ..., @var{URLN} are the urls of the
43 resource to be concatenated, each one possibly specifying a distinct
46 For example to read a sequence of files @file{split1.mpeg},
47 @file{split2.mpeg}, @file{split3.mpeg} with @command{avplay} use the
50 avplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
53 Note that you may need to escape the character "|" which is special for
60 Allow to read from or read to a file.
62 For example to read from a file @file{input.mpeg} with @command{avconv}
65 avconv -i file:input.mpeg output.mpeg
68 The av* tools default to the file protocol, that is a resource
69 specified with the name "FILE.mpeg" is interpreted as the URL
72 This protocol accepts the following options:
76 If set to 1, the protocol will retry reading at the end of the file, allowing
77 reading files that still are being written. In order for this to terminate,
78 you either need to use the rw_timeout option, or use the interrupt callback
89 Read Apple HTTP Live Streaming compliant segmented stream as
90 a uniform one. The M3U8 playlists describing the segments can be
91 remote HTTP resources or local files, accessed using the standard
93 The nested protocol is declared by specifying
94 "+@var{proto}" after the hls URI scheme name, where @var{proto}
95 is either "file" or "http".
98 hls+http://host/path/to/remote/resource.m3u8
99 hls+file://path/to/local/resource.m3u8
102 Using this protocol is discouraged - the hls demuxer should work
103 just as well (if not, please report the issues) and is more complete.
104 To use the hls demuxer instead, simply use the direct URLs to the
109 HTTP (Hyper Text Transfer Protocol).
111 This protocol accepts the following options:
115 If set to 1 use chunked Transfer-Encoding for posts, default is 1.
118 Set a specific content type for the POST messages.
121 Set custom HTTP headers, can override built in default headers. The
122 value must be a string encoding the headers.
124 @item multiple_requests
125 Use persistent connections if set to 1, default is 0.
128 Set custom HTTP post data.
131 Override the User-Agent header. If not specified a string of the form
132 "Lavf/<version>" will be used.
135 Export the MIME type.
138 If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
139 supports this, the metadata has to be retrieved by the application by reading
140 the @option{icy_metadata_headers} and @option{icy_metadata_packet} options.
143 @item icy_metadata_headers
144 If the server supports ICY metadata, this contains the ICY-specific HTTP reply
145 headers, separated by newline characters.
147 @item icy_metadata_packet
148 If the server supports ICY metadata, and @option{icy} was set to 1, this
149 contains the last non-empty metadata packet sent by the server. It should be
150 polled in regular intervals by applications interested in mid-stream metadata
154 Set initial byte offset.
157 Try to limit the request to bytes preceding this offset.
162 Icecast (stream to Icecast servers)
164 This protocol accepts the following options:
168 Set the stream genre.
173 @item ice_description
174 Set the stream description.
177 Set the stream website URL.
180 Set if the stream should be public or not.
181 The default is 0 (not public).
184 Override the User-Agent header. If not specified a string of the form
185 "Lavf/<version>" will be used.
188 Set the Icecast mountpoint password.
191 Set the stream content type. This must be set if it is different from
195 This enables support for Icecast versions < 2.4.0, that do not support the
196 HTTP PUT method but the SOURCE method.
202 MMS (Microsoft Media Server) protocol over TCP.
206 MMS (Microsoft Media Server) protocol over HTTP.
208 The required syntax is:
210 mmsh://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
217 Computes the MD5 hash of the data to be written, and on close writes
218 this to the designated output or stdout if none is specified. It can
219 be used to test muxers without writing an actual file.
221 Some examples follow.
223 # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
224 avconv -i input.flv -f avi -y md5:output.avi.md5
226 # Write the MD5 hash of the encoded AVI file to stdout.
227 avconv -i input.flv -f avi -y md5:
230 Note that some formats (typically MOV) require the output protocol to
231 be seekable, so they will fail with the MD5 output protocol.
235 UNIX pipe access protocol.
237 Allow to read and write from UNIX pipes.
239 The accepted syntax is:
244 @var{number} is the number corresponding to the file descriptor of the
245 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number}
246 is not specified, by default the stdout file descriptor will be used
247 for writing, stdin for reading.
249 For example to read from stdin with @command{avconv}:
251 cat test.wav | avconv -i pipe:0
252 # ...this is the same as...
253 cat test.wav | avconv -i pipe:
256 For writing to stdout with @command{avconv}:
258 avconv -i test.wav -f avi pipe:1 | cat > test.avi
259 # ...this is the same as...
260 avconv -i test.wav -f avi pipe: | cat > test.avi
263 Note that some formats (typically MOV), require the output protocol to
264 be seekable, so they will fail with the pipe output protocol.
268 Real-Time Messaging Protocol.
270 The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
271 content across a TCP/IP network.
273 The required syntax is:
275 rtmp://[@var{username}:@var{password}@@]@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
278 The accepted parameters are:
282 An optional username (mostly for publishing).
285 An optional password (mostly for publishing).
288 The address of the RTMP server.
291 The number of the TCP port to use (by default is 1935).
294 It is the name of the application to access. It usually corresponds to
295 the path where the application is installed on the RTMP server
296 (e.g. @file{/ondemand/}, @file{/flash/live/}, etc.). You can override
297 the value parsed from the URI through the @code{rtmp_app} option, too.
300 It is the path or name of the resource to play with reference to the
301 application specified in @var{app}, may be prefixed by "mp4:". You
302 can override the value parsed from the URI through the @code{rtmp_playpath}
306 Act as a server, listening for an incoming connection.
309 Maximum time to wait for the incoming connection. Implies listen.
312 Additionally, the following parameters can be set via command line options
313 (or in code via @code{AVOption}s):
317 Name of application to connect on the RTMP server. This option
318 overrides the parameter specified in the URI.
321 Set the client buffer time in milliseconds. The default is 3000.
324 Extra arbitrary AMF connection parameters, parsed from a string,
325 e.g. like @code{B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0}.
326 Each value is prefixed by a single character denoting the type,
327 B for Boolean, N for number, S for string, O for object, or Z for null,
328 followed by a colon. For Booleans the data must be either 0 or 1 for
329 FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or
330 1 to end or begin an object, respectively. Data items in subobjects may
331 be named, by prefixing the type with 'N' and specifying the name before
332 the value (i.e. @code{NB:myFlag:1}). This option may be used multiple
333 times to construct arbitrary AMF sequences.
336 Version of the Flash plugin used to run the SWF player. The default
337 is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
338 <libavformat version>).)
340 @item rtmp_flush_interval
341 Number of packets flushed in the same request (RTMPT only). The default
345 Specify that the media is a live stream. No resuming or seeking in
346 live streams is possible. The default value is @code{any}, which means the
347 subscriber first tries to play the live stream specified in the
348 playpath. If a live stream of that name is not found, it plays the
349 recorded stream. The other possible values are @code{live} and
353 URL of the web page in which the media was embedded. By default no
357 Stream identifier to play or to publish. This option overrides the
358 parameter specified in the URI.
361 Name of live stream to subscribe to. By default no value will be sent.
362 It is only sent if the option is specified or if rtmp_live
366 SHA256 hash of the decompressed SWF file (32 bytes).
369 Size of the decompressed SWF file, required for SWFVerification.
372 URL of the SWF player for the media. By default no value will be sent.
375 URL to player swf file, compute hash/size automatically.
378 URL of the target stream. Defaults to proto://host[:port]/app.
382 For example to read with @command{avplay} a multimedia resource named
383 "sample" from the application "vod" from an RTMP server "myserver":
385 avplay rtmp://myserver/vod/sample
388 To publish to a password protected server, passing the playpath and
389 app names separately:
391 avconv -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@@myserver/
396 Encrypted Real-Time Messaging Protocol.
398 The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
399 streaming multimedia content within standard cryptographic primitives,
400 consisting of Diffie-Hellman key exchange and HMACSHA256, generating
405 Real-Time Messaging Protocol over a secure SSL connection.
407 The Real-Time Messaging Protocol (RTMPS) is used for streaming
408 multimedia content across an encrypted connection.
412 Real-Time Messaging Protocol tunneled through HTTP.
414 The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
415 for streaming multimedia content within HTTP requests to traverse
420 Encrypted Real-Time Messaging Protocol tunneled through HTTP.
422 The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
423 is used for streaming multimedia content within HTTP requests to traverse
428 Real-Time Messaging Protocol tunneled through HTTPS.
430 The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
431 for streaming multimedia content within HTTPS requests to traverse
434 @section librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
436 Real-Time Messaging Protocol and its variants supported through
439 Requires the presence of the librtmp headers and library during
440 configuration. You need to explicitly configure the build with
441 "--enable-librtmp". If enabled this will replace the native RTMP
444 This protocol provides most client functions and a few server
445 functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
446 encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
447 variants of these encrypted types (RTMPTE, RTMPTS).
449 The required syntax is:
451 @var{rtmp_proto}://@var{server}[:@var{port}][/@var{app}][/@var{playpath}] @var{options}
454 where @var{rtmp_proto} is one of the strings "rtmp", "rtmpt", "rtmpe",
455 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
456 @var{server}, @var{port}, @var{app} and @var{playpath} have the same
457 meaning as specified for the RTMP native protocol.
458 @var{options} contains a list of space-separated options of the form
461 See the librtmp manual page (man 3 librtmp) for more information.
463 For example, to stream a file in real-time to an RTMP server using
466 avconv -re -i myfile -f flv rtmp://myserver/live/mystream
469 To play the same stream using @command{avplay}:
471 avplay "rtmp://myserver/live/mystream live=1"
480 RTSP is not technically a protocol handler in libavformat, it is a demuxer
481 and muxer. The demuxer supports both normal RTSP (with data transferred
482 over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
483 data transferred over RDT).
485 The muxer can be used to send a stream using RTSP ANNOUNCE to a server
486 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
487 @uref{http://github.com/revmischa/rtsp-server, RTSP server}).
489 The required syntax for a RTSP url is:
491 rtsp://@var{hostname}[:@var{port}]/@var{path}
494 The following options (set on the @command{avconv}/@command{avplay} command
495 line, or set in code via @code{AVOption}s or in @code{avformat_open_input}),
498 Flags for @code{rtsp_transport}:
503 Use UDP as lower transport protocol.
506 Use TCP (interleaving within the RTSP control channel) as lower
510 Use UDP multicast as lower transport protocol.
513 Use HTTP tunneling as lower transport protocol, which is useful for
517 Multiple lower transport protocols may be specified, in that case they are
518 tried one at a time (if the setup of one fails, the next one is tried).
519 For the muxer, only the @code{tcp} and @code{udp} options are supported.
521 Flags for @code{rtsp_flags}:
525 Accept packets only from negotiated peer address and port.
527 Act as a server, listening for an incoming connection.
530 When receiving data over UDP, the demuxer tries to reorder received packets
531 (since they may arrive out of order, or packets may get lost totally). This
532 can be disabled by setting the maximum demuxing delay to zero (via
533 the @code{max_delay} field of AVFormatContext).
535 When watching multi-bitrate Real-RTSP streams with @command{avplay}, the
536 streams to display can be chosen with @code{-vst} @var{n} and
537 @code{-ast} @var{n} for video and audio respectively, and can be switched
538 on the fly by pressing @code{v} and @code{a}.
540 Example command lines:
542 To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
545 avplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
548 To watch a stream tunneled over HTTP:
551 avplay -rtsp_transport http rtsp://server/video.mp4
554 To send a stream in realtime to a RTSP server, for others to watch:
557 avconv -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
560 To receive a stream in realtime:
563 avconv -rtsp_flags listen -i rtsp://ownaddress/live.sdp @var{output}
568 Session Announcement Protocol (RFC 2974). This is not technically a
569 protocol handler in libavformat, it is a muxer and demuxer.
570 It is used for signalling of RTP streams, by announcing the SDP for the
571 streams regularly on a separate port.
575 The syntax for a SAP url given to the muxer is:
577 sap://@var{destination}[:@var{port}][?@var{options}]
580 The RTP packets are sent to @var{destination} on port @var{port},
581 or to port 5004 if no port is specified.
582 @var{options} is a @code{&}-separated list. The following options
587 @item announce_addr=@var{address}
588 Specify the destination IP address for sending the announcements to.
589 If omitted, the announcements are sent to the commonly used SAP
590 announcement multicast address 224.2.127.254 (sap.mcast.net), or
591 ff0e::2:7ffe if @var{destination} is an IPv6 address.
593 @item announce_port=@var{port}
594 Specify the port to send the announcements on, defaults to
595 9875 if not specified.
598 Specify the time to live value for the announcements and RTP packets,
601 @item same_port=@var{0|1}
602 If set to 1, send all RTP streams on the same port pair. If zero (the
603 default), all streams are sent on unique ports, with each stream on a
604 port 2 numbers higher than the previous.
605 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
606 The RTP stack in libavformat for receiving requires all streams to be sent
610 Example command lines follow.
612 To broadcast a stream on the local subnet, for watching in VLC:
615 avconv -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
618 Similarly, for watching in avplay:
621 avconv -re -i @var{input} -f sap sap://224.0.0.255
624 And for watching in avplay, over IPv6:
627 avconv -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
632 The syntax for a SAP url given to the demuxer is:
634 sap://[@var{address}][:@var{port}]
637 @var{address} is the multicast address to listen for announcements on,
638 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. @var{port}
639 is the port that is listened on, 9875 if omitted.
641 The demuxers listens for announcements on the given address and port.
642 Once an announcement is received, it tries to receive that particular stream.
644 Example command lines follow.
646 To play back the first stream announced on the normal SAP multicast address:
652 To play back the first stream announced on one the default IPv6 SAP multicast address:
655 avplay sap://[ff0e::2:7ffe]
660 Haivision Secure Reliable Transport Protocol via libsrt.
662 The supported syntax for a SRT URL is:
664 srt://@var{hostname}:@var{port}[?@var{options}]
667 @var{options} contains a list of &-separated options of the form
673 @var{options} srt://@var{hostname}:@var{port}
676 @var{options} contains a list of '-@var{key} @var{val}'
679 This protocol accepts the following options.
682 @item connect_timeout
683 Connection timeout; SRT cannot connect for RTT > 1500 msec
684 (2 handshake exchanges) with the default connect timeout of
685 3 seconds. This option applies to the caller and rendezvous
686 connection modes. The connect timeout is 10 times the value
687 set for the rendezvous mode (which can be used as a
688 workaround for this connection problem with earlier versions).
690 @item ffs=@var{bytes}
691 Flight Flag Size (Window Size), in bytes. FFS is actually an
692 internal parameter and you should set it to not less than
693 @option{recv_buffer_size} and @option{mss}. The default value
694 is relatively large, therefore unless you set a very large receiver buffer,
695 you do not need to change this option. Default value is 25600.
697 @item inputbw=@var{bytes/seconds}
698 Sender nominal input rate, in bytes per seconds. Used along with
699 @option{oheadbw}, when @option{maxbw} is set to relative (0), to
700 calculate maximum sending rate when recovery packets are sent
701 along with the main media stream:
702 @option{inputbw} * (100 + @option{oheadbw}) / 100
703 if @option{inputbw} is not set while @option{maxbw} is set to
704 relative (0), the actual input rate is evaluated inside
705 the library. Default value is 0.
707 @item iptos=@var{tos}
708 IP Type of Service. Applies to sender only. Default value is 0xB8.
710 @item ipttl=@var{ttl}
711 IP Time To Live. Applies to sender only. Default value is 64.
714 Timestamp-based Packet Delivery Delay.
715 Used to absorb bursts of missed packet retransmissions.
716 This flag sets both @option{rcvlatency} and @option{peerlatency}
717 to the same value. Note that prior to version 1.3.0
718 this is the only flag to set the latency, however
719 this is effectively equivalent to setting @option{peerlatency},
720 when side is sender and @option{rcvlatency}
721 when side is receiver, and the bidirectional stream
722 sending is not supported.
725 Set socket listen timeout.
727 @item maxbw=@var{bytes/seconds}
728 Maximum sending bandwidth, in bytes per seconds.
729 -1 infinite (CSRTCC limit is 30mbps)
730 0 relative to input rate (see @option{inputbw})
731 >0 absolute limit value
732 Default value is 0 (relative)
734 @item mode=@var{caller|listener|rendezvous}
736 @option{caller} opens client connection.
737 @option{listener} starts server to listen for incoming connections.
738 @option{rendezvous} use Rendez-Vous connection mode.
739 Default value is caller.
741 @item mss=@var{bytes}
742 Maximum Segment Size, in bytes. Used for buffer allocation
743 and rate calculation using a packet counter assuming fully
744 filled packets. The smallest MSS between the peers is
745 used. This is 1500 by default in the overall internet.
746 This is the maximum size of the UDP packet and can be
747 only decreased, unless you have some unusual dedicated
748 network settings. Default value is 1500.
750 @item nakreport=@var{1|0}
751 If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
752 periodically until a lost packet is retransmitted or
753 intentionally dropped. Default value is 1.
755 @item oheadbw=@var{percents}
756 Recovery bandwidth overhead above input rate, in percents.
757 See @option{inputbw}. Default value is 25%.
759 @item passphrase=@var{string}
760 HaiCrypt Encryption/Decryption Passphrase string, length
761 from 10 to 79 characters. The passphrase is the shared
762 secret between the sender and the receiver. It is used
763 to generate the Key Encrypting Key using PBKDF2
764 (Password-Based Key Derivation Function). It is used
765 only if @option{pbkeylen} is non-zero. It is used on
766 the receiver only if the received data is encrypted.
767 The configured passphrase cannot be recovered (write-only).
769 @item payloadsize=@var{bytes}
770 Sets the maximum declared size of a packet transferred
771 during the single call to the sending function in Live
772 mode. Use 0 if this value isn't used (which is default in
774 Default value is for MPEG-TS; if you are going to use SRT
775 to send any different kind of payload, such as, for example,
776 wrapping a live stream in very small frames, then you can
777 use a bigger maximum frame size, though not greater than
781 The latency value (as described in @option{rcvlatency}) that is
782 set by the sender side as a minimum value for the receiver.
784 @item pbkeylen=@var{bytes}
785 Sender encryption key length, in bytes.
786 Only can be set to 0, 16, 24 and 32.
787 Enable sender encryption if not 0.
788 Not required on receiver (set to 0),
789 key size obtained from sender in HaiCrypt handshake.
793 The time that should elapse since the moment when the
794 packet was sent and the moment when it's delivered to
795 the receiver application in the receiving function.
796 This time should be a buffer time large enough to cover
797 the time spent for sending, unexpectedly extended RTT
798 time, and the time needed to retransmit the lost UDP
799 packet. The effective latency value will be the maximum
800 of this options' value and the value of @option{peerlatency}
801 set by the peer side. Before version 1.3.0 this option
802 is only available as @option{latency}.
804 @item recv_buffer_size=@var{bytes}
805 Set receive buffer size, expressed in bytes.
807 @item send_buffer_size=@var{bytes}
808 Set send buffer size, expressed in bytes.
811 Set raise error timeout for read/write optations.
813 This option is only relevant in read mode:
814 if no data arrived in more than this time
815 interval, raise error.
817 @item tlpktdrop=@var{1|0}
818 Too-late Packet Drop. When enabled on receiver, it skips
819 missing packets that have not been delivered in time and
820 delivers the following packets to the application when
821 their time-to-play has come. It also sends a fake ACK to
822 the sender. When enabled on sender and enabled on the
823 receiving peer, the sender drops the older packets that
824 have no chance of being delivered in time. It was
825 automatically enabled in the sender if the receiver
830 For more information see: @url{https://github.com/Haivision/srt}.
834 Transmission Control Protocol.
836 The required syntax for a TCP url is:
838 tcp://@var{hostname}:@var{port}[?@var{options}]
844 Listen for an incoming connection
847 avconv -i @var{input} -f @var{format} tcp://@var{hostname}:@var{port}?listen
848 avplay tcp://@var{hostname}:@var{port}
855 Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
857 The required syntax for a TLS url is:
859 tls://@var{hostname}:@var{port}
862 The following parameters can be set via command line options
863 (or in code via @code{AVOption}s):
868 A file containing certificate authority (CA) root certificates to treat
869 as trusted. If the linked TLS library contains a default this might not
870 need to be specified for verification to work, but not all libraries and
871 setups have defaults built in.
873 @item tls_verify=@var{1|0}
874 If enabled, try to verify the peer that we are communicating with.
875 Note, if using OpenSSL, this currently only makes sure that the
876 peer certificate is signed by one of the root certificates in the CA
877 database, but it does not validate that the certificate actually
878 matches the host name we are trying to connect to. (With GnuTLS,
879 the host name is validated as well.)
881 This is disabled by default since it requires a CA database to be
882 provided by the caller in many cases.
885 A file containing a certificate to use in the handshake with the peer.
886 (When operating as server, in listen mode, this is more often required
887 by the peer, while client certificates only are mandated in certain
891 A file containing the private key for the certificate.
893 @item listen=@var{1|0}
894 If enabled, listen for connections on the provided port, and assume
895 the server role in the handshake instead of the client role.
901 User Datagram Protocol.
903 The required syntax for a UDP url is:
905 udp://@var{hostname}:@var{port}[?@var{options}]
908 @var{options} contains a list of &-separated options of the form @var{key}=@var{val}.
909 Follow the list of supported options.
913 @item buffer_size=@var{size}
914 set the UDP buffer size in bytes
916 @item localport=@var{port}
917 override the local UDP port to bind with
919 @item localaddr=@var{addr}
920 Choose the local IP address. This is useful e.g. if sending multicast
921 and the host has multiple interfaces, where the user can choose
922 which interface to send on by specifying the IP address of that interface.
924 @item pkt_size=@var{size}
925 set the size in bytes of UDP packets
927 @item reuse=@var{1|0}
928 explicitly allow or disallow reusing UDP sockets
931 set the time to live value (for multicast only)
933 @item connect=@var{1|0}
934 Initialize the UDP socket with @code{connect()}. In this case, the
935 destination address can't be changed with ff_udp_set_remote_url later.
936 If the destination address isn't known at the start, this option can
937 be specified in ff_udp_set_remote_url, too.
938 This allows finding out the source address for the packets with getsockname,
939 and makes writes return with AVERROR(ECONNREFUSED) if "destination
940 unreachable" is received.
941 For receiving, this gives the benefit of only receiving packets from
942 the specified peer address/port.
944 @item sources=@var{address}[,@var{address}]
945 Only receive packets sent to the multicast group from one of the
946 specified sender IP addresses.
948 @item block=@var{address}[,@var{address}]
949 Ignore packets sent to the multicast group from the specified
953 Some usage examples of the udp protocol with @command{avconv} follow.
955 To stream over UDP to a remote endpoint:
957 avconv -i @var{input} -f @var{format} udp://@var{hostname}:@var{port}
960 To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
962 avconv -i @var{input} -f mpegts udp://@var{hostname}:@var{port}?pkt_size=188&buffer_size=65535
965 To receive over UDP from a remote endpoint:
967 avconv -i udp://[@var{multicast-address}]:@var{port}
974 The required syntax for a Unix socket URL is:
977 unix://@var{filepath}
980 The following parameters can be set via command line options
981 (or in code via @code{AVOption}s):
987 Create the Unix socket in listening mode.