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

SEE ALSO

1934       ffmpeg(1), ffplay(1), ffprobe(1), libavformat(3)
1935

AUTHORS

1937       The FFmpeg developers.
1938
1939       For details about the authorship, see the Git history of the project
1940       (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
1941       the FFmpeg source directory, or browsing the online repository at
1942       <https://git.ffmpeg.org/ffmpeg>.
1943
1944       Maintainers for the specific components are listed in the file
1945       MAINTAINERS in the source code tree.
1946
1947
1948
1949                                                           FFMPEG-PROTOCOLS(1)
Impressum