.\" Automatically generated by Pod::Man 4.10 (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 .. .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 "FFPLAY-ALL 1" .TH FFPLAY-ALL 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" ffplay \- FFplay media player .SH "SYNOPSIS" .IX Header "SYNOPSIS" ffplay [\fIoptions\fR] [\fIinput_url\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" FFplay is a very simple and portable media player using the FFmpeg libraries and the \s-1SDL\s0 library. It is mostly used as a testbed for the various FFmpeg APIs. .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] or p:\fR\fIprogram_id\fR\fB[:\fR\fIstream_type\fR\fB[:\fR\fIstream_index\fR\fB]] or\fR" 4 .IX Item "p:program_id[:stream_index] or p:program_id[:stream_type[:stream_index]] or" p:\fIprogram_id\fR:m:\fIkey\fR[:\fIvalue\fR] In first version, 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. In the second version, \fIstream_type\fR is one of following: 'v' for video, 'a' for audio, 's' for subtitle, 'd' for data. If \fIstream_index\fR is also given, then it matches stream number \fIstream_index\fR of this type in the program with the id \fIprogram_id\fR. Otherwise, if only \fIstream_type\fR is given, it matches all streams of this type in the program with the id \fIprogram_id\fR. In the third version matches streams in the program with the id \fIprogram_id\fR 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 "\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 [\fR\fIflags\fR\fB+]\fR\fIloglevel\fR \fB| \-v [\fR\fIflags\fR\fB+]\fR\fIloglevel\fR" 4 .IX Item "-loglevel [flags+]loglevel | -v [flags+]loglevel" Set logging level and flags used by the library. .Sp The optional \fIflags\fR prefix can consist of the following values: .RS 4 .IP "\fBrepeat\fR" 4 .IX Item "repeat" 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. .IP "\fBlevel\fR" 4 .IX Item "level" Indicates that log output should add a \f(CW\*(C`[level]\*(C'\fR prefix to each message line. This can be used as an alternative to log coloring, e.g. when dumping the log to file. .RE .RS 4 .Sp Flags can also be used alone by adding a '+'/'\-' prefix to set/reset a single flag without affecting other \fIflags\fR or changing \fIloglevel\fR. When setting both \fIflags\fR and \fIloglevel\fR, a '+' separator is expected between the last \fIflags\fR value and before \fIloglevel\fR. .Sp \&\fIloglevel\fR is a string or a number containing one of the following values: .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 For example to enable repeated log output, add the \f(CW\*(C`level\*(C'\fR prefix, and set \&\fIloglevel\fR to \f(CW\*(C`verbose\*(C'\fR: .Sp .Vb 1 \& ffmpeg \-loglevel repeat+level+verbose \-i input output .Ve .Sp Another example that enables repeated log output without affecting current state of \f(CW\*(C`level\*(C'\fR prefix flag or \fIloglevel\fR: .Sp .Vb 1 \& ffmpeg [...] \-loglevel +repeat .Ve .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 .PD .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\-x\fR \fIwidth\fR" 4 .IX Item "-x width" Force displayed width. .IP "\fB\-y\fR \fIheight\fR" 4 .IX Item "-y height" Force displayed height. .IP "\fB\-s\fR \fIsize\fR" 4 .IX Item "-s size" Set frame size (WxH or abbreviation), needed for videos which do not contain a header with the frame size like raw \s-1YUV.\s0 This option has been deprecated in favor of private options, try \-video_size. .IP "\fB\-fs\fR" 4 .IX Item "-fs" Start in fullscreen mode. .IP "\fB\-an\fR" 4 .IX Item "-an" Disable audio. .IP "\fB\-vn\fR" 4 .IX Item "-vn" Disable video. .IP "\fB\-sn\fR" 4 .IX Item "-sn" Disable subtitles. .IP "\fB\-ss\fR \fIpos\fR" 4 .IX Item "-ss pos" Seek to \fIpos\fR. Note that in most formats it is not possible to seek exactly, so \fBffplay\fR will seek to the nearest seek point to \&\fIpos\fR. .Sp \&\fIpos\fR must be a time duration specification, see \fBthe Time duration section in the \fBffmpeg\-utils\fB\|(1) manual\fR. .IP "\fB\-t\fR \fIduration\fR" 4 .IX Item "-t duration" Play \fIduration\fR seconds of audio/video. .Sp \&\fIduration\fR must be a time duration specification, see \fBthe Time duration section in the \fBffmpeg\-utils\fB\|(1) manual\fR. .IP "\fB\-bytes\fR" 4 .IX Item "-bytes" Seek by bytes. .IP "\fB\-seek_interval\fR" 4 .IX Item "-seek_interval" Set custom interval, in seconds, for seeking using left/right keys. Default is 10 seconds. .IP "\fB\-nodisp\fR" 4 .IX Item "-nodisp" Disable graphical display. .IP "\fB\-noborder\fR" 4 .IX Item "-noborder" Borderless window. .IP "\fB\-volume\fR" 4 .IX Item "-volume" Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values are treated as 0, values above 100 are treated as 100. .IP "\fB\-f\fR \fIfmt\fR" 4 .IX Item "-f fmt" Force format. .IP "\fB\-window_title\fR \fItitle\fR" 4 .IX Item "-window_title title" Set window title (default is the input filename). .IP "\fB\-left\fR \fItitle\fR" 4 .IX Item "-left title" Set the x position for the left of the window (default is a centered window). .IP "\fB\-top\fR \fItitle\fR" 4 .IX Item "-top title" Set the y position for the top of the window (default is a centered window). .IP "\fB\-loop\fR \fInumber\fR" 4 .IX Item "-loop number" Loops movie playback times. 0 means forever. .IP "\fB\-showmode\fR \fImode\fR" 4 .IX Item "-showmode mode" Set the show mode to use. Available values for \fImode\fR are: .RS 4 .IP "\fB0, video\fR" 4 .IX Item "0, video" show video .IP "\fB1, waves\fR" 4 .IX Item "1, waves" show audio waves .IP "\fB2, rdft\fR" 4 .IX Item "2, rdft" show audio frequency band using \s-1RDFT\s0 ((Inverse) Real Discrete Fourier Transform) .RE .RS 4 .Sp Default value is \*(L"video\*(R", if video is not present or cannot be played \&\*(L"rdft\*(R" is automatically selected. .Sp You can interactively cycle through the available show modes by pressing the key \fBw\fR. .RE .IP "\fB\-vf\fR \fIfiltergraph\fR" 4 .IX Item "-vf filtergraph" Create the filtergraph specified by \fIfiltergraph\fR and use it to filter the video stream. .Sp \&\fIfiltergraph\fR is a description of the filtergraph to apply to the stream, and must have a single video input and a single video output. In the filtergraph, the input is associated to the label \&\f(CW\*(C`in\*(C'\fR, and the output to the label \f(CW\*(C`out\*(C'\fR. See the ffmpeg-filters manual for more information about the filtergraph syntax. .Sp You can specify this parameter multiple times and cycle through the specified filtergraphs along with the show modes by pressing the key \fBw\fR. .IP "\fB\-af\fR \fIfiltergraph\fR" 4 .IX Item "-af filtergraph" \&\fIfiltergraph\fR is a description of the filtergraph to apply to the input audio. Use the option \*(L"\-filters\*(R" to show all the available filters (including sources and sinks). .IP "\fB\-i\fR \fIinput_url\fR" 4 .IX Item "-i input_url" Read \fIinput_url\fR. .SS "Advanced options" .IX Subsection "Advanced options" .IP "\fB\-pix_fmt\fR \fIformat\fR" 4 .IX Item "-pix_fmt format" Set pixel format. This option has been deprecated in favor of private options, try \-pixel_format. .IP "\fB\-stats\fR" 4 .IX Item "-stats" Print several playback statistics, in particular show the stream duration, the codec parameters, the current position in the stream and the audio/video synchronisation drift. It is on by default, to explicitly disable it you need to specify \f(CW\*(C`\-nostats\*(C'\fR. .IP "\fB\-fast\fR" 4 .IX Item "-fast" Non-spec-compliant optimizations. .IP "\fB\-genpts\fR" 4 .IX Item "-genpts" Generate pts. .IP "\fB\-sync\fR \fItype\fR" 4 .IX Item "-sync type" Set the master clock to audio (\f(CW\*(C`type=audio\*(C'\fR), video (\f(CW\*(C`type=video\*(C'\fR) or external (\f(CW\*(C`type=ext\*(C'\fR). Default is audio. The master clock is used to control audio-video synchronization. Most media players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. .IP "\fB\-ast\fR \fIaudio_stream_specifier\fR" 4 .IX Item "-ast audio_stream_specifier" Select the desired audio stream using the given stream specifier. The stream specifiers are described in the \fBStream specifiers\fR chapter. If this option is not specified, the \*(L"best\*(R" audio stream is selected in the program of the already selected video stream. .IP "\fB\-vst\fR \fIvideo_stream_specifier\fR" 4 .IX Item "-vst video_stream_specifier" Select the desired video stream using the given stream specifier. The stream specifiers are described in the \fBStream specifiers\fR chapter. If this option is not specified, the \*(L"best\*(R" video stream is selected. .IP "\fB\-sst\fR \fIsubtitle_stream_specifier\fR" 4 .IX Item "-sst subtitle_stream_specifier" Select the desired subtitle stream using the given stream specifier. The stream specifiers are described in the \fBStream specifiers\fR chapter. If this option is not specified, the \*(L"best\*(R" subtitle stream is selected in the program of the already selected video or audio stream. .IP "\fB\-autoexit\fR" 4 .IX Item "-autoexit" Exit when video is done playing. .IP "\fB\-exitonkeydown\fR" 4 .IX Item "-exitonkeydown" Exit if any key is pressed. .IP "\fB\-exitonmousedown\fR" 4 .IX Item "-exitonmousedown" Exit if any mouse button is pressed. .IP "\fB\-codec:\fR\fImedia_specifier\fR\fB \fR\fIcodec_name\fR" 4 .IX Item "-codec:media_specifier codec_name" Force a specific decoder implementation for the stream identified by \&\fImedia_specifier\fR, which can assume the values \f(CW\*(C`a\*(C'\fR (audio), \&\f(CW\*(C`v\*(C'\fR (video), and \f(CW\*(C`s\*(C'\fR subtitle. .IP "\fB\-acodec\fR \fIcodec_name\fR" 4 .IX Item "-acodec codec_name" Force a specific audio decoder. .IP "\fB\-vcodec\fR \fIcodec_name\fR" 4 .IX Item "-vcodec codec_name" Force a specific video decoder. .IP "\fB\-scodec\fR \fIcodec_name\fR" 4 .IX Item "-scodec codec_name" Force a specific subtitle decoder. .IP "\fB\-autorotate\fR" 4 .IX Item "-autorotate" Automatically rotate the video according to file metadata. Enabled by default, use \fB\-noautorotate\fR to disable it. .IP "\fB\-framedrop\fR" 4 .IX Item "-framedrop" Drop video frames if video is out of sync. Enabled by default if the master clock is not set to video. Use this option to enable frame dropping for all master clock sources, use \fB\-noframedrop\fR to disable it. .IP "\fB\-infbuf\fR" 4 .IX Item "-infbuf" Do not limit the input buffer size, read as much data as possible from the input as soon as possible. Enabled by default for realtime streams, where data may be dropped if not read in time. Use this option to enable infinite buffers for all inputs, use \fB\-noinfbuf\fR to disable it. .SS "While playing" .IX Subsection "While playing" .IP "\fBq, \s-1ESC\s0\fR" 4 .IX Item "q, ESC" Quit. .IP "\fBf\fR" 4 .IX Item "f" Toggle full screen. .IP "\fBp, \s-1SPC\s0\fR" 4 .IX Item "p, SPC" Pause. .IP "\fBm\fR" 4 .IX Item "m" Toggle mute. .IP "\fB9, 0\fR" 4 .IX Item "9, 0" Decrease and increase volume respectively. .IP "\fB/, *\fR" 4 .IX Item "/, *" Decrease and increase volume respectively. .IP "\fBa\fR" 4 .IX Item "a" Cycle audio channel in the current program. .IP "\fBv\fR" 4 .IX Item "v" Cycle video channel. .IP "\fBt\fR" 4 .IX Item "t" Cycle subtitle channel in the current program. .IP "\fBc\fR" 4 .IX Item "c" Cycle program. .IP "\fBw\fR" 4 .IX Item "w" Cycle video filters or show modes. .IP "\fBs\fR" 4 .IX Item "s" Step to the next frame. .Sp Pause if the stream is not already paused, step to the next video frame, and pause. .IP "\fBleft/right\fR" 4 .IX Item "left/right" Seek backward/forward 10 seconds. .IP "\fBdown/up\fR" 4 .IX Item "down/up" Seek backward/forward 1 minute. .IP "\fBpage down/page up\fR" 4 .IX Item "page down/page up" Seek to the previous/next chapter. or if there are no chapters Seek backward/forward 10 minutes. .IP "\fBright mouse click\fR" 4 .IX Item "right mouse click" Seek to percentage in file corresponding to fraction of width. .IP "\fBleft mouse double-click\fR" 4 .IX Item "left mouse double-click" Toggle full screen. .SH "SYNTAX" .IX Header "SYNTAX" This section documents the syntax and formats employed by the FFmpeg libraries and tools. .SS "Quoting and escaping" .IX Subsection "Quoting and escaping" FFmpeg adopts the following quoting and escaping mechanism, unless explicitly specified. The following rules are applied: .IP "\(bu" 4 \&\fB'\fR and \fB\e\fR are special characters (respectively used for quoting and escaping). In addition to them, there might be other special characters depending on the specific syntax where the escaping and quoting are employed. .IP "\(bu" 4 A special character is escaped by prefixing it with a \fB\e\fR. .IP "\(bu" 4 All characters enclosed between \fB''\fR are included literally in the parsed string. The quote character \fB'\fR itself cannot be quoted, so you may need to close the quote and escape it. .IP "\(bu" 4 Leading and trailing whitespaces, unless escaped or quoted, are removed from the parsed string. .PP Note that you may need to add a second level of escaping when using the command line or a script, which depends on the syntax of the adopted shell language. .PP The function \f(CW\*(C`av_get_token\*(C'\fR defined in \&\fIlibavutil/avstring.h\fR can be used to parse a token quoted or escaped according to the rules defined above. .PP The tool \fItools/ffescape\fR in the FFmpeg source tree can be used to automatically quote or escape a string in a script. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Escape the string \f(CW\*(C`Crime d\*(AqAmour\*(C'\fR containing the \f(CW\*(C`\*(Aq\*(C'\fR special character: .Sp .Vb 1 \& Crime d\e\*(AqAmour .Ve .IP "\(bu" 4 The string above contains a quote, so the \f(CW\*(C`\*(Aq\*(C'\fR needs to be escaped when quoting it: .Sp .Vb 1 \& \*(AqCrime d\*(Aq\e\*(Aq\*(AqAmour\*(Aq .Ve .IP "\(bu" 4 Include leading or trailing whitespaces using quoting: .Sp .Vb 1 \& \*(Aq this string starts and ends with whitespaces \*(Aq .Ve .IP "\(bu" 4 Escaping and quoting can be mixed together: .Sp .Vb 1 \& \*(Aq The string \*(Aq\e\*(Aqstring\e\*(Aq\*(Aq is a string \*(Aq .Ve .IP "\(bu" 4 To include a literal \fB\e\fR you can use either escaping or quoting: .Sp .Vb 1 \& \*(Aqc:\efoo\*(Aq can be written as c:\e\efoo .Ve .SS "Date" .IX Subsection "Date" The accepted syntax is: .PP .Vb 2 \& [(YYYY\-MM\-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z] \& now .Ve .PP If the value is \*(L"now\*(R" it takes the current time. .PP Time is local time unless Z is appended, in which case it is interpreted as \s-1UTC.\s0 If the year-month-day part is not specified it takes the current year-month-day. .SS "Time duration" .IX Subsection "Time duration" There are two accepted syntaxes for expressing time duration. .PP .Vb 1 \& [\-][:]:[....] .Ve .PP \&\fI\s-1HH\s0\fR expresses the number of hours, \fI\s-1MM\s0\fR the number of minutes for a maximum of 2 digits, and \fI\s-1SS\s0\fR the number of seconds for a maximum of 2 digits. The \fIm\fR at the end expresses decimal value for \&\fI\s-1SS\s0\fR. .PP \&\fIor\fR .PP .Vb 1 \& [\-]+[....] .Ve .PP \&\fIS\fR expresses the number of seconds, with the optional decimal part \&\fIm\fR. .PP In both expressions, the optional \fB\-\fR indicates negative duration. .PP \fIExamples\fR .IX Subsection "Examples" .PP The following examples are all valid time duration: .IP "\fB55\fR" 4 .IX Item "55" 55 seconds .IP "\fB12:03:45\fR" 4 .IX Item "12:03:45" 12 hours, 03 minutes and 45 seconds .IP "\fB23.189\fR" 4 .IX Item "23.189" 23.189 seconds .SS "Video size" .IX Subsection "Video size" Specify the size of the sourced video, it may be a string of the form \&\fIwidth\fRx\fIheight\fR, or the name of a size abbreviation. .PP The following abbreviations are recognized: .IP "\fBntsc\fR" 4 .IX Item "ntsc" 720x480 .IP "\fBpal\fR" 4 .IX Item "pal" 720x576 .IP "\fBqntsc\fR" 4 .IX Item "qntsc" 352x240 .IP "\fBqpal\fR" 4 .IX Item "qpal" 352x288 .IP "\fBsntsc\fR" 4 .IX Item "sntsc" 640x480 .IP "\fBspal\fR" 4 .IX Item "spal" 768x576 .IP "\fBfilm\fR" 4 .IX Item "film" 352x240 .IP "\fBntsc-film\fR" 4 .IX Item "ntsc-film" 352x240 .IP "\fBsqcif\fR" 4 .IX Item "sqcif" 128x96 .IP "\fBqcif\fR" 4 .IX Item "qcif" 176x144 .IP "\fBcif\fR" 4 .IX Item "cif" 352x288 .IP "\fB4cif\fR" 4 .IX Item "4cif" 704x576 .IP "\fB16cif\fR" 4 .IX Item "16cif" 1408x1152 .IP "\fBqqvga\fR" 4 .IX Item "qqvga" 160x120 .IP "\fBqvga\fR" 4 .IX Item "qvga" 320x240 .IP "\fBvga\fR" 4 .IX Item "vga" 640x480 .IP "\fBsvga\fR" 4 .IX Item "svga" 800x600 .IP "\fBxga\fR" 4 .IX Item "xga" 1024x768 .IP "\fBuxga\fR" 4 .IX Item "uxga" 1600x1200 .IP "\fBqxga\fR" 4 .IX Item "qxga" 2048x1536 .IP "\fBsxga\fR" 4 .IX Item "sxga" 1280x1024 .IP "\fBqsxga\fR" 4 .IX Item "qsxga" 2560x2048 .IP "\fBhsxga\fR" 4 .IX Item "hsxga" 5120x4096 .IP "\fBwvga\fR" 4 .IX Item "wvga" 852x480 .IP "\fBwxga\fR" 4 .IX Item "wxga" 1366x768 .IP "\fBwsxga\fR" 4 .IX Item "wsxga" 1600x1024 .IP "\fBwuxga\fR" 4 .IX Item "wuxga" 1920x1200 .IP "\fBwoxga\fR" 4 .IX Item "woxga" 2560x1600 .IP "\fBwqsxga\fR" 4 .IX Item "wqsxga" 3200x2048 .IP "\fBwquxga\fR" 4 .IX Item "wquxga" 3840x2400 .IP "\fBwhsxga\fR" 4 .IX Item "whsxga" 6400x4096 .IP "\fBwhuxga\fR" 4 .IX Item "whuxga" 7680x4800 .IP "\fBcga\fR" 4 .IX Item "cga" 320x200 .IP "\fBega\fR" 4 .IX Item "ega" 640x350 .IP "\fBhd480\fR" 4 .IX Item "hd480" 852x480 .IP "\fBhd720\fR" 4 .IX Item "hd720" 1280x720 .IP "\fBhd1080\fR" 4 .IX Item "hd1080" 1920x1080 .IP "\fB2k\fR" 4 .IX Item "2k" 2048x1080 .IP "\fB2kflat\fR" 4 .IX Item "2kflat" 1998x1080 .IP "\fB2kscope\fR" 4 .IX Item "2kscope" 2048x858 .IP "\fB4k\fR" 4 .IX Item "4k" 4096x2160 .IP "\fB4kflat\fR" 4 .IX Item "4kflat" 3996x2160 .IP "\fB4kscope\fR" 4 .IX Item "4kscope" 4096x1716 .IP "\fBnhd\fR" 4 .IX Item "nhd" 640x360 .IP "\fBhqvga\fR" 4 .IX Item "hqvga" 240x160 .IP "\fBwqvga\fR" 4 .IX Item "wqvga" 400x240 .IP "\fBfwqvga\fR" 4 .IX Item "fwqvga" 432x240 .IP "\fBhvga\fR" 4 .IX Item "hvga" 480x320 .IP "\fBqhd\fR" 4 .IX Item "qhd" 960x540 .IP "\fB2kdci\fR" 4 .IX Item "2kdci" 2048x1080 .IP "\fB4kdci\fR" 4 .IX Item "4kdci" 4096x2160 .IP "\fBuhd2160\fR" 4 .IX Item "uhd2160" 3840x2160 .IP "\fBuhd4320\fR" 4 .IX Item "uhd4320" 7680x4320 .SS "Video rate" .IX Subsection "Video rate" Specify the frame rate of a video, expressed as the number of frames generated per second. It has to be a string in the format \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a float number or a valid video frame rate abbreviation. .PP The following abbreviations are recognized: .IP "\fBntsc\fR" 4 .IX Item "ntsc" 30000/1001 .IP "\fBpal\fR" 4 .IX Item "pal" 25/1 .IP "\fBqntsc\fR" 4 .IX Item "qntsc" 30000/1001 .IP "\fBqpal\fR" 4 .IX Item "qpal" 25/1 .IP "\fBsntsc\fR" 4 .IX Item "sntsc" 30000/1001 .IP "\fBspal\fR" 4 .IX Item "spal" 25/1 .IP "\fBfilm\fR" 4 .IX Item "film" 24/1 .IP "\fBntsc-film\fR" 4 .IX Item "ntsc-film" 24000/1001 .SS "Ratio" .IX Subsection "Ratio" A ratio can be expressed as an expression, or in the form \&\fInumerator\fR:\fIdenominator\fR. .PP Note that a ratio with infinite (1/0) or negative value is considered valid, so you should check on the returned value if you want to exclude those values. .PP The undefined value can be expressed using the \*(L"0:0\*(R" string. .SS "Color" .IX Subsection "Color" It can be the name of a color as defined below (case insensitive match) or a \&\f(CW\*(C`[0x|#]RRGGBB[AA]\*(C'\fR sequence, possibly followed by @ and a string representing the alpha component. .PP The alpha component may be a string composed by \*(L"0x\*(R" followed by an hexadecimal number or a decimal number between 0.0 and 1.0, which represents the opacity value (\fB0x00\fR or \fB0.0\fR means completely transparent, \fB0xff\fR or \fB1.0\fR completely opaque). If the alpha component is not specified then \fB0xff\fR is assumed. .PP The string \fBrandom\fR will result in a random color. .PP The following names of colors are recognized: .IP "\fBAliceBlue\fR" 4 .IX Item "AliceBlue" 0xF0F8FF .IP "\fBAntiqueWhite\fR" 4 .IX Item "AntiqueWhite" 0xFAEBD7 .IP "\fBAqua\fR" 4 .IX Item "Aqua" 0x00FFFF .IP "\fBAquamarine\fR" 4 .IX Item "Aquamarine" 0x7FFFD4 .IP "\fBAzure\fR" 4 .IX Item "Azure" 0xF0FFFF .IP "\fBBeige\fR" 4 .IX Item "Beige" 0xF5F5DC .IP "\fBBisque\fR" 4 .IX Item "Bisque" 0xFFE4C4 .IP "\fBBlack\fR" 4 .IX Item "Black" 0x000000 .IP "\fBBlanchedAlmond\fR" 4 .IX Item "BlanchedAlmond" 0xFFEBCD .IP "\fBBlue\fR" 4 .IX Item "Blue" 0x0000FF .IP "\fBBlueViolet\fR" 4 .IX Item "BlueViolet" 0x8A2BE2 .IP "\fBBrown\fR" 4 .IX Item "Brown" 0xA52A2A .IP "\fBBurlyWood\fR" 4 .IX Item "BurlyWood" 0xDEB887 .IP "\fBCadetBlue\fR" 4 .IX Item "CadetBlue" 0x5F9EA0 .IP "\fBChartreuse\fR" 4 .IX Item "Chartreuse" 0x7FFF00 .IP "\fBChocolate\fR" 4 .IX Item "Chocolate" 0xD2691E .IP "\fBCoral\fR" 4 .IX Item "Coral" 0xFF7F50 .IP "\fBCornflowerBlue\fR" 4 .IX Item "CornflowerBlue" 0x6495ED .IP "\fBCornsilk\fR" 4 .IX Item "Cornsilk" 0xFFF8DC .IP "\fBCrimson\fR" 4 .IX Item "Crimson" 0xDC143C .IP "\fBCyan\fR" 4 .IX Item "Cyan" 0x00FFFF .IP "\fBDarkBlue\fR" 4 .IX Item "DarkBlue" 0x00008B .IP "\fBDarkCyan\fR" 4 .IX Item "DarkCyan" 0x008B8B .IP "\fBDarkGoldenRod\fR" 4 .IX Item "DarkGoldenRod" 0xB8860B .IP "\fBDarkGray\fR" 4 .IX Item "DarkGray" 0xA9A9A9 .IP "\fBDarkGreen\fR" 4 .IX Item "DarkGreen" 0x006400 .IP "\fBDarkKhaki\fR" 4 .IX Item "DarkKhaki" 0xBDB76B .IP "\fBDarkMagenta\fR" 4 .IX Item "DarkMagenta" 0x8B008B .IP "\fBDarkOliveGreen\fR" 4 .IX Item "DarkOliveGreen" 0x556B2F .IP "\fBDarkorange\fR" 4 .IX Item "Darkorange" 0xFF8C00 .IP "\fBDarkOrchid\fR" 4 .IX Item "DarkOrchid" 0x9932CC .IP "\fBDarkRed\fR" 4 .IX Item "DarkRed" 0x8B0000 .IP "\fBDarkSalmon\fR" 4 .IX Item "DarkSalmon" 0xE9967A .IP "\fBDarkSeaGreen\fR" 4 .IX Item "DarkSeaGreen" 0x8FBC8F .IP "\fBDarkSlateBlue\fR" 4 .IX Item "DarkSlateBlue" 0x483D8B .IP "\fBDarkSlateGray\fR" 4 .IX Item "DarkSlateGray" 0x2F4F4F .IP "\fBDarkTurquoise\fR" 4 .IX Item "DarkTurquoise" 0x00CED1 .IP "\fBDarkViolet\fR" 4 .IX Item "DarkViolet" 0x9400D3 .IP "\fBDeepPink\fR" 4 .IX Item "DeepPink" 0xFF1493 .IP "\fBDeepSkyBlue\fR" 4 .IX Item "DeepSkyBlue" 0x00BFFF .IP "\fBDimGray\fR" 4 .IX Item "DimGray" 0x696969 .IP "\fBDodgerBlue\fR" 4 .IX Item "DodgerBlue" 0x1E90FF .IP "\fBFireBrick\fR" 4 .IX Item "FireBrick" 0xB22222 .IP "\fBFloralWhite\fR" 4 .IX Item "FloralWhite" 0xFFFAF0 .IP "\fBForestGreen\fR" 4 .IX Item "ForestGreen" 0x228B22 .IP "\fBFuchsia\fR" 4 .IX Item "Fuchsia" 0xFF00FF .IP "\fBGainsboro\fR" 4 .IX Item "Gainsboro" 0xDCDCDC .IP "\fBGhostWhite\fR" 4 .IX Item "GhostWhite" 0xF8F8FF .IP "\fBGold\fR" 4 .IX Item "Gold" 0xFFD700 .IP "\fBGoldenRod\fR" 4 .IX Item "GoldenRod" 0xDAA520 .IP "\fBGray\fR" 4 .IX Item "Gray" 0x808080 .IP "\fBGreen\fR" 4 .IX Item "Green" 0x008000 .IP "\fBGreenYellow\fR" 4 .IX Item "GreenYellow" 0xADFF2F .IP "\fBHoneyDew\fR" 4 .IX Item "HoneyDew" 0xF0FFF0 .IP "\fBHotPink\fR" 4 .IX Item "HotPink" 0xFF69B4 .IP "\fBIndianRed\fR" 4 .IX Item "IndianRed" 0xCD5C5C .IP "\fBIndigo\fR" 4 .IX Item "Indigo" 0x4B0082 .IP "\fBIvory\fR" 4 .IX Item "Ivory" 0xFFFFF0 .IP "\fBKhaki\fR" 4 .IX Item "Khaki" 0xF0E68C .IP "\fBLavender\fR" 4 .IX Item "Lavender" 0xE6E6FA .IP "\fBLavenderBlush\fR" 4 .IX Item "LavenderBlush" 0xFFF0F5 .IP "\fBLawnGreen\fR" 4 .IX Item "LawnGreen" 0x7CFC00 .IP "\fBLemonChiffon\fR" 4 .IX Item "LemonChiffon" 0xFFFACD .IP "\fBLightBlue\fR" 4 .IX Item "LightBlue" 0xADD8E6 .IP "\fBLightCoral\fR" 4 .IX Item "LightCoral" 0xF08080 .IP "\fBLightCyan\fR" 4 .IX Item "LightCyan" 0xE0FFFF .IP "\fBLightGoldenRodYellow\fR" 4 .IX Item "LightGoldenRodYellow" 0xFAFAD2 .IP "\fBLightGreen\fR" 4 .IX Item "LightGreen" 0x90EE90 .IP "\fBLightGrey\fR" 4 .IX Item "LightGrey" 0xD3D3D3 .IP "\fBLightPink\fR" 4 .IX Item "LightPink" 0xFFB6C1 .IP "\fBLightSalmon\fR" 4 .IX Item "LightSalmon" 0xFFA07A .IP "\fBLightSeaGreen\fR" 4 .IX Item "LightSeaGreen" 0x20B2AA .IP "\fBLightSkyBlue\fR" 4 .IX Item "LightSkyBlue" 0x87CEFA .IP "\fBLightSlateGray\fR" 4 .IX Item "LightSlateGray" 0x778899 .IP "\fBLightSteelBlue\fR" 4 .IX Item "LightSteelBlue" 0xB0C4DE .IP "\fBLightYellow\fR" 4 .IX Item "LightYellow" 0xFFFFE0 .IP "\fBLime\fR" 4 .IX Item "Lime" 0x00FF00 .IP "\fBLimeGreen\fR" 4 .IX Item "LimeGreen" 0x32CD32 .IP "\fBLinen\fR" 4 .IX Item "Linen" 0xFAF0E6 .IP "\fBMagenta\fR" 4 .IX Item "Magenta" 0xFF00FF .IP "\fBMaroon\fR" 4 .IX Item "Maroon" 0x800000 .IP "\fBMediumAquaMarine\fR" 4 .IX Item "MediumAquaMarine" 0x66CDAA .IP "\fBMediumBlue\fR" 4 .IX Item "MediumBlue" 0x0000CD .IP "\fBMediumOrchid\fR" 4 .IX Item "MediumOrchid" 0xBA55D3 .IP "\fBMediumPurple\fR" 4 .IX Item "MediumPurple" 0x9370D8 .IP "\fBMediumSeaGreen\fR" 4 .IX Item "MediumSeaGreen" 0x3CB371 .IP "\fBMediumSlateBlue\fR" 4 .IX Item "MediumSlateBlue" 0x7B68EE .IP "\fBMediumSpringGreen\fR" 4 .IX Item "MediumSpringGreen" 0x00FA9A .IP "\fBMediumTurquoise\fR" 4 .IX Item "MediumTurquoise" 0x48D1CC .IP "\fBMediumVioletRed\fR" 4 .IX Item "MediumVioletRed" 0xC71585 .IP "\fBMidnightBlue\fR" 4 .IX Item "MidnightBlue" 0x191970 .IP "\fBMintCream\fR" 4 .IX Item "MintCream" 0xF5FFFA .IP "\fBMistyRose\fR" 4 .IX Item "MistyRose" 0xFFE4E1 .IP "\fBMoccasin\fR" 4 .IX Item "Moccasin" 0xFFE4B5 .IP "\fBNavajoWhite\fR" 4 .IX Item "NavajoWhite" 0xFFDEAD .IP "\fBNavy\fR" 4 .IX Item "Navy" 0x000080 .IP "\fBOldLace\fR" 4 .IX Item "OldLace" 0xFDF5E6 .IP "\fBOlive\fR" 4 .IX Item "Olive" 0x808000 .IP "\fBOliveDrab\fR" 4 .IX Item "OliveDrab" 0x6B8E23 .IP "\fBOrange\fR" 4 .IX Item "Orange" 0xFFA500 .IP "\fBOrangeRed\fR" 4 .IX Item "OrangeRed" 0xFF4500 .IP "\fBOrchid\fR" 4 .IX Item "Orchid" 0xDA70D6 .IP "\fBPaleGoldenRod\fR" 4 .IX Item "PaleGoldenRod" 0xEEE8AA .IP "\fBPaleGreen\fR" 4 .IX Item "PaleGreen" 0x98FB98 .IP "\fBPaleTurquoise\fR" 4 .IX Item "PaleTurquoise" 0xAFEEEE .IP "\fBPaleVioletRed\fR" 4 .IX Item "PaleVioletRed" 0xD87093 .IP "\fBPapayaWhip\fR" 4 .IX Item "PapayaWhip" 0xFFEFD5 .IP "\fBPeachPuff\fR" 4 .IX Item "PeachPuff" 0xFFDAB9 .IP "\fBPeru\fR" 4 .IX Item "Peru" 0xCD853F .IP "\fBPink\fR" 4 .IX Item "Pink" 0xFFC0CB .IP "\fBPlum\fR" 4 .IX Item "Plum" 0xDDA0DD .IP "\fBPowderBlue\fR" 4 .IX Item "PowderBlue" 0xB0E0E6 .IP "\fBPurple\fR" 4 .IX Item "Purple" 0x800080 .IP "\fBRed\fR" 4 .IX Item "Red" 0xFF0000 .IP "\fBRosyBrown\fR" 4 .IX Item "RosyBrown" 0xBC8F8F .IP "\fBRoyalBlue\fR" 4 .IX Item "RoyalBlue" 0x4169E1 .IP "\fBSaddleBrown\fR" 4 .IX Item "SaddleBrown" 0x8B4513 .IP "\fBSalmon\fR" 4 .IX Item "Salmon" 0xFA8072 .IP "\fBSandyBrown\fR" 4 .IX Item "SandyBrown" 0xF4A460 .IP "\fBSeaGreen\fR" 4 .IX Item "SeaGreen" 0x2E8B57 .IP "\fBSeaShell\fR" 4 .IX Item "SeaShell" 0xFFF5EE .IP "\fBSienna\fR" 4 .IX Item "Sienna" 0xA0522D .IP "\fBSilver\fR" 4 .IX Item "Silver" 0xC0C0C0 .IP "\fBSkyBlue\fR" 4 .IX Item "SkyBlue" 0x87CEEB .IP "\fBSlateBlue\fR" 4 .IX Item "SlateBlue" 0x6A5ACD .IP "\fBSlateGray\fR" 4 .IX Item "SlateGray" 0x708090 .IP "\fBSnow\fR" 4 .IX Item "Snow" 0xFFFAFA .IP "\fBSpringGreen\fR" 4 .IX Item "SpringGreen" 0x00FF7F .IP "\fBSteelBlue\fR" 4 .IX Item "SteelBlue" 0x4682B4 .IP "\fBTan\fR" 4 .IX Item "Tan" 0xD2B48C .IP "\fBTeal\fR" 4 .IX Item "Teal" 0x008080 .IP "\fBThistle\fR" 4 .IX Item "Thistle" 0xD8BFD8 .IP "\fBTomato\fR" 4 .IX Item "Tomato" 0xFF6347 .IP "\fBTurquoise\fR" 4 .IX Item "Turquoise" 0x40E0D0 .IP "\fBViolet\fR" 4 .IX Item "Violet" 0xEE82EE .IP "\fBWheat\fR" 4 .IX Item "Wheat" 0xF5DEB3 .IP "\fBWhite\fR" 4 .IX Item "White" 0xFFFFFF .IP "\fBWhiteSmoke\fR" 4 .IX Item "WhiteSmoke" 0xF5F5F5 .IP "\fBYellow\fR" 4 .IX Item "Yellow" 0xFFFF00 .IP "\fBYellowGreen\fR" 4 .IX Item "YellowGreen" 0x9ACD32 .SS "Channel Layout" .IX Subsection "Channel Layout" A channel layout specifies the spatial disposition of the channels in a multi-channel audio stream. To specify a channel layout, FFmpeg makes use of a special syntax. .PP Individual channels are identified by an id, as given by the table below: .IP "\fB\s-1FL\s0\fR" 4 .IX Item "FL" front left .IP "\fB\s-1FR\s0\fR" 4 .IX Item "FR" front right .IP "\fB\s-1FC\s0\fR" 4 .IX Item "FC" front center .IP "\fB\s-1LFE\s0\fR" 4 .IX Item "LFE" low frequency .IP "\fB\s-1BL\s0\fR" 4 .IX Item "BL" back left .IP "\fB\s-1BR\s0\fR" 4 .IX Item "BR" back right .IP "\fB\s-1FLC\s0\fR" 4 .IX Item "FLC" front left-of-center .IP "\fB\s-1FRC\s0\fR" 4 .IX Item "FRC" front right-of-center .IP "\fB\s-1BC\s0\fR" 4 .IX Item "BC" back center .IP "\fB\s-1SL\s0\fR" 4 .IX Item "SL" side left .IP "\fB\s-1SR\s0\fR" 4 .IX Item "SR" side right .IP "\fB\s-1TC\s0\fR" 4 .IX Item "TC" top center .IP "\fB\s-1TFL\s0\fR" 4 .IX Item "TFL" top front left .IP "\fB\s-1TFC\s0\fR" 4 .IX Item "TFC" top front center .IP "\fB\s-1TFR\s0\fR" 4 .IX Item "TFR" top front right .IP "\fB\s-1TBL\s0\fR" 4 .IX Item "TBL" top back left .IP "\fB\s-1TBC\s0\fR" 4 .IX Item "TBC" top back center .IP "\fB\s-1TBR\s0\fR" 4 .IX Item "TBR" top back right .IP "\fB\s-1DL\s0\fR" 4 .IX Item "DL" downmix left .IP "\fB\s-1DR\s0\fR" 4 .IX Item "DR" downmix right .IP "\fB\s-1WL\s0\fR" 4 .IX Item "WL" wide left .IP "\fB\s-1WR\s0\fR" 4 .IX Item "WR" wide right .IP "\fB\s-1SDL\s0\fR" 4 .IX Item "SDL" surround direct left .IP "\fB\s-1SDR\s0\fR" 4 .IX Item "SDR" surround direct right .IP "\fB\s-1LFE2\s0\fR" 4 .IX Item "LFE2" low frequency 2 .PP Standard channel layout compositions can be specified by using the following identifiers: .IP "\fBmono\fR" 4 .IX Item "mono" \&\s-1FC\s0 .IP "\fBstereo\fR" 4 .IX Item "stereo" \&\s-1FL+FR\s0 .IP "\fB2.1\fR" 4 .IX Item "2.1" \&\s-1FL+FR+LFE\s0 .IP "\fB3.0\fR" 4 .IX Item "3.0" \&\s-1FL+FR+FC\s0 .IP "\fB3.0(back)\fR" 4 .IX Item "3.0(back)" \&\s-1FL+FR+BC\s0 .IP "\fB4.0\fR" 4 .IX Item "4.0" \&\s-1FL+FR+FC+BC\s0 .IP "\fBquad\fR" 4 .IX Item "quad" \&\s-1FL+FR+BL+BR\s0 .IP "\fBquad(side)\fR" 4 .IX Item "quad(side)" \&\s-1FL+FR+SL+SR\s0 .IP "\fB3.1\fR" 4 .IX Item "3.1" \&\s-1FL+FR+FC+LFE\s0 .IP "\fB5.0\fR" 4 .IX Item "5.0" \&\s-1FL+FR+FC+BL+BR\s0 .IP "\fB5.0(side)\fR" 4 .IX Item "5.0(side)" \&\s-1FL+FR+FC+SL+SR\s0 .IP "\fB4.1\fR" 4 .IX Item "4.1" \&\s-1FL+FR+FC+LFE+BC\s0 .IP "\fB5.1\fR" 4 .IX Item "5.1" \&\s-1FL+FR+FC+LFE+BL+BR\s0 .IP "\fB5.1(side)\fR" 4 .IX Item "5.1(side)" \&\s-1FL+FR+FC+LFE+SL+SR\s0 .IP "\fB6.0\fR" 4 .IX Item "6.0" \&\s-1FL+FR+FC+BC+SL+SR\s0 .IP "\fB6.0(front)\fR" 4 .IX Item "6.0(front)" \&\s-1FL+FR+FLC+FRC+SL+SR\s0 .IP "\fBhexagonal\fR" 4 .IX Item "hexagonal" \&\s-1FL+FR+FC+BL+BR+BC\s0 .IP "\fB6.1\fR" 4 .IX Item "6.1" \&\s-1FL+FR+FC+LFE+BC+SL+SR\s0 .IP "\fB6.1\fR" 4 .IX Item "6.1" \&\s-1FL+FR+FC+LFE+BL+BR+BC\s0 .IP "\fB6.1(front)\fR" 4 .IX Item "6.1(front)" \&\s-1FL+FR+LFE+FLC+FRC+SL+SR\s0 .IP "\fB7.0\fR" 4 .IX Item "7.0" \&\s-1FL+FR+FC+BL+BR+SL+SR\s0 .IP "\fB7.0(front)\fR" 4 .IX Item "7.0(front)" \&\s-1FL+FR+FC+FLC+FRC+SL+SR\s0 .IP "\fB7.1\fR" 4 .IX Item "7.1" \&\s-1FL+FR+FC+LFE+BL+BR+SL+SR\s0 .IP "\fB7.1(wide)\fR" 4 .IX Item "7.1(wide)" \&\s-1FL+FR+FC+LFE+BL+BR+FLC+FRC\s0 .IP "\fB7.1(wide\-side)\fR" 4 .IX Item "7.1(wide-side)" \&\s-1FL+FR+FC+LFE+FLC+FRC+SL+SR\s0 .IP "\fBoctagonal\fR" 4 .IX Item "octagonal" \&\s-1FL+FR+FC+BL+BR+BC+SL+SR\s0 .IP "\fBdownmix\fR" 4 .IX Item "downmix" \&\s-1DL+DR\s0 .PP A custom channel layout can be specified as a sequence of terms, separated by \&'+' or '|'. Each term can be: .IP "\(bu" 4 the name of a standard channel layout (e.g. \fBmono\fR, \&\fBstereo\fR, \fB4.0\fR, \fBquad\fR, \fB5.0\fR, etc.) .IP "\(bu" 4 the name of a single channel (e.g. \fB\s-1FL\s0\fR, \fB\s-1FR\s0\fR, \fB\s-1FC\s0\fR, \fB\s-1LFE\s0\fR, etc.) .IP "\(bu" 4 a number of channels, in decimal, followed by 'c', yielding the default channel layout for that number of channels (see the function \&\f(CW\*(C`av_get_default_channel_layout\*(C'\fR). Note that not all channel counts have a default layout. .IP "\(bu" 4 a number of channels, in decimal, followed by 'C', yielding an unknown channel layout with the specified number of channels. Note that not all channel layout specification strings support unknown channel layouts. .IP "\(bu" 4 a channel layout mask, in hexadecimal starting with \*(L"0x\*(R" (see the \&\f(CW\*(C`AV_CH_*\*(C'\fR macros in \fIlibavutil/channel_layout.h\fR. .PP Before libavutil version 53 the trailing character \*(L"c\*(R" to specify a number of channels was optional, but now it is required, while a channel layout mask can also be specified as a decimal number (if and only if not followed by \*(L"c\*(R" or \*(L"C\*(R"). .PP See also the function \f(CW\*(C`av_get_channel_layout\*(C'\fR defined in \&\fIlibavutil/channel_layout.h\fR. .SH "EXPRESSION EVALUATION" .IX Header "EXPRESSION EVALUATION" When evaluating an arithmetic expression, FFmpeg uses an internal formula evaluator, implemented through the \fIlibavutil/eval.h\fR interface. .PP An expression may contain unary, binary operators, constants, and functions. .PP Two expressions \fIexpr1\fR and \fIexpr2\fR can be combined to form another expression "\fIexpr1\fR;\fIexpr2\fR". \&\fIexpr1\fR and \fIexpr2\fR are evaluated in turn, and the new expression evaluates to the value of \fIexpr2\fR. .PP The following binary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR, \&\f(CW\*(C`*\*(C'\fR, \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`^\*(C'\fR. .PP The following unary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR. .PP The following functions are available: .IP "\fBabs(x)\fR" 4 .IX Item "abs(x)" Compute absolute value of \fIx\fR. .IP "\fBacos(x)\fR" 4 .IX Item "acos(x)" Compute arccosine of \fIx\fR. .IP "\fBasin(x)\fR" 4 .IX Item "asin(x)" Compute arcsine of \fIx\fR. .IP "\fBatan(x)\fR" 4 .IX Item "atan(x)" Compute arctangent of \fIx\fR. .IP "\fBatan2(x, y)\fR" 4 .IX Item "atan2(x, y)" Compute principal value of the arc tangent of \fIy\fR/\fIx\fR. .IP "\fBbetween(x, min, max)\fR" 4 .IX Item "between(x, min, max)" Return 1 if \fIx\fR is greater than or equal to \fImin\fR and lesser than or equal to \fImax\fR, 0 otherwise. .IP "\fBbitand(x, y)\fR" 4 .IX Item "bitand(x, y)" .PD 0 .IP "\fBbitor(x, y)\fR" 4 .IX Item "bitor(x, y)" .PD Compute bitwise and/or operation on \fIx\fR and \fIy\fR. .Sp The results of the evaluation of \fIx\fR and \fIy\fR are converted to integers before executing the bitwise operation. .Sp Note that both the conversion to integer and the conversion back to floating point can lose precision. Beware of unexpected results for large numbers (usually 2^53 and larger). .IP "\fBceil(expr)\fR" 4 .IX Item "ceil(expr)" Round the value of expression \fIexpr\fR upwards to the nearest integer. For example, \*(L"ceil(1.5)\*(R" is \*(L"2.0\*(R". .IP "\fBclip(x, min, max)\fR" 4 .IX Item "clip(x, min, max)" Return the value of \fIx\fR clipped between \fImin\fR and \fImax\fR. .IP "\fBcos(x)\fR" 4 .IX Item "cos(x)" Compute cosine of \fIx\fR. .IP "\fBcosh(x)\fR" 4 .IX Item "cosh(x)" Compute hyperbolic cosine of \fIx\fR. .IP "\fBeq(x, y)\fR" 4 .IX Item "eq(x, y)" Return 1 if \fIx\fR and \fIy\fR are equivalent, 0 otherwise. .IP "\fBexp(x)\fR" 4 .IX Item "exp(x)" Compute exponential of \fIx\fR (with base \f(CW\*(C`e\*(C'\fR, the Euler's number). .IP "\fBfloor(expr)\fR" 4 .IX Item "floor(expr)" Round the value of expression \fIexpr\fR downwards to the nearest integer. For example, \*(L"floor(\-1.5)\*(R" is \*(L"\-2.0\*(R". .IP "\fBgauss(x)\fR" 4 .IX Item "gauss(x)" Compute Gauss function of \fIx\fR, corresponding to \&\f(CW\*(C`exp(\-x*x/2) / sqrt(2*PI)\*(C'\fR. .IP "\fBgcd(x, y)\fR" 4 .IX Item "gcd(x, y)" Return the greatest common divisor of \fIx\fR and \fIy\fR. If both \fIx\fR and \&\fIy\fR are 0 or either or both are less than zero then behavior is undefined. .IP "\fBgt(x, y)\fR" 4 .IX Item "gt(x, y)" Return 1 if \fIx\fR is greater than \fIy\fR, 0 otherwise. .IP "\fBgte(x, y)\fR" 4 .IX Item "gte(x, y)" Return 1 if \fIx\fR is greater than or equal to \fIy\fR, 0 otherwise. .IP "\fBhypot(x, y)\fR" 4 .IX Item "hypot(x, y)" This function is similar to the C function with the same name; it returns "sqrt(\fIx\fR*\fIx\fR + \fIy\fR*\fIy\fR)", the length of the hypotenuse of a right triangle with sides of length \fIx\fR and \fIy\fR, or the distance of the point (\fIx\fR, \fIy\fR) from the origin. .IP "\fBif(x, y)\fR" 4 .IX Item "if(x, y)" Evaluate \fIx\fR, and if the result is non-zero return the result of the evaluation of \fIy\fR, return 0 otherwise. .IP "\fBif(x, y, z)\fR" 4 .IX Item "if(x, y, z)" Evaluate \fIx\fR, and if the result is non-zero return the evaluation result of \fIy\fR, otherwise the evaluation result of \fIz\fR. .IP "\fBifnot(x, y)\fR" 4 .IX Item "ifnot(x, y)" Evaluate \fIx\fR, and if the result is zero return the result of the evaluation of \fIy\fR, return 0 otherwise. .IP "\fBifnot(x, y, z)\fR" 4 .IX Item "ifnot(x, y, z)" Evaluate \fIx\fR, and if the result is zero return the evaluation result of \fIy\fR, otherwise the evaluation result of \fIz\fR. .IP "\fBisinf(x)\fR" 4 .IX Item "isinf(x)" Return 1.0 if \fIx\fR is +/\-INFINITY, 0.0 otherwise. .IP "\fBisnan(x)\fR" 4 .IX Item "isnan(x)" Return 1.0 if \fIx\fR is \s-1NAN, 0.0\s0 otherwise. .IP "\fBld(var)\fR" 4 .IX Item "ld(var)" Load the value of the internal variable with number \&\fIvar\fR, which was previously stored with st(\fIvar\fR, \fIexpr\fR). The function returns the loaded value. .IP "\fBlerp(x, y, z)\fR" 4 .IX Item "lerp(x, y, z)" Return linear interpolation between \fIx\fR and \fIy\fR by amount of \fIz\fR. .IP "\fBlog(x)\fR" 4 .IX Item "log(x)" Compute natural logarithm of \fIx\fR. .IP "\fBlt(x, y)\fR" 4 .IX Item "lt(x, y)" Return 1 if \fIx\fR is lesser than \fIy\fR, 0 otherwise. .IP "\fBlte(x, y)\fR" 4 .IX Item "lte(x, y)" Return 1 if \fIx\fR is lesser than or equal to \fIy\fR, 0 otherwise. .IP "\fBmax(x, y)\fR" 4 .IX Item "max(x, y)" Return the maximum between \fIx\fR and \fIy\fR. .IP "\fBmin(x, y)\fR" 4 .IX Item "min(x, y)" Return the minimum between \fIx\fR and \fIy\fR. .IP "\fBmod(x, y)\fR" 4 .IX Item "mod(x, y)" Compute the remainder of division of \fIx\fR by \fIy\fR. .IP "\fBnot(expr)\fR" 4 .IX Item "not(expr)" Return 1.0 if \fIexpr\fR is zero, 0.0 otherwise. .IP "\fBpow(x, y)\fR" 4 .IX Item "pow(x, y)" Compute the power of \fIx\fR elevated \fIy\fR, it is equivalent to "(\fIx\fR)^(\fIy\fR)". .IP "\fBprint(t)\fR" 4 .IX Item "print(t)" .PD 0 .IP "\fBprint(t, l)\fR" 4 .IX Item "print(t, l)" .PD Print the value of expression \fIt\fR with loglevel \fIl\fR. If \&\fIl\fR is not specified then a default log level is used. Returns the value of the expression printed. .Sp Prints t with loglevel l .IP "\fBrandom(x)\fR" 4 .IX Item "random(x)" Return a pseudo random value between 0.0 and 1.0. \fIx\fR is the index of the internal variable which will be used to save the seed/state. .IP "\fBroot(expr, max)\fR" 4 .IX Item "root(expr, max)" Find an input value for which the function represented by \fIexpr\fR with argument \fI\f(BIld\fI\|(0)\fR is 0 in the interval 0..\fImax\fR. .Sp The expression in \fIexpr\fR must denote a continuous function or the result is undefined. .Sp \&\fI\f(BIld\fI\|(0)\fR is used to represent the function input value, which means that the given expression will be evaluated multiple times with various input values that the expression can access through \&\f(CWld(0)\fR. When the expression evaluates to 0 then the corresponding input value will be returned. .IP "\fBround(expr)\fR" 4 .IX Item "round(expr)" Round the value of expression \fIexpr\fR to the nearest integer. For example, \*(L"round(1.5)\*(R" is \*(L"2.0\*(R". .IP "\fBsin(x)\fR" 4 .IX Item "sin(x)" Compute sine of \fIx\fR. .IP "\fBsinh(x)\fR" 4 .IX Item "sinh(x)" Compute hyperbolic sine of \fIx\fR. .IP "\fBsqrt(expr)\fR" 4 .IX Item "sqrt(expr)" Compute the square root of \fIexpr\fR. This is equivalent to "(\fIexpr\fR)^.5". .IP "\fBsquish(x)\fR" 4 .IX Item "squish(x)" Compute expression \f(CW\*(C`1/(1 + exp(4*x))\*(C'\fR. .IP "\fBst(var, expr)\fR" 4 .IX Item "st(var, expr)" Store the value of the expression \fIexpr\fR in an internal variable. \fIvar\fR specifies the number of the variable where to store the value, and it is a value ranging from 0 to 9. The function returns the value stored in the internal variable. Note, Variables are currently not shared between expressions. .IP "\fBtan(x)\fR" 4 .IX Item "tan(x)" Compute tangent of \fIx\fR. .IP "\fBtanh(x)\fR" 4 .IX Item "tanh(x)" Compute hyperbolic tangent of \fIx\fR. .IP "\fBtaylor(expr, x)\fR" 4 .IX Item "taylor(expr, x)" .PD 0 .IP "\fBtaylor(expr, x, id)\fR" 4 .IX Item "taylor(expr, x, id)" .PD Evaluate a Taylor series at \fIx\fR, given an expression representing the \f(CW\*(C`ld(id)\*(C'\fR\-th derivative of a function at 0. .Sp When the series does not converge the result is undefined. .Sp \&\fIld(id)\fR is used to represent the derivative order in \fIexpr\fR, which means that the given expression will be evaluated multiple times with various input values that the expression can access through \&\f(CW\*(C`ld(id)\*(C'\fR. If \fIid\fR is not specified then 0 is assumed. .Sp Note, when you have the derivatives at y instead of 0, \&\f(CW\*(C`taylor(expr, x\-y)\*(C'\fR can be used. .IP "\fB\fBtime\fB\|(0)\fR" 4 .IX Item "time" Return the current (wallclock) time in seconds. .IP "\fBtrunc(expr)\fR" 4 .IX Item "trunc(expr)" Round the value of expression \fIexpr\fR towards zero to the nearest integer. For example, \*(L"trunc(\-1.5)\*(R" is \*(L"\-1.0\*(R". .IP "\fBwhile(cond, expr)\fR" 4 .IX Item "while(cond, expr)" Evaluate expression \fIexpr\fR while the expression \fIcond\fR is non-zero, and returns the value of the last \fIexpr\fR evaluation, or \&\s-1NAN\s0 if \fIcond\fR was always false. .PP The following constants are available: .IP "\fB\s-1PI\s0\fR" 4 .IX Item "PI" area of the unit disc, approximately 3.14 .IP "\fBE\fR" 4 .IX Item "E" \&\fBexp\fR\|(1) (Euler's number), approximately 2.718 .IP "\fB\s-1PHI\s0\fR" 4 .IX Item "PHI" golden ratio (1+\fBsqrt\fR\|(5))/2, approximately 1.618 .PP Assuming that an expression is considered \*(L"true\*(R" if it has a non-zero value, note that: .PP \&\f(CW\*(C`*\*(C'\fR works like \s-1AND\s0 .PP \&\f(CW\*(C`+\*(C'\fR works like \s-1OR\s0 .PP For example the construct: .PP .Vb 1 \& if (A AND B) then C .Ve .PP is equivalent to: .PP .Vb 1 \& if(A*B, C) .Ve .PP In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. .PP The evaluator also recognizes the International System unit prefixes. If 'i' is appended after the prefix, binary prefixes are used, which are based on powers of 1024 instead of powers of 1000. The 'B' postfix multiplies the value by 8, and can be appended after a unit prefix or used alone. This allows using for example '\s-1KB\s0', 'MiB', \&'G' and 'B' as number postfix. .PP The list of available International System prefixes follows, with indication of the corresponding powers of 10 and of 2. .IP "\fBy\fR" 4 .IX Item "y" 10^\-24 / 2^\-80 .IP "\fBz\fR" 4 .IX Item "z" 10^\-21 / 2^\-70 .IP "\fBa\fR" 4 .IX Item "a" 10^\-18 / 2^\-60 .IP "\fBf\fR" 4 .IX Item "f" 10^\-15 / 2^\-50 .IP "\fBp\fR" 4 .IX Item "p" 10^\-12 / 2^\-40 .IP "\fBn\fR" 4 .IX Item "n" 10^\-9 / 2^\-30 .IP "\fBu\fR" 4 .IX Item "u" 10^\-6 / 2^\-20 .IP "\fBm\fR" 4 .IX Item "m" 10^\-3 / 2^\-10 .IP "\fBc\fR" 4 .IX Item "c" 10^\-2 .IP "\fBd\fR" 4 .IX Item "d" 10^\-1 .IP "\fBh\fR" 4 .IX Item "h" 10^2 .IP "\fBk\fR" 4 .IX Item "k" 10^3 / 2^10 .IP "\fBK\fR" 4 .IX Item "K" 10^3 / 2^10 .IP "\fBM\fR" 4 .IX Item "M" 10^6 / 2^20 .IP "\fBG\fR" 4 .IX Item "G" 10^9 / 2^30 .IP "\fBT\fR" 4 .IX Item "T" 10^12 / 2^40 .IP "\fBP\fR" 4 .IX Item "P" 10^15 / 2^40 .IP "\fBE\fR" 4 .IX Item "E" 10^18 / 2^50 .IP "\fBZ\fR" 4 .IX Item "Z" 10^21 / 2^60 .IP "\fBY\fR" 4 .IX Item "Y" 10^24 / 2^70 .SH "CODEC OPTIONS" .IX Header "CODEC OPTIONS" libavcodec provides some generic global options, which can be set on all the encoders and decoders. In addition each codec may support so-called private options, which are specific for a given codec. .PP Sometimes, a global option may only affect a specific kind of codec, and may be nonsensical or ignored by another, so you need to be aware of the meaning of the specified options. Also some options are meant only for decoding or encoding. .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`AVCodecContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0 for programmatic use. .PP The list of supported options follow: .IP "\fBb\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "b integer (encoding,audio,video)" Set bitrate in bits/s. Default value is 200K. .IP "\fBab\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "ab integer (encoding,audio)" Set audio bitrate (in bits/s). Default value is 128K. .IP "\fBbt\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "bt integer (encoding,video)" Set video bitrate tolerance (in bits/s). In 1\-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value. This is not related to min/max bitrate. Lowering tolerance too much has an adverse effect on quality. .IP "\fBflags\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video,subtitles\fR\fB)\fR" 4 .IX Item "flags flags (decoding/encoding,audio,video,subtitles)" Set generic flags. .Sp Possible values: .RS 4 .IP "\fBmv4\fR" 4 .IX Item "mv4" Use four motion vector by macroblock (mpeg4). .IP "\fBqpel\fR" 4 .IX Item "qpel" Use 1/4 pel motion compensation. .IP "\fBloop\fR" 4 .IX Item "loop" Use loop filter. .IP "\fBqscale\fR" 4 .IX Item "qscale" Use fixed qscale. .IP "\fBpass1\fR" 4 .IX Item "pass1" Use internal 2pass ratecontrol in first pass mode. .IP "\fBpass2\fR" 4 .IX Item "pass2" Use internal 2pass ratecontrol in second pass mode. .IP "\fBgray\fR" 4 .IX Item "gray" Only decode/encode grayscale. .IP "\fBemu_edge\fR" 4 .IX Item "emu_edge" Do not draw edges. .IP "\fBpsnr\fR" 4 .IX Item "psnr" Set error[?] variables during encoding. .IP "\fBtruncated\fR" 4 .IX Item "truncated" .PD 0 .IP "\fBildct\fR" 4 .IX Item "ildct" .PD Use interlaced \s-1DCT.\s0 .IP "\fBlow_delay\fR" 4 .IX Item "low_delay" Force low delay. .IP "\fBglobal_header\fR" 4 .IX Item "global_header" Place global headers in extradata instead of every keyframe. .IP "\fBbitexact\fR" 4 .IX Item "bitexact" Only write platform\-, build\- and time-independent data. (except (I)DCT). This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing. .IP "\fBaic\fR" 4 .IX Item "aic" Apply H263 advanced intra coding / mpeg4 ac prediction. .IP "\fBcbp\fR" 4 .IX Item "cbp" Deprecated, use mpegvideo private options instead. .IP "\fBqprd\fR" 4 .IX Item "qprd" Deprecated, use mpegvideo private options instead. .IP "\fBilme\fR" 4 .IX Item "ilme" Apply interlaced motion estimation. .IP "\fBcgop\fR" 4 .IX Item "cgop" Use closed gop. .RE .RS 4 .RE .IP "\fBme_method\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "me_method integer (encoding,video)" Set motion estimation method. .Sp Possible values: .RS 4 .IP "\fBzero\fR" 4 .IX Item "zero" zero motion estimation (fastest) .IP "\fBfull\fR" 4 .IX Item "full" full motion estimation (slowest) .IP "\fBepzs\fR" 4 .IX Item "epzs" \&\s-1EPZS\s0 motion estimation (default) .IP "\fBesa\fR" 4 .IX Item "esa" esa motion estimation (alias for full) .IP "\fBtesa\fR" 4 .IX Item "tesa" tesa motion estimation .IP "\fBdia\fR" 4 .IX Item "dia" dia motion estimation (alias for epzs) .IP "\fBlog\fR" 4 .IX Item "log" log motion estimation .IP "\fBphods\fR" 4 .IX Item "phods" phods motion estimation .IP "\fBx1\fR" 4 .IX Item "x1" X1 motion estimation .IP "\fBhex\fR" 4 .IX Item "hex" hex motion estimation .IP "\fBumh\fR" 4 .IX Item "umh" umh motion estimation .IP "\fBiter\fR" 4 .IX Item "iter" iter motion estimation .RE .RS 4 .RE .IP "\fBextradata_size\fR \fIinteger\fR" 4 .IX Item "extradata_size integer" Set extradata size. .IP "\fBtime_base\fR \fIrational number\fR" 4 .IX Item "time_base rational number" Set codec time base. .Sp It is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. For fixed-fps content, timebase should be \f(CW\*(C`1 / frame_rate\*(C'\fR and timestamp increments should be identically 1. .IP "\fBg\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "g integer (encoding,video)" Set the group of picture (\s-1GOP\s0) size. Default value is 12. .IP "\fBar\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4 .IX Item "ar integer (decoding/encoding,audio)" Set audio sampling rate (in Hz). .IP "\fBac\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4 .IX Item "ac integer (decoding/encoding,audio)" Set number of audio channels. .IP "\fBcutoff\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "cutoff integer (encoding,audio)" Set cutoff bandwidth. (Supported only by selected encoders, see their respective documentation sections.) .IP "\fBframe_size\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "frame_size integer (encoding,audio)" Set audio frame size. .Sp Each submitted frame except the last must contain exactly frame_size samples per channel. May be 0 when the codec has \&\s-1CODEC_CAP_VARIABLE_FRAME_SIZE\s0 set, in that case the frame size is not restricted. It is set by some decoders to indicate constant frame size. .IP "\fBframe_number\fR \fIinteger\fR" 4 .IX Item "frame_number integer" Set the frame number. .IP "\fBdelay\fR \fIinteger\fR" 4 .IX Item "delay integer" .PD 0 .IP "\fBqcomp\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qcomp float (encoding,video)" .PD Set video quantizer scale compression (\s-1VBR\s0). It is used as a constant in the ratecontrol equation. Recommended range for default rc_eq: 0.0\-1.0. .IP "\fBqblur\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qblur float (encoding,video)" Set video quantizer scale blur (\s-1VBR\s0). .IP "\fBqmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qmin integer (encoding,video)" Set min video quantizer scale (\s-1VBR\s0). Must be included between \-1 and 69, default value is 2. .IP "\fBqmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qmax integer (encoding,video)" Set max video quantizer scale (\s-1VBR\s0). Must be included between \-1 and 1024, default value is 31. .IP "\fBqdiff\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qdiff integer (encoding,video)" Set max difference between the quantizer scale (\s-1VBR\s0). .IP "\fBbf\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "bf integer (encoding,video)" Set max number of B frames between non-B-frames. .Sp Must be an integer between \-1 and 16. 0 means that B\-frames are disabled. If a value of \-1 is used, it will choose an automatic value depending on the encoder. .Sp Default value is 0. .IP "\fBb_qfactor\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "b_qfactor float (encoding,video)" Set qp factor between P and B frames. .IP "\fBrc_strategy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_strategy integer (encoding,video)" Set ratecontrol method. .IP "\fBb_strategy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "b_strategy integer (encoding,video)" Set strategy to choose between I/P/B\-frames. .IP "\fBps\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "ps integer (encoding,video)" Set \s-1RTP\s0 payload size in bytes. .IP "\fBmv_bits\fR \fIinteger\fR" 4 .IX Item "mv_bits integer" .PD 0 .IP "\fBheader_bits\fR \fIinteger\fR" 4 .IX Item "header_bits integer" .IP "\fBi_tex_bits\fR \fIinteger\fR" 4 .IX Item "i_tex_bits integer" .IP "\fBp_tex_bits\fR \fIinteger\fR" 4 .IX Item "p_tex_bits integer" .IP "\fBi_count\fR \fIinteger\fR" 4 .IX Item "i_count integer" .IP "\fBp_count\fR \fIinteger\fR" 4 .IX Item "p_count integer" .IP "\fBskip_count\fR \fIinteger\fR" 4 .IX Item "skip_count integer" .IP "\fBmisc_bits\fR \fIinteger\fR" 4 .IX Item "misc_bits integer" .IP "\fBframe_bits\fR \fIinteger\fR" 4 .IX Item "frame_bits integer" .IP "\fBcodec_tag\fR \fIinteger\fR" 4 .IX Item "codec_tag integer" .IP "\fBbug\fR \fIflags\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "bug flags (decoding,video)" .PD Workaround not auto detected encoder bugs. .Sp Possible values: .RS 4 .IP "\fBautodetect\fR" 4 .IX Item "autodetect" .PD 0 .IP "\fBold_msmpeg4\fR" 4 .IX Item "old_msmpeg4" .PD some old lavc generated msmpeg4v3 files (no autodetection) .IP "\fBxvid_ilace\fR" 4 .IX Item "xvid_ilace" Xvid interlacing bug (autodetected if fourcc==XVIX) .IP "\fBump4\fR" 4 .IX Item "ump4" (autodetected if fourcc==UMP4) .IP "\fBno_padding\fR" 4 .IX Item "no_padding" padding bug (autodetected) .IP "\fBamv\fR" 4 .IX Item "amv" .PD 0 .IP "\fBac_vlc\fR" 4 .IX Item "ac_vlc" .PD illegal vlc bug (autodetected per fourcc) .IP "\fBqpel_chroma\fR" 4 .IX Item "qpel_chroma" .PD 0 .IP "\fBstd_qpel\fR" 4 .IX Item "std_qpel" .PD old standard qpel (autodetected per fourcc/version) .IP "\fBqpel_chroma2\fR" 4 .IX Item "qpel_chroma2" .PD 0 .IP "\fBdirect_blocksize\fR" 4 .IX Item "direct_blocksize" .PD direct-qpel-blocksize bug (autodetected per fourcc/version) .IP "\fBedge\fR" 4 .IX Item "edge" edge padding bug (autodetected per fourcc/version) .IP "\fBhpel_chroma\fR" 4 .IX Item "hpel_chroma" .PD 0 .IP "\fBdc_clip\fR" 4 .IX Item "dc_clip" .IP "\fBms\fR" 4 .IX Item "ms" .PD Workaround various bugs in microsoft broken decoders. .IP "\fBtrunc\fR" 4 .IX Item "trunc" trancated frames .RE .RS 4 .RE .IP "\fBlelim\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "lelim integer (encoding,video)" Set single coefficient elimination threshold for luminance (negative values also consider \s-1DC\s0 coefficient). .IP "\fBcelim\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "celim integer (encoding,video)" Set single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) .IP "\fBstrict\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4 .IX Item "strict integer (decoding/encoding,audio,video)" Specify how strictly to follow the standards. .Sp Possible values: .RS 4 .IP "\fBvery\fR" 4 .IX Item "very" strictly conform to an older more strict version of the spec or reference software .IP "\fBstrict\fR" 4 .IX Item "strict" strictly conform to all the things in the spec no matter what consequences .IP "\fBnormal\fR" 4 .IX Item "normal" .PD 0 .IP "\fBunofficial\fR" 4 .IX Item "unofficial" .PD allow unofficial extensions .IP "\fBexperimental\fR" 4 .IX Item "experimental" allow non standardized experimental things, experimental (unfinished/work in progress/not well tested) decoders and encoders. Note: experimental decoders can pose a security risk, do not use this for decoding untrusted input. .RE .RS 4 .RE .IP "\fBb_qoffset\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "b_qoffset float (encoding,video)" Set \s-1QP\s0 offset between P and B frames. .IP "\fBerr_detect\fR \fIflags\fR \fB(\fR\fIdecoding,audio,video\fR\fB)\fR" 4 .IX Item "err_detect flags (decoding,audio,video)" Set error detection flags. .Sp Possible values: .RS 4 .IP "\fBcrccheck\fR" 4 .IX Item "crccheck" verify embedded CRCs .IP "\fBbitstream\fR" 4 .IX Item "bitstream" detect bitstream specification deviations .IP "\fBbuffer\fR" 4 .IX Item "buffer" detect improper bitstream length .IP "\fBexplode\fR" 4 .IX Item "explode" abort decoding on minor error detection .IP "\fBignore_err\fR" 4 .IX Item "ignore_err" ignore decoding errors, and continue decoding. This is useful if you want to analyze the content of a video and thus want everything to be decoded no matter what. This option will not result in a video that is pleasing to watch in case of errors. .IP "\fBcareful\fR" 4 .IX Item "careful" consider things that violate the spec and have not been seen in the wild as errors .IP "\fBcompliant\fR" 4 .IX Item "compliant" consider all spec non compliancies as errors .IP "\fBaggressive\fR" 4 .IX Item "aggressive" consider things that a sane encoder should not do as an error .RE .RS 4 .RE .IP "\fBhas_b_frames\fR \fIinteger\fR" 4 .IX Item "has_b_frames integer" .PD 0 .IP "\fBblock_align\fR \fIinteger\fR" 4 .IX Item "block_align integer" .IP "\fBmpeg_quant\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mpeg_quant integer (encoding,video)" .PD Use \s-1MPEG\s0 quantizers instead of H.263. .IP "\fBqsquish\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qsquish float (encoding,video)" How to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function). .IP "\fBrc_qmod_amp\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_qmod_amp float (encoding,video)" Set experimental quantizer modulation. .IP "\fBrc_qmod_freq\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_qmod_freq integer (encoding,video)" Set experimental quantizer modulation. .IP "\fBrc_override_count\fR \fIinteger\fR" 4 .IX Item "rc_override_count integer" .PD 0 .IP "\fBrc_eq\fR \fIstring\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_eq string (encoding,video)" .PD Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex. .IP "\fBmaxrate\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "maxrate integer (encoding,audio,video)" Set max bitrate tolerance (in bits/s). Requires bufsize to be set. .IP "\fBminrate\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "minrate integer (encoding,audio,video)" Set min bitrate tolerance (in bits/s). Most useful in setting up a \s-1CBR\s0 encode. It is of little use elsewise. .IP "\fBbufsize\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "bufsize integer (encoding,audio,video)" Set ratecontrol buffer size (in bits). .IP "\fBrc_buf_aggressivity\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_buf_aggressivity float (encoding,video)" Currently useless. .IP "\fBi_qfactor\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "i_qfactor float (encoding,video)" Set \s-1QP\s0 factor between P and I frames. .IP "\fBi_qoffset\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "i_qoffset float (encoding,video)" Set \s-1QP\s0 offset between P and I frames. .IP "\fBrc_init_cplx\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_init_cplx float (encoding,video)" Set initial complexity for 1\-pass encoding. .IP "\fBdct\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "dct integer (encoding,video)" Set \s-1DCT\s0 algorithm. .Sp Possible values: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" autoselect a good one (default) .IP "\fBfastint\fR" 4 .IX Item "fastint" fast integer .IP "\fBint\fR" 4 .IX Item "int" accurate integer .IP "\fBmmx\fR" 4 .IX Item "mmx" .PD 0 .IP "\fBaltivec\fR" 4 .IX Item "altivec" .IP "\fBfaan\fR" 4 .IX Item "faan" .PD floating point \s-1AAN DCT\s0 .RE .RS 4 .RE .IP "\fBlumi_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "lumi_mask float (encoding,video)" Compress bright areas stronger than medium ones. .IP "\fBtcplx_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "tcplx_mask float (encoding,video)" Set temporal complexity masking. .IP "\fBscplx_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "scplx_mask float (encoding,video)" Set spatial complexity masking. .IP "\fBp_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "p_mask float (encoding,video)" Set inter masking. .IP "\fBdark_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "dark_mask float (encoding,video)" Compress dark areas stronger than medium ones. .IP "\fBidct\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "idct integer (decoding/encoding,video)" Select \s-1IDCT\s0 implementation. .Sp Possible values: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" .PD 0 .IP "\fBint\fR" 4 .IX Item "int" .IP "\fBsimple\fR" 4 .IX Item "simple" .IP "\fBsimplemmx\fR" 4 .IX Item "simplemmx" .IP "\fBsimpleauto\fR" 4 .IX Item "simpleauto" .PD Automatically pick a \s-1IDCT\s0 compatible with the simple one .IP "\fBarm\fR" 4 .IX Item "arm" .PD 0 .IP "\fBaltivec\fR" 4 .IX Item "altivec" .IP "\fBsh4\fR" 4 .IX Item "sh4" .IP "\fBsimplearm\fR" 4 .IX Item "simplearm" .IP "\fBsimplearmv5te\fR" 4 .IX Item "simplearmv5te" .IP "\fBsimplearmv6\fR" 4 .IX Item "simplearmv6" .IP "\fBsimpleneon\fR" 4 .IX Item "simpleneon" .IP "\fBsimplealpha\fR" 4 .IX Item "simplealpha" .IP "\fBipp\fR" 4 .IX Item "ipp" .IP "\fBxvidmmx\fR" 4 .IX Item "xvidmmx" .IP "\fBfaani\fR" 4 .IX Item "faani" .PD floating point \s-1AAN IDCT\s0 .RE .RS 4 .RE .IP "\fBslice_count\fR \fIinteger\fR" 4 .IX Item "slice_count integer" .PD 0 .IP "\fBec\fR \fIflags\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "ec flags (decoding,video)" .PD Set error concealment strategy. .Sp Possible values: .RS 4 .IP "\fBguess_mvs\fR" 4 .IX Item "guess_mvs" iterative motion vector (\s-1MV\s0) search (slow) .IP "\fBdeblock\fR" 4 .IX Item "deblock" use strong deblock filter for damaged MBs .IP "\fBfavor_inter\fR" 4 .IX Item "favor_inter" favor predicting from the previous frame instead of the current .RE .RS 4 .RE .IP "\fBbits_per_coded_sample\fR \fIinteger\fR" 4 .IX Item "bits_per_coded_sample integer" .PD 0 .IP "\fBpred\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "pred integer (encoding,video)" .PD Set prediction method. .Sp Possible values: .RS 4 .IP "\fBleft\fR" 4 .IX Item "left" .PD 0 .IP "\fBplane\fR" 4 .IX Item "plane" .IP "\fBmedian\fR" 4 .IX Item "median" .RE .RS 4 .RE .IP "\fBaspect\fR \fIrational number\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "aspect rational number (encoding,video)" .PD Set sample aspect ratio. .IP "\fBsar\fR \fIrational number\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "sar rational number (encoding,video)" Set sample aspect ratio. Alias to \fIaspect\fR. .IP "\fBdebug\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video,subtitles\fR\fB)\fR" 4 .IX Item "debug flags (decoding/encoding,audio,video,subtitles)" Print specific debug info. .Sp Possible values: .RS 4 .IP "\fBpict\fR" 4 .IX Item "pict" picture info .IP "\fBrc\fR" 4 .IX Item "rc" rate control .IP "\fBbitstream\fR" 4 .IX Item "bitstream" .PD 0 .IP "\fBmb_type\fR" 4 .IX Item "mb_type" .PD macroblock (\s-1MB\s0) type .IP "\fBqp\fR" 4 .IX Item "qp" per-block quantization parameter (\s-1QP\s0) .IP "\fBdct_coeff\fR" 4 .IX Item "dct_coeff" .PD 0 .IP "\fBgreen_metadata\fR" 4 .IX Item "green_metadata" .PD display complexity metadata for the upcoming frame, GoP or for a given duration. .IP "\fBskip\fR" 4 .IX Item "skip" .PD 0 .IP "\fBstartcode\fR" 4 .IX Item "startcode" .IP "\fBer\fR" 4 .IX Item "er" .PD error recognition .IP "\fBmmco\fR" 4 .IX Item "mmco" memory management control operations (H.264) .IP "\fBbugs\fR" 4 .IX Item "bugs" .PD 0 .IP "\fBbuffers\fR" 4 .IX Item "buffers" .PD picture buffer allocations .IP "\fBthread_ops\fR" 4 .IX Item "thread_ops" threading operations .IP "\fBnomc\fR" 4 .IX Item "nomc" skip motion compensation .RE .RS 4 .RE .IP "\fBcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "cmp integer (encoding,video)" Set full pel me compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBsubcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "subcmp integer (encoding,video)" .PD Set sub pel me compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBmbcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mbcmp integer (encoding,video)" .PD Set macroblock compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBildctcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "ildctcmp integer (encoding,video)" .PD Set interlaced dct compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBdia_size\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "dia_size integer (encoding,video)" .PD Set diamond type & size for motion estimation. .IP "\fBlast_pred\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "last_pred integer (encoding,video)" Set amount of motion predictors from the previous frame. .IP "\fBpreme\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "preme integer (encoding,video)" Set pre motion estimation. .IP "\fBprecmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "precmp integer (encoding,video)" Set pre motion estimation compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBpre_dia_size\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "pre_dia_size integer (encoding,video)" .PD Set diamond type & size for motion estimation pre-pass. .IP "\fBsubq\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "subq integer (encoding,video)" Set sub pel motion estimation quality. .IP "\fBdtg_active_format\fR \fIinteger\fR" 4 .IX Item "dtg_active_format integer" .PD 0 .IP "\fBme_range\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "me_range integer (encoding,video)" .PD Set limit motion vectors range (1023 for DivX player). .IP "\fBibias\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "ibias integer (encoding,video)" Set intra quant bias. .IP "\fBpbias\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "pbias integer (encoding,video)" Set inter quant bias. .IP "\fBcolor_table_id\fR \fIinteger\fR" 4 .IX Item "color_table_id integer" .PD 0 .IP "\fBglobal_quality\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "global_quality integer (encoding,audio,video)" .IP "\fBcoder\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "coder integer (encoding,video)" .PD Possible values: .RS 4 .IP "\fBvlc\fR" 4 .IX Item "vlc" variable length coder / huffman coder .IP "\fBac\fR" 4 .IX Item "ac" arithmetic coder .IP "\fBraw\fR" 4 .IX Item "raw" raw (no encoding) .IP "\fBrle\fR" 4 .IX Item "rle" run-length coder .IP "\fBdeflate\fR" 4 .IX Item "deflate" deflate-based coder .RE .RS 4 .RE .IP "\fBcontext\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "context integer (encoding,video)" Set context model. .IP "\fBslice_flags\fR \fIinteger\fR" 4 .IX Item "slice_flags integer" .PD 0 .IP "\fBmbd\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mbd integer (encoding,video)" .PD Set macroblock decision algorithm (high quality mode). .Sp Possible values: .RS 4 .IP "\fBsimple\fR" 4 .IX Item "simple" use mbcmp (default) .IP "\fBbits\fR" 4 .IX Item "bits" use fewest bits .IP "\fBrd\fR" 4 .IX Item "rd" use best rate distortion .RE .RS 4 .RE .IP "\fBstream_codec_tag\fR \fIinteger\fR" 4 .IX Item "stream_codec_tag integer" .PD 0 .IP "\fBsc_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "sc_threshold integer (encoding,video)" .PD Set scene change threshold. .IP "\fBlmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "lmin integer (encoding,video)" Set min lagrange factor (\s-1VBR\s0). .IP "\fBlmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "lmax integer (encoding,video)" Set max lagrange factor (\s-1VBR\s0). .IP "\fBnr\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "nr integer (encoding,video)" Set noise reduction. .IP "\fBrc_init_occupancy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_init_occupancy integer (encoding,video)" Set number of bits which should be loaded into the rc buffer before decoding starts. .IP "\fBflags2\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4 .IX Item "flags2 flags (decoding/encoding,audio,video)" Possible values: .RS 4 .IP "\fBfast\fR" 4 .IX Item "fast" Allow non spec compliant speedup tricks. .IP "\fBsgop\fR" 4 .IX Item "sgop" Deprecated, use mpegvideo private options instead. .IP "\fBnoout\fR" 4 .IX Item "noout" Skip bitstream encoding. .IP "\fBignorecrop\fR" 4 .IX Item "ignorecrop" Ignore cropping information from sps. .IP "\fBlocal_header\fR" 4 .IX Item "local_header" Place global headers at every keyframe instead of in extradata. .IP "\fBchunks\fR" 4 .IX Item "chunks" Frame data might be split into multiple chunks. .IP "\fBshowall\fR" 4 .IX Item "showall" Show all frames before the first keyframe. .IP "\fBskiprd\fR" 4 .IX Item "skiprd" Deprecated, use mpegvideo private options instead. .IP "\fBexport_mvs\fR" 4 .IX Item "export_mvs" Export motion vectors into frame side-data (see \f(CW\*(C`AV_FRAME_DATA_MOTION_VECTORS\*(C'\fR) for codecs that support it. See also \fIdoc/examples/export_mvs.c\fR. .RE .RS 4 .RE .IP "\fBerror\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "error integer (encoding,video)" .PD 0 .IP "\fBqns\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "qns integer (encoding,video)" .PD Deprecated, use mpegvideo private options instead. .IP "\fBthreads\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "threads integer (decoding/encoding,video)" Set the number of threads to be used, in case the selected codec implementation supports multi-threading. .Sp Possible values: .RS 4 .IP "\fBauto, 0\fR" 4 .IX Item "auto, 0" automatically select the number of threads to set .RE .RS 4 .Sp Default value is \fBauto\fR. .RE .IP "\fBme_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "me_threshold integer (encoding,video)" Set motion estimation threshold. .IP "\fBmb_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mb_threshold integer (encoding,video)" Set macroblock threshold. .IP "\fBdc\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "dc integer (encoding,video)" Set intra_dc_precision. .IP "\fBnssew\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "nssew integer (encoding,video)" Set nsse weight. .IP "\fBskip_top\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_top integer (decoding,video)" Set number of macroblock rows at the top which are skipped. .IP "\fBskip_bottom\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_bottom integer (decoding,video)" Set number of macroblock rows at the bottom which are skipped. .IP "\fBprofile\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "profile integer (encoding,audio,video)" Possible values: .RS 4 .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBaac_main\fR" 4 .IX Item "aac_main" .IP "\fBaac_low\fR" 4 .IX Item "aac_low" .IP "\fBaac_ssr\fR" 4 .IX Item "aac_ssr" .IP "\fBaac_ltp\fR" 4 .IX Item "aac_ltp" .IP "\fBaac_he\fR" 4 .IX Item "aac_he" .IP "\fBaac_he_v2\fR" 4 .IX Item "aac_he_v2" .IP "\fBaac_ld\fR" 4 .IX Item "aac_ld" .IP "\fBaac_eld\fR" 4 .IX Item "aac_eld" .IP "\fBmpeg2_aac_low\fR" 4 .IX Item "mpeg2_aac_low" .IP "\fBmpeg2_aac_he\fR" 4 .IX Item "mpeg2_aac_he" .IP "\fBmpeg4_sp\fR" 4 .IX Item "mpeg4_sp" .IP "\fBmpeg4_core\fR" 4 .IX Item "mpeg4_core" .IP "\fBmpeg4_main\fR" 4 .IX Item "mpeg4_main" .IP "\fBmpeg4_asp\fR" 4 .IX Item "mpeg4_asp" .IP "\fBdts\fR" 4 .IX Item "dts" .IP "\fBdts_es\fR" 4 .IX Item "dts_es" .IP "\fBdts_96_24\fR" 4 .IX Item "dts_96_24" .IP "\fBdts_hd_hra\fR" 4 .IX Item "dts_hd_hra" .IP "\fBdts_hd_ma\fR" 4 .IX Item "dts_hd_ma" .RE .RS 4 .RE .IP "\fBlevel\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "level integer (encoding,audio,video)" .PD Possible values: .RS 4 .IP "\fBunknown\fR" 4 .IX Item "unknown" .RE .RS 4 .RE .PD 0 .IP "\fBlowres\fR \fIinteger\fR \fB(\fR\fIdecoding,audio,video\fR\fB)\fR" 4 .IX Item "lowres integer (decoding,audio,video)" .PD Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions. .IP "\fBskip_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "skip_threshold integer (encoding,video)" Set frame skip threshold. .IP "\fBskip_factor\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "skip_factor integer (encoding,video)" Set frame skip factor. .IP "\fBskip_exp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "skip_exp integer (encoding,video)" Set frame skip exponent. Negative values behave identical to the corresponding positive ones, except that the score is normalized. Positive values exist primarily for compatibility reasons and are not so useful. .IP "\fBskipcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "skipcmp integer (encoding,video)" Set frame skip compare function. .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBw53\fR" 4 .IX Item "w53" 5/3 wavelet, only used in snow .IP "\fBw97\fR" 4 .IX Item "w97" 9/7 wavelet, only used in snow .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fBborder_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "border_mask float (encoding,video)" .PD Increase the quantizer for macroblocks close to borders. .IP "\fBmblmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mblmin integer (encoding,video)" Set min macroblock lagrange factor (\s-1VBR\s0). .IP "\fBmblmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mblmax integer (encoding,video)" Set max macroblock lagrange factor (\s-1VBR\s0). .IP "\fBmepc\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mepc integer (encoding,video)" Set motion estimation bitrate penalty compensation (1.0 = 256). .IP "\fBskip_loop_filter\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_loop_filter integer (decoding,video)" .PD 0 .IP "\fBskip_idct\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_idct integer (decoding,video)" .IP "\fBskip_frame\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_frame integer (decoding,video)" .PD Make decoder discard processing depending on the frame type selected by the option value. .Sp \&\fBskip_loop_filter\fR skips frame loop filtering, \fBskip_idct\fR skips frame IDCT/dequantization, \fBskip_frame\fR skips decoding. .Sp Possible values: .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" Discard no frame. .IP "\fBdefault\fR" 4 .IX Item "default" Discard useless frames like 0\-sized frames. .IP "\fBnoref\fR" 4 .IX Item "noref" Discard all non-reference frames. .IP "\fBbidir\fR" 4 .IX Item "bidir" Discard all bidirectional frames. .IP "\fBnokey\fR" 4 .IX Item "nokey" Discard all frames excepts keyframes. .IP "\fBall\fR" 4 .IX Item "all" Discard all frames. .RE .RS 4 .Sp Default value is \fBdefault\fR. .RE .IP "\fBbidir_refine\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "bidir_refine integer (encoding,video)" Refine the two motion vectors used in bidirectional macroblocks. .IP "\fBbrd_scale\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "brd_scale integer (encoding,video)" Downscale frames for dynamic B\-frame decision. .IP "\fBkeyint_min\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "keyint_min integer (encoding,video)" Set minimum interval between IDR-frames. .IP "\fBrefs\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "refs integer (encoding,video)" Set reference frames to consider for motion compensation. .IP "\fBchromaoffset\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "chromaoffset integer (encoding,video)" Set chroma qp offset from luma. .IP "\fBtrellis\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "trellis integer (encoding,audio,video)" Set rate-distortion optimal quantization. .IP "\fBmv0_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "mv0_threshold integer (encoding,video)" .PD 0 .IP "\fBb_sensitivity\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "b_sensitivity integer (encoding,video)" .PD Adjust sensitivity of b_frame_strategy 1. .IP "\fBcompression_level\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "compression_level integer (encoding,audio,video)" .PD 0 .IP "\fBmin_prediction_order\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "min_prediction_order integer (encoding,audio)" .IP "\fBmax_prediction_order\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "max_prediction_order integer (encoding,audio)" .IP "\fBtimecode_frame_start\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "timecode_frame_start integer (encoding,video)" .PD Set \s-1GOP\s0 timecode frame start number, in non drop frame format. .IP "\fBrequest_channels\fR \fIinteger\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4 .IX Item "request_channels integer (decoding,audio)" Set desired number of audio channels. .IP "\fBbits_per_raw_sample\fR \fIinteger\fR" 4 .IX Item "bits_per_raw_sample integer" .PD 0 .IP "\fBchannel_layout\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4 .IX Item "channel_layout integer (decoding/encoding,audio)" .PD Possible values: .IP "\fBrequest_channel_layout\fR \fIinteger\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4 .IX Item "request_channel_layout integer (decoding,audio)" Possible values: .IP "\fBrc_max_vbv_use\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_max_vbv_use float (encoding,video)" .PD 0 .IP "\fBrc_min_vbv_use\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "rc_min_vbv_use float (encoding,video)" .IP "\fBticks_per_frame\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4 .IX Item "ticks_per_frame integer (decoding/encoding,audio,video)" .IP "\fBcolor_primaries\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "color_primaries integer (decoding/encoding,video)" .PD Possible values: .RS 4 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBbt470m\fR" 4 .IX Item "bt470m" \&\s-1BT.470 M\s0 .IP "\fBbt470bg\fR" 4 .IX Item "bt470bg" \&\s-1BT.470 BG\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBfilm\fR" 4 .IX Item "film" Film .IP "\fBbt2020\fR" 4 .IX Item "bt2020" \&\s-1BT.2020\s0 .IP "\fBsmpte428\fR" 4 .IX Item "smpte428" .PD 0 .IP "\fBsmpte428_1\fR" 4 .IX Item "smpte428_1" .PD \&\s-1SMPTE ST 428\-1\s0 .IP "\fBsmpte431\fR" 4 .IX Item "smpte431" \&\s-1SMPTE 431\-2\s0 .IP "\fBsmpte432\fR" 4 .IX Item "smpte432" \&\s-1SMPTE 432\-1\s0 .IP "\fBjedec\-p22\fR" 4 .IX Item "jedec-p22" \&\s-1JEDEC P22\s0 .RE .RS 4 .RE .IP "\fBcolor_trc\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "color_trc integer (decoding/encoding,video)" Possible values: .RS 4 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBgamma22\fR" 4 .IX Item "gamma22" \&\s-1BT.470 M\s0 .IP "\fBgamma28\fR" 4 .IX Item "gamma28" \&\s-1BT.470 BG\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBlinear\fR" 4 .IX Item "linear" Linear .IP "\fBlog\fR" 4 .IX Item "log" .PD 0 .IP "\fBlog100\fR" 4 .IX Item "log100" .PD Log .IP "\fBlog_sqrt\fR" 4 .IX Item "log_sqrt" .PD 0 .IP "\fBlog316\fR" 4 .IX Item "log316" .PD Log square root .IP "\fBiec61966_2_4\fR" 4 .IX Item "iec61966_2_4" .PD 0 .IP "\fBiec61966\-2\-4\fR" 4 .IX Item "iec61966-2-4" .PD \&\s-1IEC 61966\-2\-4\s0 .IP "\fBbt1361\fR" 4 .IX Item "bt1361" .PD 0 .IP "\fBbt1361e\fR" 4 .IX Item "bt1361e" .PD \&\s-1BT.1361\s0 .IP "\fBiec61966_2_1\fR" 4 .IX Item "iec61966_2_1" .PD 0 .IP "\fBiec61966\-2\-1\fR" 4 .IX Item "iec61966-2-1" .PD \&\s-1IEC 61966\-2\-1\s0 .IP "\fBbt2020_10\fR" 4 .IX Item "bt2020_10" .PD 0 .IP "\fBbt2020_10bit\fR" 4 .IX Item "bt2020_10bit" .PD \&\s-1BT.2020\s0 \- 10 bit .IP "\fBbt2020_12\fR" 4 .IX Item "bt2020_12" .PD 0 .IP "\fBbt2020_12bit\fR" 4 .IX Item "bt2020_12bit" .PD \&\s-1BT.2020\s0 \- 12 bit .IP "\fBsmpte2084\fR" 4 .IX Item "smpte2084" \&\s-1SMPTE ST 2084\s0 .IP "\fBsmpte428\fR" 4 .IX Item "smpte428" .PD 0 .IP "\fBsmpte428_1\fR" 4 .IX Item "smpte428_1" .PD \&\s-1SMPTE ST 428\-1\s0 .IP "\fBarib\-std\-b67\fR" 4 .IX Item "arib-std-b67" \&\s-1ARIB STD\-B67\s0 .RE .RS 4 .RE .IP "\fBcolorspace\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "colorspace integer (decoding/encoding,video)" Possible values: .RS 4 .IP "\fBrgb\fR" 4 .IX Item "rgb" \&\s-1RGB\s0 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBfcc\fR" 4 .IX Item "fcc" \&\s-1FCC\s0 .IP "\fBbt470bg\fR" 4 .IX Item "bt470bg" \&\s-1BT.470 BG\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBycocg\fR" 4 .IX Item "ycocg" \&\s-1YCOCG\s0 .IP "\fBbt2020nc\fR" 4 .IX Item "bt2020nc" .PD 0 .IP "\fBbt2020_ncl\fR" 4 .IX Item "bt2020_ncl" .PD \&\s-1BT.2020 NCL\s0 .IP "\fBbt2020c\fR" 4 .IX Item "bt2020c" .PD 0 .IP "\fBbt2020_cl\fR" 4 .IX Item "bt2020_cl" .PD \&\s-1BT.2020 CL\s0 .IP "\fBsmpte2085\fR" 4 .IX Item "smpte2085" \&\s-1SMPTE 2085\s0 .RE .RS 4 .RE .IP "\fBcolor_range\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "color_range integer (decoding/encoding,video)" If used as input parameter, it serves as a hint to the decoder, which color_range the input has. Possible values: .RS 4 .IP "\fBtv\fR" 4 .IX Item "tv" .PD 0 .IP "\fBmpeg\fR" 4 .IX Item "mpeg" .PD \&\s-1MPEG\s0 (219*2^(n\-8)) .IP "\fBpc\fR" 4 .IX Item "pc" .PD 0 .IP "\fBjpeg\fR" 4 .IX Item "jpeg" .PD \&\s-1JPEG\s0 (2^n\-1) .RE .RS 4 .RE .IP "\fBchroma_sample_location\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "chroma_sample_location integer (decoding/encoding,video)" Possible values: .RS 4 .IP "\fBleft\fR" 4 .IX Item "left" .PD 0 .IP "\fBcenter\fR" 4 .IX Item "center" .IP "\fBtopleft\fR" 4 .IX Item "topleft" .IP "\fBtop\fR" 4 .IX Item "top" .IP "\fBbottomleft\fR" 4 .IX Item "bottomleft" .IP "\fBbottom\fR" 4 .IX Item "bottom" .RE .RS 4 .RE .IP "\fBlog_level_offset\fR \fIinteger\fR" 4 .IX Item "log_level_offset integer" .PD Set the log level offset. .IP "\fBslices\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "slices integer (encoding,video)" Number of slices, used in parallelized encoding. .IP "\fBthread_type\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "thread_type flags (decoding/encoding,video)" Select which multithreading methods to use. .Sp Use of \fBframe\fR will increase decoding delay by one frame per thread, so clients which cannot provide future frames should not use it. .Sp Possible values: .RS 4 .IP "\fBslice\fR" 4 .IX Item "slice" Decode more than one part of a single frame at once. .Sp Multithreading using slices works only when the video was encoded with slices. .IP "\fBframe\fR" 4 .IX Item "frame" Decode more than one frame at once. .RE .RS 4 .Sp Default value is \fBslice+frame\fR. .RE .IP "\fBaudio_service_type\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4 .IX Item "audio_service_type integer (encoding,audio)" Set audio service type. .Sp Possible values: .RS 4 .IP "\fBma\fR" 4 .IX Item "ma" Main Audio Service .IP "\fBef\fR" 4 .IX Item "ef" Effects .IP "\fBvi\fR" 4 .IX Item "vi" Visually Impaired .IP "\fBhi\fR" 4 .IX Item "hi" Hearing Impaired .IP "\fBdi\fR" 4 .IX Item "di" Dialogue .IP "\fBco\fR" 4 .IX Item "co" Commentary .IP "\fBem\fR" 4 .IX Item "em" Emergency .IP "\fBvo\fR" 4 .IX Item "vo" Voice Over .IP "\fBka\fR" 4 .IX Item "ka" Karaoke .RE .RS 4 .RE .IP "\fBrequest_sample_fmt\fR \fIsample_fmt\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4 .IX Item "request_sample_fmt sample_fmt (decoding,audio)" Set sample format audio decoders should prefer. Default value is \&\f(CW\*(C`none\*(C'\fR. .IP "\fBpkt_timebase\fR \fIrational number\fR" 4 .IX Item "pkt_timebase rational number" .PD 0 .IP "\fBsub_charenc\fR \fIencoding\fR \fB(\fR\fIdecoding,subtitles\fR\fB)\fR" 4 .IX Item "sub_charenc encoding (decoding,subtitles)" .PD Set the input subtitles character encoding. .IP "\fBfield_order\fR \fIfield_order\fR \fB(\fR\fIvideo\fR\fB)\fR" 4 .IX Item "field_order field_order (video)" Set/override the field order of the video. Possible values: .RS 4 .IP "\fBprogressive\fR" 4 .IX Item "progressive" Progressive video .IP "\fBtt\fR" 4 .IX Item "tt" Interlaced video, top field coded and displayed first .IP "\fBbb\fR" 4 .IX Item "bb" Interlaced video, bottom field coded and displayed first .IP "\fBtb\fR" 4 .IX Item "tb" Interlaced video, top coded first, bottom displayed first .IP "\fBbt\fR" 4 .IX Item "bt" Interlaced video, bottom coded first, top displayed first .RE .RS 4 .RE .IP "\fBskip_alpha\fR \fIbool\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "skip_alpha bool (decoding,video)" Set to 1 to disable processing alpha (transparency). This works like the \&\fBgray\fR flag in the \fBflags\fR option which skips chroma information instead of alpha. Default is 0. .IP "\fBcodec_whitelist\fR \fIlist\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "codec_whitelist list (input)" \&\*(L",\*(R" separated list of allowed decoders. By default all are allowed. .IP "\fBdump_separator\fR \fIstring\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "dump_separator string (input)" Separator used to separate the fields printed on the command line about the Stream parameters. For example to separate the fields with newlines and indention: .Sp .Vb 2 \& ffprobe \-dump_separator " \& " \-i ~/videos/matrixbench_mpeg2.mpg .Ve .IP "\fBmax_pixels\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4 .IX Item "max_pixels integer (decoding/encoding,video)" Maximum number of pixels per image. This value can be used to avoid out of memory failures due to large images. .IP "\fBapply_cropping\fR \fIbool\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4 .IX Item "apply_cropping bool (decoding,video)" Enable cropping if cropping parameters are multiples of the required alignment for the left and top parameters. If the alignment is not met the cropping will be partially applied to maintain alignment. Default is 1 (enabled). Note: The required alignment depends on if \f(CW\*(C`AV_CODEC_FLAG_UNALIGNED\*(C'\fR is set and the \&\s-1CPU.\s0 \f(CW\*(C`AV_CODEC_FLAG_UNALIGNED\*(C'\fR cannot be changed from the command line. Also hardware decoders will not apply left/top Cropping. .SH "DECODERS" .IX Header "DECODERS" Decoders are configured elements in FFmpeg which allow the decoding of multimedia streams. .PP When you configure your FFmpeg build, all the supported native decoders are enabled by default. Decoders requiring an external library must be enabled manually via the corresponding \f(CW\*(C`\-\-enable\-lib\*(C'\fR option. You can list all available decoders using the configure option \f(CW\*(C`\-\-list\-decoders\*(C'\fR. .PP You can disable all the decoders with the configure option \&\f(CW\*(C`\-\-disable\-decoders\*(C'\fR and selectively enable / disable single decoders with the options \f(CW\*(C`\-\-enable\-decoder=\f(CIDECODER\f(CW\*(C'\fR / \&\f(CW\*(C`\-\-disable\-decoder=\f(CIDECODER\f(CW\*(C'\fR. .PP The option \f(CW\*(C`\-decoders\*(C'\fR of the ff* tools will display the list of enabled decoders. .SH "VIDEO DECODERS" .IX Header "VIDEO DECODERS" A description of some of the currently available video decoders follows. .SS "rawvideo" .IX Subsection "rawvideo" Raw video decoder. .PP This decoder decodes rawvideo streams. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBtop\fR \fItop_field_first\fR" 4 .IX Item "top top_field_first" Specify the assumed field type of the input video. .RS 4 .IP "\fB\-1\fR" 4 .IX Item "-1" the video is assumed to be progressive (default) .IP "\fB0\fR" 4 .IX Item "0" bottom-field-first is assumed .IP "\fB1\fR" 4 .IX Item "1" top-field-first is assumed .RE .RS 4 .RE .SS "libdavs2" .IX Subsection "libdavs2" \&\s-1AVS2\-P2/IEEE1857.4\s0 video decoder wrapper. .PP This decoder allows libavcodec to decode \s-1AVS2\s0 streams with davs2 library. .SH "AUDIO DECODERS" .IX Header "AUDIO DECODERS" A description of some of the currently available audio decoders follows. .SS "ac3" .IX Subsection "ac3" \&\s-1AC\-3\s0 audio decoder. .PP This decoder implements part of \s-1ATSC A/52:2010\s0 and \s-1ETSI TS 102 366,\s0 as well as the undocumented RealAudio 3 (a.k.a. dnet). .PP \fI\s-1AC\-3\s0 Decoder Options\fR .IX Subsection "AC-3 Decoder Options" .IP "\fB\-drc_scale\fR \fIvalue\fR" 4 .IX Item "-drc_scale value" Dynamic Range Scale Factor. The factor to apply to dynamic range values from the \s-1AC\-3\s0 stream. This factor is applied exponentially. There are 3 notable scale factor ranges: .RS 4 .IP "\fBdrc_scale == 0\fR" 4 .IX Item "drc_scale == 0" \&\s-1DRC\s0 disabled. Produces full range audio. .IP "\fB0 < drc_scale <= 1\fR" 4 .IX Item "0 < drc_scale <= 1" \&\s-1DRC\s0 enabled. Applies a fraction of the stream \s-1DRC\s0 value. Audio reproduction is between full range and full compression. .IP "\fBdrc_scale > 1\fR" 4 .IX Item "drc_scale > 1" \&\s-1DRC\s0 enabled. Applies drc_scale asymmetrically. Loud sounds are fully compressed. Soft sounds are enhanced. .RE .RS 4 .RE .SS "flac" .IX Subsection "flac" \&\s-1FLAC\s0 audio decoder. .PP This decoder aims to implement the complete \s-1FLAC\s0 specification from Xiph. .PP \fI\s-1FLAC\s0 Decoder options\fR .IX Subsection "FLAC Decoder options" .IP "\fB\-use_buggy_lpc\fR" 4 .IX Item "-use_buggy_lpc" The lavc \s-1FLAC\s0 encoder used to produce buggy streams with high lpc values (like the default value). This option makes it possible to decode such streams correctly by using lavc's old buggy lpc logic for decoding. .SS "ffwavesynth" .IX Subsection "ffwavesynth" Internal wave synthesizer. .PP This decoder generates wave patterns according to predefined sequences. Its use is purely internal and the format of the data it accepts is not publicly documented. .SS "libcelt" .IX Subsection "libcelt" libcelt decoder wrapper. .PP libcelt allows libavcodec to decode the Xiph \s-1CELT\s0 ultra-low delay audio codec. Requires the presence of the libcelt headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libcelt\*(C'\fR. .SS "libgsm" .IX Subsection "libgsm" libgsm decoder wrapper. .PP libgsm allows libavcodec to decode the \s-1GSM\s0 full rate audio codec. Requires the presence of the libgsm headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libgsm\*(C'\fR. .PP This decoder supports both the ordinary \s-1GSM\s0 and the Microsoft variant. .SS "libilbc" .IX Subsection "libilbc" libilbc decoder wrapper. .PP libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC) audio codec. Requires the presence of the libilbc headers and library during configuration. You need to explicitly configure the build with \&\f(CW\*(C`\-\-enable\-libilbc\*(C'\fR. .PP \fIOptions\fR .IX Subsection "Options" .PP The following option is supported by the libilbc wrapper. .IP "\fBenhance\fR" 4 .IX Item "enhance" Enable the enhancement of the decoded audio when set to 1. The default value is 0 (disabled). .SS "libopencore-amrnb" .IX Subsection "libopencore-amrnb" libopencore-amrnb decoder wrapper. .PP libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate Narrowband audio codec. Using it requires the presence of the libopencore-amrnb headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libopencore\-amrnb\*(C'\fR. .PP An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB without this library. .SS "libopencore-amrwb" .IX Subsection "libopencore-amrwb" libopencore-amrwb decoder wrapper. .PP libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate Wideband audio codec. Using it requires the presence of the libopencore-amrwb headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libopencore\-amrwb\*(C'\fR. .PP An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB without this library. .SS "libopus" .IX Subsection "libopus" libopus decoder wrapper. .PP libopus allows libavcodec to decode the Opus Interactive Audio Codec. Requires the presence of the libopus headers and library during configuration. You need to explicitly configure the build with \&\f(CW\*(C`\-\-enable\-libopus\*(C'\fR. .PP An FFmpeg native decoder for Opus exists, so users can decode Opus without this library. .SH "SUBTITLES DECODERS" .IX Header "SUBTITLES DECODERS" .SS "dvbsub" .IX Subsection "dvbsub" \fIOptions\fR .IX Subsection "Options" .IP "\fBcompute_clut\fR" 4 .IX Item "compute_clut" .RS 4 .PD 0 .IP "\fB\-1\fR" 4 .IX Item "-1" .PD Compute clut if no matching \s-1CLUT\s0 is in the stream. .IP "\fB0\fR" 4 .IX Item "0" Never compute \s-1CLUT\s0 .IP "\fB1\fR" 4 .IX Item "1" Always compute \s-1CLUT\s0 and override the one provided in the stream. .RE .RS 4 .RE .IP "\fBdvb_substream\fR" 4 .IX Item "dvb_substream" Selects the dvb substream, or all substreams if \-1 which is default. .SS "dvdsub" .IX Subsection "dvdsub" This codec decodes the bitmap subtitles used in DVDs; the same subtitles can also be found in VobSub file pairs and in some Matroska files. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBpalette\fR" 4 .IX Item "palette" Specify the global palette used by the bitmaps. When stored in VobSub, the palette is normally specified in the index file; in Matroska, the palette is stored in the codec extra-data in the same format as in VobSub. In DVDs, the palette is stored in the \s-1IFO\s0 file, and therefore not available when reading from dumped \s-1VOB\s0 files. .Sp The format for this option is a string containing 16 24\-bits hexadecimal numbers (without 0x prefix) separated by comas, for example \f(CW\*(C`0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b\*(C'\fR. .IP "\fBifo_palette\fR" 4 .IX Item "ifo_palette" Specify the \s-1IFO\s0 file from which the global palette is obtained. (experimental) .IP "\fBforced_subs_only\fR" 4 .IX Item "forced_subs_only" Only decode subtitle entries marked as forced. Some titles have forced and non-forced subtitles in the same track. Setting this flag to \f(CW1\fR will only keep the forced subtitles. Default value is \f(CW0\fR. .SS "libzvbi-teletext" .IX Subsection "libzvbi-teletext" Libzvbi allows libavcodec to decode \s-1DVB\s0 teletext pages and \s-1DVB\s0 teletext subtitles. Requires the presence of the libzvbi headers and library during configuration. You need to explicitly configure the build with \&\f(CW\*(C`\-\-enable\-libzvbi\*(C'\fR. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBtxt_page\fR" 4 .IX Item "txt_page" List of teletext page numbers to decode. Pages that do not match the specified list are dropped. You may use the special \f(CW\*(C`*\*(C'\fR string to match all pages, or \f(CW\*(C`subtitle\*(C'\fR to match all subtitle pages. Default value is *. .IP "\fBtxt_chop_top\fR" 4 .IX Item "txt_chop_top" Discards the top teletext line. Default value is 1. .IP "\fBtxt_format\fR" 4 .IX Item "txt_format" Specifies the format of the decoded subtitles. .RS 4 .IP "\fBbitmap\fR" 4 .IX Item "bitmap" The default format, you should use this for teletext pages, because certain graphics and colors cannot be expressed in simple text or even \s-1ASS.\s0 .IP "\fBtext\fR" 4 .IX Item "text" Simple text based output without formatting. .IP "\fBass\fR" 4 .IX Item "ass" Formatted \s-1ASS\s0 output, subtitle pages and teletext pages are returned in different styles, subtitle pages are stripped down to text, but an effort is made to keep the text alignment and the formatting. .RE .RS 4 .RE .IP "\fBtxt_left\fR" 4 .IX Item "txt_left" X offset of generated bitmaps, default is 0. .IP "\fBtxt_top\fR" 4 .IX Item "txt_top" Y offset of generated bitmaps, default is 0. .IP "\fBtxt_chop_spaces\fR" 4 .IX Item "txt_chop_spaces" Chops leading and trailing spaces and removes empty lines from the generated text. This option is useful for teletext based subtitles where empty spaces may be present at the start or at the end of the lines or empty lines may be present between the subtitle lines because of double-sized teletext characters. Default value is 1. .IP "\fBtxt_duration\fR" 4 .IX Item "txt_duration" Sets the display duration of the decoded teletext pages or subtitles in milliseconds. Default value is \-1 which means infinity or until the next subtitle event comes. .IP "\fBtxt_transparent\fR" 4 .IX Item "txt_transparent" Force transparent background of the generated teletext bitmaps. Default value is 0 which means an opaque background. .IP "\fBtxt_opacity\fR" 4 .IX Item "txt_opacity" Sets the opacity (0\-255) of the teletext background. If \&\fBtxt_transparent\fR is not set, it only affects characters between a start box and an end box, typically subtitles. Default value is 0 if \&\fBtxt_transparent\fR is set, 255 otherwise. .SH "BITSTREAM FILTERS" .IX Header "BITSTREAM FILTERS" When you configure your FFmpeg build, all the supported bitstream filters are enabled by default. You can list all available ones using the configure option \f(CW\*(C`\-\-list\-bsfs\*(C'\fR. .PP You can disable all the bitstream filters using the configure option \&\f(CW\*(C`\-\-disable\-bsfs\*(C'\fR, and selectively enable any bitstream filter using the option \f(CW\*(C`\-\-enable\-bsf=BSF\*(C'\fR, or you can disable a particular bitstream filter using the option \f(CW\*(C`\-\-disable\-bsf=BSF\*(C'\fR. .PP The option \f(CW\*(C`\-bsfs\*(C'\fR of the ff* tools will display the list of all the supported bitstream filters included in your build. .PP The ff* tools have a \-bsf option applied per stream, taking a comma-separated list of filters, whose parameters follow the filter name after a '='. .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT .Ve .PP Below is a description of the currently available bitstream filters, with their parameters, if any. .SS "aac_adtstoasc" .IX Subsection "aac_adtstoasc" Convert \s-1MPEG\-2/4 AAC ADTS\s0 to an \s-1MPEG\-4\s0 Audio Specific Configuration bitstream. .PP This filter creates an \s-1MPEG\-4\s0 AudioSpecificConfig from an \s-1MPEG\-2/4 ADTS\s0 header and removes the \s-1ADTS\s0 header. .PP This filter is required for example when copying an \s-1AAC\s0 stream from a raw \s-1ADTS AAC\s0 or an MPEG-TS container to \s-1MP4A\-LATM,\s0 to an \s-1FLV\s0 file, or to \s-1MOV/MP4\s0 files and related formats such as 3GP or M4A. Please note that it is auto-inserted for \s-1MP4A\-LATM\s0 and \s-1MOV/MP4\s0 and related formats. .SS "av1_metadata" .IX Subsection "av1_metadata" Modify metadata embedded in an \s-1AV1\s0 stream. .IP "\fBtd\fR" 4 .IX Item "td" Insert or remove temporal delimiter OBUs in all temporal units of the stream. .RS 4 .IP "\fBinsert\fR" 4 .IX Item "insert" Insert a \s-1TD\s0 at the beginning of every \s-1TU\s0 which does not already have one. .IP "\fBremove\fR" 4 .IX Item "remove" Remove the \s-1TD\s0 from the beginning of every \s-1TU\s0 which has one. .RE .RS 4 .RE .IP "\fBcolor_primaries\fR" 4 .IX Item "color_primaries" .PD 0 .IP "\fBtransfer_characteristics\fR" 4 .IX Item "transfer_characteristics" .IP "\fBmatrix_coefficients\fR" 4 .IX Item "matrix_coefficients" .PD Set the color description fields in the stream (see \s-1AV1\s0 section 6.4.2). .IP "\fBcolor_range\fR" 4 .IX Item "color_range" Set the color range in the stream (see \s-1AV1\s0 section 6.4.2; note that this cannot be set for streams using \s-1BT.709\s0 primaries, sRGB transfer characteristic and identity (\s-1RGB\s0) matrix coefficients). .RS 4 .IP "\fBtv\fR" 4 .IX Item "tv" Limited range. .IP "\fBpc\fR" 4 .IX Item "pc" Full range. .RE .RS 4 .RE .IP "\fBchroma_sample_position\fR" 4 .IX Item "chroma_sample_position" Set the chroma sample location in the stream (see \s-1AV1\s0 section 6.4.2). This can only be set for 4:2:0 streams. .RS 4 .IP "\fBvertical\fR" 4 .IX Item "vertical" Left position (matching the default in \s-1MPEG\-2\s0 and H.264). .IP "\fBcolocated\fR" 4 .IX Item "colocated" Top-left position. .RE .RS 4 .RE .IP "\fBtick_rate\fR" 4 .IX Item "tick_rate" Set the tick rate (\fInum_units_in_display_tick / time_scale\fR) in the timing info in the sequence header. .IP "\fBnum_ticks_per_picture\fR" 4 .IX Item "num_ticks_per_picture" Set the number of ticks in each picture, to indicate that the stream has a fixed framerate. Ignored if \fBtick_rate\fR is not also set. .SS "chomp" .IX Subsection "chomp" Remove zero padding at the end of a packet. .SS "dca_core" .IX Subsection "dca_core" Extract the core from a \s-1DCA/DTS\s0 stream, dropping extensions such as DTS-HD. .SS "dump_extra" .IX Subsection "dump_extra" Add extradata to the beginning of the filtered packets. .IP "\fBfreq\fR" 4 .IX Item "freq" The additional argument specifies which packets should be filtered. It accepts the values: .RS 4 .IP "\fBk\fR" 4 .IX Item "k" .PD 0 .IP "\fBkeyframe\fR" 4 .IX Item "keyframe" .PD add extradata to all key packets .IP "\fBe\fR" 4 .IX Item "e" .PD 0 .IP "\fBall\fR" 4 .IX Item "all" .PD add extradata to all packets .RE .RS 4 .RE .PP If not specified it is assumed \fBe\fR. .PP For example the following \fBffmpeg\fR command forces a global header (thus disabling individual packet headers) in the H.264 packets generated by the \f(CW\*(C`libx264\*(C'\fR encoder, but corrects them by adding the header stored in extradata to the key packets: .PP .Vb 1 \& ffmpeg \-i INPUT \-map 0 \-flags:v +global_header \-c:v libx264 \-bsf:v dump_extra out.ts .Ve .SS "eac3_core" .IX Subsection "eac3_core" Extract the core from a E\-AC\-3 stream, dropping extra channels. .SS "extract_extradata" .IX Subsection "extract_extradata" Extract the in-band extradata. .PP Certain codecs allow the long-term headers (e.g. \s-1MPEG\-2\s0 sequence headers, or H.264/HEVC (\s-1VPS/\s0)SPS/PPS) to be transmitted either \*(L"in-band\*(R" (i.e. as a part of the bitstream containing the coded frames) or \*(L"out of band\*(R" (e.g. on the container level). This latter form is called \*(L"extradata\*(R" in FFmpeg terminology. .PP This bitstream filter detects the in-band headers and makes them available as extradata. .IP "\fBremove\fR" 4 .IX Item "remove" When this option is enabled, the long-term headers are removed from the bitstream after extraction. .SS "filter_units" .IX Subsection "filter_units" Remove units with types in or not in a given set from the stream. .IP "\fBpass_types\fR" 4 .IX Item "pass_types" List of unit types or ranges of unit types to pass through while removing all others. This is specified as a '|'\-separated list of unit type values or ranges of values with '\-'. .IP "\fBremove_types\fR" 4 .IX Item "remove_types" Identical to \fBpass_types\fR, except the units in the given set removed and all others passed through. .PP Extradata is unchanged by this transformation, but note that if the stream contains inline parameter sets then the output may be unusable if they are removed. .PP For example, to remove all non-VCL \s-1NAL\s0 units from an H.264 stream: .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=pass_types=1\-5\*(Aq OUTPUT .Ve .PP To remove all AUDs, \s-1SEI\s0 and filler from an H.265 stream: .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=remove_types=35|38\-40\*(Aq OUTPUT .Ve .SS "hapqa_extract" .IX Subsection "hapqa_extract" Extract Rgb or Alpha part of an \s-1HAPQA\s0 file, without recompression, in order to create an \s-1HAPQ\s0 or an HAPAlphaOnly file. .IP "\fBtexture\fR" 4 .IX Item "texture" Specifies the texture to keep. .RS 4 .IP "\fBcolor\fR" 4 .IX Item "color" .PD 0 .IP "\fBalpha\fR" 4 .IX Item "alpha" .RE .RS 4 .RE .PD .PP Convert \s-1HAPQA\s0 to \s-1HAPQ\s0 .PP .Vb 1 \& ffmpeg \-i hapqa_inputfile.mov \-c copy \-bsf:v hapqa_extract=texture=color \-tag:v HapY \-metadata:s:v:0 encoder="HAPQ" hapq_file.mov .Ve .PP Convert \s-1HAPQA\s0 to HAPAlphaOnly .PP .Vb 1 \& ffmpeg \-i hapqa_inputfile.mov \-c copy \-bsf:v hapqa_extract=texture=alpha \-tag:v HapA \-metadata:s:v:0 encoder="HAPAlpha Only" hapalphaonly_file.mov .Ve .SS "h264_metadata" .IX Subsection "h264_metadata" Modify metadata embedded in an H.264 stream. .IP "\fBaud\fR" 4 .IX Item "aud" Insert or remove \s-1AUD NAL\s0 units in all access units of the stream. .RS 4 .IP "\fBinsert\fR" 4 .IX Item "insert" .PD 0 .IP "\fBremove\fR" 4 .IX Item "remove" .RE .RS 4 .RE .IP "\fBsample_aspect_ratio\fR" 4 .IX Item "sample_aspect_ratio" .PD Set the sample aspect ratio of the stream in the \s-1VUI\s0 parameters. .IP "\fBvideo_format\fR" 4 .IX Item "video_format" .PD 0 .IP "\fBvideo_full_range_flag\fR" 4 .IX Item "video_full_range_flag" .PD Set the video format in the stream (see H.264 section E.2.1 and table E\-2). .IP "\fBcolour_primaries\fR" 4 .IX Item "colour_primaries" .PD 0 .IP "\fBtransfer_characteristics\fR" 4 .IX Item "transfer_characteristics" .IP "\fBmatrix_coefficients\fR" 4 .IX Item "matrix_coefficients" .PD Set the colour description in the stream (see H.264 section E.2.1 and tables E\-3, E\-4 and E\-5). .IP "\fBchroma_sample_loc_type\fR" 4 .IX Item "chroma_sample_loc_type" Set the chroma sample location in the stream (see H.264 section E.2.1 and figure E\-1). .IP "\fBtick_rate\fR" 4 .IX Item "tick_rate" Set the tick rate (num_units_in_tick / time_scale) in the \s-1VUI\s0 parameters. This is the smallest time unit representable in the stream, and in many cases represents the field rate of the stream (double the frame rate). .IP "\fBfixed_frame_rate_flag\fR" 4 .IX Item "fixed_frame_rate_flag" Set whether the stream has fixed framerate \- typically this indicates that the framerate is exactly half the tick rate, but the exact meaning is dependent on interlacing and the picture structure (see H.264 section E.2.1 and table E\-6). .IP "\fBcrop_left\fR" 4 .IX Item "crop_left" .PD 0 .IP "\fBcrop_right\fR" 4 .IX Item "crop_right" .IP "\fBcrop_top\fR" 4 .IX Item "crop_top" .IP "\fBcrop_bottom\fR" 4 .IX Item "crop_bottom" .PD Set the frame cropping offsets in the \s-1SPS.\s0 These values will replace the current ones if the stream is already cropped. .Sp These fields are set in pixels. Note that some sizes may not be representable if the chroma is subsampled or the stream is interlaced (see H.264 section 7.4.2.1.1). .IP "\fBsei_user_data\fR" 4 .IX Item "sei_user_data" Insert a string as \s-1SEI\s0 unregistered user data. The argument must be of the form \fIUUID+string\fR, where the \s-1UUID\s0 is as hex digits possibly separated by hyphens, and the string can be anything. .Sp For example, \fB086f3693\-b7b3\-4f2c\-9653\-21492feee5b8+hello\fR will insert the string ``hello'' associated with the given \s-1UUID.\s0 .IP "\fBdelete_filler\fR" 4 .IX Item "delete_filler" Deletes both filler \s-1NAL\s0 units and filler \s-1SEI\s0 messages. .IP "\fBlevel\fR" 4 .IX Item "level" Set the level in the \s-1SPS.\s0 Refer to H.264 section A.3 and tables A\-1 to A\-5. .Sp The argument must be the name of a level (for example, \fB4.2\fR), a level_idc value (for example, \fB42\fR), or the special name \fBauto\fR indicating that the filter should attempt to guess the level from the input stream properties. .SS "h264_mp4toannexb" .IX Subsection "h264_mp4toannexb" Convert an H.264 bitstream from length prefixed mode to start code prefixed mode (as defined in the Annex B of the ITU-T H.264 specification). .PP This is required by some streaming formats, typically the \s-1MPEG\-2\s0 transport stream format (muxer \f(CW\*(C`mpegts\*(C'\fR). .PP For example to remux an \s-1MP4\s0 file containing an H.264 stream to mpegts format with \fBffmpeg\fR, you can use the command: .PP .Vb 1 \& ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v h264_mp4toannexb OUTPUT.ts .Ve .PP Please note that this filter is auto-inserted for MPEG-TS (muxer \&\f(CW\*(C`mpegts\*(C'\fR) and raw H.264 (muxer \f(CW\*(C`h264\*(C'\fR) output formats. .SS "h264_redundant_pps" .IX Subsection "h264_redundant_pps" This applies a specific fixup to some Blu-ray streams which contain redundant PPSs modifying irrelevant parameters of the stream which confuse other transformations which require correct extradata. .PP A new single global \s-1PPS\s0 is created, and all of the redundant PPSs within the stream are removed. .SS "hevc_metadata" .IX Subsection "hevc_metadata" Modify metadata embedded in an \s-1HEVC\s0 stream. .IP "\fBaud\fR" 4 .IX Item "aud" Insert or remove \s-1AUD NAL\s0 units in all access units of the stream. .RS 4 .IP "\fBinsert\fR" 4 .IX Item "insert" .PD 0 .IP "\fBremove\fR" 4 .IX Item "remove" .RE .RS 4 .RE .IP "\fBsample_aspect_ratio\fR" 4 .IX Item "sample_aspect_ratio" .PD Set the sample aspect ratio in the stream in the \s-1VUI\s0 parameters. .IP "\fBvideo_format\fR" 4 .IX Item "video_format" .PD 0 .IP "\fBvideo_full_range_flag\fR" 4 .IX Item "video_full_range_flag" .PD Set the video format in the stream (see H.265 section E.3.1 and table E.2). .IP "\fBcolour_primaries\fR" 4 .IX Item "colour_primaries" .PD 0 .IP "\fBtransfer_characteristics\fR" 4 .IX Item "transfer_characteristics" .IP "\fBmatrix_coefficients\fR" 4 .IX Item "matrix_coefficients" .PD Set the colour description in the stream (see H.265 section E.3.1 and tables E.3, E.4 and E.5). .IP "\fBchroma_sample_loc_type\fR" 4 .IX Item "chroma_sample_loc_type" Set the chroma sample location in the stream (see H.265 section E.3.1 and figure E.1). .IP "\fBtick_rate\fR" 4 .IX Item "tick_rate" Set the tick rate in the \s-1VPS\s0 and \s-1VUI\s0 parameters (num_units_in_tick / time_scale). Combined with \fBnum_ticks_poc_diff_one\fR, this can set a constant framerate in the stream. Note that it is likely to be overridden by container parameters when the stream is in a container. .IP "\fBnum_ticks_poc_diff_one\fR" 4 .IX Item "num_ticks_poc_diff_one" Set poc_proportional_to_timing_flag in \s-1VPS\s0 and \s-1VUI\s0 and use this value to set num_ticks_poc_diff_one_minus1 (see H.265 sections 7.4.3.1 and E.3.1). Ignored if \fBtick_rate\fR is not also set. .IP "\fBcrop_left\fR" 4 .IX Item "crop_left" .PD 0 .IP "\fBcrop_right\fR" 4 .IX Item "crop_right" .IP "\fBcrop_top\fR" 4 .IX Item "crop_top" .IP "\fBcrop_bottom\fR" 4 .IX Item "crop_bottom" .PD Set the conformance window cropping offsets in the \s-1SPS.\s0 These values will replace the current ones if the stream is already cropped. .Sp These fields are set in pixels. Note that some sizes may not be representable if the chroma is subsampled (H.265 section 7.4.3.2.1). .SS "hevc_mp4toannexb" .IX Subsection "hevc_mp4toannexb" Convert an \s-1HEVC/H.265\s0 bitstream from length prefixed mode to start code prefixed mode (as defined in the Annex B of the ITU-T H.265 specification). .PP This is required by some streaming formats, typically the \s-1MPEG\-2\s0 transport stream format (muxer \f(CW\*(C`mpegts\*(C'\fR). .PP For example to remux an \s-1MP4\s0 file containing an \s-1HEVC\s0 stream to mpegts format with \fBffmpeg\fR, you can use the command: .PP .Vb 1 \& ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v hevc_mp4toannexb OUTPUT.ts .Ve .PP Please note that this filter is auto-inserted for MPEG-TS (muxer \&\f(CW\*(C`mpegts\*(C'\fR) and raw \s-1HEVC/H.265\s0 (muxer \f(CW\*(C`h265\*(C'\fR or \&\f(CW\*(C`hevc\*(C'\fR) output formats. .SS "imxdump" .IX Subsection "imxdump" Modifies the bitstream to fit in \s-1MOV\s0 and to be usable by the Final Cut Pro decoder. This filter only applies to the mpeg2video codec, and is likely not needed for Final Cut Pro 7 and newer with the appropriate \&\fB\-tag:v\fR. .PP For example, to remux 30 MB/sec \s-1NTSC IMX\s0 to \s-1MOV:\s0 .PP .Vb 1 \& ffmpeg \-i input.mxf \-c copy \-bsf:v imxdump \-tag:v mx3n output.mov .Ve .SS "mjpeg2jpeg" .IX Subsection "mjpeg2jpeg" Convert \s-1MJPEG/AVI1\s0 packets to full \s-1JPEG/JFIF\s0 packets. .PP \&\s-1MJPEG\s0 is a video codec wherein each video frame is essentially a \&\s-1JPEG\s0 image. The individual frames can be extracted without loss, e.g. by .PP .Vb 1 \& ffmpeg \-i ../some_mjpeg.avi \-c:v copy frames_%d.jpg .Ve .PP Unfortunately, these chunks are incomplete \s-1JPEG\s0 images, because they lack the \s-1DHT\s0 segment required for decoding. Quoting from <\fBhttp://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml\fR>: .PP Avery Lee, writing in the rec.video.desktop newsgroup in 2001, commented that \*(L"\s-1MJPEG,\s0 or at least the \s-1MJPEG\s0 in AVIs having the \&\s-1MJPG\s0 fourcc, is restricted \s-1JPEG\s0 with a fixed \*(-- and *omitted* \*(-- Huffman table. The \s-1JPEG\s0 must be YCbCr colorspace, it must be 4:2:2, and it must use basic Huffman encoding, not arithmetic or progressive. . . . You can indeed extract the \s-1MJPEG\s0 frames and decode them with a regular \s-1JPEG\s0 decoder, but you have to prepend the \s-1DHT\s0 segment to them, or else the decoder won't have any idea how to decompress the data. The exact table necessary is given in the OpenDML spec.\*(R" .PP This bitstream filter patches the header of frames extracted from an \s-1MJPEG\s0 stream (carrying the \s-1AVI1\s0 header \s-1ID\s0 and lacking a \s-1DHT\s0 segment) to produce fully qualified \s-1JPEG\s0 images. .PP .Vb 3 \& ffmpeg \-i mjpeg\-movie.avi \-c:v copy \-bsf:v mjpeg2jpeg frame_%d.jpg \& exiftran \-i \-9 frame*.jpg \& ffmpeg \-i frame_%d.jpg \-c:v copy rotated.avi .Ve .SS "mjpegadump" .IX Subsection "mjpegadump" Add an \s-1MJPEG A\s0 header to the bitstream, to enable decoding by Quicktime. .SS "mov2textsub" .IX Subsection "mov2textsub" Extract a representable text file from \s-1MOV\s0 subtitles, stripping the metadata header from each subtitle packet. .PP See also the \fBtext2movsub\fR filter. .SS "mp3decomp" .IX Subsection "mp3decomp" Decompress non-standard compressed \s-1MP3\s0 audio headers. .SS "mpeg2_metadata" .IX Subsection "mpeg2_metadata" Modify metadata embedded in an \s-1MPEG\-2\s0 stream. .IP "\fBdisplay_aspect_ratio\fR" 4 .IX Item "display_aspect_ratio" Set the display aspect ratio in the stream. .Sp The following fixed values are supported: .RS 4 .IP "\fB4/3\fR" 4 .IX Item "4/3" .PD 0 .IP "\fB16/9\fR" 4 .IX Item "16/9" .IP "\fB221/100\fR" 4 .IX Item "221/100" .RE .RS 4 .PD .Sp Any other value will result in square pixels being signalled instead (see H.262 section 6.3.3 and table 6\-3). .RE .IP "\fBframe_rate\fR" 4 .IX Item "frame_rate" Set the frame rate in the stream. This is constructed from a table of known values combined with a small multiplier and divisor \- if the supplied value is not exactly representable, the nearest representable value will be used instead (see H.262 section 6.3.3 and table 6\-4). .IP "\fBvideo_format\fR" 4 .IX Item "video_format" Set the video format in the stream (see H.262 section 6.3.6 and table 6\-6). .IP "\fBcolour_primaries\fR" 4 .IX Item "colour_primaries" .PD 0 .IP "\fBtransfer_characteristics\fR" 4 .IX Item "transfer_characteristics" .IP "\fBmatrix_coefficients\fR" 4 .IX Item "matrix_coefficients" .PD Set the colour description in the stream (see H.262 section 6.3.6 and tables 6\-7, 6\-8 and 6\-9). .SS "mpeg4_unpack_bframes" .IX Subsection "mpeg4_unpack_bframes" Unpack DivX-style packed B\-frames. .PP DivX-style packed B\-frames are not valid \s-1MPEG\-4\s0 and were only a workaround for the broken Video for Windows subsystem. They use more space, can cause minor \s-1AV\s0 sync issues, require more \&\s-1CPU\s0 power to decode (unless the player has some decoded picture queue to compensate the 2,0,2,0 frame per packet style) and cause trouble if copied into a standard container like mp4 or mpeg\-ps/ts, because \s-1MPEG\-4\s0 decoders may not be able to decode them, since they are not valid \s-1MPEG\-4.\s0 .PP For example to fix an \s-1AVI\s0 file containing an \s-1MPEG\-4\s0 stream with DivX-style packed B\-frames using \fBffmpeg\fR, you can use the command: .PP .Vb 1 \& ffmpeg \-i INPUT.avi \-codec copy \-bsf:v mpeg4_unpack_bframes OUTPUT.avi .Ve .SS "noise" .IX Subsection "noise" Damages the contents of packets or simply drops them without damaging the container. Can be used for fuzzing or testing error resilience/concealment. .PP Parameters: .IP "\fBamount\fR" 4 .IX Item "amount" A numeral string, whose value is related to how often output bytes will be modified. Therefore, values below or equal to 0 are forbidden, and the lower the more frequent bytes will be modified, with 1 meaning every byte is modified. .IP "\fBdropamount\fR" 4 .IX Item "dropamount" A numeral string, whose value is related to how often packets will be dropped. Therefore, values below or equal to 0 are forbidden, and the lower the more frequent packets will be dropped, with 1 meaning every packet is dropped. .PP The following example applies the modification to every byte but does not drop any packets. .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf noise[=1] output.mkv .Ve .SS "null" .IX Subsection "null" This bitstream filter passes the packets through unchanged. .SS "remove_extra" .IX Subsection "remove_extra" Remove extradata from packets. .PP It accepts the following parameter: .IP "\fBfreq\fR" 4 .IX Item "freq" Set which frame types to remove extradata from. .RS 4 .IP "\fBk\fR" 4 .IX Item "k" Remove extradata from non-keyframes only. .IP "\fBkeyframe\fR" 4 .IX Item "keyframe" Remove extradata from keyframes only. .IP "\fBe, all\fR" 4 .IX Item "e, all" Remove extradata from all frames. .RE .RS 4 .RE .SS "text2movsub" .IX Subsection "text2movsub" Convert text subtitles to \s-1MOV\s0 subtitles (as used by the \f(CW\*(C`mov_text\*(C'\fR codec) with metadata headers. .PP See also the \fBmov2textsub\fR filter. .SS "trace_headers" .IX Subsection "trace_headers" Log trace output containing all syntax elements in the coded stream headers (everything above the level of individual coded blocks). This can be useful for debugging low-level stream issues. .PP Supports H.264, H.265, \s-1MPEG\-2\s0 and \s-1VP9.\s0 .SS "vp9_metadata" .IX Subsection "vp9_metadata" Modify metadata embedded in a \s-1VP9\s0 stream. .IP "\fBcolor_space\fR" 4 .IX Item "color_space" Set the color space value in the frame header. .RS 4 .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBbt601\fR" 4 .IX Item "bt601" .IP "\fBbt709\fR" 4 .IX Item "bt709" .IP "\fBsmpte170\fR" 4 .IX Item "smpte170" .IP "\fBsmpte240\fR" 4 .IX Item "smpte240" .IP "\fBbt2020\fR" 4 .IX Item "bt2020" .IP "\fBrgb\fR" 4 .IX Item "rgb" .RE .RS 4 .RE .IP "\fBcolor_range\fR" 4 .IX Item "color_range" .PD Set the color range value in the frame header. Note that this cannot be set in \s-1RGB\s0 streams. .RS 4 .IP "\fBtv\fR" 4 .IX Item "tv" .PD 0 .IP "\fBpc\fR" 4 .IX Item "pc" .RE .RS 4 .RE .PD .SS "vp9_superframe" .IX Subsection "vp9_superframe" Merge \s-1VP9\s0 invisible (alt-ref) frames back into \s-1VP9\s0 superframes. This fixes merging of split/segmented \s-1VP9\s0 streams where the alt-ref frame was split from its visible counterpart. .SS "vp9_superframe_split" .IX Subsection "vp9_superframe_split" Split \s-1VP9\s0 superframes into single frames. .SS "vp9_raw_reorder" .IX Subsection "vp9_raw_reorder" Given a \s-1VP9\s0 stream with correct timestamps but possibly out of order, insert additional show-existing-frame packets to correct the ordering. .SH "FORMAT OPTIONS" .IX Header "FORMAT OPTIONS" The libavformat library provides some generic global options, which can be set on all the muxers and demuxers. In addition each muxer or demuxer 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 "\fBavioflags\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "avioflags flags (input/output)" Possible values: .RS 4 .IP "\fBdirect\fR" 4 .IX Item "direct" Reduce buffering. .RE .RS 4 .RE .IP "\fBprobesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "probesize integer (input)" Set probing size in bytes, i.e. the size of the data to analyze to get stream information. A higher value will enable detecting more information in case it is dispersed into the stream, but will increase latency. Must be an integer not lesser than 32. It is 5000000 by default. .IP "\fBpacketsize\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "packetsize integer (output)" Set packet size. .IP "\fBfflags\fR \fIflags\fR" 4 .IX Item "fflags flags" Set format flags. Some are implemented for a limited number of formats. .Sp Possible values for input files: .RS 4 .IP "\fBdiscardcorrupt\fR" 4 .IX Item "discardcorrupt" Discard corrupted packets. .IP "\fBfastseek\fR" 4 .IX Item "fastseek" Enable fast, but inaccurate seeks for some formats. .IP "\fBgenpts\fR" 4 .IX Item "genpts" Generate missing \s-1PTS\s0 if \s-1DTS\s0 is present. .IP "\fBigndts\fR" 4 .IX Item "igndts" Ignore \s-1DTS\s0 if \s-1PTS\s0 is set. Inert when nofillin is set. .IP "\fBignidx\fR" 4 .IX Item "ignidx" Ignore index. .IP "\fBkeepside (\fR\fIdeprecated\fR\fB,\fR\fIinert\fR\fB)\fR" 4 .IX Item "keepside (deprecated,inert)" .PD 0 .IP "\fBnobuffer\fR" 4 .IX Item "nobuffer" .PD Reduce the latency introduced by buffering during initial input streams analysis. .IP "\fBnofillin\fR" 4 .IX Item "nofillin" Do not fill in missing values in packet fields that can be exactly calculated. .IP "\fBnoparse\fR" 4 .IX Item "noparse" Disable AVParsers, this needs \f(CW\*(C`+nofillin\*(C'\fR too. .IP "\fBsortdts\fR" 4 .IX Item "sortdts" Try to interleave output packets by \s-1DTS.\s0 At present, available only for AVIs with an index. .RE .RS 4 .Sp Possible values for output files: .IP "\fBautobsf\fR" 4 .IX Item "autobsf" Automatically apply bitstream filters as required by the output format. Enabled by default. .IP "\fBbitexact\fR" 4 .IX Item "bitexact" Only write platform\-, build\- and time-independent data. This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing. .IP "\fBflush_packets\fR" 4 .IX Item "flush_packets" Write out packets immediately. .IP "\fBlatm (\fR\fIdeprecated\fR\fB,\fR\fIinert\fR\fB)\fR" 4 .IX Item "latm (deprecated,inert)" .PD 0 .IP "\fBshortest\fR" 4 .IX Item "shortest" .PD Stop muxing at the end of the shortest stream. It may be needed to increase max_interleave_delta to avoid flushing the longer streams before \s-1EOF.\s0 .RE .RS 4 .RE .IP "\fBseek2any\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "seek2any integer (input)" Allow seeking to non-keyframes on demuxer level when supported if set to 1. Default is 0. .IP "\fBanalyzeduration\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "analyzeduration integer (input)" Specify how many microseconds are analyzed to probe the input. A higher value will enable detecting more accurate information, but will increase latency. It defaults to 5,000,000 microseconds = 5 seconds. .IP "\fBcryptokey\fR \fIhexadecimal string\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "cryptokey hexadecimal string (input)" Set decryption key. .IP "\fBindexmem\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "indexmem integer (input)" Set max memory used for timestamp index (per stream). .IP "\fBrtbufsize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "rtbufsize integer (input)" Set max memory used for buffering real-time frames. .IP "\fBfdebug\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "fdebug flags (input/output)" Print specific debug info. .Sp Possible values: .RS 4 .IP "\fBts\fR" 4 .IX Item "ts" .RE .RS 4 .RE .PD 0 .IP "\fBmax_delay\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "max_delay integer (input/output)" .PD Set maximum muxing or demuxing delay in microseconds. .IP "\fBfpsprobesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "fpsprobesize integer (input)" Set number of frames used to probe fps. .IP "\fBaudio_preload\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "audio_preload integer (output)" Set microseconds by which audio packets should be interleaved earlier. .IP "\fBchunk_duration\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "chunk_duration integer (output)" Set microseconds for each chunk. .IP "\fBchunk_size\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "chunk_size integer (output)" Set size in bytes for each chunk. .IP "\fBerr_detect, f_err_detect\fR \fIflags\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "err_detect, f_err_detect flags (input)" Set error detection flags. \f(CW\*(C`f_err_detect\*(C'\fR is deprecated and should be used only via the \fBffmpeg\fR tool. .Sp Possible values: .RS 4 .IP "\fBcrccheck\fR" 4 .IX Item "crccheck" Verify embedded CRCs. .IP "\fBbitstream\fR" 4 .IX Item "bitstream" Detect bitstream specification deviations. .IP "\fBbuffer\fR" 4 .IX Item "buffer" Detect improper bitstream length. .IP "\fBexplode\fR" 4 .IX Item "explode" Abort decoding on minor error detection. .IP "\fBcareful\fR" 4 .IX Item "careful" Consider things that violate the spec and have not been seen in the wild as errors. .IP "\fBcompliant\fR" 4 .IX Item "compliant" Consider all spec non compliancies as errors. .IP "\fBaggressive\fR" 4 .IX Item "aggressive" Consider things that a sane encoder should not do as an error. .RE .RS 4 .RE .IP "\fBmax_interleave_delta\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "max_interleave_delta integer (output)" Set maximum buffering duration for interleaving. The duration is expressed in microseconds, and defaults to 1000000 (1 second). .Sp To ensure all the streams are interleaved correctly, libavformat will wait until it has at least one packet for each stream before actually writing any packets to the output file. When some streams are \&\*(L"sparse\*(R" (i.e. there are large gaps between successive packets), this can result in excessive buffering. .Sp This field specifies the maximum difference between the timestamps of the first and the last packet in the muxing queue, above which libavformat will output a packet regardless of whether it has queued a packet for all the streams. .Sp If set to 0, libavformat will continue buffering packets until it has a packet for each stream, regardless of the maximum timestamp difference between the buffered packets. .IP "\fBuse_wallclock_as_timestamps\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "use_wallclock_as_timestamps integer (input)" Use wallclock as timestamps if set to 1. Default is 0. .IP "\fBavoid_negative_ts\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "avoid_negative_ts integer (output)" Possible values: .RS 4 .IP "\fBmake_non_negative\fR" 4 .IX Item "make_non_negative" Shift timestamps to make them non-negative. Also note that this affects only leading negative timestamps, and not non-monotonic negative timestamps. .IP "\fBmake_zero\fR" 4 .IX Item "make_zero" Shift timestamps so that the first timestamp is 0. .IP "\fBauto (default)\fR" 4 .IX Item "auto (default)" Enables shifting when required by the target format. .IP "\fBdisabled\fR" 4 .IX Item "disabled" Disables shifting of timestamp. .RE .RS 4 .Sp When shifting is enabled, all output timestamps are shifted by the same amount. Audio, video, and subtitles desynching and relative timestamp differences are preserved compared to how they would have been without shifting. .RE .IP "\fBskip_initial_bytes\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "skip_initial_bytes integer (input)" Set number of bytes to skip before reading header and frames if set to 1. Default is 0. .IP "\fBcorrect_ts_overflow\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "correct_ts_overflow integer (input)" Correct single timestamp overflows if set to 1. Default is 1. .IP "\fBflush_packets\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "flush_packets integer (output)" Flush the underlying I/O stream after each packet. Default is \-1 (auto), which means that the underlying protocol will decide, 1 enables it, and has the effect of reducing the latency, 0 disables it and may increase \s-1IO\s0 throughput in some cases. .IP "\fBoutput_ts_offset\fR \fIoffset\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "output_ts_offset offset (output)" Set the output time offset. .Sp \&\fIoffset\fR must be a time duration specification, see \fBthe Time duration section in the \fBffmpeg\-utils\fB\|(1) manual\fR. .Sp The offset is added by the muxer to the output timestamps. .Sp Specifying a positive offset means that the corresponding streams are delayed bt the time duration specified in \fIoffset\fR. Default value is \f(CW0\fR (meaning that no offset is applied). .IP "\fBformat_whitelist\fR \fIlist\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "format_whitelist list (input)" \&\*(L",\*(R" separated list of allowed demuxers. By default all are allowed. .IP "\fBdump_separator\fR \fIstring\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "dump_separator string (input)" Separator used to separate the fields printed on the command line about the Stream parameters. For example to separate the fields with newlines and indention: .Sp .Vb 2 \& ffprobe \-dump_separator " \& " \-i ~/videos/matrixbench_mpeg2.mpg .Ve .IP "\fBmax_streams\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "max_streams integer (input)" Specifies the maximum number of streams. This can be used to reject files that would require too many resources due to a large number of streams. .IP "\fBskip_estimate_duration_from_pts\fR \fIbool\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "skip_estimate_duration_from_pts bool (input)" Skip estimation of input duration when calculated using \s-1PTS.\s0 At present, applicable for MPEG-PS and MPEG-TS. .SS "Format stream specifiers" .IX Subsection "Format stream specifiers" Format stream specifiers allow selection of one or more streams that match specific properties. .PP Possible forms of stream specifiers are: .IP "\fIstream_index\fR" 4 .IX Item "stream_index" Matches the stream with this index. .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' for video, 'a' for audio, \&'s' for subtitle, 'd' for data, and 't' for attachments. If \&\fIstream_index\fR is given, then it matches the 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" 4 .IX Item "#stream_id" Matches the stream by a format-specific \s-1ID.\s0 .PP The exact semantics of stream specifiers is defined by the \&\f(CW\*(C`avformat_match_stream_specifier()\*(C'\fR function declared in the \&\fIlibavformat/avformat.h\fR header. .SH "DEMUXERS" .IX Header "DEMUXERS" Demuxers are configured elements in FFmpeg that can read the multimedia streams from a particular type of file. .PP When you configure your FFmpeg build, all the supported demuxers are enabled by default. You can list all available ones using the configure option \f(CW\*(C`\-\-list\-demuxers\*(C'\fR. .PP You can disable all the demuxers using the configure option \&\f(CW\*(C`\-\-disable\-demuxers\*(C'\fR, and selectively enable a single demuxer with the option \f(CW\*(C`\-\-enable\-demuxer=\f(CIDEMUXER\f(CW\*(C'\fR, or disable it with the option \f(CW\*(C`\-\-disable\-demuxer=\f(CIDEMUXER\f(CW\*(C'\fR. .PP The option \f(CW\*(C`\-demuxers\*(C'\fR of the ff* tools will display the list of enabled demuxers. Use \f(CW\*(C`\-formats\*(C'\fR to view a combined list of enabled demuxers and muxers. .PP The description of some of the currently available demuxers follows. .SS "aa" .IX Subsection "aa" Audible Format 2, 3, and 4 demuxer. .PP This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files. .SS "applehttp" .IX Subsection "applehttp" Apple \s-1HTTP\s0 Live Streaming demuxer. .PP This demuxer presents all AVStreams from all variant streams. The id field is set to the bitrate variant index number. By setting the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), the caller can decide which variant streams to actually receive. The total bitrate of the variant that the stream belongs to is available in a metadata key named \*(L"variant_bitrate\*(R". .SS "apng" .IX Subsection "apng" Animated Portable Network Graphics demuxer. .PP This demuxer is used to demux \s-1APNG\s0 files. All headers, but the \s-1PNG\s0 signature, up to (but not including) the first fcTL chunk are transmitted as extradata. Frames are then split as being all the chunks between two fcTL ones, or between the last fcTL and \s-1IEND\s0 chunks. .IP "\fB\-ignore_loop\fR \fIbool\fR" 4 .IX Item "-ignore_loop bool" Ignore the loop variable in the file if set. .IP "\fB\-max_fps\fR \fIint\fR" 4 .IX Item "-max_fps int" Maximum framerate in frames per second (0 for no limit). .IP "\fB\-default_fps\fR \fIint\fR" 4 .IX Item "-default_fps int" Default framerate in frames per second when none is specified in the file (0 meaning as fast as possible). .SS "asf" .IX Subsection "asf" Advanced Systems Format demuxer. .PP This demuxer is used to demux \s-1ASF\s0 files and \s-1MMS\s0 network streams. .IP "\fB\-no_resync_search\fR \fIbool\fR" 4 .IX Item "-no_resync_search bool" Do not try to resynchronize by looking for a certain optional start code. .SS "concat" .IX Subsection "concat" Virtual concatenation script demuxer. .PP This demuxer reads a list of files and other directives from a text file and demuxes them one after the other, as if all their packets had been muxed together. .PP The timestamps in the files are adjusted so that the first file starts at 0 and each next file starts where the previous one finishes. Note that it is done globally and may cause gaps if all streams do not have exactly the same length. .PP All files must have the same streams (same codecs, same time base, etc.). .PP The duration of each file is used to adjust the timestamps of the next file: if the duration is incorrect (because it was computed using the bit-rate or because the file is truncated, for example), it can cause artifacts. The \&\f(CW\*(C`duration\*(C'\fR directive can be used to override the duration stored in each file. .PP \fISyntax\fR .IX Subsection "Syntax" .PP The script is a text file in extended-ASCII, with one directive per line. Empty lines, leading spaces and lines starting with '#' are ignored. The following directive is recognized: .ie n .IP "\fB\f(CB""file \f(CBpath\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBfile \f(CBpath\f(CB\fB\fR" 4 .IX Item "file path" Path to a file to read; special characters and spaces must be escaped with backslash or single quotes. .Sp All subsequent file-related directives apply to that file. .ie n .IP "\fB\f(CB""ffconcat version 1.0""\fB\fR" 4 .el .IP "\fB\f(CBffconcat version 1.0\fB\fR" 4 .IX Item "ffconcat version 1.0" Identify the script type and version. It also sets the \fBsafe\fR option to 1 if it was \-1. .Sp To make FFmpeg recognize the format automatically, this directive must appear exactly as is (no extra space or byte-order-mark) on the very first line of the script. .ie n .IP "\fB\f(CB""duration \f(CBdur\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBduration \f(CBdur\f(CB\fB\fR" 4 .IX Item "duration dur" Duration of the file. This information can be specified from the file; specifying it here may be more efficient or help if the information from the file is not available or accurate. .Sp If the duration is set for all files, then it is possible to seek in the whole concatenated video. .ie n .IP "\fB\f(CB""inpoint \f(CBtimestamp\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBinpoint \f(CBtimestamp\f(CB\fB\fR" 4 .IX Item "inpoint timestamp" In point of the file. When the demuxer opens the file it instantly seeks to the specified timestamp. Seeking is done so that all streams can be presented successfully at In point. .Sp This directive works best with intra frame codecs, because for non-intra frame ones you will usually get extra packets before the actual In point and the decoded content will most likely contain frames before In point too. .Sp For each file, packets before the file In point will have timestamps less than the calculated start timestamp of the file (negative in case of the first file), and the duration of the files (if not specified by the \f(CW\*(C`duration\*(C'\fR directive) will be reduced based on their specified In point. .Sp Because of potential packets before the specified In point, packet timestamps may overlap between two concatenated files. .ie n .IP "\fB\f(CB""outpoint \f(CBtimestamp\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBoutpoint \f(CBtimestamp\f(CB\fB\fR" 4 .IX Item "outpoint timestamp" Out point of the file. When the demuxer reaches the specified decoding timestamp in any of the streams, it handles it as an end of file condition and skips the current and all the remaining packets from all streams. .Sp Out point is exclusive, which means that the demuxer will not output packets with a decoding timestamp greater or equal to Out point. .Sp This directive works best with intra frame codecs and formats where all streams are tightly interleaved. For non-intra frame codecs you will usually get additional packets with presentation timestamp after Out point therefore the decoded content will most likely contain frames after Out point too. If your streams are not tightly interleaved you may not get all the packets from all streams before Out point and you may only will be able to decode the earliest stream until Out point. .Sp The duration of the files (if not specified by the \f(CW\*(C`duration\*(C'\fR directive) will be reduced based on their specified Out point. .ie n .IP "\fB\f(CB""file_packet_metadata \f(CBkey=value\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBfile_packet_metadata \f(CBkey=value\f(CB\fB\fR" 4 .IX Item "file_packet_metadata key=value" Metadata of the packets of the file. The specified metadata will be set for each file packet. You can specify this directive multiple times to add multiple metadata entries. .ie n .IP "\fB\f(CB""stream""\fB\fR" 4 .el .IP "\fB\f(CBstream\fB\fR" 4 .IX Item "stream" Introduce a stream in the virtual file. All subsequent stream-related directives apply to the last introduced stream. Some streams properties must be set in order to allow identifying the matching streams in the subfiles. If no streams are defined in the script, the streams from the first file are copied. .ie n .IP "\fB\f(CB""exact_stream_id \f(CBid\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBexact_stream_id \f(CBid\f(CB\fB\fR" 4 .IX Item "exact_stream_id id" Set the id of the stream. If this directive is given, the string with the corresponding id in the subfiles will be used. This is especially useful for MPEG-PS (\s-1VOB\s0) files, where the order of the streams is not reliable. .PP \fIOptions\fR .IX Subsection "Options" .PP This demuxer accepts the following option: .IP "\fBsafe\fR" 4 .IX Item "safe" If set to 1, reject unsafe file paths. A file path is considered safe if it does not contain a protocol specification and is relative and all components only contain characters from the portable character set (letters, digits, period, underscore and hyphen) and have no period at the beginning of a component. .Sp If set to 0, any file name is accepted. .Sp The default is 1. .Sp \&\-1 is equivalent to 1 if the format was automatically probed and 0 otherwise. .IP "\fBauto_convert\fR" 4 .IX Item "auto_convert" If set to 1, try to perform automatic conversions on packet data to make the streams concatenable. The default is 1. .Sp Currently, the only conversion is adding the h264_mp4toannexb bitstream filter to H.264 streams in \s-1MP4\s0 format. This is necessary in particular if there are resolution changes. .IP "\fBsegment_time_metadata\fR" 4 .IX Item "segment_time_metadata" If set to 1, every packet will contain the \fIlavf.concat.start_time\fR and the \&\fIlavf.concat.duration\fR packet metadata values which are the start_time and the duration of the respective file segments in the concatenated output expressed in microseconds. The duration metadata is only set if it is known based on the concat file. The default is 0. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Use absolute filenames and include some comments: .Sp .Vb 6 \& # my first filename \& file /mnt/share/file\-1.wav \& # my second filename including whitespace \& file \*(Aq/mnt/share/file 2.wav\*(Aq \& # my third filename including whitespace plus single quote \& file \*(Aq/mnt/share/file 3\*(Aq\e\*(Aq\*(Aq.wav\*(Aq .Ve .IP "\(bu" 4 Allow for input format auto-probing, use safe filenames and set the duration of the first file: .Sp .Vb 1 \& ffconcat version 1.0 \& \& file file\-1.wav \& duration 20.0 \& \& file subdir/file\-2.wav .Ve .SS "dash" .IX Subsection "dash" Dynamic Adaptive Streaming over \s-1HTTP\s0 demuxer. .PP This demuxer presents all AVStreams found in the manifest. By setting the discard flags on AVStreams the caller can decide which streams to actually receive. Each stream mirrors the \f(CW\*(C`id\*(C'\fR and \f(CW\*(C`bandwidth\*(C'\fR properties from the \&\f(CW\*(C`\*(C'\fR as metadata keys named \*(L"id\*(R" and \*(L"variant_bitrate\*(R" respectively. .SS "flv, live_flv" .IX Subsection "flv, live_flv" Adobe Flash Video Format demuxer. .PP This demuxer is used to demux \s-1FLV\s0 files and \s-1RTMP\s0 network streams. In case of live network streams, if you force format, you may use live_flv option instead of flv to survive timestamp discontinuities. .PP .Vb 2 \& ffmpeg \-f flv \-i myfile.flv ... \& ffmpeg \-f live_flv \-i rtmp:///anything/key .... .Ve .IP "\fB\-flv_metadata\fR \fIbool\fR" 4 .IX Item "-flv_metadata bool" Allocate the streams according to the onMetaData array content. .IP "\fB\-flv_ignore_prevtag\fR \fIbool\fR" 4 .IX Item "-flv_ignore_prevtag bool" Ignore the size of previous tag value. .IP "\fB\-flv_full_metadata\fR \fIbool\fR" 4 .IX Item "-flv_full_metadata bool" Output all context of the onMetadata. .SS "gif" .IX Subsection "gif" Animated \s-1GIF\s0 demuxer. .PP It accepts the following options: .IP "\fBmin_delay\fR" 4 .IX Item "min_delay" Set the minimum valid delay between frames in hundredths of seconds. Range is 0 to 6000. Default value is 2. .IP "\fBmax_gif_delay\fR" 4 .IX Item "max_gif_delay" Set the maximum valid delay between frames in hundredth of seconds. Range is 0 to 65535. Default value is 65535 (nearly eleven minutes), the maximum value allowed by the specification. .IP "\fBdefault_delay\fR" 4 .IX Item "default_delay" Set the default delay between frames in hundredths of seconds. Range is 0 to 6000. Default value is 10. .IP "\fBignore_loop\fR" 4 .IX Item "ignore_loop" \&\s-1GIF\s0 files can contain information to loop a certain number of times (or infinitely). If \fBignore_loop\fR is set to 1, then the loop setting from the input will be ignored and looping will not occur. If set to 0, then looping will occur and will cycle the number of times according to the \s-1GIF.\s0 Default value is 1. .PP For example, with the overlay filter, place an infinitely looping \s-1GIF\s0 over another video: .PP .Vb 1 \& ffmpeg \-i input.mp4 \-ignore_loop 0 \-i input.gif \-filter_complex overlay=shortest=1 out.mkv .Ve .PP Note that in the above example the shortest option for overlay filter is used to end the output video at the length of the shortest input file, which in this case is \fIinput.mp4\fR as the \s-1GIF\s0 in this example loops infinitely. .SS "hls" .IX Subsection "hls" \&\s-1HLS\s0 demuxer .PP It accepts the following options: .IP "\fBlive_start_index\fR" 4 .IX Item "live_start_index" segment index to start live streams at (negative values are from the end). .IP "\fBallowed_extensions\fR" 4 .IX Item "allowed_extensions" \&',' separated list of file extensions that hls is allowed to access. .IP "\fBmax_reload\fR" 4 .IX Item "max_reload" Maximum number of times a insufficient list is attempted to be reloaded. Default value is 1000. .IP "\fBhttp_persistent\fR" 4 .IX Item "http_persistent" Use persistent \s-1HTTP\s0 connections. Applicable only for \s-1HTTP\s0 streams. Enabled by default. .IP "\fBhttp_multiple\fR" 4 .IX Item "http_multiple" Use multiple \s-1HTTP\s0 connections for downloading \s-1HTTP\s0 segments. Enabled by default for \s-1HTTP/1.1\s0 servers. .SS "image2" .IX Subsection "image2" Image file demuxer. .PP This demuxer reads from a list of image files specified by a pattern. The syntax and meaning of the pattern is specified by the option \fIpattern_type\fR. .PP The pattern may contain a suffix which is used to automatically determine the format of the images contained in the files. .PP The size, the pixel format, and the format of each image must be the same for all the files in the sequence. .PP This demuxer accepts the following options: .IP "\fBframerate\fR" 4 .IX Item "framerate" Set the frame rate for the video stream. It defaults to 25. .IP "\fBloop\fR" 4 .IX Item "loop" If set to 1, loop over the input. Default value is 0. .IP "\fBpattern_type\fR" 4 .IX Item "pattern_type" Select the pattern type used to interpret the provided filename. .Sp \&\fIpattern_type\fR accepts one of the following values. .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" Disable pattern matching, therefore the video will only contain the specified image. You should use this option if you do not want to create sequences from multiple images and your filenames may contain special pattern characters. .IP "\fBsequence\fR" 4 .IX Item "sequence" Select a sequence pattern type, used to specify a sequence of files indexed by sequential numbers. .Sp A sequence pattern may contain the string \*(L"%d\*(R" or "%0\fIN\fRd\*(L", which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form \&\*(R"%d0\fIN\fRd" is used, the string representing the number in each filename is 0\-padded and \fIN\fR is the total number of 0\-padded digits representing the number. The literal character '%' can be specified in the pattern with the string \*(L"%%\*(R". .Sp If the sequence pattern contains \*(L"%d\*(R" or "%0\fIN\fRd", the first filename of the file list specified by the pattern must contain a number inclusively contained between \fIstart_number\fR and \&\fIstart_number\fR+\fIstart_number_range\fR\-1, and all the following numbers must be sequential. .Sp For example the pattern \*(L"img\-%03d.bmp\*(R" will match a sequence of filenames of the form \fIimg\-001.bmp\fR, \fIimg\-002.bmp\fR, ..., \&\fIimg\-010.bmp\fR, etc.; the pattern \*(L"i%%m%%g\-%d.jpg\*(R" will match a sequence of filenames of the form \fIi%m%g\-1.jpg\fR, \&\fIi%m%g\-2.jpg\fR, ..., \fIi%m%g\-10.jpg\fR, etc. .Sp Note that the pattern must not necessarily contain \*(L"%d\*(R" or "%0\fIN\fRd", for example to convert a single image file \&\fIimg.jpeg\fR you can employ the command: .Sp .Vb 1 \& ffmpeg \-i img.jpeg img.png .Ve .IP "\fBglob\fR" 4 .IX Item "glob" Select a glob wildcard pattern type. .Sp The pattern is interpreted like a \f(CW\*(C`glob()\*(C'\fR pattern. This is only selectable if libavformat was compiled with globbing support. .IP "\fBglob_sequence\fR \fI(deprecated, will be removed)\fR" 4 .IX Item "glob_sequence (deprecated, will be removed)" Select a mixed glob wildcard/sequence pattern. .Sp If your version of libavformat was compiled with globbing support, and the provided pattern contains at least one glob meta character among \&\f(CW\*(C`%*?[]{}\*(C'\fR that is preceded by an unescaped \*(L"%\*(R", the pattern is interpreted like a \f(CW\*(C`glob()\*(C'\fR pattern, otherwise it is interpreted like a sequence pattern. .Sp All glob special characters \f(CW\*(C`%*?[]{}\*(C'\fR must be prefixed with \*(L"%\*(R". To escape a literal \*(L"%\*(R" you shall use \*(L"%%\*(R". .Sp For example the pattern \f(CW\*(C`foo\-%*.jpeg\*(C'\fR will match all the filenames prefixed by \*(L"foo\-\*(R" and terminating with \*(L".jpeg\*(R", and \&\f(CW\*(C`foo\-%?%?%?.jpeg\*(C'\fR will match all the filenames prefixed with \&\*(L"foo\-\*(R", followed by a sequence of three characters, and terminating with \*(L".jpeg\*(R". .Sp This pattern type is deprecated in favor of \fIglob\fR and \&\fIsequence\fR. .RE .RS 4 .Sp Default value is \fIglob_sequence\fR. .RE .IP "\fBpixel_format\fR" 4 .IX Item "pixel_format" Set the pixel format of the images to read. If not specified the pixel format is guessed from the first image file in the sequence. .IP "\fBstart_number\fR" 4 .IX Item "start_number" Set the index of the file matched by the image file pattern to start to read from. Default value is 0. .IP "\fBstart_number_range\fR" 4 .IX Item "start_number_range" Set the index interval range to check when looking for the first image file in the sequence, starting from \fIstart_number\fR. Default value is 5. .IP "\fBts_from_file\fR" 4 .IX Item "ts_from_file" If set to 1, will set frame timestamp to modification time of image file. Note that monotonity of timestamps is not provided: images go in the same order as without this option. Default value is 0. If set to 2, will set frame timestamp to the modification time of the image file in nanosecond precision. .IP "\fBvideo_size\fR" 4 .IX Item "video_size" Set the video size of the images to read. If not specified the video size is guessed from the first image file in the sequence. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Use \fBffmpeg\fR for creating a video from the images in the file sequence \fIimg\-001.jpeg\fR, \fIimg\-002.jpeg\fR, ..., assuming an input frame rate of 10 frames per second: .Sp .Vb 1 \& ffmpeg \-framerate 10 \-i \*(Aqimg\-%03d.jpeg\*(Aq out.mkv .Ve .IP "\(bu" 4 As above, but start by reading from a file with index 100 in the sequence: .Sp .Vb 1 \& ffmpeg \-framerate 10 \-start_number 100 \-i \*(Aqimg\-%03d.jpeg\*(Aq out.mkv .Ve .IP "\(bu" 4 Read images matching the \*(L"*.png\*(R" glob pattern , that is all the files terminating with the \*(L".png\*(R" suffix: .Sp .Vb 1 \& ffmpeg \-framerate 10 \-pattern_type glob \-i "*.png" out.mkv .Ve .SS "libgme" .IX Subsection "libgme" The Game Music Emu library is a collection of video game music file emulators. .PP See <\fBhttp://code.google.com/p/game\-music\-emu/\fR> for more information. .PP Some files have multiple tracks. The demuxer will pick the first track by default. The \fBtrack_index\fR option can be used to select a different track. Track indexes start at 0. The demuxer exports the number of tracks as \&\fItracks\fR meta data entry. .PP For very large files, the \fBmax_size\fR option may have to be adjusted. .SS "libopenmpt" .IX Subsection "libopenmpt" libopenmpt based module demuxer .PP See <\fBhttps://lib.openmpt.org/libopenmpt/\fR> for more information. .PP Some files have multiple subsongs (tracks) this can be set with the \fBsubsong\fR option. .PP It accepts the following options: .IP "\fBsubsong\fR" 4 .IX Item "subsong" Set the subsong index. This can be either 'all', 'auto', or the index of the subsong. Subsong indexes start at 0. The default is 'auto'. .Sp The default value is to let libopenmpt choose. .IP "\fBlayout\fR" 4 .IX Item "layout" Set the channel layout. Valid values are 1, 2, and 4 channel layouts. The default value is \s-1STEREO.\s0 .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" Set the sample rate for libopenmpt to output. Range is from 1000 to \s-1INT_MAX.\s0 The value default is 48000. .SS "mov/mp4/3gp/QuickTime" .IX Subsection "mov/mp4/3gp/QuickTime" QuickTime / \s-1MP4\s0 demuxer. .PP This demuxer accepts the following options: .IP "\fBenable_drefs\fR" 4 .IX Item "enable_drefs" Enable loading of external tracks, disabled by default. Enabling this can theoretically leak information in some use cases. .IP "\fBuse_absolute_path\fR" 4 .IX Item "use_absolute_path" Allows loading of external tracks via absolute paths, disabled by default. Enabling this poses a security risk. It should only be enabled if the source is known to be non malicious. .SS "mpegts" .IX Subsection "mpegts" \&\s-1MPEG\-2\s0 transport stream demuxer. .PP This demuxer accepts the following options: .IP "\fBresync_size\fR" 4 .IX Item "resync_size" Set size limit for looking up a new synchronization. Default value is 65536. .IP "\fBskip_unknown_pmt\fR" 4 .IX Item "skip_unknown_pmt" Skip PMTs for programs not defined in the \s-1PAT.\s0 Default value is 0. .IP "\fBfix_teletext_pts\fR" 4 .IX Item "fix_teletext_pts" Override teletext packet \s-1PTS\s0 and \s-1DTS\s0 values with the timestamps calculated from the \s-1PCR\s0 of the first program which the teletext stream is part of and is not discarded. Default value is 1, set this option to 0 if you want your teletext packet \s-1PTS\s0 and \s-1DTS\s0 values untouched. .IP "\fBts_packetsize\fR" 4 .IX Item "ts_packetsize" Output option carrying the raw packet size in bytes. Show the detected raw packet size, cannot be set by the user. .IP "\fBscan_all_pmts\fR" 4 .IX Item "scan_all_pmts" Scan and combine all PMTs. The value is an integer with value from \-1 to 1 (\-1 means automatic setting, 1 means enabled, 0 means disabled). Default value is \-1. .IP "\fBmerge_pmt_versions\fR" 4 .IX Item "merge_pmt_versions" Re-use existing streams when a \s-1PMT\s0's version is updated and elementary streams move to different PIDs. Default value is 0. .SS "mpjpeg" .IX Subsection "mpjpeg" \&\s-1MJPEG\s0 encapsulated in multi-part \s-1MIME\s0 demuxer. .PP This demuxer allows reading of \s-1MJPEG,\s0 where each frame is represented as a part of multipart/x\-mixed\-replace stream. .IP "\fBstrict_mime_boundary\fR" 4 .IX Item "strict_mime_boundary" Default implementation applies a relaxed standard to multi-part \s-1MIME\s0 boundary detection, to prevent regression with numerous existing endpoints not generating a proper \s-1MIME MJPEG\s0 stream. Turning this option on by setting it to 1 will result in a stricter check of the boundary value. .SS "rawvideo" .IX Subsection "rawvideo" Raw video demuxer. .PP This demuxer allows one to read raw video data. Since there is no header specifying the assumed video parameters, the user must specify them in order to be able to decode the data correctly. .PP This demuxer accepts the following options: .IP "\fBframerate\fR" 4 .IX Item "framerate" Set input video frame rate. Default value is 25. .IP "\fBpixel_format\fR" 4 .IX Item "pixel_format" Set the input video pixel format. Default value is \f(CW\*(C`yuv420p\*(C'\fR. .IP "\fBvideo_size\fR" 4 .IX Item "video_size" Set the input video size. This value must be specified explicitly. .PP For example to read a rawvideo file \fIinput.raw\fR with \&\fBffplay\fR, assuming a pixel format of \f(CW\*(C`rgb24\*(C'\fR, a video size of \f(CW\*(C`320x240\*(C'\fR, and a frame rate of 10 images per second, use the command: .PP .Vb 1 \& ffplay \-f rawvideo \-pixel_format rgb24 \-video_size 320x240 \-framerate 10 input.raw .Ve .SS "sbg" .IX Subsection "sbg" SBaGen script demuxer. .PP This demuxer reads the script language used by SBaGen <\fBhttp://uazu.net/sbagen/\fR> to generate binaural beats sessions. A \s-1SBG\s0 script looks like that: .PP .Vb 9 \& \-SE \& a: 300\-2.5/3 440+4.5/0 \& b: 300\-2.5/0 440+4.5/3 \& off: \- \& NOW == a \& +0:07:00 == b \& +0:14:00 == a \& +0:21:00 == b \& +0:30:00 off .Ve .PP A \s-1SBG\s0 script can mix absolute and relative timestamps. If the script uses either only absolute timestamps (including the script start time) or only relative ones, then its layout is fixed, and the conversion is straightforward. On the other hand, if the script mixes both kind of timestamps, then the \fI\s-1NOW\s0\fR reference for relative timestamps will be taken from the current time of day at the time the script is read, and the script layout will be frozen according to that reference. That means that if the script is directly played, the actual times will match the absolute timestamps up to the sound controller's clock accuracy, but if the user somehow pauses the playback or seeks, all times will be shifted accordingly. .SS "tedcaptions" .IX Subsection "tedcaptions" \&\s-1JSON\s0 captions used for <\fBhttp://www.ted.com/\fR>. .PP \&\s-1TED\s0 does not provide links to the captions, but they can be guessed from the page. The file \fItools/bookmarklets.html\fR from the FFmpeg source tree contains a bookmarklet to expose them. .PP This demuxer accepts the following option: .IP "\fBstart_time\fR" 4 .IX Item "start_time" Set the start time of the \s-1TED\s0 talk, in milliseconds. The default is 15000 (15s). It is used to sync the captions with the downloadable videos, because they include a 15s intro. .PP Example: convert the captions to a format most players understand: .PP .Vb 1 \& ffmpeg \-i http://www.ted.com/talks/subtitles/id/1/lang/en talk1\-en.srt .Ve .SH "METADATA" .IX Header "METADATA" FFmpeg is able to dump metadata from media files into a simple UTF\-8\-encoded INI-like text file and then load it back using the metadata muxer/demuxer. .PP The file format is as follows: .IP "1." 4 A file consists of a header and a number of metadata tags divided into sections, each on its own line. .IP "2." 4 The header is a \fB;FFMETADATA\fR string, followed by a version number (now 1). .IP "3." 4 Metadata tags are of the form \fBkey=value\fR .IP "4." 4 Immediately after header follows global metadata .IP "5." 4 After global metadata there may be sections with per\-stream/per\-chapter metadata. .IP "6." 4 A section starts with the section name in uppercase (i.e. \s-1STREAM\s0 or \s-1CHAPTER\s0) in brackets (\fB[\fR, \fB]\fR) and ends with next section or end of file. .IP "7." 4 At the beginning of a chapter section there may be an optional timebase to be used for start/end values. It must be in form \&\fBTIMEBASE=\fR\fInum\fR\fB/\fR\fIden\fR, where \fInum\fR and \fIden\fR are integers. If the timebase is missing then start/end times are assumed to be in milliseconds. .Sp Next a chapter section must contain chapter start and end times in form \&\fBSTART=\fR\fInum\fR, \fBEND=\fR\fInum\fR, where \fInum\fR is a positive integer. .IP "8." 4 Empty lines and lines starting with \fB;\fR or \fB#\fR are ignored. .IP "9." 4 Metadata keys or values containing special characters (\fB=\fR, \fB;\fR, \&\fB#\fR, \fB\e\fR and a newline) must be escaped with a backslash \fB\e\fR. .IP "10." 4 Note that whitespace in metadata (e.g. \fBfoo = bar\fR) is considered to be a part of the tag (in the example above key is \fBfoo\fR , value is \fBbar\fR). .PP A ffmetadata file might look like this: .PP .Vb 4 \& ;FFMETADATA1 \& title=bike\e\eshed \& ;this is a comment \& artist=FFmpeg troll team \& \& [CHAPTER] \& TIMEBASE=1/1000 \& START=0 \& #chapter ends at 0:01:00 \& END=60000 \& title=chapter \e#1 \& [STREAM] \& title=multi\e \& line .Ve .PP By using the ffmetadata muxer and demuxer it is possible to extract metadata from an input file to an ffmetadata file, and then transcode the file into an output file with the edited ffmetadata file. .PP Extracting an ffmetadata file with \fIffmpeg\fR goes as follows: .PP .Vb 1 \& ffmpeg \-i INPUT \-f ffmetadata FFMETADATAFILE .Ve .PP Reinserting edited metadata information from the \s-1FFMETADATAFILE\s0 file can be done as: .PP .Vb 1 \& ffmpeg \-i INPUT \-i FFMETADATAFILE \-map_metadata 1 \-codec copy OUTPUT .Ve .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 "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 .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 "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 "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. .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-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. .PP This protocol accepts the following options: .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). .SS "gopher" .IX Subsection "gopher" Gopher protocol. .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 "\fBuser-agent\fR" 4 .IX Item "user-agent" This is a deprecated option, you can use user_agent instead it. .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 "\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_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 .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. .PP .Vb 1 \& icecast://[[:]@]:/ .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 \&\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. .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=