.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "FFMPEG-PROTOCOLS 1" .TH FFMPEG-PROTOCOLS 1 " " " " " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ffmpeg\-protocols \- FFmpeg protocols .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes the input and output protocols provided by the libavformat library. .SH "PROTOCOL OPTIONS" .IX Header "PROTOCOL OPTIONS" The libavformat library provides some generic global options, which can be set on all the protocols. In addition each protocol may support so-called private options, which are specific for that component. .PP Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the FFmpeg tools, or by setting the value explicitly in the \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0 for programmatic use. .PP The list of supported options follows: .IP "\fBprotocol_whitelist\fR \fIlist\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "protocol_whitelist list (input)" Set a \*(L",\*(R"\-separated list of allowed protocols. \*(L"\s-1ALL\*(R"\s0 matches all protocols. Protocols prefixed by \*(L"\-\*(R" are disabled. All protocols are allowed by default but protocols used by an another protocol (nested protocols) are restricted to a per protocol subset. .SH "PROTOCOLS" .IX Header "PROTOCOLS" Protocols are configured elements in FFmpeg that enable access to resources that require specific protocols. .PP When you configure your FFmpeg build, all the supported protocols are enabled by default. You can list all available ones using the configure option \*(L"\-\-list\-protocols\*(R". .PP You can disable all the protocols using the configure option \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a particular protocol using the option \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR". .PP The option \*(L"\-protocols\*(R" of the ff* tools will display the list of supported protocols. .PP All protocols accept the following options: .IP "\fBrw_timeout\fR" 4 .IX Item "rw_timeout" Maximum time to wait for (network) read/write operations to complete, in microseconds. .PP A description of the currently available protocols follows. .SS "amqp" .IX Subsection "amqp" Advanced Message Queueing Protocol (\s-1AMQP\s0) version 0\-9\-1 is a broker based publish-subscribe communication protocol. .PP FFmpeg must be compiled with \-\-enable\-librabbitmq to support \s-1AMQP. A\s0 separate \&\s-1AMQP\s0 broker must also be run. An example open-source \s-1AMQP\s0 broker is RabbitMQ. .PP After starting the broker, an FFmpeg client may stream data to the broker using the command: .PP .Vb 1 \& ffmpeg \-re \-i input \-f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost] .Ve .PP Where hostname and port (default is 5672) is the address of the broker. The client may also set a user/password for authentication. The default for both fields is \*(L"guest\*(R". Name of virtual host on broker can be set with vhost. The default value is \*(L"/\*(R". .PP Muliple subscribers may stream from the broker using the command: .PP .Vb 1 \& ffplay amqp://[[user]:[password]@]hostname[:port][/vhost] .Ve .PP In RabbitMQ all data published to the broker flows through a specific exchange, and each subscribing client has an assigned queue/buffer. When a packet arrives at an exchange, it may be copied to a client's queue depending on the exchange and routing_key fields. .PP The following options are supported: .IP "\fBexchange\fR" 4 .IX Item "exchange" Sets the exchange to use on the broker. RabbitMQ has several predefined exchanges: \*(L"amq.direct\*(R" is the default exchange, where the publisher and subscriber must have a matching routing_key; \*(L"amq.fanout\*(R" is the same as a broadcast operation (i.e. the data is forwarded to all queues on the fanout exchange independent of the routing_key); and \*(L"amq.topic\*(R" is similar to \&\*(L"amq.direct\*(R", but allows for more complex pattern matching (refer to the RabbitMQ documentation). .IP "\fBrouting_key\fR" 4 .IX Item "routing_key" Sets the routing key. The default value is \*(L"amqp\*(R". The routing key is used on the \*(L"amq.direct\*(R" and \*(L"amq.topic\*(R" exchanges to decide whether packets are written to the queue of a subscriber. .IP "\fBpkt_size\fR" 4 .IX Item "pkt_size" Maximum size of each packet sent/received to the broker. Default is 131072. Minimum is 4096 and max is any large value (representable by an int). When receiving packets, this sets an internal buffer size in FFmpeg. It should be equal to or greater than the size of the published packets to the broker. Otherwise the received message may be truncated causing decoding errors. .IP "\fBconnection_timeout\fR" 4 .IX Item "connection_timeout" The timeout in seconds during the initial connection to the broker. The default value is rw_timeout, or 5 seconds if rw_timeout is not set. .IP "\fBdelivery_mode\fR \fImode\fR" 4 .IX Item "delivery_mode mode" Sets the delivery mode of each message sent to broker. The following values are accepted: .RS 4 .IP "\fBpersistent\fR" 4 .IX Item "persistent" Delivery mode set to \*(L"persistent\*(R" (2). This is the default value. Messages may be written to the broker's disk depending on its setup. .IP "\fBnon-persistent\fR" 4 .IX Item "non-persistent" Delivery mode set to \*(L"non-persistent\*(R" (1). Messages will stay in broker's memory unless the broker is under memory pressure. .RE .RS 4 .RE .SS "async" .IX Subsection "async" Asynchronous data filling wrapper for input stream. .PP Fill data in a background thread, to decouple I/O operation from demux thread. .PP .Vb 3 \& async: \& async:http://host/resource \& async:cache:http://host/resource .Ve .SS "bluray" .IX Subsection "bluray" Read BluRay playlist. .PP The accepted options are: .IP "\fBangle\fR" 4 .IX Item "angle" BluRay angle .IP "\fBchapter\fR" 4 .IX Item "chapter" Start chapter (1...N) .IP "\fBplaylist\fR" 4 .IX Item "playlist" Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls) .PP Examples: .PP Read longest playlist from BluRay mounted to /mnt/bluray: .PP .Vb 1 \& bluray:/mnt/bluray .Ve .PP Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2: .PP .Vb 1 \& \-playlist 4 \-angle 2 \-chapter 2 bluray:/mnt/bluray .Ve .SS "cache" .IX Subsection "cache" Caching wrapper for input stream. .PP Cache the input stream to temporary file. It brings seeking capability to live streams. .PP The accepted options are: .IP "\fBread_ahead_limit\fR" 4 .IX Item "read_ahead_limit" Amount in bytes that may be read ahead when seeking isn't supported. Range is \-1 to \s-1INT_MAX.\s0 \&\-1 for unlimited. Default is 65536. .PP \&\s-1URL\s0 Syntax is .PP .Vb 1 \& cache: .Ve .SS "concat" .IX Subsection "concat" Physical concatenation protocol. .PP Read and seek from many resources in sequence as if they were a unique resource. .PP A \s-1URL\s0 accepted by this protocol has the syntax: .PP .Vb 1 \& concat:||...| .Ve .PP where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the resource to be concatenated, each one possibly specifying a distinct protocol. .PP For example to read a sequence of files \fIsplit1.mpeg\fR, \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the command: .PP .Vb 1 \& ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg .Ve .PP Note that you may need to escape the character \*(L"|\*(R" which is special for many shells. .SS "concatf" .IX Subsection "concatf" Physical concatenation protocol using a line break delimited list of resources. .PP Read and seek from many resources in sequence as if they were a unique resource. .PP A \s-1URL\s0 accepted by this protocol has the syntax: .PP .Vb 1 \& concatf: .Ve .PP where \fI\s-1URL\s0\fR is the url containing a line break delimited list of resources to be concatenated, each one possibly specifying a distinct protocol. Special characters must be escaped with backslash or single quotes. See \fBthe \*(L"Quoting and escaping\*(R" section in the \fBffmpeg\-utils\fB\|(1) manual\fR. .PP For example to read a sequence of files \fIsplit1.mpeg\fR, \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR listed in separate lines within a file \fIsplit.txt\fR with \fBffplay\fR use the command: .PP .Vb 1 \& ffplay concatf:split.txt .Ve .PP Where \fIsplit.txt\fR contains the lines: .PP .Vb 3 \& split1.mpeg \& split2.mpeg \& split3.mpeg .Ve .SS "crypto" .IX Subsection "crypto" AES-encrypted stream reading protocol. .PP The accepted options are: .IP "\fBkey\fR" 4 .IX Item "key" Set the \s-1AES\s0 decryption key binary block from given hexadecimal representation. .IP "\fBiv\fR" 4 .IX Item "iv" Set the \s-1AES\s0 decryption initialization vector binary block from given hexadecimal representation. .PP Accepted \s-1URL\s0 formats: .PP .Vb 2 \& crypto: \& crypto+ .Ve .SS "data" .IX Subsection "data" Data in-line in the \s-1URI.\s0 See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>. .PP For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR: .PP .Vb 1 \& ffmpeg \-i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png .Ve .SS "fd" .IX Subsection "fd" File descriptor access protocol. .PP The accepted syntax is: .PP .Vb 1 \& fd: \-fd .Ve .PP If \fBfd\fR is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. Unlike the pipe protocol, fd protocol has seek support if it corresponding to a regular file. fd protocol doesn't support pass file descriptor via \s-1URL\s0 for security. .PP This protocol accepts the following options: .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow. .IP "\fBfd\fR" 4 .IX Item "fd" Set file descriptor. .SS "file" .IX Subsection "file" File access protocol. .PP Read from or write to a file. .PP A file \s-1URL\s0 can have the form: .PP .Vb 1 \& file: .Ve .PP where \fIfilename\fR is the path of the file to read. .PP An \s-1URL\s0 that does not have a protocol prefix will be assumed to be a file \s-1URL.\s0 Depending on the build, an \s-1URL\s0 that looks like a Windows path with the drive letter at the beginning will also be assumed to be a file \s-1URL\s0 (usually not the case in builds for unix-like systems). .PP For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR use the command: .PP .Vb 1 \& ffmpeg \-i file:input.mpeg output.mpeg .Ve .PP This protocol accepts the following options: .IP "\fBtruncate\fR" 4 .IX Item "truncate" Truncate existing files on write, if set to 1. A value of 0 prevents truncating. Default value is 1. .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable for files on slow medium. .IP "\fBfollow\fR" 4 .IX Item "follow" If set to 1, the protocol will retry reading at the end of the file, allowing reading files that still are being written. In order for this to terminate, you either need to use the rw_timeout option, or use the interrupt callback (for \s-1API\s0 users). .IP "\fBseekable\fR" 4 .IX Item "seekable" Controls if seekability is advertised on the file. 0 means non-seekable, \-1 means auto (seekable for normal files, non-seekable for named pipes). .Sp Many demuxers handle seekable and non-seekable resources differently, overriding this might speed up opening certain files at the cost of losing some features (e.g. accurate seeking). .SS "ftp" .IX Subsection "ftp" \&\s-1FTP\s0 (File Transfer Protocol). .PP Read from or write to remote resources using \s-1FTP\s0 protocol. .PP Following syntax is required. .PP .Vb 1 \& ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg .Ve .PP This protocol accepts the following options. .IP "\fBtimeout\fR" 4 .IX Item "timeout" Set timeout in microseconds of socket I/O operations used by the underlying low level operation. By default it is set to \-1, which means that the timeout is not specified. .IP "\fBftp-user\fR" 4 .IX Item "ftp-user" Set a user to be used for authenticating to the \s-1FTP\s0 server. This is overridden by the user in the \s-1FTP URL.\s0 .IP "\fBftp-password\fR" 4 .IX Item "ftp-password" Set a password to be used for authenticating to the \s-1FTP\s0 server. This is overridden by the password in the \s-1FTP URL,\s0 or by \fBftp-anonymous-password\fR if no user is set. .IP "\fBftp-anonymous-password\fR" 4 .IX Item "ftp-anonymous-password" Password used when login as anonymous user. Typically an e\-mail address should be used. .IP "\fBftp-write-seekable\fR" 4 .IX Item "ftp-write-seekable" Control seekability of connection during encoding. If set to 1 the resource is supposed to be seekable, if set to 0 it is assumed not to be seekable. Default value is 0. .PP \&\s-1NOTE:\s0 Protocol can be used as output, but it is recommended to not do it, unless special care is taken (tests, customized server configuration etc.). Different \s-1FTP\s0 servers behave in different way during seek operation. ff* tools may produce incomplete content due to server limitations. .SS "gopher" .IX Subsection "gopher" Gopher protocol. .SS "gophers" .IX Subsection "gophers" Gophers protocol. .PP The Gopher protocol with \s-1TLS\s0 encapsulation. .SS "hls" .IX Subsection "hls" Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as a uniform one. The M3U8 playlists describing the segments can be remote \s-1HTTP\s0 resources or local files, accessed using the standard file protocol. The nested protocol is declared by specifying "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR is either \*(L"file\*(R" or \*(L"http\*(R". .PP .Vb 2 \& hls+http://host/path/to/remote/resource.m3u8 \& hls+file://path/to/local/resource.m3u8 .Ve .PP Using this protocol is discouraged \- the hls demuxer should work just as well (if not, please report the issues) and is more complete. To use the hls demuxer instead, simply use the direct URLs to the m3u8 files. .SS "http" .IX Subsection "http" \&\s-1HTTP\s0 (Hyper Text Transfer Protocol). .PP This protocol accepts the following options: .IP "\fBseekable\fR" 4 .IX Item "seekable" Control seekability of connection. If set to 1 the resource is supposed to be seekable, if set to 0 it is assumed not to be seekable, if set to \-1 it will try to autodetect if it is seekable. Default value is \-1. .IP "\fBchunked_post\fR" 4 .IX Item "chunked_post" If set to 1 use chunked Transfer-Encoding for posts, default is 1. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set a specific content type for the \s-1POST\s0 messages or for listen mode. .IP "\fBhttp_proxy\fR" 4 .IX Item "http_proxy" set \s-1HTTP\s0 proxy to tunnel through e.g. http://example.com:1234 .IP "\fBheaders\fR" 4 .IX Item "headers" Set custom \s-1HTTP\s0 headers, can override built in default headers. The value must be a string encoding the headers. .IP "\fBmultiple_requests\fR" 4 .IX Item "multiple_requests" Use persistent connections if set to 1, default is 0. .IP "\fBpost_data\fR" 4 .IX Item "post_data" Set custom \s-1HTTP\s0 post data. .IP "\fBreferer\fR" 4 .IX Item "referer" Set the Referer header. Include 'Referer: \s-1URL\s0' header in \s-1HTTP\s0 request. .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified the protocol will use a string describing the libavformat build. (\*(L"Lavf/\*(R") .IP "\fBreconnect_at_eof\fR" 4 .IX Item "reconnect_at_eof" If set then eof is treated like an error and causes reconnection, this is useful for live / endless streams. .IP "\fBreconnect_streamed\fR" 4 .IX Item "reconnect_streamed" If set then even streamed/non seekable streams will be reconnected on errors. .IP "\fBreconnect_on_network_error\fR" 4 .IX Item "reconnect_on_network_error" Reconnect automatically in case of \s-1TCP/TLS\s0 errors during connect. .IP "\fBreconnect_on_http_error\fR" 4 .IX Item "reconnect_on_http_error" A comma separated list of \s-1HTTP\s0 status codes to reconnect on. The list can include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. .IP "\fBreconnect_delay_max\fR" 4 .IX Item "reconnect_delay_max" Sets the maximum delay in seconds after which to give up reconnecting .IP "\fBmime_type\fR" 4 .IX Item "mime_type" Export the \s-1MIME\s0 type. .IP "\fBhttp_version\fR" 4 .IX Item "http_version" Exports the \s-1HTTP\s0 response version number. Usually \*(L"1.0\*(R" or \*(L"1.1\*(R". .IP "\fBicy\fR" 4 .IX Item "icy" If set to 1 request \s-1ICY\s0 (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading the \fBicy_metadata_headers\fR and \fBicy_metadata_packet\fR options. The default is 1. .IP "\fBicy_metadata_headers\fR" 4 .IX Item "icy_metadata_headers" If the server supports \s-1ICY\s0 metadata, this contains the ICY-specific \s-1HTTP\s0 reply headers, separated by newline characters. .IP "\fBicy_metadata_packet\fR" 4 .IX Item "icy_metadata_packet" If the server supports \s-1ICY\s0 metadata, and \fBicy\fR was set to 1, this contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. .IP "\fBcookies\fR" 4 .IX Item "cookies" Set the cookies to be sent in future requests. The format of each cookie is the same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be delimited by a newline character. .IP "\fBoffset\fR" 4 .IX Item "offset" Set initial byte offset. .IP "\fBend_offset\fR" 4 .IX Item "end_offset" Try to limit the request to bytes preceding this offset. .IP "\fBmethod\fR" 4 .IX Item "method" When used as a client option it sets the \s-1HTTP\s0 method for the request. .Sp When used as a server option it sets the \s-1HTTP\s0 method that is going to be expected from the client(s). If the expected and the received \s-1HTTP\s0 method do not match the client will be given a Bad Request response. When unset the \s-1HTTP\s0 method is not checked for now. This will be replaced by autodetection in the future. .IP "\fBlisten\fR" 4 .IX Item "listen" If set to 1 enables experimental \s-1HTTP\s0 server. This can be used to send data when used as an output option, or read data from a client with \s-1HTTP POST\s0 when used as an input option. If set to 2 enables experimental multi-client \s-1HTTP\s0 server. This is not yet implemented in ffmpeg.c and thus must not be used as a command line option. .Sp .Vb 2 \& # Server side (sending): \& ffmpeg \-i somefile.ogg \-c copy \-listen 1 \-f ogg http://: \& \& # Client side (receiving): \& ffmpeg \-i http://: \-c copy somefile.ogg \& \& # Client can also be done with wget: \& wget http://: \-O somefile.ogg \& \& # Server side (receiving): \& ffmpeg \-listen 1 \-i http://: \-c copy somefile.ogg \& \& # Client side (sending): \& ffmpeg \-i somefile.ogg \-chunked_post 0 \-c copy \-f ogg http://: \& \& # Client can also be done with wget: \& wget \-\-post\-file=somefile.ogg http://: .Ve .IP "\fBsend_expect_100\fR" 4 .IX Item "send_expect_100" Send an Expect: 100\-continue header for \s-1POST.\s0 If set to 1 it will send, if set to 0 it won't, if set to \-1 it will try to send if it is applicable. Default value is \-1. .IP "\fBauth_type\fR" 4 .IX Item "auth_type" Set \s-1HTTP\s0 authentication type. No option for Digest, since this method requires getting nonce parameters from the server first and can't be used straight away like Basic. .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" Choose the \s-1HTTP\s0 authentication type automatically. This is the default. .IP "\fBbasic\fR" 4 .IX Item "basic" Choose the \s-1HTTP\s0 basic authentication. .Sp Basic authentication sends a Base64\-encoded string that contains a user name and password for the client. Base64 is not a form of encryption and should be considered the same as sending the user name and password in clear text (Base64 is a reversible encoding). If a resource needs to be protected, strongly consider using an authentication scheme other than basic authentication. \s-1HTTPS/TLS\s0 should be used with basic authentication. Without these additional security enhancements, basic authentication should not be used to protect sensitive or valuable information. .RE .RS 4 .RE .PP \fI\s-1HTTP\s0 Cookies\fR .IX Subsection "HTTP Cookies" .PP Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the request. The \fBcookies\fR option allows these cookies to be specified. At the very least, each cookie must specify a value along with a path and domain. \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited by a newline. .PP The required syntax to play a stream specifying a cookie is: .PP .Vb 1 \& ffplay \-cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 .Ve .SS "Icecast" .IX Subsection "Icecast" Icecast protocol (stream to Icecast servers) .PP This protocol accepts the following options: .IP "\fBice_genre\fR" 4 .IX Item "ice_genre" Set the stream genre. .IP "\fBice_name\fR" 4 .IX Item "ice_name" Set the stream name. .IP "\fBice_description\fR" 4 .IX Item "ice_description" Set the stream description. .IP "\fBice_url\fR" 4 .IX Item "ice_url" Set the stream website \s-1URL.\s0 .IP "\fBice_public\fR" 4 .IX Item "ice_public" Set if the stream should be public. The default is 0 (not public). .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified a string of the form \&\*(L"Lavf/\*(R" will be used. .IP "\fBpassword\fR" 4 .IX Item "password" Set the Icecast mountpoint password. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set the stream content type. This must be set if it is different from audio/mpeg. .IP "\fBlegacy_icecast\fR" 4 .IX Item "legacy_icecast" This enables support for Icecast versions < 2.4.0, that do not support the \&\s-1HTTP PUT\s0 method but the \s-1SOURCE\s0 method. .IP "\fBtls\fR" 4 .IX Item "tls" Establish a \s-1TLS\s0 (\s-1HTTPS\s0) connection to Icecast. .PP .Vb 1 \& icecast://[[:]@]:/ .Ve .SS "ipfs" .IX Subsection "ipfs" InterPlanetary File System (\s-1IPFS\s0) protocol support. One can access files stored on the \s-1IPFS\s0 network through so-called gateways. These are http(s) endpoints. This protocol wraps the \s-1IPFS\s0 native protocols (ipfs:// and ipns://) to be sent to such a gateway. Users can (and should) host their own node which means this protocol will use one's local gateway to access files on the \s-1IPFS\s0 network. .PP This protocol accepts the following options: .IP "\fBgateway\fR" 4 .IX Item "gateway" Defines the gateway to use. When not set, the protocol will first try locating the local gateway by looking at \f(CW$IPFS_GATEWAY\fR, \f(CW$IPFS_PATH\fR and \f(CW\*(C`$HOME/.ipfs/\*(C'\fR, in that order. .PP One can use this protocol in 2 ways. Using \s-1IPFS:\s0 .PP .Vb 1 \& ffplay ipfs:// .Ve .PP Or the \s-1IPNS\s0 protocol (\s-1IPNS\s0 is mutable \s-1IPFS\s0): .PP .Vb 1 \& ffplay ipns:// .Ve .SS "mmst" .IX Subsection "mmst" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP.\s0 .SS "mmsh" .IX Subsection "mmsh" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP.\s0 .PP The required syntax is: .PP .Vb 1 \& mmsh://[:][/][/] .Ve .SS "md5" .IX Subsection "md5" \&\s-1MD5\s0 output protocol. .PP Computes the \s-1MD5\s0 hash of the data to be written, and on close writes this to the designated output or stdout if none is specified. It can be used to test muxers without writing an actual file. .PP Some examples follow. .PP .Vb 2 \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. \& ffmpeg \-i input.flv \-f avi \-y md5:output.avi.md5 \& \& # Write the MD5 hash of the encoded AVI file to stdout. \& ffmpeg \-i input.flv \-f avi \-y md5: .Ve .PP Note that some formats (typically \s-1MOV\s0) require the output protocol to be seekable, so they will fail with the \s-1MD5\s0 output protocol. .SS "pipe" .IX Subsection "pipe" \&\s-1UNIX\s0 pipe access protocol. .PP Read and write from \s-1UNIX\s0 pipes. .PP The accepted syntax is: .PP .Vb 1 \& pipe:[] .Ve .PP If \fBfd\fR isn't specified, \fInumber\fR is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. .PP For example to read from stdin with \fBffmpeg\fR: .PP .Vb 3 \& cat test.wav | ffmpeg \-i pipe:0 \& # ...this is the same as... \& cat test.wav | ffmpeg \-i pipe: .Ve .PP For writing to stdout with \fBffmpeg\fR: .PP .Vb 3 \& ffmpeg \-i test.wav \-f avi pipe:1 | cat > test.avi \& # ...this is the same as... \& ffmpeg \-i test.wav \-f avi pipe: | cat > test.avi .Ve .PP This protocol accepts the following options: .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow. .IP "\fBfd\fR" 4 .IX Item "fd" Set file descriptor. .PP Note that some formats (typically \s-1MOV\s0), require the output protocol to be seekable, so they will fail with the pipe output protocol. .SS "prompeg" .IX Subsection "prompeg" Pro-MPEG Code of Practice #3 Release 2 \s-1FEC\s0 protocol. .PP The Pro-MPEG CoP#3 \s-1FEC\s0 is a 2D parity-check forward error correction mechanism for \s-1MPEG\-2\s0 Transport Streams sent over \s-1RTP.\s0 .PP This protocol must be used in conjunction with the \f(CW\*(C`rtp_mpegts\*(C'\fR muxer and the \f(CW\*(C`rtp\*(C'\fR protocol. .PP The required syntax is: .PP .Vb 1 \& \-f rtp_mpegts \-fec prompeg=