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

SEE ALSO

1848       ffmpeg(1), ffplay(1), ffprobe(1), libavformat(3)
1849

AUTHORS

1851       The FFmpeg developers.
1852
1853       For details about the authorship, see the Git history of the project
1854       (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
1855       the FFmpeg source directory, or browsing the online repository at
1856       <http://source.ffmpeg.org>.
1857
1858       Maintainers for the specific components are listed in the file
1859       MAINTAINERS in the source code tree.
1860
1861
1862
1863                                                           FFMPEG-PROTOCOLS(1)
Impressum