1FFMPEG-PROTOCOLS(1)                                        FFMPEG-PROTOCOLS(1)
2
3
4

NAME

6       ffmpeg-protocols - FFmpeg protocols
7

DESCRIPTION

9       This document describes the input and output protocols provided by the
10       libavformat library.
11

PROTOCOL OPTIONS

13       The libavformat library provides some generic global options, which can
14       be set on all the protocols. In addition each protocol may support so-
15       called private options, which are specific for that component.
16
17       Options may be set by specifying -option value in the FFmpeg tools, or
18       by setting the value explicitly in the "AVFormatContext" options or
19       using the libavutil/opt.h API for programmatic use.
20
21       The list of supported options follows:
22
23       protocol_whitelist list (input)
24           Set a ","-separated list of allowed protocols. "ALL" matches all
25           protocols. Protocols prefixed by "-" are disabled.  All protocols
26           are allowed by default but protocols used by an another protocol
27           (nested protocols) are restricted to a per protocol subset.
28

PROTOCOLS

30       Protocols are configured elements in FFmpeg that enable access to
31       resources that require specific protocols.
32
33       When you configure your FFmpeg build, all the supported protocols are
34       enabled by default. You can list all available ones using the configure
35       option "--list-protocols".
36
37       You can disable all the protocols using the configure option
38       "--disable-protocols", and selectively enable a protocol using the
39       option "--enable-protocol=PROTOCOL", or you can disable a particular
40       protocol using the option "--disable-protocol=PROTOCOL".
41
42       The option "-protocols" of the ff* tools will display the list of
43       supported protocols.
44
45       All protocols accept the following options:
46
47       rw_timeout
48           Maximum time to wait for (network) read/write operations to
49           complete, in microseconds.
50
51       A description of the currently available protocols follows.
52
53   amqp
54       Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker
55       based publish-subscribe communication protocol.
56
57       FFmpeg must be compiled with --enable-librabbitmq to support AMQP. A
58       separate AMQP broker must also be run. An example open-source AMQP
59       broker is RabbitMQ.
60
61       After starting the broker, an FFmpeg client may stream data to the
62       broker using the command:
63
64               ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
65
66       Where hostname and port (default is 5672) is the address of the broker.
67       The client may also set a user/password for authentication. The default
68       for both fields is "guest". Name of virtual host on broker can be set
69       with vhost. The default value is "/".
70
71       Muliple subscribers may stream from the broker using the command:
72
73               ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
74
75       In RabbitMQ all data published to the broker flows through a specific
76       exchange, and each subscribing client has an assigned queue/buffer.
77       When a packet arrives at an exchange, it may be copied to a client's
78       queue depending on the exchange and routing_key fields.
79
80       The following options are supported:
81
82       exchange
83           Sets the exchange to use on the broker. RabbitMQ has several
84           predefined exchanges: "amq.direct" is the default exchange, where
85           the publisher and subscriber must have a matching routing_key;
86           "amq.fanout" is the same as a broadcast operation (i.e. the data is
87           forwarded to all queues on the fanout exchange independent of the
88           routing_key); and "amq.topic" is similar to "amq.direct", but
89           allows for more complex pattern matching (refer to the RabbitMQ
90           documentation).
91
92       routing_key
93           Sets the routing key. The default value is "amqp". The routing key
94           is used on the "amq.direct" and "amq.topic" exchanges to decide
95           whether packets are written to the queue of a subscriber.
96
97       pkt_size
98           Maximum size of each packet sent/received to the broker. Default is
99           131072.  Minimum is 4096 and max is any large value (representable
100           by an int). When receiving packets, this sets an internal buffer
101           size in FFmpeg. It should be equal to or greater than the size of
102           the published packets to the broker. Otherwise the received message
103           may be truncated causing decoding errors.
104
105       connection_timeout
106           The timeout in seconds during the initial connection to the broker.
107           The default value is rw_timeout, or 5 seconds if rw_timeout is not
108           set.
109
110       delivery_mode mode
111           Sets the delivery mode of each message sent to broker.  The
112           following values are accepted:
113
114           persistent
115               Delivery mode set to "persistent" (2). This is the default
116               value.  Messages may be written to the broker's disk depending
117               on its setup.
118
119           non-persistent
120               Delivery mode set to "non-persistent" (1).  Messages will stay
121               in broker's memory unless the broker is under memory pressure.
122
123   async
124       Asynchronous data filling wrapper for input stream.
125
126       Fill data in a background thread, to decouple I/O operation from demux
127       thread.
128
129               async:<URL>
130               async:http://host/resource
131               async:cache:http://host/resource
132
133   bluray
134       Read BluRay playlist.
135
136       The accepted options are:
137
138       angle
139           BluRay angle
140
141       chapter
142           Start chapter (1...N)
143
144       playlist
145           Playlist to read (BDMV/PLAYLIST/?????.mpls)
146
147       Examples:
148
149       Read longest playlist from BluRay mounted to /mnt/bluray:
150
151               bluray:/mnt/bluray
152
153       Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start
154       from chapter 2:
155
156               -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
157
158   cache
159       Caching wrapper for input stream.
160
161       Cache the input stream to temporary file. It brings seeking capability
162       to live streams.
163
164       The accepted options are:
165
166       read_ahead_limit
167           Amount in bytes that may be read ahead when seeking isn't
168           supported. Range is -1 to INT_MAX.  -1 for unlimited. Default is
169           65536.
170
171       URL Syntax is
172
173               cache:<URL>
174
175   concat
176       Physical concatenation protocol.
177
178       Read and seek from many resources in sequence as if they were a unique
179       resource.
180
181       A URL accepted by this protocol has the syntax:
182
183               concat:<URL1>|<URL2>|...|<URLN>
184
185       where URL1, URL2, ..., URLN are the urls of the resource to be
186       concatenated, each one possibly specifying a distinct protocol.
187
188       For example to read a sequence of files split1.mpeg, split2.mpeg,
189       split3.mpeg with ffplay use the command:
190
191               ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
192
193       Note that you may need to escape the character "|" which is special for
194       many shells.
195
196   concatf
197       Physical concatenation protocol using a line break delimited list of
198       resources.
199
200       Read and seek from many resources in sequence as if they were a unique
201       resource.
202
203       A URL accepted by this protocol has the syntax:
204
205               concatf:<URL>
206
207       where URL is the url containing a line break delimited list of
208       resources to be concatenated, each one possibly specifying a distinct
209       protocol. Special characters must be escaped with backslash or single
210       quotes. See the "Quoting and escaping" section in the ffmpeg-utils(1)
211       manual.
212
213       For example to read a sequence of files split1.mpeg, split2.mpeg,
214       split3.mpeg listed in separate lines within a file split.txt with
215       ffplay use the command:
216
217               ffplay concatf:split.txt
218
219       Where split.txt contains the lines:
220
221               split1.mpeg
222               split2.mpeg
223               split3.mpeg
224
225   crypto
226       AES-encrypted stream reading protocol.
227
228       The accepted options are:
229
230       key Set the AES decryption key binary block from given hexadecimal
231           representation.
232
233       iv  Set the AES decryption initialization vector binary block from
234           given hexadecimal representation.
235
236       Accepted URL formats:
237
238               crypto:<URL>
239               crypto+<URL>
240
241   data
242       Data in-line in the URI. See
243       <http://en.wikipedia.org/wiki/Data_URI_scheme>.
244
245       For example, to convert a GIF file given inline with ffmpeg:
246
247               ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
248
249   file
250       File access protocol.
251
252       Read from or write to a file.
253
254       A file URL can have the form:
255
256               file:<filename>
257
258       where filename is the path of the file to read.
259
260       An URL that does not have a protocol prefix will be assumed to be a
261       file URL. Depending on the build, an URL that looks like a Windows path
262       with the drive letter at the beginning will also be assumed to be a
263       file URL (usually not the case in builds for unix-like systems).
264
265       For example to read from a file input.mpeg with ffmpeg use the command:
266
267               ffmpeg -i file:input.mpeg output.mpeg
268
269       This protocol accepts the following options:
270
271       truncate
272           Truncate existing files on write, if set to 1. A value of 0
273           prevents truncating. Default value is 1.
274
275       blocksize
276           Set I/O operation maximum block size, in bytes. Default value is
277           "INT_MAX", which results in not limiting the requested block size.
278           Setting this value reasonably low improves user termination request
279           reaction time, which is valuable for files on slow medium.
280
281       follow
282           If set to 1, the protocol will retry reading at the end of the
283           file, allowing reading files that still are being written. In order
284           for this to terminate, you either need to use the rw_timeout
285           option, or use the interrupt callback (for API users).
286
287       seekable
288           Controls if seekability is advertised on the file. 0 means non-
289           seekable, -1 means auto (seekable for normal files, non-seekable
290           for named pipes).
291
292           Many demuxers handle seekable and non-seekable resources
293           differently, overriding this might speed up opening certain files
294           at the cost of losing some features (e.g. accurate seeking).
295
296   ftp
297       FTP (File Transfer Protocol).
298
299       Read from or write to remote resources using FTP protocol.
300
301       Following syntax is required.
302
303               ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
304
305       This protocol accepts the following options.
306
307       timeout
308           Set timeout in microseconds of socket I/O operations used by the
309           underlying low level operation. By default it is set to -1, which
310           means that the timeout is not specified.
311
312       ftp-user
313           Set a user to be used for authenticating to the FTP server. This is
314           overridden by the user in the FTP URL.
315
316       ftp-password
317           Set a password to be used for authenticating to the FTP server.
318           This is overridden by the password in the FTP URL, or by ftp-
319           anonymous-password if no user is set.
320
321       ftp-anonymous-password
322           Password used when login as anonymous user. Typically an e-mail
323           address should be used.
324
325       ftp-write-seekable
326           Control seekability of connection during encoding. If set to 1 the
327           resource is supposed to be seekable, if set to 0 it is assumed not
328           to be seekable. Default value is 0.
329
330       NOTE: Protocol can be used as output, but it is recommended to not do
331       it, unless special care is taken (tests, customized server
332       configuration etc.). Different FTP servers behave in different way
333       during seek operation. ff* tools may produce incomplete content due to
334       server limitations.
335
336   gopher
337       Gopher protocol.
338
339   gophers
340       Gophers protocol.
341
342       The Gopher protocol with TLS encapsulation.
343
344   hls
345       Read Apple HTTP Live Streaming compliant segmented stream as a uniform
346       one. The M3U8 playlists describing the segments can be remote HTTP
347       resources or local files, accessed using the standard file protocol.
348       The nested protocol is declared by specifying "+proto" after the hls
349       URI scheme name, where proto is either "file" or "http".
350
351               hls+http://host/path/to/remote/resource.m3u8
352               hls+file://path/to/local/resource.m3u8
353
354       Using this protocol is discouraged - the hls demuxer should work just
355       as well (if not, please report the issues) and is more complete.  To
356       use the hls demuxer instead, simply use the direct URLs to the m3u8
357       files.
358
359   http
360       HTTP (Hyper Text Transfer Protocol).
361
362       This protocol accepts the following options:
363
364       seekable
365           Control seekability of connection. If set to 1 the resource is
366           supposed to be seekable, if set to 0 it is assumed not to be
367           seekable, if set to -1 it will try to autodetect if it is seekable.
368           Default value is -1.
369
370       chunked_post
371           If set to 1 use chunked Transfer-Encoding for posts, default is 1.
372
373       content_type
374           Set a specific content type for the POST messages or for listen
375           mode.
376
377       http_proxy
378           set HTTP proxy to tunnel through e.g. http://example.com:1234
379
380       headers
381           Set custom HTTP headers, can override built in default headers. The
382           value must be a string encoding the headers.
383
384       multiple_requests
385           Use persistent connections if set to 1, default is 0.
386
387       post_data
388           Set custom HTTP post data.
389
390       referer
391           Set the Referer header. Include 'Referer: URL' header in HTTP
392           request.
393
394       user_agent
395           Override the User-Agent header. If not specified the protocol will
396           use a string describing the libavformat build. ("Lavf/<version>")
397
398       reconnect_at_eof
399           If set then eof is treated like an error and causes reconnection,
400           this is useful for live / endless streams.
401
402       reconnect_streamed
403           If set then even streamed/non seekable streams will be reconnected
404           on errors.
405
406       reconnect_on_network_error
407           Reconnect automatically in case of TCP/TLS errors during connect.
408
409       reconnect_on_http_error
410           A comma separated list of HTTP status codes to reconnect on. The
411           list can include specific status codes (e.g. '503') or the strings
412           '4xx' / '5xx'.
413
414       reconnect_delay_max
415           Sets the maximum delay in seconds after which to give up
416           reconnecting
417
418       mime_type
419           Export the MIME type.
420
421       http_version
422           Exports the HTTP response version number. Usually "1.0" or "1.1".
423
424       icy If set to 1 request ICY (SHOUTcast) metadata from the server. If
425           the server supports this, the metadata has to be retrieved by the
426           application by reading the icy_metadata_headers and
427           icy_metadata_packet options.  The default is 1.
428
429       icy_metadata_headers
430           If the server supports ICY metadata, this contains the ICY-specific
431           HTTP reply headers, separated by newline characters.
432
433       icy_metadata_packet
434           If the server supports ICY metadata, and icy was set to 1, this
435           contains the last non-empty metadata packet sent by the server. It
436           should be polled in regular intervals by applications interested in
437           mid-stream metadata updates.
438
439       cookies
440           Set the cookies to be sent in future requests. The format of each
441           cookie is the same as the value of a Set-Cookie HTTP response
442           field. Multiple cookies can be delimited by a newline character.
443
444       offset
445           Set initial byte offset.
446
447       end_offset
448           Try to limit the request to bytes preceding this offset.
449
450       method
451           When used as a client option it sets the HTTP method for the
452           request.
453
454           When used as a server option it sets the HTTP method that is going
455           to be expected from the client(s).  If the expected and the
456           received HTTP method do not match the client will be given a Bad
457           Request response.  When unset the HTTP method is not checked for
458           now. This will be replaced by autodetection in the future.
459
460       listen
461           If set to 1 enables experimental HTTP server. This can be used to
462           send data when used as an output option, or read data from a client
463           with HTTP POST when used as an input option.  If set to 2 enables
464           experimental multi-client HTTP server. This is not yet implemented
465           in ffmpeg.c and thus must not be used as a command line option.
466
467                   # Server side (sending):
468                   ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<server>:<port>
469
470                   # Client side (receiving):
471                   ffmpeg -i http://<server>:<port> -c copy somefile.ogg
472
473                   # Client can also be done with wget:
474                   wget http://<server>:<port> -O somefile.ogg
475
476                   # Server side (receiving):
477                   ffmpeg -listen 1 -i http://<server>:<port> -c copy somefile.ogg
478
479                   # Client side (sending):
480                   ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<server>:<port>
481
482                   # Client can also be done with wget:
483                   wget --post-file=somefile.ogg http://<server>:<port>
484
485       send_expect_100
486           Send an Expect: 100-continue header for POST. If set to 1 it will
487           send, if set to 0 it won't, if set to -1 it will try to send if it
488           is applicable. Default value is -1.
489
490       auth_type
491           Set HTTP authentication type. No option for Digest, since this
492           method requires getting nonce parameters from the server first and
493           can't be used straight away like Basic.
494
495           none
496               Choose the HTTP authentication type automatically. This is the
497               default.
498
499           basic
500               Choose the HTTP basic authentication.
501
502               Basic authentication sends a Base64-encoded string that
503               contains a user name and password for the client. Base64 is not
504               a form of encryption and should be considered the same as
505               sending the user name and password in clear text (Base64 is a
506               reversible encoding).  If a resource needs to be protected,
507               strongly consider using an authentication scheme other than
508               basic authentication. HTTPS/TLS should be used with basic
509               authentication.  Without these additional security
510               enhancements, basic authentication should not be used to
511               protect sensitive or valuable information.
512
513       HTTP Cookies
514
515       Some HTTP requests will be denied unless cookie values are passed in
516       with the request. The cookies option allows these cookies to be
517       specified. At the very least, each cookie must specify a value along
518       with a path and domain.  HTTP requests that match both the domain and
519       path will automatically include the cookie value in the HTTP Cookie
520       header field. Multiple cookies can be delimited by a newline.
521
522       The required syntax to play a stream specifying a cookie is:
523
524               ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
525
526   Icecast
527       Icecast protocol (stream to Icecast servers)
528
529       This protocol accepts the following options:
530
531       ice_genre
532           Set the stream genre.
533
534       ice_name
535           Set the stream name.
536
537       ice_description
538           Set the stream description.
539
540       ice_url
541           Set the stream website URL.
542
543       ice_public
544           Set if the stream should be public.  The default is 0 (not public).
545
546       user_agent
547           Override the User-Agent header. If not specified a string of the
548           form "Lavf/<version>" will be used.
549
550       password
551           Set the Icecast mountpoint password.
552
553       content_type
554           Set the stream content type. This must be set if it is different
555           from audio/mpeg.
556
557       legacy_icecast
558           This enables support for Icecast versions < 2.4.0, that do not
559           support the HTTP PUT method but the SOURCE method.
560
561       tls Establish a TLS (HTTPS) connection to Icecast.
562
563               icecast://[<username>[:<password>]@]<server>:<port>/<mountpoint>
564
565   mmst
566       MMS (Microsoft Media Server) protocol over TCP.
567
568   mmsh
569       MMS (Microsoft Media Server) protocol over HTTP.
570
571       The required syntax is:
572
573               mmsh://<server>[:<port>][/<app>][/<playpath>]
574
575   md5
576       MD5 output protocol.
577
578       Computes the MD5 hash of the data to be written, and on close writes
579       this to the designated output or stdout if none is specified. It can be
580       used to test muxers without writing an actual file.
581
582       Some examples follow.
583
584               # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
585               ffmpeg -i input.flv -f avi -y md5:output.avi.md5
586
587               # Write the MD5 hash of the encoded AVI file to stdout.
588               ffmpeg -i input.flv -f avi -y md5:
589
590       Note that some formats (typically MOV) require the output protocol to
591       be seekable, so they will fail with the MD5 output protocol.
592
593   pipe
594       UNIX pipe access protocol.
595
596       Read and write from UNIX pipes.
597
598       The accepted syntax is:
599
600               pipe:[<number>]
601
602       number is the number corresponding to the file descriptor of the pipe
603       (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If number is not
604       specified, by default the stdout file descriptor will be used for
605       writing, stdin for reading.
606
607       For example to read from stdin with ffmpeg:
608
609               cat test.wav | ffmpeg -i pipe:0
610               # ...this is the same as...
611               cat test.wav | ffmpeg -i pipe:
612
613       For writing to stdout with ffmpeg:
614
615               ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
616               # ...this is the same as...
617               ffmpeg -i test.wav -f avi pipe: | cat > test.avi
618
619       This protocol accepts the following options:
620
621       blocksize
622           Set I/O operation maximum block size, in bytes. Default value is
623           "INT_MAX", which results in not limiting the requested block size.
624           Setting this value reasonably low improves user termination request
625           reaction time, which is valuable if data transmission is slow.
626
627       Note that some formats (typically MOV), require the output protocol to
628       be seekable, so they will fail with the pipe output protocol.
629
630   prompeg
631       Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
632
633       The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction
634       mechanism for MPEG-2 Transport Streams sent over RTP.
635
636       This protocol must be used in conjunction with the "rtp_mpegts" muxer
637       and the "rtp" protocol.
638
639       The required syntax is:
640
641               -f rtp_mpegts -fec prompeg=<option>=<val>... rtp://<hostname>:<port>
642
643       The destination UDP ports are "port + 2" for the column FEC stream and
644       "port + 4" for the row FEC stream.
645
646       This protocol accepts the following options:
647
648       l=n The number of columns (4-20, LxD <= 100)
649
650       d=n The number of rows (4-20, LxD <= 100)
651
652       Example usage:
653
654               -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<hostname>:<port>
655
656   rist
657       Reliable Internet Streaming Transport protocol
658
659       The accepted options are:
660
661       rist_profile
662           Supported values:
663
664           simple
665           main
666               This one is default.
667
668           advanced
669       buffer_size
670           Set internal RIST buffer size in milliseconds for retransmission of
671           data.  Default value is 0 which means the librist default (1 sec).
672           Maximum value is 30 seconds.
673
674       pkt_size
675           Set maximum packet size for sending data. 1316 by default.
676
677       log_level
678           Set loglevel for RIST logging messages. You only need to set this
679           if you explicitly want to enable debug level messages or packet
680           loss simulation, otherwise the regular loglevel is respected.
681
682       secret
683           Set override of encryption secret, by default is unset.
684
685       encryption
686           Set encryption type, by default is disabled.  Acceptable values are
687           128 and 256.
688
689   rtmp
690       Real-Time Messaging Protocol.
691
692       The Real-Time Messaging Protocol (RTMP) is used for streaming
693       multimedia content across a TCP/IP network.
694
695       The required syntax is:
696
697               rtmp://[<username>:<password>@]<server>[:<port>][/<app>][/<instance>][/<playpath>]
698
699       The accepted parameters are:
700
701       username
702           An optional username (mostly for publishing).
703
704       password
705           An optional password (mostly for publishing).
706
707       server
708           The address of the RTMP server.
709
710       port
711           The number of the TCP port to use (by default is 1935).
712
713       app It is the name of the application to access. It usually corresponds
714           to the path where the application is installed on the RTMP server
715           (e.g. /ondemand/, /flash/live/, etc.). You can override the value
716           parsed from the URI through the "rtmp_app" option, too.
717
718       playpath
719           It is the path or name of the resource to play with reference to
720           the application specified in app, may be prefixed by "mp4:". You
721           can override the value parsed from the URI through the
722           "rtmp_playpath" option, too.
723
724       listen
725           Act as a server, listening for an incoming connection.
726
727       timeout
728           Maximum time to wait for the incoming connection. Implies listen.
729
730       Additionally, the following parameters can be set via command line
731       options (or in code via "AVOption"s):
732
733       rtmp_app
734           Name of application to connect on the RTMP server. This option
735           overrides the parameter specified in the URI.
736
737       rtmp_buffer
738           Set the client buffer time in milliseconds. The default is 3000.
739
740       rtmp_conn
741           Extra arbitrary AMF connection parameters, parsed from a string,
742           e.g. like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0".  Each
743           value is prefixed by a single character denoting the type, B for
744           Boolean, N for number, S for string, O for object, or Z for null,
745           followed by a colon. For Booleans the data must be either 0 or 1
746           for FALSE or TRUE, respectively.  Likewise for Objects the data
747           must be 0 or 1 to end or begin an object, respectively. Data items
748           in subobjects may be named, by prefixing the type with 'N' and
749           specifying the name before the value (i.e. "NB:myFlag:1"). This
750           option may be used multiple times to construct arbitrary AMF
751           sequences.
752
753       rtmp_flashver
754           Version of the Flash plugin used to run the SWF player. The default
755           is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0
756           (compatible; <libavformat version>).)
757
758       rtmp_flush_interval
759           Number of packets flushed in the same request (RTMPT only). The
760           default is 10.
761
762       rtmp_live
763           Specify that the media is a live stream. No resuming or seeking in
764           live streams is possible. The default value is "any", which means
765           the subscriber first tries to play the live stream specified in the
766           playpath. If a live stream of that name is not found, it plays the
767           recorded stream. The other possible values are "live" and
768           "recorded".
769
770       rtmp_pageurl
771           URL of the web page in which the media was embedded. By default no
772           value will be sent.
773
774       rtmp_playpath
775           Stream identifier to play or to publish. This option overrides the
776           parameter specified in the URI.
777
778       rtmp_subscribe
779           Name of live stream to subscribe to. By default no value will be
780           sent.  It is only sent if the option is specified or if rtmp_live
781           is set to live.
782
783       rtmp_swfhash
784           SHA256 hash of the decompressed SWF file (32 bytes).
785
786       rtmp_swfsize
787           Size of the decompressed SWF file, required for SWFVerification.
788
789       rtmp_swfurl
790           URL of the SWF player for the media. By default no value will be
791           sent.
792
793       rtmp_swfverify
794           URL to player swf file, compute hash/size automatically.
795
796       rtmp_tcurl
797           URL of the target stream. Defaults to proto://host[:port]/app.
798
799       tcp_nodelay=1|0
800           Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
801
802           Remark: Writing to the socket is currently not optimized to
803           minimize system calls and reduces the efficiency / effect of
804           TCP_NODELAY.
805
806       For example to read with ffplay a multimedia resource named "sample"
807       from the application "vod" from an RTMP server "myserver":
808
809               ffplay rtmp://myserver/vod/sample
810
811       To publish to a password protected server, passing the playpath and app
812       names separately:
813
814               ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
815
816   rtmpe
817       Encrypted Real-Time Messaging Protocol.
818
819       The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
820       streaming multimedia content within standard cryptographic primitives,
821       consisting of Diffie-Hellman key exchange and HMACSHA256, generating a
822       pair of RC4 keys.
823
824   rtmps
825       Real-Time Messaging Protocol over a secure SSL connection.
826
827       The Real-Time Messaging Protocol (RTMPS) is used for streaming
828       multimedia content across an encrypted connection.
829
830   rtmpt
831       Real-Time Messaging Protocol tunneled through HTTP.
832
833       The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
834       for streaming multimedia content within HTTP requests to traverse
835       firewalls.
836
837   rtmpte
838       Encrypted Real-Time Messaging Protocol tunneled through HTTP.
839
840       The Encrypted Real-Time Messaging Protocol tunneled through HTTP
841       (RTMPTE) is used for streaming multimedia content within HTTP requests
842       to traverse firewalls.
843
844   rtmpts
845       Real-Time Messaging Protocol tunneled through HTTPS.
846
847       The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is
848       used for streaming multimedia content within HTTPS requests to traverse
849       firewalls.
850
851   libsmbclient
852       libsmbclient permits one to manipulate CIFS/SMB network resources.
853
854       Following syntax is required.
855
856               smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
857
858       This protocol accepts the following options.
859
860       timeout
861           Set timeout in milliseconds of socket I/O operations used by the
862           underlying low level operation. By default it is set to -1, which
863           means that the timeout is not specified.
864
865       truncate
866           Truncate existing files on write, if set to 1. A value of 0
867           prevents truncating. Default value is 1.
868
869       workgroup
870           Set the workgroup used for making connections. By default workgroup
871           is not specified.
872
873       For more information see: <http://www.samba.org/>.
874
875   libssh
876       Secure File Transfer Protocol via libssh
877
878       Read from or write to remote resources using SFTP protocol.
879
880       Following syntax is required.
881
882               sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
883
884       This protocol accepts the following options.
885
886       timeout
887           Set timeout of socket I/O operations used by the underlying low
888           level operation. By default it is set to -1, which means that the
889           timeout is not specified.
890
891       truncate
892           Truncate existing files on write, if set to 1. A value of 0
893           prevents truncating. Default value is 1.
894
895       private_key
896           Specify the path of the file containing private key to use during
897           authorization.  By default libssh searches for keys in the ~/.ssh/
898           directory.
899
900       Example: Play a file stored on remote server.
901
902               ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
903
904   librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
905       Real-Time Messaging Protocol and its variants supported through
906       librtmp.
907
908       Requires the presence of the librtmp headers and library during
909       configuration. You need to explicitly configure the build with
910       "--enable-librtmp". If enabled this will replace the native RTMP
911       protocol.
912
913       This protocol provides most client functions and a few server functions
914       needed to support RTMP, RTMP tunneled in HTTP (RTMPT), encrypted RTMP
915       (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled variants of these
916       encrypted types (RTMPTE, RTMPTS).
917
918       The required syntax is:
919
920               <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
921
922       where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe",
923       "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
924       server, port, app and playpath have the same meaning as specified for
925       the RTMP native protocol.  options contains a list of space-separated
926       options of the form key=val.
927
928       See the librtmp manual page (man 3 librtmp) for more information.
929
930       For example, to stream a file in real-time to an RTMP server using
931       ffmpeg:
932
933               ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
934
935       To play the same stream using ffplay:
936
937               ffplay "rtmp://myserver/live/mystream live=1"
938
939   rtp
940       Real-time Transport Protocol.
941
942       The required syntax for an RTP URL is:
943       rtp://hostname[:port][?option=val...]
944
945       port specifies the RTP port to use.
946
947       The following URL options are supported:
948
949       ttl=n
950           Set the TTL (Time-To-Live) value (for multicast only).
951
952       rtcpport=n
953           Set the remote RTCP port to n.
954
955       localrtpport=n
956           Set the local RTP port to n.
957
958       localrtcpport=n'
959           Set the local RTCP port to n.
960
961       pkt_size=n
962           Set max packet size (in bytes) to n.
963
964       buffer_size=size
965           Set the maximum UDP socket buffer size in bytes.
966
967       connect=0|1
968           Do a "connect()" on the UDP socket (if set to 1) or not (if set to
969           0).
970
971       sources=ip[,ip]
972           List allowed source IP addresses.
973
974       block=ip[,ip]
975           List disallowed (blocked) source IP addresses.
976
977       write_to_source=0|1
978           Send packets to the source address of the latest received packet
979           (if set to 1) or to a default remote address (if set to 0).
980
981       localport=n
982           Set the local RTP port to n.
983
984       localaddr=addr
985           Local IP address of a network interface used for sending packets or
986           joining multicast groups.
987
988       timeout=n
989           Set timeout (in microseconds) of socket I/O operations to n.
990
991           This is a deprecated option. Instead, localrtpport should be used.
992
993       Important notes:
994
995       1.  If rtcpport is not set the RTCP port will be set to the RTP port
996           value plus 1.
997
998       2.  If localrtpport (the local RTP port) is not set any available port
999           will be used for the local RTP and RTCP ports.
1000
1001       3.  If localrtcpport (the local RTCP port) is not set it will be set to
1002           the local RTP port value plus 1.
1003
1004   rtsp
1005       Real-Time Streaming Protocol.
1006
1007       RTSP is not technically a protocol handler in libavformat, it is a
1008       demuxer and muxer. The demuxer supports both normal RTSP (with data
1009       transferred over RTP; this is used by e.g. Apple and Microsoft) and
1010       Real-RTSP (with data transferred over RDT).
1011
1012       The muxer can be used to send a stream using RTSP ANNOUNCE to a server
1013       supporting it (currently Darwin Streaming Server and Mischa
1014       Spiegelmock's <https://github.com/revmischa/rtsp-server>).
1015
1016       The required syntax for a RTSP url is:
1017
1018               rtsp://<hostname>[:<port>]/<path>
1019
1020       Options can be set on the ffmpeg/ffplay command line, or set in code
1021       via "AVOption"s or in "avformat_open_input".
1022
1023       The following options are supported.
1024
1025       initial_pause
1026           Do not start playing the stream immediately if set to 1. Default
1027           value is 0.
1028
1029       rtsp_transport
1030           Set RTSP transport protocols.
1031
1032           It accepts the following values:
1033
1034           udp Use UDP as lower transport protocol.
1035
1036           tcp Use TCP (interleaving within the RTSP control channel) as lower
1037               transport protocol.
1038
1039           udp_multicast
1040               Use UDP multicast as lower transport protocol.
1041
1042           http
1043               Use HTTP tunneling as lower transport protocol, which is useful
1044               for passing proxies.
1045
1046           Multiple lower transport protocols may be specified, in that case
1047           they are tried one at a time (if the setup of one fails, the next
1048           one is tried).  For the muxer, only the tcp and udp options are
1049           supported.
1050
1051       rtsp_flags
1052           Set RTSP flags.
1053
1054           The following values are accepted:
1055
1056           filter_src
1057               Accept packets only from negotiated peer address and port.
1058
1059           listen
1060               Act as a server, listening for an incoming connection.
1061
1062           prefer_tcp
1063               Try TCP for RTP transport first, if TCP is available as RTSP
1064               RTP transport.
1065
1066           Default value is none.
1067
1068       allowed_media_types
1069           Set media types to accept from the server.
1070
1071           The following flags are accepted:
1072
1073           video
1074           audio
1075           data
1076
1077           By default it accepts all media types.
1078
1079       min_port
1080           Set minimum local UDP port. Default value is 5000.
1081
1082       max_port
1083           Set maximum local UDP port. Default value is 65000.
1084
1085       listen_timeout
1086           Set maximum timeout (in seconds) to establish an initial
1087           connection. Setting listen_timeout > 0 sets rtsp_flags to listen.
1088           Default is -1 which means an infinite timeout when listen mode is
1089           set.
1090
1091       reorder_queue_size
1092           Set number of packets to buffer for handling of reordered packets.
1093
1094       timeout
1095           Set socket TCP I/O timeout in microseconds.
1096
1097       user_agent
1098           Override User-Agent header. If not specified, it defaults to the
1099           libavformat identifier string.
1100
1101       When receiving data over UDP, the demuxer tries to reorder received
1102       packets (since they may arrive out of order, or packets may get lost
1103       totally). This can be disabled by setting the maximum demuxing delay to
1104       zero (via the "max_delay" field of AVFormatContext).
1105
1106       When watching multi-bitrate Real-RTSP streams with ffplay, the streams
1107       to display can be chosen with "-vst" n and "-ast" n for video and audio
1108       respectively, and can be switched on the fly by pressing "v" and "a".
1109
1110       Examples
1111
1112       The following examples all make use of the ffplay and ffmpeg tools.
1113
1114       •   Watch a stream over UDP, with a max reordering delay of 0.5
1115           seconds:
1116
1117                   ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
1118
1119       •   Watch a stream tunneled over HTTP:
1120
1121                   ffplay -rtsp_transport http rtsp://server/video.mp4
1122
1123       •   Send a stream in realtime to a RTSP server, for others to watch:
1124
1125                   ffmpeg -re -i <input> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
1126
1127       •   Receive a stream in realtime:
1128
1129                   ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <output>
1130
1131   sap
1132       Session Announcement Protocol (RFC 2974). This is not technically a
1133       protocol handler in libavformat, it is a muxer and demuxer.  It is used
1134       for signalling of RTP streams, by announcing the SDP for the streams
1135       regularly on a separate port.
1136
1137       Muxer
1138
1139       The syntax for a SAP url given to the muxer is:
1140
1141               sap://<destination>[:<port>][?<options>]
1142
1143       The RTP packets are sent to destination on port port, or to port 5004
1144       if no port is specified.  options is a "&"-separated list. The
1145       following options are supported:
1146
1147       announce_addr=address
1148           Specify the destination IP address for sending the announcements
1149           to.  If omitted, the announcements are sent to the commonly used
1150           SAP announcement multicast address 224.2.127.254 (sap.mcast.net),
1151           or ff0e::2:7ffe if destination is an IPv6 address.
1152
1153       announce_port=port
1154           Specify the port to send the announcements on, defaults to 9875 if
1155           not specified.
1156
1157       ttl=ttl
1158           Specify the time to live value for the announcements and RTP
1159           packets, defaults to 255.
1160
1161       same_port=0|1
1162           If set to 1, send all RTP streams on the same port pair. If zero
1163           (the default), all streams are sent on unique ports, with each
1164           stream on a port 2 numbers higher than the previous.  VLC/Live555
1165           requires this to be set to 1, to be able to receive the stream.
1166           The RTP stack in libavformat for receiving requires all streams to
1167           be sent on unique ports.
1168
1169       Example command lines follow.
1170
1171       To broadcast a stream on the local subnet, for watching in VLC:
1172
1173               ffmpeg -re -i <input> -f sap sap://224.0.0.255?same_port=1
1174
1175       Similarly, for watching in ffplay:
1176
1177               ffmpeg -re -i <input> -f sap sap://224.0.0.255
1178
1179       And for watching in ffplay, over IPv6:
1180
1181               ffmpeg -re -i <input> -f sap sap://[ff0e::1:2:3:4]
1182
1183       Demuxer
1184
1185       The syntax for a SAP url given to the demuxer is:
1186
1187               sap://[<address>][:<port>]
1188
1189       address is the multicast address to listen for announcements on, if
1190       omitted, the default 224.2.127.254 (sap.mcast.net) is used. port is the
1191       port that is listened on, 9875 if omitted.
1192
1193       The demuxers listens for announcements on the given address and port.
1194       Once an announcement is received, it tries to receive that particular
1195       stream.
1196
1197       Example command lines follow.
1198
1199       To play back the first stream announced on the normal SAP multicast
1200       address:
1201
1202               ffplay sap://
1203
1204       To play back the first stream announced on one the default IPv6 SAP
1205       multicast address:
1206
1207               ffplay sap://[ff0e::2:7ffe]
1208
1209   sctp
1210       Stream Control Transmission Protocol.
1211
1212       The accepted URL syntax is:
1213
1214               sctp://<host>:<port>[?<options>]
1215
1216       The protocol accepts the following options:
1217
1218       listen
1219           If set to any value, listen for an incoming connection. Outgoing
1220           connection is done by default.
1221
1222       max_streams
1223           Set the maximum number of streams. By default no limit is set.
1224
1225   srt
1226       Haivision Secure Reliable Transport Protocol via libsrt.
1227
1228       The supported syntax for a SRT URL is:
1229
1230               srt://<hostname>:<port>[?<options>]
1231
1232       options contains a list of &-separated options of the form key=val.
1233
1234       or
1235
1236               <options> srt://<hostname>:<port>
1237
1238       options contains a list of '-key val' options.
1239
1240       This protocol accepts the following options.
1241
1242       connect_timeout=milliseconds
1243           Connection timeout; SRT cannot connect for RTT > 1500 msec (2
1244           handshake exchanges) with the default connect timeout of 3 seconds.
1245           This option applies to the caller and rendezvous connection modes.
1246           The connect timeout is 10 times the value set for the rendezvous
1247           mode (which can be used as a workaround for this connection problem
1248           with earlier versions).
1249
1250       ffs=bytes
1251           Flight Flag Size (Window Size), in bytes. FFS is actually an
1252           internal parameter and you should set it to not less than
1253           recv_buffer_size and mss. The default value is relatively large,
1254           therefore unless you set a very large receiver buffer, you do not
1255           need to change this option. Default value is 25600.
1256
1257       inputbw=bytes/seconds
1258           Sender nominal input rate, in bytes per seconds. Used along with
1259           oheadbw, when maxbw is set to relative (0), to calculate maximum
1260           sending rate when recovery packets are sent along with the main
1261           media stream: inputbw * (100 + oheadbw) / 100 if inputbw is not set
1262           while maxbw is set to relative (0), the actual input rate is
1263           evaluated inside the library. Default value is 0.
1264
1265       iptos=tos
1266           IP Type of Service. Applies to sender only. Default value is 0xB8.
1267
1268       ipttl=ttl
1269           IP Time To Live. Applies to sender only. Default value is 64.
1270
1271       latency=microseconds
1272           Timestamp-based Packet Delivery Delay.  Used to absorb bursts of
1273           missed packet retransmissions.  This flag sets both rcvlatency and
1274           peerlatency to the same value. Note that prior to version 1.3.0
1275           this is the only flag to set the latency, however this is
1276           effectively equivalent to setting peerlatency, when side is sender
1277           and rcvlatency when side is receiver, and the bidirectional stream
1278           sending is not supported.
1279
1280       listen_timeout=microseconds
1281           Set socket listen timeout.
1282
1283       maxbw=bytes/seconds
1284           Maximum sending bandwidth, in bytes per seconds.  -1 infinite
1285           (CSRTCC limit is 30mbps) 0 relative to input rate (see inputbw) >0
1286           absolute limit value Default value is 0 (relative)
1287
1288       mode=caller|listener|rendezvous
1289           Connection mode.  caller opens client connection.  listener starts
1290           server to listen for incoming connections.  rendezvous use Rendez-
1291           Vous connection mode.  Default value is caller.
1292
1293       mss=bytes
1294           Maximum Segment Size, in bytes. Used for buffer allocation and rate
1295           calculation using a packet counter assuming fully filled packets.
1296           The smallest MSS between the peers is used. This is 1500 by default
1297           in the overall internet.  This is the maximum size of the UDP
1298           packet and can be only decreased, unless you have some unusual
1299           dedicated network settings. Default value is 1500.
1300
1301       nakreport=1|0
1302           If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
1303           periodically until a lost packet is retransmitted or intentionally
1304           dropped. Default value is 1.
1305
1306       oheadbw=percents
1307           Recovery bandwidth overhead above input rate, in percents.  See
1308           inputbw. Default value is 25%.
1309
1310       passphrase=string
1311           HaiCrypt Encryption/Decryption Passphrase string, length from 10 to
1312           79 characters. The passphrase is the shared secret between the
1313           sender and the receiver. It is used to generate the Key Encrypting
1314           Key using PBKDF2 (Password-Based Key Derivation Function). It is
1315           used only if pbkeylen is non-zero. It is used on the receiver only
1316           if the received data is encrypted.  The configured passphrase
1317           cannot be recovered (write-only).
1318
1319       enforced_encryption=1|0
1320           If true, both connection parties must have the same password set
1321           (including empty, that is, with no encryption). If the password
1322           doesn't match or only one side is unencrypted, the connection is
1323           rejected. Default is true.
1324
1325       kmrefreshrate=packets
1326           The number of packets to be transmitted after which the encryption
1327           key is switched to a new key. Default is -1.  -1 means auto
1328           (0x1000000 in srt library). The range for this option is integers
1329           in the 0 - "INT_MAX".
1330
1331       kmpreannounce=packets
1332           The interval between when a new encryption key is sent and when
1333           switchover occurs. This value also applies to the subsequent
1334           interval between when switchover occurs and when the old encryption
1335           key is decommissioned. Default is -1.  -1 means auto (0x1000 in srt
1336           library). The range for this option is integers in the 0 -
1337           "INT_MAX".
1338
1339       snddropdelay=microseconds
1340           The sender's extra delay before dropping packets. This delay is
1341           added to the default drop delay time interval value.
1342
1343           Special value -1: Do not drop packets on the sender at all.
1344
1345       payload_size=bytes
1346           Sets the maximum declared size of a packet transferred during the
1347           single call to the sending function in Live mode. Use 0 if this
1348           value isn't used (which is default in file mode).  Default is -1
1349           (automatic), which typically means MPEG-TS; if you are going to use
1350           SRT to send any different kind of payload, such as, for example,
1351           wrapping a live stream in very small frames, then you can use a
1352           bigger maximum frame size, though not greater than 1456 bytes.
1353
1354       pkt_size=bytes
1355           Alias for payload_size.
1356
1357       peerlatency=microseconds
1358           The latency value (as described in rcvlatency) that is set by the
1359           sender side as a minimum value for the receiver.
1360
1361       pbkeylen=bytes
1362           Sender encryption key length, in bytes.  Only can be set to 0, 16,
1363           24 and 32.  Enable sender encryption if not 0.  Not required on
1364           receiver (set to 0), key size obtained from sender in HaiCrypt
1365           handshake.  Default value is 0.
1366
1367       rcvlatency=microseconds
1368           The time that should elapse since the moment when the packet was
1369           sent and the moment when it's delivered to the receiver application
1370           in the receiving function.  This time should be a buffer time large
1371           enough to cover the time spent for sending, unexpectedly extended
1372           RTT time, and the time needed to retransmit the lost UDP packet.
1373           The effective latency value will be the maximum of this options'
1374           value and the value of peerlatency set by the peer side. Before
1375           version 1.3.0 this option is only available as latency.
1376
1377       recv_buffer_size=bytes
1378           Set UDP receive buffer size, expressed in bytes.
1379
1380       send_buffer_size=bytes
1381           Set UDP send buffer size, expressed in bytes.
1382
1383       timeout=microseconds
1384           Set raise error timeouts for read, write and connect operations.
1385           Note that the SRT library has internal timeouts which can be
1386           controlled separately, the value set here is only a cap on those.
1387
1388       tlpktdrop=1|0
1389           Too-late Packet Drop. When enabled on receiver, it skips missing
1390           packets that have not been delivered in time and delivers the
1391           following packets to the application when their time-to-play has
1392           come. It also sends a fake ACK to the sender. When enabled on
1393           sender and enabled on the receiving peer, the sender drops the
1394           older packets that have no chance of being delivered in time. It
1395           was automatically enabled in the sender if the receiver supports
1396           it.
1397
1398       sndbuf=bytes
1399           Set send buffer size, expressed in bytes.
1400
1401       rcvbuf=bytes
1402           Set receive buffer size, expressed in bytes.
1403
1404           Receive buffer must not be greater than ffs.
1405
1406       lossmaxttl=packets
1407           The value up to which the Reorder Tolerance may grow. When Reorder
1408           Tolerance is > 0, then packet loss report is delayed until that
1409           number of packets come in. Reorder Tolerance increases every time a
1410           "belated" packet has come, but it wasn't due to retransmission
1411           (that is, when UDP packets tend to come out of order), with the
1412           difference between the latest sequence and this packet's sequence,
1413           and not more than the value of this option. By default it's 0,
1414           which means that this mechanism is turned off, and the loss report
1415           is always sent immediately upon experiencing a "gap" in sequences.
1416
1417       minversion
1418           The minimum SRT version that is required from the peer. A
1419           connection to a peer that does not satisfy the minimum version
1420           requirement will be rejected.
1421
1422           The version format in hex is 0xXXYYZZ for x.y.z in human readable
1423           form.
1424
1425       streamid=string
1426           A string limited to 512 characters that can be set on the socket
1427           prior to connecting. This stream ID will be able to be retrieved by
1428           the listener side from the socket that is returned from srt_accept
1429           and was connected by a socket with that set stream ID. SRT does not
1430           enforce any special interpretation of the contents of this string.
1431           This option doesnXt make sense in Rendezvous connection; the result
1432           might be that simply one side will override the value from the
1433           other side and itXs the matter of luck which one would win
1434
1435       srt_streamid=string
1436           Alias for streamid to avoid conflict with ffmpeg command line
1437           option.
1438
1439       smoother=live|file
1440           The type of Smoother used for the transmission for that socket,
1441           which is responsible for the transmission and congestion control.
1442           The Smoother type must be exactly the same on both connecting
1443           parties, otherwise the connection is rejected.
1444
1445       messageapi=1|0
1446           When set, this socket uses the Message API, otherwise it uses
1447           Buffer API. Note that in live mode (see transtype) thereXs only
1448           message API available. In File mode you can chose to use one of two
1449           modes:
1450
1451           Stream API (default, when this option is false). In this mode you
1452           may send as many data as you wish with one sending instruction, or
1453           even use dedicated functions that read directly from a file. The
1454           internal facility will take care of any speed and congestion
1455           control. When receiving, you can also receive as many data as
1456           desired, the data not extracted will be waiting for the next call.
1457           There is no boundary between data portions in the Stream mode.
1458
1459           Message API. In this mode your single sending instruction passes
1460           exactly one piece of data that has boundaries (a message). Contrary
1461           to Live mode, this message may span across multiple UDP packets and
1462           the only size limitation is that it shall fit as a whole in the
1463           sending buffer. The receiver shall use as large buffer as necessary
1464           to receive the message, otherwise the message will not be given up.
1465           When the message is not complete (not all packets received or there
1466           was a packet loss) it will not be given up.
1467
1468       transtype=live|file
1469           Sets the transmission type for the socket, in particular, setting
1470           this option sets multiple other parameters to their default values
1471           as required for a particular transmission type.
1472
1473           live: Set options as for live transmission. In this mode, you
1474           should send by one sending instruction only so many data that fit
1475           in one UDP packet, and limited to the value defined first in
1476           payload_size (1316 is default in this mode). There is no speed
1477           control in this mode, only the bandwidth control, if configured, in
1478           order to not exceed the bandwidth with the overhead transmission
1479           (retransmitted and control packets).
1480
1481           file: Set options as for non-live transmission. See messageapi for
1482           further explanations
1483
1484       linger=seconds
1485           The number of seconds that the socket waits for unsent data when
1486           closing.  Default is -1. -1 means auto (off with 0 seconds in live
1487           mode, on with 180 seconds in file mode). The range for this option
1488           is integers in the 0 - "INT_MAX".
1489
1490       tsbpd=1|0
1491           When true, use Timestamp-based Packet Delivery mode. The default
1492           behavior depends on the transmission type: enabled in live mode,
1493           disabled in file mode.
1494
1495       For more information see: <https://github.com/Haivision/srt>.
1496
1497   srtp
1498       Secure Real-time Transport Protocol.
1499
1500       The accepted options are:
1501
1502       srtp_in_suite
1503       srtp_out_suite
1504           Select input and output encoding suites.
1505
1506           Supported values:
1507
1508           AES_CM_128_HMAC_SHA1_80
1509           SRTP_AES128_CM_HMAC_SHA1_80
1510           AES_CM_128_HMAC_SHA1_32
1511           SRTP_AES128_CM_HMAC_SHA1_32
1512       srtp_in_params
1513       srtp_out_params
1514           Set input and output encoding parameters, which are expressed by a
1515           base64-encoded representation of a binary block. The first 16 bytes
1516           of this binary block are used as master key, the following 14 bytes
1517           are used as master salt.
1518
1519   subfile
1520       Virtually extract a segment of a file or another stream.  The
1521       underlying stream must be seekable.
1522
1523       Accepted options:
1524
1525       start
1526           Start offset of the extracted segment, in bytes.
1527
1528       end End offset of the extracted segment, in bytes.  If set to 0,
1529           extract till end of file.
1530
1531       Examples:
1532
1533       Extract a chapter from a DVD VOB file (start and end sectors obtained
1534       externally and multiplied by 2048):
1535
1536               subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
1537
1538       Play an AVI file directly from a TAR archive:
1539
1540               subfile,,start,183241728,end,366490624,,:archive.tar
1541
1542       Play a MPEG-TS file from start offset till end:
1543
1544               subfile,,start,32815239,end,0,,:video.ts
1545
1546   tee
1547       Writes the output to multiple protocols. The individual outputs are
1548       separated by |
1549
1550               tee:file://path/to/local/this.avi|file://path/to/local/that.avi
1551
1552   tcp
1553       Transmission Control Protocol.
1554
1555       The required syntax for a TCP url is:
1556
1557               tcp://<hostname>:<port>[?<options>]
1558
1559       options contains a list of &-separated options of the form key=val.
1560
1561       The list of supported options follows.
1562
1563       listen=2|1|0
1564           Listen for an incoming connection. 0 disables listen, 1 enables
1565           listen in single client mode, 2 enables listen in multi-client
1566           mode. Default value is 0.
1567
1568       timeout=microseconds
1569           Set raise error timeout, expressed in microseconds.
1570
1571           This option is only relevant in read mode: if no data arrived in
1572           more than this time interval, raise error.
1573
1574       listen_timeout=milliseconds
1575           Set listen timeout, expressed in milliseconds.
1576
1577       recv_buffer_size=bytes
1578           Set receive buffer size, expressed bytes.
1579
1580       send_buffer_size=bytes
1581           Set send buffer size, expressed bytes.
1582
1583       tcp_nodelay=1|0
1584           Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
1585
1586           Remark: Writing to the socket is currently not optimized to
1587           minimize system calls and reduces the efficiency / effect of
1588           TCP_NODELAY.
1589
1590       tcp_mss=bytes
1591           Set maximum segment size for outgoing TCP packets, expressed in
1592           bytes.
1593
1594       The following example shows how to setup a listening TCP connection
1595       with ffmpeg, which is then accessed with ffplay:
1596
1597               ffmpeg -i <input> -f <format> tcp://<hostname>:<port>?listen
1598               ffplay tcp://<hostname>:<port>
1599
1600   tls
1601       Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
1602
1603       The required syntax for a TLS/SSL url is:
1604
1605               tls://<hostname>:<port>[?<options>]
1606
1607       The following parameters can be set via command line options (or in
1608       code via "AVOption"s):
1609
1610       ca_file, cafile=filename
1611           A file containing certificate authority (CA) root certificates to
1612           treat as trusted. If the linked TLS library contains a default this
1613           might not need to be specified for verification to work, but not
1614           all libraries and setups have defaults built in.  The file must be
1615           in OpenSSL PEM format.
1616
1617       tls_verify=1|0
1618           If enabled, try to verify the peer that we are communicating with.
1619           Note, if using OpenSSL, this currently only makes sure that the
1620           peer certificate is signed by one of the root certificates in the
1621           CA database, but it does not validate that the certificate actually
1622           matches the host name we are trying to connect to. (With other
1623           backends, the host name is validated as well.)
1624
1625           This is disabled by default since it requires a CA database to be
1626           provided by the caller in many cases.
1627
1628       cert_file, cert=filename
1629           A file containing a certificate to use in the handshake with the
1630           peer.  (When operating as server, in listen mode, this is more
1631           often required by the peer, while client certificates only are
1632           mandated in certain setups.)
1633
1634       key_file, key=filename
1635           A file containing the private key for the certificate.
1636
1637       listen=1|0
1638           If enabled, listen for connections on the provided port, and assume
1639           the server role in the handshake instead of the client role.
1640
1641       http_proxy
1642           The HTTP proxy to tunnel through, e.g. "http://example.com:1234".
1643           The proxy must support the CONNECT method.
1644
1645       Example command lines:
1646
1647       To create a TLS/SSL server that serves an input stream.
1648
1649               ffmpeg -i <input> -f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
1650
1651       To play back a stream from the TLS/SSL server using ffplay:
1652
1653               ffplay tls://<hostname>:<port>
1654
1655   udp
1656       User Datagram Protocol.
1657
1658       The required syntax for an UDP URL is:
1659
1660               udp://<hostname>:<port>[?<options>]
1661
1662       options contains a list of &-separated options of the form key=val.
1663
1664       In case threading is enabled on the system, a circular buffer is used
1665       to store the incoming data, which allows one to reduce loss of data due
1666       to UDP socket buffer overruns. The fifo_size and overrun_nonfatal
1667       options are related to this buffer.
1668
1669       The list of supported options follows.
1670
1671       buffer_size=size
1672           Set the UDP maximum socket buffer size in bytes. This is used to
1673           set either the receive or send buffer size, depending on what the
1674           socket is used for.  Default is 32 KB for output, 384 KB for input.
1675           See also fifo_size.
1676
1677       bitrate=bitrate
1678           If set to nonzero, the output will have the specified constant
1679           bitrate if the input has enough packets to sustain it.
1680
1681       burst_bits=bits
1682           When using bitrate this specifies the maximum number of bits in
1683           packet bursts.
1684
1685       localport=port
1686           Override the local UDP port to bind with.
1687
1688       localaddr=addr
1689           Local IP address of a network interface used for sending packets or
1690           joining multicast groups.
1691
1692       pkt_size=size
1693           Set the size in bytes of UDP packets.
1694
1695       reuse=1|0
1696           Explicitly allow or disallow reusing UDP sockets.
1697
1698       ttl=ttl
1699           Set the time to live value (for multicast only).
1700
1701       connect=1|0
1702           Initialize the UDP socket with "connect()". In this case, the
1703           destination address can't be changed with ff_udp_set_remote_url
1704           later.  If the destination address isn't known at the start, this
1705           option can be specified in ff_udp_set_remote_url, too.  This allows
1706           finding out the source address for the packets with getsockname,
1707           and makes writes return with AVERROR(ECONNREFUSED) if "destination
1708           unreachable" is received.  For receiving, this gives the benefit of
1709           only receiving packets from the specified peer address/port.
1710
1711       sources=address[,address]
1712           Only receive packets sent from the specified addresses. In case of
1713           multicast, also subscribe to multicast traffic coming from these
1714           addresses only.
1715
1716       block=address[,address]
1717           Ignore packets sent from the specified addresses. In case of
1718           multicast, also exclude the source addresses in the multicast
1719           subscription.
1720
1721       fifo_size=units
1722           Set the UDP receiving circular buffer size, expressed as a number
1723           of packets with size of 188 bytes. If not specified defaults to
1724           7*4096.
1725
1726       overrun_nonfatal=1|0
1727           Survive in case of UDP receiving circular buffer overrun. Default
1728           value is 0.
1729
1730       timeout=microseconds
1731           Set raise error timeout, expressed in microseconds.
1732
1733           This option is only relevant in read mode: if no data arrived in
1734           more than this time interval, raise error.
1735
1736       broadcast=1|0
1737           Explicitly allow or disallow UDP broadcasting.
1738
1739           Note that broadcasting may not work properly on networks having a
1740           broadcast storm protection.
1741
1742       Examples
1743
1744       •   Use ffmpeg to stream over UDP to a remote endpoint:
1745
1746                   ffmpeg -i <input> -f <format> udp://<hostname>:<port>
1747
1748       •   Use ffmpeg to stream in mpegts format over UDP using 188 sized UDP
1749           packets, using a large input buffer:
1750
1751                   ffmpeg -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
1752
1753       •   Use ffmpeg to receive over UDP from a remote endpoint:
1754
1755                   ffmpeg -i udp://[<multicast-address>]:<port> ...
1756
1757   unix
1758       Unix local socket
1759
1760       The required syntax for a Unix socket URL is:
1761
1762               unix://<filepath>
1763
1764       The following parameters can be set via command line options (or in
1765       code via "AVOption"s):
1766
1767       timeout
1768           Timeout in ms.
1769
1770       listen
1771           Create the Unix socket in listening mode.
1772
1773   zmq
1774       ZeroMQ asynchronous messaging using the libzmq library.
1775
1776       This library supports unicast streaming to multiple clients without
1777       relying on an external server.
1778
1779       The required syntax for streaming or connecting to a stream is:
1780
1781               zmq:tcp://ip-address:port
1782
1783       Example: Create a localhost stream on port 5555:
1784
1785               ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
1786
1787       Multiple clients may connect to the stream using:
1788
1789               ffplay zmq:tcp://127.0.0.1:5555
1790
1791       Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub
1792       pattern.  The server side binds to a port and publishes data. Clients
1793       connect to the server (via IP address/port) and subscribe to the
1794       stream. The order in which the server and client start generally does
1795       not matter.
1796
1797       ffmpeg must be compiled with the --enable-libzmq option to support this
1798       protocol.
1799
1800       Options can be set on the ffmpeg/ffplay command line. The following
1801       options are supported:
1802
1803       pkt_size
1804           Forces the maximum packet size for sending/receiving data. The
1805           default value is 131,072 bytes. On the server side, this sets the
1806           maximum size of sent packets via ZeroMQ. On the clients, it sets an
1807           internal buffer size for receiving packets. Note that pkt_size on
1808           the clients should be equal to or greater than pkt_size on the
1809           server. Otherwise the received message may be truncated causing
1810           decoding errors.
1811

SEE ALSO

1813       ffmpeg(1), ffplay(1), ffprobe(1), libavformat(3)
1814

AUTHORS

1816       The FFmpeg developers.
1817
1818       For details about the authorship, see the Git history of the project
1819       (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
1820       the FFmpeg source directory, or browsing the online repository at
1821       <http://source.ffmpeg.org>.
1822
1823       Maintainers for the specific components are listed in the file
1824       MAINTAINERS in the source code tree.
1825
1826
1827
1828                                                           FFMPEG-PROTOCOLS(1)
Impressum