.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" 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 "FFSERVER 1" .TH FFSERVER 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" ffserver \- ffserver video server .SH "SYNOPSIS" .IX Header "SYNOPSIS" ffserver [\fIoptions\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBffserver\fR is a streaming server for both audio and video. It supports several live feeds, streaming from files and time shifting on live feeds. You can seek to positions in the past on each live feed, provided you specify a big enough feed storage. .PP \&\fBffserver\fR is configured through a configuration file, which is read at startup. If not explicitly specified, it will read from \&\fI/etc/ffserver.conf\fR. .PP \&\fBffserver\fR receives prerecorded files or \s-1FFM\s0 streams from some \&\fBffmpeg\fR instance as input, then streams them over \&\s-1RTP/RTSP/HTTP.\s0 .PP An \fBffserver\fR instance will listen on some port as specified in the configuration file. You can launch one or more instances of \&\fBffmpeg\fR and send one or more \s-1FFM\s0 streams to the port where ffserver is expecting to receive them. Alternately, you can make \&\fBffserver\fR launch such \fBffmpeg\fR instances at startup. .PP Input streams are called feeds, and each one is specified by a \&\f(CW\*(C`\*(C'\fR section in the configuration file. .PP For each feed you can have different output streams in various formats, each one specified by a \f(CW\*(C`\*(C'\fR section in the configuration file. .SH "DETAILED DESCRIPTION" .IX Header "DETAILED DESCRIPTION" \&\fBffserver\fR works by forwarding streams encoded by \&\fBffmpeg\fR, or pre-recorded streams which are read from disk. .PP Precisely, \fBffserver\fR acts as an \s-1HTTP\s0 server, accepting \s-1POST\s0 requests from \fBffmpeg\fR to acquire the stream to publish, and serving \s-1RTSP\s0 clients or \s-1HTTP\s0 clients \s-1GET\s0 requests with the stream media content. .PP A feed is an \fB\s-1FFM\s0\fR stream created by \fBffmpeg\fR, and sent to a port where \fBffserver\fR is listening. .PP Each feed is identified by a unique name, corresponding to the name of the resource published on \fBffserver\fR, and is configured by a dedicated \f(CW\*(C`Feed\*(C'\fR section in the configuration file. .PP The feed publish \s-1URL\s0 is given by: .PP .Vb 1 \& http://:/ .Ve .PP where \fIffserver_ip_address\fR is the \s-1IP\s0 address of the machine where \&\fBffserver\fR is installed, \fIhttp_port\fR is the port number of the \s-1HTTP\s0 server (configured through the \fBHTTPPort\fR option), and \&\fIfeed_name\fR is the name of the corresponding feed defined in the configuration file. .PP Each feed is associated to a file which is stored on disk. This stored file is used to send pre-recorded data to a player as fast as possible when new content is added in real-time to the stream. .PP A \*(L"live-stream\*(R" or \*(L"stream\*(R" is a resource published by \&\fBffserver\fR, and made accessible through the \s-1HTTP\s0 protocol to clients. .PP A stream can be connected to a feed, or to a file. In the first case, the published stream is forwarded from the corresponding feed generated by a running instance of \fBffmpeg\fR, in the second case the stream is read from a pre-recorded file. .PP Each stream is identified by a unique name, corresponding to the name of the resource served by \fBffserver\fR, and is configured by a dedicated \f(CW\*(C`Stream\*(C'\fR section in the configuration file. .PP The stream access \s-1HTTP URL\s0 is given by: .PP .Vb 1 \& http://:/[] .Ve .PP The stream access \s-1RTSP URL\s0 is given by: .PP .Vb 1 \& http://:/[] .Ve .PP \&\fIstream_name\fR is the name of the corresponding stream defined in the configuration file. \fIoptions\fR is a list of options specified after the \s-1URL\s0 which affects how the stream is served by \&\fBffserver\fR. \fIhttp_port\fR and \fIrtsp_port\fR are the \s-1HTTP\s0 and \s-1RTSP\s0 ports configured with the options \fIHTTPPort\fR and \&\fIRTSPPort\fR respectively. .PP In case the stream is associated to a feed, the encoding parameters must be configured in the stream configuration. They are sent to \&\fBffmpeg\fR when setting up the encoding. This allows \&\fBffserver\fR to define the encoding parameters used by the \fBffmpeg\fR encoders. .PP The \fBffmpeg\fR \fBoverride_ffserver\fR commandline option allows one to override the encoding parameters set by the server. .PP Multiple streams can be connected to the same feed. .PP For example, you can have a situation described by the following graph: .PP .Vb 10 \& _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& | | | | \& ffmpeg 1 \-\-\-\-\-| feed 1 |\-\-\-\-\-| stream 1 | \& \e |_\|_\|_\|_\|_\|_\|_\|_\|_|\e |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| \& \e \e \& \e \e _\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& \e \e | | \& \e \e| stream 2 | \& \e |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| \& \e \& \e _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& \e | | | | \& \e| feed 2 |\-\-\-\-\-| stream 3 | \& |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| \& \& _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& | | | | \& ffmpeg 2 \-\-\-\-\-| feed 3 |\-\-\-\-\-| stream 4 | \& |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| \& \& _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& | | | | \& | file 1 |\-\-\-\-\-| stream 5 | \& |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| .Ve .SS "\s-1FFM, FFM2\s0 formats" .IX Subsection "FFM, FFM2 formats" \&\s-1FFM\s0 and \s-1FFM2\s0 are formats used by ffserver. They allow storing a wide variety of video and audio streams and encoding options, and can store a moving time segment of an infinite movie or a whole movie. .PP \&\s-1FFM\s0 is version specific, and there is limited compatibility of \s-1FFM\s0 files generated by one version of ffmpeg/ffserver and another version of ffmpeg/ffserver. It may work but it is not guaranteed to work. .PP \&\s-1FFM2\s0 is extensible while maintaining compatibility and should work between differing versions of tools. \s-1FFM2\s0 is the default. .SS "Status stream" .IX Subsection "Status stream" \&\fBffserver\fR supports an \s-1HTTP\s0 interface which exposes the current status of the server. .PP Simply point your browser to the address of the special status stream specified in the configuration file. .PP For example if you have: .PP .Vb 2 \& \& Format status \& \& # Only allow local people to get the status \& ACL allow localhost \& ACL allow 192.168.0.0 192.168.255.255 \& .Ve .PP then the server will post a page with the status information when the special stream \fIstatus.html\fR is requested. .SS "How do I make it work?" .IX Subsection "How do I make it work?" As a simple test, just run the following two command lines where \s-1INPUTFILE\s0 is some file which you can decode with ffmpeg: .PP .Vb 2 \& ffserver \-f doc/ffserver.conf & \& ffmpeg \-i INPUTFILE http://localhost:8090/feed1.ffm .Ve .PP At this point you should be able to go to your Windows machine and fire up Windows Media Player (\s-1WMP\s0). Go to Open \s-1URL\s0 and enter .PP .Vb 1 \& http://:8090/test.asf .Ve .PP You should (after a short delay) see video and hear audio. .PP \&\s-1WARNING:\s0 trying to stream test1.mpg doesn't work with \s-1WMP\s0 as it tries to transfer the entire file before starting to play. The same is true of \s-1AVI\s0 files. .PP You should edit the \fIffserver.conf\fR file to suit your needs (in terms of frame rates etc). Then install \fBffserver\fR and \&\fBffmpeg\fR, write a script to start them up, and off you go. .SS "What else can it do?" .IX Subsection "What else can it do?" You can replay video from .ffm files that was recorded earlier. However, there are a number of caveats, including the fact that the ffserver parameters must match the original parameters used to record the file. If they do not, then ffserver deletes the file before recording into it. (Now that I write this, it seems broken). .PP You can fiddle with many of the codec choices and encoding parameters, and there are a bunch more parameters that you cannot control. Post a message to the mailing list if there are some 'must have' parameters. Look in ffserver.conf for a list of the currently available controls. .PP It will automatically generate the \s-1ASX\s0 or \s-1RAM\s0 files that are often used in browsers. These files are actually redirections to the underlying \s-1ASF\s0 or \s-1RM\s0 file. The reason for this is that the browser often fetches the entire file before starting up the external viewer. The redirection files are very small and can be transferred quickly. [The stream itself is often 'infinite' and thus the browser tries to download it and never finishes.] .SS "Tips" .IX Subsection "Tips" * When you connect to a live stream, most players (\s-1WMP, RA,\s0 etc) want to buffer a certain number of seconds of material so that they can display the signal continuously. However, ffserver (by default) starts sending data in realtime. This means that there is a pause of a few seconds while the buffering is being done by the player. The good news is that this can be cured by adding a '?buffer=5' to the end of the \s-1URL.\s0 This means that the stream should start 5 seconds in the past \*(-- and so the first 5 seconds of the stream are sent as fast as the network will allow. It will then slow down to real time. This noticeably improves the startup experience. .PP You can also add a 'Preroll 15' statement into the ffserver.conf that will add the 15 second prebuffering on all requests that do not otherwise specify a time. In addition, ffserver will skip frames until a key_frame is found. This further reduces the startup delay by not transferring data that will be discarded. .SS "Why does the ?buffer / Preroll stop working after a time?" .IX Subsection "Why does the ?buffer / Preroll stop working after a time?" It turns out that (on my machine at least) the number of frames successfully grabbed is marginally less than the number that ought to be grabbed. This means that the timestamp in the encoded data stream gets behind realtime. This means that if you say 'Preroll 10', then when the stream gets 10 or more seconds behind, there is no Preroll left. .PP Fixing this requires a change in the internals of how timestamps are handled. .ie n .SS "Does the ""?date="" stuff work." .el .SS "Does the \f(CW?date=\fP stuff work." .IX Subsection "Does the ?date= stuff work." Yes (subject to the limitation outlined above). Also note that whenever you start ffserver, it deletes the ffm file (if any parameters have changed), thus wiping out what you had recorded before. .PP The format of the \f(CW\*(C`?date=xxxxxx\*(C'\fR is fairly flexible. You should use one of the following formats (the 'T' is literal): .PP .Vb 2 \& * YYYY\-MM\-DDTHH:MM:SS (localtime) \& * YYYY\-MM\-DDTHH:MM:SSZ (UTC) .Ve .PP You can omit the YYYY-MM-DD, and then it refers to the current day. However note that \fB?date=16:00:00\fR refers to 16:00 on the current day \*(-- this may be in the future and so is unlikely to be useful. .PP You use this by adding the ?date= to the end of the \s-1URL\s0 for the stream. For example: \fBhttp://localhost:8080/test.asf?date=2002\-07\-26T23:05:00\fR. .SH "OPTIONS" .IX Header "OPTIONS" All the numerical options, if not specified otherwise, accept a string representing a number as input, which may be followed by one of the \s-1SI\s0 unit prefixes, for example: 'K', 'M', or 'G'. .PP If 'i' is appended to the \s-1SI\s0 unit prefix, the complete prefix will be interpreted as a unit prefix for binary multiples, which are based on powers of 1024 instead of powers of 1000. Appending 'B' to the \s-1SI\s0 unit prefix multiplies the value by 8. This allows using, for example: \&'\s-1KB\s0', 'MiB', 'G' and 'B' as number suffixes. .PP Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing the option name with \*(L"no\*(R". For example using \*(L"\-nofoo\*(R" will set the boolean option with name \*(L"foo\*(R" to false. .SS "Stream specifiers" .IX Subsection "Stream specifiers" Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) a given option belongs to. .PP A stream specifier is a string generally appended to the option name and separated from it by a colon. E.g. \f(CW\*(C`\-codec:a:1 ac3\*(C'\fR contains the \&\f(CW\*(C`a:1\*(C'\fR stream specifier, which matches the second audio stream. Therefore, it would select the ac3 codec for the second audio stream. .PP A stream specifier can match several streams, so that the option is applied to all of them. E.g. the stream specifier in \f(CW\*(C`\-b:a 128k\*(C'\fR matches all audio streams. .PP An empty stream specifier matches all streams. For example, \f(CW\*(C`\-codec copy\*(C'\fR or \f(CW\*(C`\-codec: copy\*(C'\fR would copy all the streams without reencoding. .PP Possible forms of stream specifiers are: .IP "\fIstream_index\fR" 4 .IX Item "stream_index" Matches the stream with this index. E.g. \f(CW\*(C`\-threads:1 4\*(C'\fR would set the thread count for the second stream to 4. .IP "\fIstream_type\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4 .IX Item "stream_type[:stream_index]" \&\fIstream_type\fR is one of following: 'v' or 'V' for video, 'a' for audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v' matches all video streams, 'V' only matches video streams which are not attached pictures, video thumbnails or cover arts. If \fIstream_index\fR is given, then it matches stream number \fIstream_index\fR of this type. Otherwise, it matches all streams of this type. .IP "\fBp:\fR\fIprogram_id\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4 .IX Item "p:program_id[:stream_index]" If \fIstream_index\fR is given, then it matches the stream with number \fIstream_index\fR in the program with the id \fIprogram_id\fR. Otherwise, it matches all streams in the program. .IP "\fB#\fR\fIstream_id\fR \fBor i:\fR\fIstream_id\fR" 4 .IX Item "#stream_id or i:stream_id" Match the stream by stream id (e.g. \s-1PID\s0 in MPEG-TS container). .IP "\fBm:\fR\fIkey\fR\fB[:\fR\fIvalue\fR\fB]\fR" 4 .IX Item "m:key[:value]" Matches streams with the metadata tag \fIkey\fR having the specified value. If \&\fIvalue\fR is not given, matches streams that contain the given tag with any value. .IP "\fBu\fR" 4 .IX Item "u" Matches streams with usable configuration, the codec must be defined and the essential information such as video dimension or audio sample rate must be present. .Sp Note that in \fBffmpeg\fR, matching by metadata will only work properly for input files. .SS "Generic options" .IX Subsection "Generic options" These options are shared amongst the ff* tools. .IP "\fB\-L\fR" 4 .IX Item "-L" Show license. .IP "\fB\-h, \-?, \-help, \-\-help [\fR\fIarg\fR\fB]\fR" 4 .IX Item "-h, -?, -help, --help [arg]" Show help. An optional parameter may be specified to print help about a specific item. If no argument is specified, only basic (non advanced) tool options are shown. .Sp Possible values of \fIarg\fR are: .RS 4 .IP "\fBlong\fR" 4 .IX Item "long" Print advanced tool options in addition to the basic tool options. .IP "\fBfull\fR" 4 .IX Item "full" Print complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc. .IP "\fBdecoder=\fR\fIdecoder_name\fR" 4 .IX Item "decoder=decoder_name" Print detailed information about the decoder named \fIdecoder_name\fR. Use the \&\fB\-decoders\fR option to get a list of all decoders. .IP "\fBencoder=\fR\fIencoder_name\fR" 4 .IX Item "encoder=encoder_name" Print detailed information about the encoder named \fIencoder_name\fR. Use the \&\fB\-encoders\fR option to get a list of all encoders. .IP "\fBdemuxer=\fR\fIdemuxer_name\fR" 4 .IX Item "demuxer=demuxer_name" Print detailed information about the demuxer named \fIdemuxer_name\fR. Use the \&\fB\-formats\fR option to get a list of all demuxers and muxers. .IP "\fBmuxer=\fR\fImuxer_name\fR" 4 .IX Item "muxer=muxer_name" Print detailed information about the muxer named \fImuxer_name\fR. Use the \&\fB\-formats\fR option to get a list of all muxers and demuxers. .IP "\fBfilter=\fR\fIfilter_name\fR" 4 .IX Item "filter=filter_name" Print detailed information about the filter name \fIfilter_name\fR. Use the \&\fB\-filters\fR option to get a list of all filters. .RE .RS 4 .RE .IP "\fB\-version\fR" 4 .IX Item "-version" Show version. .IP "\fB\-formats\fR" 4 .IX Item "-formats" Show available formats (including devices). .IP "\fB\-demuxers\fR" 4 .IX Item "-demuxers" Show available demuxers. .IP "\fB\-muxers\fR" 4 .IX Item "-muxers" Show available muxers. .IP "\fB\-devices\fR" 4 .IX Item "-devices" Show available devices. .IP "\fB\-codecs\fR" 4 .IX Item "-codecs" Show all codecs known to libavcodec. .Sp Note that the term 'codec' is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format. .IP "\fB\-decoders\fR" 4 .IX Item "-decoders" Show available decoders. .IP "\fB\-encoders\fR" 4 .IX Item "-encoders" Show all available encoders. .IP "\fB\-bsfs\fR" 4 .IX Item "-bsfs" Show available bitstream filters. .IP "\fB\-protocols\fR" 4 .IX Item "-protocols" Show available protocols. .IP "\fB\-filters\fR" 4 .IX Item "-filters" Show available libavfilter filters. .IP "\fB\-pix_fmts\fR" 4 .IX Item "-pix_fmts" Show available pixel formats. .IP "\fB\-sample_fmts\fR" 4 .IX Item "-sample_fmts" Show available sample formats. .IP "\fB\-layouts\fR" 4 .IX Item "-layouts" Show channel names and standard channel layouts. .IP "\fB\-colors\fR" 4 .IX Item "-colors" Show recognized color names. .IP "\fB\-sources\fR \fIdevice\fR\fB[,\fR\fIopt1\fR\fB=\fR\fIval1\fR\fB[,\fR\fIopt2\fR\fB=\fR\fIval2\fR\fB]...]\fR" 4 .IX Item "-sources device[,opt1=val1[,opt2=val2]...]" Show autodetected sources of the input device. Some devices may provide system-dependent source names that cannot be autodetected. The returned list cannot be assumed to be always complete. .Sp .Vb 1 \& ffmpeg \-sources pulse,server=192.168.0.4 .Ve .IP "\fB\-sinks\fR \fIdevice\fR\fB[,\fR\fIopt1\fR\fB=\fR\fIval1\fR\fB[,\fR\fIopt2\fR\fB=\fR\fIval2\fR\fB]...]\fR" 4 .IX Item "-sinks device[,opt1=val1[,opt2=val2]...]" Show autodetected sinks of the output device. Some devices may provide system-dependent sink names that cannot be autodetected. The returned list cannot be assumed to be always complete. .Sp .Vb 1 \& ffmpeg \-sinks pulse,server=192.168.0.4 .Ve .IP "\fB\-loglevel [repeat+]\fR\fIloglevel\fR \fB| \-v [repeat+]\fR\fIloglevel\fR" 4 .IX Item "-loglevel [repeat+]loglevel | -v [repeat+]loglevel" Set the logging level used by the library. Adding \*(L"repeat+\*(R" indicates that repeated log output should not be compressed to the first line and the \*(L"Last message repeated n times\*(R" line will be omitted. \*(L"repeat\*(R" can also be used alone. If \*(L"repeat\*(R" is used alone, and with no prior loglevel set, the default loglevel will be used. If multiple loglevel parameters are given, using \&'repeat' will not change the loglevel. \&\fIloglevel\fR is a string or a number containing one of the following values: .RS 4 .IP "\fBquiet, \-8\fR" 4 .IX Item "quiet, -8" Show nothing at all; be silent. .IP "\fBpanic, 0\fR" 4 .IX Item "panic, 0" Only show fatal errors which could lead the process to crash, such as an assertion failure. This is not currently used for anything. .IP "\fBfatal, 8\fR" 4 .IX Item "fatal, 8" Only show fatal errors. These are errors after which the process absolutely cannot continue. .IP "\fBerror, 16\fR" 4 .IX Item "error, 16" Show all errors, including ones which can be recovered from. .IP "\fBwarning, 24\fR" 4 .IX Item "warning, 24" Show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown. .IP "\fBinfo, 32\fR" 4 .IX Item "info, 32" Show informative messages during processing. This is in addition to warnings and errors. This is the default value. .IP "\fBverbose, 40\fR" 4 .IX Item "verbose, 40" Same as \f(CW\*(C`info\*(C'\fR, except more verbose. .IP "\fBdebug, 48\fR" 4 .IX Item "debug, 48" Show everything, including debugging information. .IP "\fBtrace, 56\fR" 4 .IX Item "trace, 56" .RE .RS 4 .Sp By default the program logs to stderr. If coloring is supported by the terminal, colors are used to mark errors and warnings. Log coloring can be disabled setting the environment variable \&\fB\s-1AV_LOG_FORCE_NOCOLOR\s0\fR or \fB\s-1NO_COLOR\s0\fR, or can be forced setting the environment variable \fB\s-1AV_LOG_FORCE_COLOR\s0\fR. The use of the environment variable \fB\s-1NO_COLOR\s0\fR is deprecated and will be dropped in a future FFmpeg version. .RE .IP "\fB\-report\fR" 4 .IX Item "-report" Dump full command line and console output to a file named \&\f(CW\*(C`\f(CIprogram\f(CW\-\f(CIYYYYMMDD\f(CW\-\f(CIHHMMSS\f(CW.log\*(C'\fR in the current directory. This file can be useful for bug reports. It also implies \f(CW\*(C`\-loglevel verbose\*(C'\fR. .Sp Setting the environment variable \fB\s-1FFREPORT\s0\fR to any value has the same effect. If the value is a ':'\-separated key=value sequence, these options will affect the report; option values must be escaped if they contain special characters or the options delimiter ':' (see the ``Quoting and escaping'' section in the ffmpeg-utils manual). .Sp The following options are recognized: .RS 4 .IP "\fBfile\fR" 4 .IX Item "file" set the file name to use for the report; \f(CW%p\fR is expanded to the name of the program, \f(CW%t\fR is expanded to a timestamp, \f(CW\*(C`%%\*(C'\fR is expanded to a plain \f(CW\*(C`%\*(C'\fR .IP "\fBlevel\fR" 4 .IX Item "level" set the log verbosity level using a numerical value (see \f(CW\*(C`\-loglevel\*(C'\fR). .RE .RS 4 .Sp For example, to output a report to a file named \fIffreport.log\fR using a log level of \f(CW32\fR (alias for log level \f(CW\*(C`info\*(C'\fR): .Sp .Vb 1 \& FFREPORT=file=ffreport.log:level=32 ffmpeg \-i input output .Ve .Sp Errors in parsing the environment variable are not fatal, and will not appear in the report. .RE .IP "\fB\-hide_banner\fR" 4 .IX Item "-hide_banner" Suppress printing banner. .Sp All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information. .IP "\fB\-cpuflags flags (\fR\fIglobal\fR\fB)\fR" 4 .IX Item "-cpuflags flags (global)" Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you're doing. .Sp .Vb 3 \& ffmpeg \-cpuflags \-sse+mmx ... \& ffmpeg \-cpuflags mmx ... \& ffmpeg \-cpuflags 0 ... .Ve .Sp Possible flags for this option are: .RS 4 .IP "\fBx86\fR" 4 .IX Item "x86" .RS 4 .PD 0 .IP "\fBmmx\fR" 4 .IX Item "mmx" .IP "\fBmmxext\fR" 4 .IX Item "mmxext" .IP "\fBsse\fR" 4 .IX Item "sse" .IP "\fBsse2\fR" 4 .IX Item "sse2" .IP "\fBsse2slow\fR" 4 .IX Item "sse2slow" .IP "\fBsse3\fR" 4 .IX Item "sse3" .IP "\fBsse3slow\fR" 4 .IX Item "sse3slow" .IP "\fBssse3\fR" 4 .IX Item "ssse3" .IP "\fBatom\fR" 4 .IX Item "atom" .IP "\fBsse4.1\fR" 4 .IX Item "sse4.1" .IP "\fBsse4.2\fR" 4 .IX Item "sse4.2" .IP "\fBavx\fR" 4 .IX Item "avx" .IP "\fBavx2\fR" 4 .IX Item "avx2" .IP "\fBxop\fR" 4 .IX Item "xop" .IP "\fBfma3\fR" 4 .IX Item "fma3" .IP "\fBfma4\fR" 4 .IX Item "fma4" .IP "\fB3dnow\fR" 4 .IX Item "3dnow" .IP "\fB3dnowext\fR" 4 .IX Item "3dnowext" .IP "\fBbmi1\fR" 4 .IX Item "bmi1" .IP "\fBbmi2\fR" 4 .IX Item "bmi2" .IP "\fBcmov\fR" 4 .IX Item "cmov" .RE .RS 4 .RE .IP "\fB\s-1ARM\s0\fR" 4 .IX Item "ARM" .RS 4 .IP "\fBarmv5te\fR" 4 .IX Item "armv5te" .IP "\fBarmv6\fR" 4 .IX Item "armv6" .IP "\fBarmv6t2\fR" 4 .IX Item "armv6t2" .IP "\fBvfp\fR" 4 .IX Item "vfp" .IP "\fBvfpv3\fR" 4 .IX Item "vfpv3" .IP "\fBneon\fR" 4 .IX Item "neon" .IP "\fBsetend\fR" 4 .IX Item "setend" .RE .RS 4 .RE .IP "\fBAArch64\fR" 4 .IX Item "AArch64" .RS 4 .IP "\fBarmv8\fR" 4 .IX Item "armv8" .IP "\fBvfp\fR" 4 .IX Item "vfp" .IP "\fBneon\fR" 4 .IX Item "neon" .RE .RS 4 .RE .IP "\fBPowerPC\fR" 4 .IX Item "PowerPC" .RS 4 .IP "\fBaltivec\fR" 4 .IX Item "altivec" .RE .RS 4 .RE .IP "\fBSpecific Processors\fR" 4 .IX Item "Specific Processors" .RS 4 .IP "\fBpentium2\fR" 4 .IX Item "pentium2" .IP "\fBpentium3\fR" 4 .IX Item "pentium3" .IP "\fBpentium4\fR" 4 .IX Item "pentium4" .IP "\fBk6\fR" 4 .IX Item "k6" .IP "\fBk62\fR" 4 .IX Item "k62" .IP "\fBathlon\fR" 4 .IX Item "athlon" .IP "\fBathlonxp\fR" 4 .IX Item "athlonxp" .IP "\fBk8\fR" 4 .IX Item "k8" .RE .RS 4 .RE .RE .RS 4 .RE .IP "\fB\-opencl_bench\fR" 4 .IX Item "-opencl_bench" .PD This option is used to benchmark all available OpenCL devices and print the results. This option is only available when FFmpeg has been compiled with \&\f(CW\*(C`\-\-enable\-opencl\*(C'\fR. .Sp When FFmpeg is configured with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR, the options for the global OpenCL context are set via \fB\-opencl_options\fR. See the \&\*(L"OpenCL Options\*(R" section in the ffmpeg-utils manual for the complete list of supported options. Amongst others, these options include the ability to select a specific platform and device to run the OpenCL code on. By default, FFmpeg will run on the first device of the first platform. While the options for the global OpenCL context provide flexibility to the user in selecting the OpenCL device of their choice, most users would probably want to select the fastest OpenCL device for their system. .Sp This option assists the selection of the most efficient configuration by identifying the appropriate device for the user's system. The built-in benchmark is run on all the OpenCL devices and the performance is measured for each device. The devices in the results list are sorted based on their performance with the fastest device listed first. The user can subsequently invoke \fBffmpeg\fR using the device deemed most appropriate via \&\fB\-opencl_options\fR to obtain the best performance for the OpenCL accelerated code. .Sp Typical usage to use the fastest OpenCL device involve the following steps. .Sp Run the command: .Sp .Vb 1 \& ffmpeg \-opencl_bench .Ve .Sp Note down the platform \s-1ID\s0 (\fIpidx\fR) and device \s-1ID\s0 (\fIdidx\fR) of the first i.e. fastest device in the list. Select the platform and device using the command: .Sp .Vb 1 \& ffmpeg \-opencl_options platform_idx=:device_idx= ... .Ve .IP "\fB\-opencl_options options (\fR\fIglobal\fR\fB)\fR" 4 .IX Item "-opencl_options options (global)" Set OpenCL environment options. This option is only available when FFmpeg has been compiled with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR. .Sp \&\fIoptions\fR must be a list of \fIkey\fR=\fIvalue\fR option pairs separated by ':'. See the ``OpenCL Options'' section in the ffmpeg-utils manual for the list of supported options. .SS "AVOptions" .IX Subsection "AVOptions" These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the \&\fB\-help\fR option. They are separated into two categories: .IP "\fBgeneric\fR" 4 .IX Item "generic" These options can be set for any container, codec or device. Generic options are listed under AVFormatContext options for containers/devices and under AVCodecContext options for codecs. .IP "\fBprivate\fR" 4 .IX Item "private" These options are specific to the given container, device or codec. Private options are listed under their corresponding containers/devices/codecs. .PP For example to write an ID3v2.3 header instead of a default ID3v2.4 to an \s-1MP3\s0 file, use the \fBid3v2_version\fR private option of the \s-1MP3\s0 muxer: .PP .Vb 1 \& ffmpeg \-i input.flac \-id3v2_version 3 out.mp3 .Ve .PP All codec AVOptions are per-stream, and thus a stream specifier should be attached to them. .PP Note: the \fB\-nooption\fR syntax cannot be used for boolean AVOptions, use \fB\-option 0\fR/\fB\-option 1\fR. .PP Note: the old undocumented way of specifying per-stream AVOptions by prepending v/a/s to the options name is now obsolete and will be removed soon. .SS "Main options" .IX Subsection "Main options" .IP "\fB\-f\fR \fIconfigfile\fR" 4 .IX Item "-f configfile" Read configuration file \fIconfigfile\fR. If not specified it will read by default from \fI/etc/ffserver.conf\fR. .IP "\fB\-n\fR" 4 .IX Item "-n" Enable no-launch mode. This option disables all the \f(CW\*(C`Launch\*(C'\fR directives within the various \f(CW\*(C`\*(C'\fR sections. Since \&\fBffserver\fR will not launch any \fBffmpeg\fR instances, you will have to launch them manually. .IP "\fB\-d\fR" 4 .IX Item "-d" Enable debug mode. This option increases log verbosity, and directs log messages to stdout. When specified, the \fBCustomLog\fR option is ignored. .SH "CONFIGURATION FILE SYNTAX" .IX Header "CONFIGURATION FILE SYNTAX" \&\fBffserver\fR reads a configuration file containing global options and settings for each stream and feed. .PP The configuration file consists of global options and dedicated sections, which must be introduced by "<\fI\s-1SECTION_NAME\s0\fR \&\fI\s-1ARGS\s0\fR>\*(L" on a separate line and must be terminated by a line in the form \*(R"". \fI\s-1ARGS\s0\fR is optional. .PP Currently the following sections are recognized: \fBFeed\fR, \&\fBStream\fR, \fBRedirect\fR. .PP A line starting with \f(CW\*(C`#\*(C'\fR is ignored and treated as a comment. .PP Name of options and sections are case-insensitive. .SS "\s-1ACL\s0 syntax" .IX Subsection "ACL syntax" An \s-1ACL\s0 (Access Control List) specifies the address which are allowed to access a given stream, or to write a given feed. .PP It accepts the following forms .IP "\(bu" 4 Allow/deny access to \fIaddress\fR. .Sp .Vb 2 \& ACL ALLOW
\& ACL DENY
.Ve .IP "\(bu" 4 Allow/deny access to ranges of addresses from \fIfirst_address\fR to \&\fIlast_address\fR. .Sp .Vb 2 \& ACL ALLOW \& ACL DENY .Ve .PP You can repeat the \s-1ACL\s0 allow/deny as often as you like. It is on a per stream basis. The first match defines the action. If there are no matches, then the default is the inverse of the last \s-1ACL\s0 statement. .PP Thus '\s-1ACL\s0 allow localhost' only allows access from localhost. \&'\s-1ACL\s0 deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and allow everybody else. .SS "Global options" .IX Subsection "Global options" .IP "\fBHTTPPort\fR \fIport_number\fR" 4 .IX Item "HTTPPort port_number" .PD 0 .IP "\fBPort\fR \fIport_number\fR" 4 .IX Item "Port port_number" .IP "\fBRTSPPort\fR \fIport_number\fR" 4 .IX Item "RTSPPort port_number" .PD \&\fIHTTPPort\fR sets the \s-1HTTP\s0 server listening \s-1TCP\s0 port number, \&\fIRTSPPort\fR sets the \s-1RTSP\s0 server listening \s-1TCP\s0 port number. .Sp \&\fIPort\fR is the equivalent of \fIHTTPPort\fR and is deprecated. .Sp You must select a different port from your standard \s-1HTTP\s0 web server if it is running on the same computer. .Sp If not specified, no corresponding server will be created. .IP "\fBHTTPBindAddress\fR \fIip_address\fR" 4 .IX Item "HTTPBindAddress ip_address" .PD 0 .IP "\fBBindAddress\fR \fIip_address\fR" 4 .IX Item "BindAddress ip_address" .IP "\fBRTSPBindAddress\fR \fIip_address\fR" 4 .IX Item "RTSPBindAddress ip_address" .PD Set address on which the \s-1HTTP/RTSP\s0 server is bound. Only useful if you have several network interfaces. .Sp \&\fIBindAddress\fR is the equivalent of \fIHTTPBindAddress\fR and is deprecated. .IP "\fBMaxHTTPConnections\fR \fIn\fR" 4 .IX Item "MaxHTTPConnections n" Set number of simultaneous \s-1HTTP\s0 connections that can be handled. It has to be defined \fIbefore\fR the \fBMaxClients\fR parameter, since it defines the \fBMaxClients\fR maximum limit. .Sp Default value is 2000. .IP "\fBMaxClients\fR \fIn\fR" 4 .IX Item "MaxClients n" Set number of simultaneous requests that can be handled. Since \&\fBffserver\fR is very fast, it is more likely that you will want to leave this high and use \fBMaxBandwidth\fR. .Sp Default value is 5. .IP "\fBMaxBandwidth\fR \fIkbps\fR" 4 .IX Item "MaxBandwidth kbps" Set the maximum amount of kbit/sec that you are prepared to consume when streaming to clients. .Sp Default value is 1000. .IP "\fBCustomLog\fR \fIfilename\fR" 4 .IX Item "CustomLog filename" Set access log file (uses standard Apache log file format). '\-' is the standard output. .Sp If not specified \fBffserver\fR will produce no log. .Sp In case the commandline option \fB\-d\fR is specified this option is ignored, and the log is written to standard output. .IP "\fBNoDaemon\fR" 4 .IX Item "NoDaemon" Set no-daemon mode. This option is currently ignored since now \&\fBffserver\fR will always work in no-daemon mode, and is deprecated. .IP "\fBUseDefaults\fR" 4 .IX Item "UseDefaults" .PD 0 .IP "\fBNoDefaults\fR" 4 .IX Item "NoDefaults" .PD Control whether default codec options are used for the all streams or not. Each stream may overwrite this setting for its own. Default is \fIUseDefaults\fR. The last occurrence overrides the previous if multiple definitions exist. .SS "Feed section" .IX Subsection "Feed section" A Feed section defines a feed provided to \fBffserver\fR. .PP Each live feed contains one video and/or audio sequence coming from an \&\fBffmpeg\fR encoder or another \fBffserver\fR. This sequence may be encoded simultaneously with several codecs at several resolutions. .PP A feed instance specification is introduced by a line in the form: .PP .Vb 1 \& .Ve .PP where \fI\s-1FEED_FILENAME\s0\fR specifies the unique name of the \s-1FFM\s0 stream. .PP The following options are recognized within a Feed section. .IP "\fBFile\fR \fIfilename\fR" 4 .IX Item "File filename" .PD 0 .IP "\fBReadOnlyFile\fR \fIfilename\fR" 4 .IX Item "ReadOnlyFile filename" .PD Set the path where the feed file is stored on disk. .Sp If not specified, the \fI/tmp/FEED.ffm\fR is assumed, where \&\fI\s-1FEED\s0\fR is the feed name. .Sp If \fBReadOnlyFile\fR is used the file is marked as read-only and it will not be deleted or updated. .IP "\fBTruncate\fR" 4 .IX Item "Truncate" Truncate the feed file, rather than appending to it. By default \&\fBffserver\fR will append data to the file, until the maximum file size value is reached (see \fBFileMaxSize\fR option). .IP "\fBFileMaxSize\fR \fIsize\fR" 4 .IX Item "FileMaxSize size" Set maximum size of the feed file in bytes. 0 means unlimited. The postfixes \f(CW\*(C`K\*(C'\fR (2^10), \f(CW\*(C`M\*(C'\fR (2^20), and \f(CW\*(C`G\*(C'\fR (2^30) are recognized. .Sp Default value is 5M. .IP "\fBLaunch\fR \fIargs\fR" 4 .IX Item "Launch args" Launch an \fBffmpeg\fR command when creating \fBffserver\fR. .Sp \&\fIargs\fR must be a sequence of arguments to be provided to an \&\fBffmpeg\fR instance. The first provided argument is ignored, and it is replaced by a path with the same dirname of the \fBffserver\fR instance, followed by the remaining argument and terminated with a path corresponding to the feed. .Sp When the launched process exits, \fBffserver\fR will launch another program instance. .Sp In case you need a more complex \fBffmpeg\fR configuration, e.g. if you need to generate multiple \s-1FFM\s0 feeds with a single \&\fBffmpeg\fR instance, you should launch \fBffmpeg\fR by hand. .Sp This option is ignored in case the commandline option \fB\-n\fR is specified. .IP "\fB\s-1ACL\s0\fR \fIspec\fR" 4 .IX Item "ACL spec" Specify the list of \s-1IP\s0 address which are allowed or denied to write the feed. Multiple \s-1ACL\s0 options can be specified. .SS "Stream section" .IX Subsection "Stream section" A Stream section defines a stream provided by \fBffserver\fR, and identified by a single name. .PP The stream is sent when answering a request containing the stream name. .PP A stream section must be introduced by the line: .PP .Vb 1 \& .Ve .PP where \fI\s-1STREAM_NAME\s0\fR specifies the unique name of the stream. .PP The following options are recognized within a Stream section. .PP Encoding options are marked with the \fIencoding\fR tag, and they are used to set the encoding parameters, and are mapped to libavcodec encoding options. Not all encoding options are supported, in particular it is not possible to set encoder private options. In order to override the encoding options specified by \fBffserver\fR, you can use the \fBffmpeg\fR \fBoverride_ffserver\fR commandline option. .PP Only one of the \fBFeed\fR and \fBFile\fR options should be set. .IP "\fBFeed\fR \fIfeed_name\fR" 4 .IX Item "Feed feed_name" Set the input feed. \fIfeed_name\fR must correspond to an existing feed defined in a \f(CW\*(C`Feed\*(C'\fR section. .Sp When this option is set, encoding options are used to setup the encoding operated by the remote \fBffmpeg\fR process. .IP "\fBFile\fR \fIfilename\fR" 4 .IX Item "File filename" Set the filename of the pre-recorded input file to stream. .Sp When this option is set, encoding options are ignored and the input file content is re-streamed as is. .IP "\fBFormat\fR \fIformat_name\fR" 4 .IX Item "Format format_name" Set the format of the output stream. .Sp Must be the name of a format recognized by FFmpeg. If set to \&\fBstatus\fR, it is treated as a status stream. .IP "\fBInputFormat\fR \fIformat_name\fR" 4 .IX Item "InputFormat format_name" Set input format. If not specified, it is automatically guessed. .IP "\fBPreroll\fR \fIn\fR" 4 .IX Item "Preroll n" Set this to the number of seconds backwards in time to start. Note that most players will buffer 5\-10 seconds of video, and also you need to allow for a keyframe to appear in the data stream. .Sp Default value is 0. .IP "\fBStartSendOnKey\fR" 4 .IX Item "StartSendOnKey" Do not send stream until it gets the first key frame. By default \&\fBffserver\fR will send data immediately. .IP "\fBMaxTime\fR \fIn\fR" 4 .IX Item "MaxTime n" Set the number of seconds to run. This value set the maximum duration of the stream a client will be able to receive. .Sp A value of 0 means that no limit is set on the stream duration. .IP "\fB\s-1ACL\s0\fR \fIspec\fR" 4 .IX Item "ACL spec" Set \s-1ACL\s0 for the stream. .IP "\fBDynamicACL\fR \fIspec\fR" 4 .IX Item "DynamicACL spec" .PD 0 .IP "\fBRTSPOption\fR \fIoption\fR" 4 .IX Item "RTSPOption option" .IP "\fBMulticastAddress\fR \fIaddress\fR" 4 .IX Item "MulticastAddress address" .IP "\fBMulticastPort\fR \fIport\fR" 4 .IX Item "MulticastPort port" .IP "\fBMulticastTTL\fR \fIinteger\fR" 4 .IX Item "MulticastTTL integer" .IP "\fBNoLoop\fR" 4 .IX Item "NoLoop" .IP "\fBFaviconURL\fR \fIurl\fR" 4 .IX Item "FaviconURL url" .PD Set favicon (favourite icon) for the server status page. It is ignored for regular streams. .IP "\fBAuthor\fR \fIvalue\fR" 4 .IX Item "Author value" .PD 0 .IP "\fBComment\fR \fIvalue\fR" 4 .IX Item "Comment value" .IP "\fBCopyright\fR \fIvalue\fR" 4 .IX Item "Copyright value" .IP "\fBTitle\fR \fIvalue\fR" 4 .IX Item "Title value" .PD Set metadata corresponding to the option. All these options are deprecated in favor of \fBMetadata\fR. .IP "\fBMetadata\fR \fIkey\fR\fB \fR\fIvalue\fR" 4 .IX Item "Metadata key value" Set metadata value on the output stream. .IP "\fBUseDefaults\fR" 4 .IX Item "UseDefaults" .PD 0 .IP "\fBNoDefaults\fR" 4 .IX Item "NoDefaults" .PD Control whether default codec options are used for the stream or not. Default is \fIUseDefaults\fR unless disabled globally. .IP "\fBNoAudio\fR" 4 .IX Item "NoAudio" .PD 0 .IP "\fBNoVideo\fR" 4 .IX Item "NoVideo" .PD Suppress audio/video. .IP "\fBAudioCodec\fR \fIcodec_name\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AudioCodec codec_name (encoding,audio)" Set audio codec. .IP "\fBAudioBitRate\fR \fIrate\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AudioBitRate rate (encoding,audio)" Set bitrate for the audio stream in kbits per second. .IP "\fBAudioChannels\fR \fIn\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AudioChannels n (encoding,audio)" Set number of audio channels. .IP "\fBAudioSampleRate\fR \fIn\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AudioSampleRate n (encoding,audio)" Set sampling frequency for audio. When using low bitrates, you should lower this frequency to 22050 or 11025. The supported frequencies depend on the selected audio codec. .IP "\fBAVOptionAudio [\fR\fIcodec\fR\fB:]\fR\fIoption\fR\fB \fR\fIvalue\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AVOptionAudio [codec:]option value (encoding,audio)" Set generic or private option for audio stream. Private option must be prefixed with codec name or codec must be defined before. .IP "\fBAVPresetAudio\fR \fIpreset\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "AVPresetAudio preset (encoding,audio)" Set preset for audio stream. .IP "\fBVideoCodec\fR \fIcodec_name\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoCodec codec_name (encoding,video)" Set video codec. .IP "\fBVideoBitRate\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoBitRate n (encoding,video)" Set bitrate for the video stream in kbits per second. .IP "\fBVideoBitRateRange\fR \fIrange\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoBitRateRange range (encoding,video)" Set video bitrate range. .Sp A range must be specified in the form \fIminrate\fR\-\fImaxrate\fR, and specifies the \fBminrate\fR and \fBmaxrate\fR encoding options expressed in kbits per second. .IP "\fBVideoBitRateRangeTolerance\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoBitRateRangeTolerance n (encoding,video)" Set video bitrate tolerance in kbits per second. .IP "\fBPixelFormat\fR \fIpixel_format\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "PixelFormat pixel_format (encoding,video)" Set video pixel format. .IP "\fBDebug\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "Debug integer (encoding,video)" Set video \fBdebug\fR encoding option. .IP "\fBStrict\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "Strict integer (encoding,video)" Set video \fBstrict\fR encoding option. .IP "\fBVideoBufferSize\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoBufferSize n (encoding,video)" Set ratecontrol buffer size, expressed in \s-1KB.\s0 .IP "\fBVideoFrameRate\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoFrameRate n (encoding,video)" Set number of video frames per second. .IP "\fBVideoSize (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoSize (encoding,video)" Set size of the video frame, must be an abbreviation or in the form \&\fIW\fRx\fIH\fR. See \fBthe Video size section in the \f(BIffmpeg\-utils\fB\|(1) manual\fR. .Sp Default value is \f(CW\*(C`160x128\*(C'\fR. .IP "\fBVideoIntraOnly (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoIntraOnly (encoding,video)" Transmit only intra frames (useful for low bitrates, but kills frame rate). .IP "\fBVideoGopSize\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoGopSize n (encoding,video)" If non-intra only, an intra frame is transmitted every VideoGopSize frames. Video synchronization can only begin at an intra frame. .IP "\fBVideoTag\fR \fItag\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoTag tag (encoding,video)" Set video tag. .IP "\fBVideoHighQuality (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoHighQuality (encoding,video)" .PD 0 .IP "\fBVideo4MotionVector (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "Video4MotionVector (encoding,video)" .IP "\fBBitExact (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "BitExact (encoding,video)" .PD Set bitexact encoding flag. .IP "\fBIdctSimple (\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "IdctSimple (encoding,video)" Set simple \s-1IDCT\s0 algorithm. .IP "\fBQscale\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "Qscale n (encoding,video)" Enable constant quality encoding, and set video qscale (quantization scale) value, expressed in \fIn\fR \s-1QP\s0 units. .IP "\fBVideoQMin\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoQMin n (encoding,video)" .PD 0 .IP "\fBVideoQMax\fR \fIn\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoQMax n (encoding,video)" .PD Set video qmin/qmax. .IP "\fBVideoQDiff\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "VideoQDiff integer (encoding,video)" Set video \fBqdiff\fR encoding option. .IP "\fBLumiMask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "LumiMask float (encoding,video)" .PD 0 .IP "\fBDarkMask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "DarkMask float (encoding,video)" .PD Set \fBlumi_mask\fR/\fBdark_mask\fR encoding options. .IP "\fBAVOptionVideo [\fR\fIcodec\fR\fB:]\fR\fIoption\fR\fB \fR\fIvalue\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "AVOptionVideo [codec:]option value (encoding,video)" Set generic or private option for video stream. Private option must be prefixed with codec name or codec must be defined before. .IP "\fBAVPresetVideo\fR \fIpreset\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "AVPresetVideo preset (encoding,video)" Set preset for video stream. .Sp \&\fIpreset\fR must be the path of a preset file. .PP \fIServer status stream\fR .IX Subsection "Server status stream" .PP A server status stream is a special stream which is used to show statistics about the \fBffserver\fR operations. .PP It must be specified setting the option \fBFormat\fR to \&\fBstatus\fR. .SS "Redirect section" .IX Subsection "Redirect section" A redirect section specifies where to redirect the requested \s-1URL\s0 to another page. .PP A redirect section must be introduced by the line: .PP .Vb 1 \& .Ve .PP where \fI\s-1NAME\s0\fR is the name of the page which should be redirected. .PP It only accepts the option \fB\s-1URL\s0\fR, which specify the redirection \&\s-1URL.\s0 .SH "STREAM EXAMPLES" .IX Header "STREAM EXAMPLES" .IP "\(bu" 4 Multipart \s-1JPEG\s0 .Sp .Vb 8 \& \& Feed feed1.ffm \& Format mpjpeg \& VideoFrameRate 2 \& VideoIntraOnly \& NoAudio \& Strict \-1 \& .Ve .IP "\(bu" 4 Single \s-1JPEG\s0 .Sp .Vb 9 \& \& Feed feed1.ffm \& Format jpeg \& VideoFrameRate 2 \& VideoIntraOnly \& VideoSize 352x240 \& NoAudio \& Strict \-1 \& .Ve .IP "\(bu" 4 Flash .Sp .Vb 7 \& \& Feed feed1.ffm \& Format swf \& VideoFrameRate 2 \& VideoIntraOnly \& NoAudio \& .Ve .IP "\(bu" 4 \&\s-1ASF\s0 compatible .Sp .Vb 11 \& \& Feed feed1.ffm \& Format asf \& VideoFrameRate 15 \& VideoSize 352x240 \& VideoBitRate 256 \& VideoBufferSize 40 \& VideoGopSize 30 \& AudioBitRate 64 \& StartSendOnKey \& .Ve .IP "\(bu" 4 \&\s-1MP3\s0 audio .Sp .Vb 9 \& \& Feed feed1.ffm \& Format mp2 \& AudioCodec mp3 \& AudioBitRate 64 \& AudioChannels 1 \& AudioSampleRate 44100 \& NoVideo \& .Ve .IP "\(bu" 4 Ogg Vorbis audio .Sp .Vb 8 \& \& Feed feed1.ffm \& Metadata title "Stream title" \& AudioBitRate 64 \& AudioChannels 2 \& AudioSampleRate 44100 \& NoVideo \& .Ve .IP "\(bu" 4 Real with audio only at 32 kbits .Sp .Vb 6 \& \& Feed feed1.ffm \& Format rm \& AudioBitRate 32 \& NoVideo \& .Ve .IP "\(bu" 4 Real with audio and video at 64 kbits .Sp .Vb 8 \& \& Feed feed1.ffm \& Format rm \& AudioBitRate 32 \& VideoBitRate 128 \& VideoFrameRate 25 \& VideoGopSize 25 \& .Ve .IP "\(bu" 4 For stream coming from a file: you only need to set the input filename and optionally a new format. .Sp .Vb 4 \& \& File "/usr/local/httpd/htdocs/tlive.rm" \& NoAudio \& \& \& \& \& \& File "/usr/local/httpd/htdocs/test.asf" \& NoAudio \& Metadata author "Me" \& Metadata copyright "Super MegaCorp" \& Metadata title "Test stream from disk" \& Metadata comment "Test comment" \& .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIffserver\-all\fR\|(1), the \fIdoc/ffserver.conf\fR example, \fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \&\fIffmpeg\-utils\fR\|(1), \fIffmpeg\-scaler\fR\|(1), \fIffmpeg\-resampler\fR\|(1), \&\fIffmpeg\-codecs\fR\|(1), \fIffmpeg\-bitstream\-filters\fR\|(1), \fIffmpeg\-formats\fR\|(1), \&\fIffmpeg\-devices\fR\|(1), \fIffmpeg\-protocols\fR\|(1), \fIffmpeg\-filters\fR\|(1) .SH "AUTHORS" .IX Header "AUTHORS" The FFmpeg developers. .PP For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command \&\fBgit log\fR in the FFmpeg source directory, or browsing the online repository at <\fBhttp://source.ffmpeg.org\fR>. .PP Maintainers for the specific components are listed in the file \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.