.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "FFPROBE-ALL 1" .TH FFPROBE-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" ffprobe \- ffprobe media prober .SH "SYNOPSIS" .IX Header "SYNOPSIS" ffprobe [\fIoptions\fR] \fIinput_url\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" ffprobe gathers information from multimedia streams and prints it in human\- and machine-readable fashion. .PP For example it can be used to check the format of the container used by a multimedia stream and the format and type of each media stream contained in it. .PP If a url is specified in input, ffprobe will try to open and probe the url content. If the url cannot be opened or recognized as a multimedia file, a positive exit code is returned. .PP If no output is specified as output with \fBo\fR ffprobe will write to stdout. .PP ffprobe may be employed both as a standalone application or in combination with a textual filter, which may perform more sophisticated processing, e.g. statistical processing or plotting. .PP Options are used to list some of the formats supported by ffprobe or for specifying which information to display, and for setting how ffprobe will show it. .PP ffprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of a form defined by the selected writer, which is specified by the \fBoutput_format\fR option. .PP Sections may contain other nested sections, and are identified by a name (which may be shared by other sections), and an unique name. See the output of \fBsections\fR. .PP Metadata tags stored in the container or in the streams are recognized and printed in the corresponding \*(L"\s-1FORMAT\*(R", \*(L"STREAM\*(R", \*(L"STREAM_GROUP_STREAM\*(R"\s0 or \*(L"\s-1PROGRAM_STREAM\*(R"\s0 section. .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. .PP Options that take arguments support a special syntax where the argument given on the command line is interpreted as a path to the file from which the actual argument value is loaded. To use this feature, add a forward slash '/' immediately before the option name (after the leading dash). E.g. .PP .Vb 1 \& ffmpeg \-i INPUT \-/filter:v filter.script OUTPUT .Ve .PP will load a filtergraph description from the file named \fIfilter.script\fR. .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. If \fIstream_index\fR is used as an additional stream specifier (see below), then it selects stream number \&\fIstream_index\fR from the matching streams. Stream numbering is based on the order of the streams as detected by libavformat except when a stream group specifier or program \s-1ID\s0 is also specified. In this case it is based on the ordering of the streams in the group or program. .IP "\fIstream_type\fR\fB[:\fR\fIadditional_stream_specifier\fR\fB]\fR" 4 .IX Item "stream_type[:additional_stream_specifier]" \&\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 \fIadditional_stream_specifier\fR is used, then it matches streams which both have this type and match the \&\fIadditional_stream_specifier\fR. Otherwise, it matches all streams of the specified type. .IP "\fBg:\fR\fIgroup_specifier\fR\fB[:\fR\fIadditional_stream_specifier\fR\fB]\fR" 4 .IX Item "g:group_specifier[:additional_stream_specifier]" Matches streams which are in the group with the specifier \fIgroup_specifier\fR. if \fIadditional_stream_specifier\fR is used, then it matches streams which both are part of the group and match the \fIadditional_stream_specifier\fR. \&\fIgroup_specifier\fR may be one of the following: .RS 4 .IP "\fIgroup_index\fR" 4 .IX Item "group_index" Match the stream with this group index. .IP "\fB#\fR\fIgroup_id\fR \fBor i:\fR\fIgroup_id\fR" 4 .IX Item "#group_id or i:group_id" Match the stream with this group id. .RE .RS 4 .RE .IP "\fBp:\fR\fIprogram_id\fR\fB[:\fR\fIadditional_stream_specifier\fR\fB]\fR" 4 .IX Item "p:program_id[:additional_stream_specifier]" Matches streams which are in the program with the id \fIprogram_id\fR. If \&\fIadditional_stream_specifier\fR is used, then it matches streams which both are part of the program and match the \fIadditional_stream_specifier\fR. .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 named \fIfilter_name\fR. Use the \&\fB\-filters\fR option to get a list of all filters. .IP "\fBbsf=\fR\fIbitstream_filter_name\fR" 4 .IX Item "bsf=bitstream_filter_name" Print detailed information about the bitstream filter named \fIbitstream_filter_name\fR. Use the \fB\-bsfs\fR option to get a list of all bitstream filters. .IP "\fBprotocol=\fR\fIprotocol_name\fR" 4 .IX Item "protocol=protocol_name" Print detailed information about the protocol named \fIprotocol_name\fR. Use the \fB\-protocols\fR option to get a list of all protocols. .RE .RS 4 .RE .IP "\fB\-version\fR" 4 .IX Item "-version" Show version. .IP "\fB\-buildconf\fR" 4 .IX Item "-buildconf" Show the build configuration, one option per line. .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\-dispositions\fR" 4 .IX Item "-dispositions" Show stream dispositions. .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 can be forced setting the environment variable \fB\s-1AV_LOG_FORCE_COLOR\s0\fR. .RE .IP "\fB\-report\fR" 4 .IX Item "-report" Dump full command line and log 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 debug\*(C'\fR. .Sp Setting the environment variable \fB\s-1FFREPORT\s0\fR to any value has the same effect. If the value is a ':'\-separated key=value sequence, these options will affect the report; option values must be escaped if they contain special characters or the options delimiter ':' (see the ``Quoting and escaping'' section in the ffmpeg-utils manual). .Sp The following options are recognized: .RS 4 .IP "\fBfile\fR" 4 .IX Item "file" set the file name to use for the report; \f(CW%p\fR is expanded to the name of the program, \f(CW%t\fR is expanded to a timestamp, \f(CW\*(C`%%\*(C'\fR is expanded to a plain \f(CW\*(C`%\*(C'\fR .IP "\fBlevel\fR" 4 .IX Item "level" set the log verbosity level using a numerical value (see \f(CW\*(C`\-loglevel\*(C'\fR). .RE .RS 4 .Sp For example, to output a report to a file named \fIffreport.log\fR using a log level of \f(CW32\fR (alias for log level \f(CW\*(C`info\*(C'\fR): .Sp .Vb 1 \& FFREPORT=file=ffreport.log:level=32 ffmpeg \-i input output .Ve .Sp Errors in parsing the environment variable are not fatal, and will not appear in the report. .RE .IP "\fB\-hide_banner\fR" 4 .IX Item "-hide_banner" Suppress printing banner. .Sp All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information. .IP "\fB\-cpuflags flags (\fR\fIglobal\fR\fB)\fR" 4 .IX Item "-cpuflags flags (global)" Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you're doing. .Sp .Vb 3 \& ffmpeg \-cpuflags \-sse+mmx ... \& ffmpeg \-cpuflags mmx ... \& ffmpeg \-cpuflags 0 ... .Ve .Sp Possible flags for this option are: .RS 4 .IP "\fBx86\fR" 4 .IX Item "x86" .RS 4 .PD 0 .IP "\fBmmx\fR" 4 .IX Item "mmx" .IP "\fBmmxext\fR" 4 .IX Item "mmxext" .IP "\fBsse\fR" 4 .IX Item "sse" .IP "\fBsse2\fR" 4 .IX Item "sse2" .IP "\fBsse2slow\fR" 4 .IX Item "sse2slow" .IP "\fBsse3\fR" 4 .IX Item "sse3" .IP "\fBsse3slow\fR" 4 .IX Item "sse3slow" .IP "\fBssse3\fR" 4 .IX Item "ssse3" .IP "\fBatom\fR" 4 .IX Item "atom" .IP "\fBsse4.1\fR" 4 .IX Item "sse4.1" .IP "\fBsse4.2\fR" 4 .IX Item "sse4.2" .IP "\fBavx\fR" 4 .IX Item "avx" .IP "\fBavx2\fR" 4 .IX Item "avx2" .IP "\fBxop\fR" 4 .IX Item "xop" .IP "\fBfma3\fR" 4 .IX Item "fma3" .IP "\fBfma4\fR" 4 .IX Item "fma4" .IP "\fB3dnow\fR" 4 .IX Item "3dnow" .IP "\fB3dnowext\fR" 4 .IX Item "3dnowext" .IP "\fBbmi1\fR" 4 .IX Item "bmi1" .IP "\fBbmi2\fR" 4 .IX Item "bmi2" .IP "\fBcmov\fR" 4 .IX Item "cmov" .RE .RS 4 .RE .IP "\fB\s-1ARM\s0\fR" 4 .IX Item "ARM" .RS 4 .IP "\fBarmv5te\fR" 4 .IX Item "armv5te" .IP "\fBarmv6\fR" 4 .IX Item "armv6" .IP "\fBarmv6t2\fR" 4 .IX Item "armv6t2" .IP "\fBvfp\fR" 4 .IX Item "vfp" .IP "\fBvfpv3\fR" 4 .IX Item "vfpv3" .IP "\fBneon\fR" 4 .IX Item "neon" .IP "\fBsetend\fR" 4 .IX Item "setend" .RE .RS 4 .RE .IP "\fBAArch64\fR" 4 .IX Item "AArch64" .RS 4 .IP "\fBarmv8\fR" 4 .IX Item "armv8" .IP "\fBvfp\fR" 4 .IX Item "vfp" .IP "\fBneon\fR" 4 .IX Item "neon" .RE .RS 4 .RE .IP "\fBPowerPC\fR" 4 .IX Item "PowerPC" .RS 4 .IP "\fBaltivec\fR" 4 .IX Item "altivec" .RE .RS 4 .RE .IP "\fBSpecific Processors\fR" 4 .IX Item "Specific Processors" .RS 4 .IP "\fBpentium2\fR" 4 .IX Item "pentium2" .IP "\fBpentium3\fR" 4 .IX Item "pentium3" .IP "\fBpentium4\fR" 4 .IX Item "pentium4" .IP "\fBk6\fR" 4 .IX Item "k6" .IP "\fBk62\fR" 4 .IX Item "k62" .IP "\fBathlon\fR" 4 .IX Item "athlon" .IP "\fBathlonxp\fR" 4 .IX Item "athlonxp" .IP "\fBk8\fR" 4 .IX Item "k8" .RE .RS 4 .RE .RE .RS 4 .RE .IP "\fB\-cpucount\fR \fIcount\fR \fB(\fR\fIglobal\fR\fB)\fR" 4 .IX Item "-cpucount count (global)" .PD Override detection of \s-1CPU\s0 count. This option is intended for testing. Do not use it unless you know what you're doing. .Sp .Vb 1 \& ffmpeg \-cpucount 2 .Ve .IP "\fB\-max_alloc\fR \fIbytes\fR" 4 .IX Item "-max_alloc bytes" Set the maximum size limit for allocating a block on the heap by ffmpeg's family of malloc functions. Exercise \fBextreme caution\fR when using this option. Don't use if you do not understand the full consequence of doing so. Default is \s-1INT_MAX.\s0 .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 .Vb 1 \& ffmpeg \-i multichannel.mxf \-map 0:v:0 \-map 0:a:0 \-map 0:a:0 \-c:a:0 ac3 \-b:a:0 640k \-ac:a:1 2 \-c:a:1 aac \-b:2 128k out.mp4 .Ve .PP In the above example, a multichannel audio stream is mapped twice for output. The first instance is encoded with codec ac3 and bitrate 640k. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using absolute index of the output stream. .PP Note: the \fB\-nooption\fR syntax cannot be used for boolean AVOptions, use \fB\-option 0\fR/\fB\-option 1\fR. .PP Note: the old undocumented way of specifying per-stream AVOptions by prepending v/a/s to the options name is now obsolete and will be removed soon. .SS "Main options" .IX Subsection "Main options" .IP "\fB\-f\fR \fIformat\fR" 4 .IX Item "-f format" Force format to use. .IP "\fB\-unit\fR" 4 .IX Item "-unit" Show the unit of the displayed values. .IP "\fB\-prefix\fR" 4 .IX Item "-prefix" Use \s-1SI\s0 prefixes for the displayed values. Unless the \*(L"\-byte_binary_prefix\*(R" option is used all the prefixes are decimal. .IP "\fB\-byte_binary_prefix\fR" 4 .IX Item "-byte_binary_prefix" Force the use of binary prefixes for byte values. .IP "\fB\-sexagesimal\fR" 4 .IX Item "-sexagesimal" Use sexagesimal format \s-1HH:MM:SS.MICROSECONDS\s0 for time values. .IP "\fB\-pretty\fR" 4 .IX Item "-pretty" Prettify the format of the displayed values, it corresponds to the options \*(L"\-unit \-prefix \-byte_binary_prefix \-sexagesimal\*(R". .IP "\fB\-output_format, \-of, \-print_format\fR \fIwriter_name\fR\fB[=\fR\fIwriter_options\fR\fB]\fR" 4 .IX Item "-output_format, -of, -print_format writer_name[=writer_options]" Set the output printing format. .Sp \&\fIwriter_name\fR specifies the name of the writer, and \&\fIwriter_options\fR specifies the options to be passed to the writer. .Sp For example for printing the output in \s-1JSON\s0 format, specify: .Sp .Vb 1 \& \-output_format json .Ve .Sp For more details on the available output printing formats, see the Writers section below. .IP "\fB\-sections\fR" 4 .IX Item "-sections" Print sections structure and section information, and exit. The output is not meant to be parsed by a machine. .IP "\fB\-select_streams\fR \fIstream_specifier\fR" 4 .IX Item "-select_streams stream_specifier" Select only the streams specified by \fIstream_specifier\fR. This option affects only the options related to streams (e.g. \f(CW\*(C`show_streams\*(C'\fR, \f(CW\*(C`show_packets\*(C'\fR, etc.). .Sp For example to show only audio streams, you can use the command: .Sp .Vb 1 \& ffprobe \-show_streams \-select_streams a INPUT .Ve .Sp To show only video packets belonging to the video stream with index 1: .Sp .Vb 1 \& ffprobe \-show_packets \-select_streams v:1 INPUT .Ve .IP "\fB\-show_data\fR" 4 .IX Item "-show_data" Show payload data, as a hexadecimal and \s-1ASCII\s0 dump. Coupled with \&\fB\-show_packets\fR, it will dump the packets' data. Coupled with \&\fB\-show_streams\fR, it will dump the codec extradata. .Sp The dump is printed as the \*(L"data\*(R" field. It may contain newlines. .IP "\fB\-show_data_hash\fR \fIalgorithm\fR" 4 .IX Item "-show_data_hash algorithm" Show a hash of payload data, for packets with \fB\-show_packets\fR and for codec extradata with \fB\-show_streams\fR. .IP "\fB\-show_error\fR" 4 .IX Item "-show_error" Show information about the error found when trying to probe the input. .Sp The error information is printed within a section with name \*(L"\s-1ERROR\*(R".\s0 .IP "\fB\-show_format\fR" 4 .IX Item "-show_format" Show information about the container format of the input multimedia stream. .Sp All the container format information is printed within a section with name \*(L"\s-1FORMAT\*(R".\s0 .IP "\fB\-show_format_entry\fR \fIname\fR" 4 .IX Item "-show_format_entry name" Like \fB\-show_format\fR, but only prints the specified entry of the container format information, rather than all. This option may be given more than once, then all specified entries will be shown. .Sp This option is deprecated, use \f(CW\*(C`show_entries\*(C'\fR instead. .IP "\fB\-show_entries\fR \fIsection_entries\fR" 4 .IX Item "-show_entries section_entries" Set list of entries to show. .Sp Entries are specified according to the following syntax. \fIsection_entries\fR contains a list of section entries separated by \f(CW\*(C`:\*(C'\fR. Each section entry is composed by a section name (or unique name), optionally followed by a list of entries local to that section, separated by \f(CW\*(C`,\*(C'\fR. .Sp If section name is specified but is followed by no \f(CW\*(C`=\*(C'\fR, all entries are printed to output, together with all the contained sections. Otherwise only the entries specified in the local section entries list are printed. In particular, if \f(CW\*(C`=\*(C'\fR is specified but the list of local entries is empty, then no entries will be shown for that section. .Sp Note that the order of specification of the local section entries is not honored in the output, and the usual display order will be retained. .Sp The formal syntax is given by: .Sp .Vb 3 \& ::= [,] \& ::= [=[]] \& ::= [:] .Ve .Sp For example, to show only the index and type of each stream, and the \s-1PTS\s0 time, duration time, and stream index of the packets, you can specify the argument: .Sp .Vb 1 \& packet=pts_time,duration_time,stream_index : stream=index,codec_type .Ve .Sp To show all the entries in the section \*(L"format\*(R", but only the codec type in the section \*(L"stream\*(R", specify the argument: .Sp .Vb 1 \& format : stream=codec_type .Ve .Sp To show all the tags in the stream and format sections: .Sp .Vb 1 \& stream_tags : format_tags .Ve .Sp To show only the \f(CW\*(C`title\*(C'\fR tag (if available) in the stream sections: .Sp .Vb 1 \& stream_tags=title .Ve .IP "\fB\-show_packets\fR" 4 .IX Item "-show_packets" Show information about each packet contained in the input multimedia stream. .Sp The information for each single packet is printed within a dedicated section with name \*(L"\s-1PACKET\*(R".\s0 .IP "\fB\-show_frames\fR" 4 .IX Item "-show_frames" Show information about each frame and subtitle contained in the input multimedia stream. .Sp The information for each single frame is printed within a dedicated section with name \*(L"\s-1FRAME\*(R"\s0 or \*(L"\s-1SUBTITLE\*(R".\s0 .IP "\fB\-show_log\fR \fIloglevel\fR" 4 .IX Item "-show_log loglevel" Show logging information from the decoder about each frame according to the value set in \fIloglevel\fR, (see \f(CW\*(C`\-loglevel\*(C'\fR). This option requires \f(CW\*(C`\-show_frames\*(C'\fR. .Sp The information for each log message is printed within a dedicated section with name \*(L"\s-1LOG\*(R".\s0 .IP "\fB\-show_streams\fR" 4 .IX Item "-show_streams" Show information about each media stream contained in the input multimedia stream. .Sp Each media stream information is printed within a dedicated section with name \*(L"\s-1STREAM\*(R".\s0 .IP "\fB\-show_programs\fR" 4 .IX Item "-show_programs" Show information about programs and their streams contained in the input multimedia stream. .Sp Each media stream information is printed within a dedicated section with name \*(L"\s-1PROGRAM_STREAM\*(R".\s0 .IP "\fB\-show_stream_groups\fR" 4 .IX Item "-show_stream_groups" Show information about stream groups and their streams contained in the input multimedia stream. .Sp Each media stream information is printed within a dedicated section with name \*(L"\s-1STREAM_GROUP_STREAM\*(R".\s0 .IP "\fB\-show_chapters\fR" 4 .IX Item "-show_chapters" Show information about chapters stored in the format. .Sp Each chapter is printed within a dedicated section with name \*(L"\s-1CHAPTER\*(R".\s0 .IP "\fB\-count_frames\fR" 4 .IX Item "-count_frames" Count the number of frames per stream and report it in the corresponding stream section. .IP "\fB\-count_packets\fR" 4 .IX Item "-count_packets" Count the number of packets per stream and report it in the corresponding stream section. .IP "\fB\-read_intervals\fR \fIread_intervals\fR" 4 .IX Item "-read_intervals read_intervals" Read only the specified intervals. \fIread_intervals\fR must be a sequence of interval specifications separated by \*(L",\*(R". \&\fBffprobe\fR will seek to the interval starting point, and will continue reading from that. .Sp Each interval is specified by two optional parts, separated by \*(L"%\*(R". .Sp The first part specifies the interval start position. It is interpreted as an absolute position, or as a relative offset from the current position if it is preceded by the \*(L"+\*(R" character. If this first part is not specified, no seeking will be performed when reading this interval. .Sp The second part specifies the interval end position. It is interpreted as an absolute position, or as a relative offset from the current position if it is preceded by the \*(L"+\*(R" character. If the offset specification starts with \*(L"#\*(R", it is interpreted as the number of packets to read (not including the flushing packets) from the interval start. If no second part is specified, the program will read until the end of the input. .Sp Note that seeking is not accurate, thus the actual interval start point may be different from the specified position. Also, when an interval duration is specified, the absolute end time will be computed by adding the duration to the interval start point found by seeking the file, rather than to the specified start value. .Sp The formal syntax is given by: .Sp .Vb 2 \& ::= [|+][%[|+]] \& ::= [,] .Ve .Sp A few examples follow. .RS 4 .IP "\(bu" 4 Seek to time 10, read packets until 20 seconds after the found seek point, then seek to position \f(CW\*(C`01:30\*(C'\fR (1 minute and thirty seconds) and read packets until position \f(CW\*(C`01:45\*(C'\fR. .Sp .Vb 1 \& 10%+20,01:30%01:45 .Ve .IP "\(bu" 4 Read only 42 packets after seeking to position \f(CW\*(C`01:23\*(C'\fR: .Sp .Vb 1 \& 01:23%+#42 .Ve .IP "\(bu" 4 Read only the first 20 seconds from the start: .Sp .Vb 1 \& %+20 .Ve .IP "\(bu" 4 Read from the start until position \f(CW\*(C`02:30\*(C'\fR: .Sp .Vb 1 \& %02:30 .Ve .RE .RS 4 .RE .IP "\fB\-show_private_data, \-private\fR" 4 .IX Item "-show_private_data, -private" Show private data, that is data depending on the format of the particular shown element. This option is enabled by default, but you may need to disable it for specific uses, for example when creating XSD-compliant \s-1XML\s0 output. .IP "\fB\-show_program_version\fR" 4 .IX Item "-show_program_version" Show information related to program version. .Sp Version information is printed within a section with name \&\*(L"\s-1PROGRAM_VERSION\*(R".\s0 .IP "\fB\-show_library_versions\fR" 4 .IX Item "-show_library_versions" Show information related to library versions. .Sp Version information for each library is printed within a section with name \*(L"\s-1LIBRARY_VERSION\*(R".\s0 .IP "\fB\-show_versions\fR" 4 .IX Item "-show_versions" Show information related to program and library versions. This is the equivalent of setting both \fB\-show_program_version\fR and \&\fB\-show_library_versions\fR options. .IP "\fB\-show_pixel_formats\fR" 4 .IX Item "-show_pixel_formats" Show information about all pixel formats supported by FFmpeg. .Sp Pixel format information for each format is printed within a section with name \*(L"\s-1PIXEL_FORMAT\*(R".\s0 .IP "\fB\-show_optional_fields\fR \fIvalue\fR" 4 .IX Item "-show_optional_fields value" Some writers viz. \s-1JSON\s0 and \s-1XML,\s0 omit the printing of fields with invalid or non-applicable values, while other writers always print them. This option enables one to control this behaviour. Valid values are \f(CW\*(C`always\*(C'\fR/\f(CW1\fR, \f(CW\*(C`never\*(C'\fR/\f(CW0\fR and \f(CW\*(C`auto\*(C'\fR/\f(CW\*(C`\-1\*(C'\fR. Default is \fIauto\fR. .IP "\fB\-bitexact\fR" 4 .IX Item "-bitexact" Force bitexact output, useful to produce output which is not dependent on the specific build. .IP "\fB\-i\fR \fIinput_url\fR" 4 .IX Item "-i input_url" Read \fIinput_url\fR. .IP "\fB\-o\fR \fIoutput_url\fR" 4 .IX Item "-o output_url" Write output to \fIoutput_url\fR. If not specified, the output is sent to stdout. .SH "WRITERS" .IX Header "WRITERS" A writer defines the output format adopted by \fBffprobe\fR, and will be used for printing all the parts of the output. .PP A writer may accept one or more arguments, which specify the options to adopt. The options are specified as a list of \fIkey\fR=\fIvalue\fR pairs, separated by \*(L":\*(R". .PP All writers support the following options: .IP "\fBstring_validation, sv\fR" 4 .IX Item "string_validation, sv" Set string validation mode. .Sp The following values are accepted. .RS 4 .IP "\fBfail\fR" 4 .IX Item "fail" The writer will fail immediately in case an invalid string (\s-1UTF\-8\s0) sequence or code point is found in the input. This is especially useful to validate input metadata. .IP "\fBignore\fR" 4 .IX Item "ignore" Any validation error will be ignored. This will result in possibly broken output, especially with the json or xml writer. .IP "\fBreplace\fR" 4 .IX Item "replace" The writer will substitute invalid \s-1UTF\-8\s0 sequences or code points with the string specified with the \fBstring_validation_replacement\fR. .RE .RS 4 .Sp Default value is \fBreplace\fR. .RE .IP "\fBstring_validation_replacement, svr\fR" 4 .IX Item "string_validation_replacement, svr" Set replacement string to use in case \fBstring_validation\fR is set to \fBreplace\fR. .Sp In case the option is not specified, the writer will assume the empty string, that is it will remove the invalid sequences from the input strings. .PP A description of the currently available writers follows. .SS "default" .IX Subsection "default" Default format. .PP Print each section in the form: .PP .Vb 5 \& [SECTION] \& key1=val1 \& ... \& keyN=valN \& [/SECTION] .Ve .PP Metadata tags are printed as a line in the corresponding \s-1FORMAT, STREAM, STREAM_GROUP_STREAM\s0 or \s-1PROGRAM_STREAM\s0 section, and are prefixed by the string \*(L"\s-1TAG:\*(R".\s0 .PP A description of the accepted options follows. .IP "\fBnokey, nk\fR" 4 .IX Item "nokey, nk" If set to 1 specify not to print the key of each field. Default value is 0. .IP "\fBnoprint_wrappers, nw\fR" 4 .IX Item "noprint_wrappers, nw" If set to 1 specify not to print the section header and footer. Default value is 0. .SS "compact, csv" .IX Subsection "compact, csv" Compact and \s-1CSV\s0 format. .PP The \f(CW\*(C`csv\*(C'\fR writer is equivalent to \f(CW\*(C`compact\*(C'\fR, but supports different defaults. .PP Each section is printed on a single line. If no option is specified, the output has the form: .PP .Vb 1 \& section|key1=val1| ... |keyN=valN .Ve .PP Metadata tags are printed in the corresponding \*(L"format\*(R" or \*(L"stream\*(R" section. A metadata tag key, if printed, is prefixed by the string \&\*(L"tag:\*(R". .PP The description of the accepted options follows. .IP "\fBitem_sep, s\fR" 4 .IX Item "item_sep, s" Specify the character to use for separating fields in the output line. It must be a single printable character, it is \*(L"|\*(R" by default (\*(L",\*(R" for the \f(CW\*(C`csv\*(C'\fR writer). .IP "\fBnokey, nk\fR" 4 .IX Item "nokey, nk" If set to 1 specify not to print the key of each field. Its default value is 0 (1 for the \f(CW\*(C`csv\*(C'\fR writer). .IP "\fBescape, e\fR" 4 .IX Item "escape, e" Set the escape mode to use, default to \*(L"c\*(R" (\*(L"csv\*(R" for the \f(CW\*(C`csv\*(C'\fR writer). .Sp It can assume one of the following values: .RS 4 .IP "\fBc\fR" 4 .IX Item "c" Perform C\-like escaping. Strings containing a newline (\fB\en\fR), carriage return (\fB\er\fR), a tab (\fB\et\fR), a form feed (\fB\ef\fR), the escaping character (\fB\e\fR) or the item separator character \fI\s-1SEP\s0\fR are escaped using C\-like fashioned escaping, so that a newline is converted to the sequence \fB\en\fR, a carriage return to \fB\er\fR, \fB\e\fR to \fB\e\e\fR and the separator \fI\s-1SEP\s0\fR is converted to \fB\e\fR\fI\s-1SEP\s0\fR. .IP "\fBcsv\fR" 4 .IX Item "csv" Perform CSV-like escaping, as described in \s-1RFC4180.\s0 Strings containing a newline (\fB\en\fR), a carriage return (\fB\er\fR), a double quote (\fB"\fR), or \fI\s-1SEP\s0\fR are enclosed in double-quotes. .IP "\fBnone\fR" 4 .IX Item "none" Perform no escaping. .RE .RS 4 .RE .IP "\fBprint_section, p\fR" 4 .IX Item "print_section, p" Print the section name at the beginning of each line if the value is \&\f(CW1\fR, disable it with value set to \f(CW0\fR. Default value is \&\f(CW1\fR. .SS "flat" .IX Subsection "flat" Flat format. .PP A free-form output where each line contains an explicit key=value, such as \&\*(L"streams.stream.3.tags.foo=bar\*(R". The output is shell escaped, so it can be directly embedded in sh scripts as long as the separator character is an alphanumeric character or an underscore (see \fIsep_char\fR option). .PP The description of the accepted options follows. .IP "\fBsep_char, s\fR" 4 .IX Item "sep_char, s" Separator character used to separate the chapter, the section name, IDs and potential tags in the printed field key. .Sp Default value is \fB.\fR. .IP "\fBhierarchical, h\fR" 4 .IX Item "hierarchical, h" Specify if the section name specification should be hierarchical. If set to 1, and if there is more than one section in the current chapter, the section name will be prefixed by the name of the chapter. A value of 0 will disable this behavior. .Sp Default value is 1. .SS "ini" .IX Subsection "ini" \&\s-1INI\s0 format output. .PP Print output in an \s-1INI\s0 based format. .PP The following conventions are adopted: .IP "\(bu" 4 all key and values are \s-1UTF\-8\s0 .IP "\(bu" 4 \&\fB.\fR is the subgroup separator .IP "\(bu" 4 newline, \fB\et\fR, \fB\ef\fR, \fB\eb\fR and the following characters are escaped .IP "\(bu" 4 \&\fB\e\fR is the escape character .IP "\(bu" 4 \&\fB#\fR is the comment indicator .IP "\(bu" 4 \&\fB=\fR is the key/value separator .IP "\(bu" 4 \&\fB:\fR is not used but usually parsed as key/value separator .PP This writer accepts options as a list of \fIkey\fR=\fIvalue\fR pairs, separated by \fB:\fR. .PP The description of the accepted options follows. .IP "\fBhierarchical, h\fR" 4 .IX Item "hierarchical, h" Specify if the section name specification should be hierarchical. If set to 1, and if there is more than one section in the current chapter, the section name will be prefixed by the name of the chapter. A value of 0 will disable this behavior. .Sp Default value is 1. .SS "json" .IX Subsection "json" \&\s-1JSON\s0 based format. .PP Each section is printed using \s-1JSON\s0 notation. .PP The description of the accepted options follows. .IP "\fBcompact, c\fR" 4 .IX Item "compact, c" If set to 1 enable compact output, that is each section will be printed on a single line. Default value is 0. .PP For more information about \s-1JSON,\s0 see <\fBhttp://www.json.org/\fR>. .SS "xml" .IX Subsection "xml" \&\s-1XML\s0 based format. .PP The \s-1XML\s0 output is described in the \s-1XML\s0 schema description file \&\fIffprobe.xsd\fR installed in the FFmpeg datadir. .PP An updated version of the schema can be retrieved at the url <\fBhttp://www.ffmpeg.org/schema/ffprobe.xsd\fR>, which redirects to the latest schema committed into the FFmpeg development source code tree. .PP Note that the output issued will be compliant to the \&\fIffprobe.xsd\fR schema only when no special global output options (\fBunit\fR, \fBprefix\fR, \fBbyte_binary_prefix\fR, \&\fBsexagesimal\fR etc.) are specified. .PP The description of the accepted options follows. .IP "\fBfully_qualified, q\fR" 4 .IX Item "fully_qualified, q" If set to 1 specify if the output should be fully qualified. Default value is 0. This is required for generating an \s-1XML\s0 file which can be validated through an \s-1XSD\s0 file. .IP "\fBxsd_strict, x\fR" 4 .IX Item "xsd_strict, x" If set to 1 perform more checks for ensuring that the output is \s-1XSD\s0 compliant. Default value is 0. This option automatically sets \fBfully_qualified\fR to 1. .PP For more information about the \s-1XML\s0 format, see <\fBhttps://www.w3.org/XML/\fR>. .SH "TIMECODE" .IX Header "TIMECODE" \&\fBffprobe\fR supports Timecode extraction: .IP "\(bu" 4 \&\s-1MPEG1/2\s0 timecode is extracted from the \s-1GOP,\s0 and is available in the video stream details (\fB\-show_streams\fR, see \fItimecode\fR). .IP "\(bu" 4 \&\s-1MOV\s0 timecode is extracted from tmcd track, so is available in the tmcd stream metadata (\fB\-show_streams\fR, see \fITAG:timecode\fR). .IP "\(bu" 4 \&\s-1DV, GXF\s0 and \s-1AVI\s0 timecodes are available in format metadata (\fB\-show_format\fR, see \fITAG:timecode\fR). .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 \& [\-]+[....][s|ms|us] .Ve .PP \&\fIS\fR expresses the number of seconds, with the optional decimal part \&\fIm\fR. The optional literal suffixes \fBs\fR, \fBms\fR or \fBus\fR indicate to interpret the value as seconds, milliseconds or microseconds, respectively. .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 "\fB0.2\fR" 4 .IX Item "0.2" 0.2 seconds .IP "\fB200ms\fR" 4 .IX Item "200ms" 200 milliseconds, that's 0.2s .IP "\fB200000us\fR" 4 .IX Item "200000us" 200000 microseconds, that's 0.2s .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 "\fB3.1.2\fR" 4 .IX Item "3.1.2" \&\s-1FL+FR+FC+LFE+TFL+TFR\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 "\fB5.1.2\fR" 4 .IX Item "5.1.2" \&\s-1FL+FR+FC+LFE+BL+BR+TFL+TFR\s0 .IP "\fBoctagonal\fR" 4 .IX Item "octagonal" \&\s-1FL+FR+FC+BL+BR+BC+SL+SR\s0 .IP "\fBcube\fR" 4 .IX Item "cube" \&\s-1FL+FR+BL+BR+TFL+TFR+TBL+TBR\s0 .IP "\fB5.1.4\fR" 4 .IX Item "5.1.4" \&\s-1FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR\s0 .IP "\fB7.1.2\fR" 4 .IX Item "7.1.2" \&\s-1FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR\s0 .IP "\fB7.1.4\fR" 4 .IX Item "7.1.4" \&\s-1FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBL+TBR\s0 .IP "\fB7.2.3\fR" 4 .IX Item "7.2.3" \&\s-1FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBC+LFE2\s0 .IP "\fB9.1.4\fR" 4 .IX Item "9.1.4" \&\s-1FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR\s0 .IP "\fBhexadecagonal\fR" 4 .IX Item "hexadecagonal" \&\s-1FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR\s0 .IP "\fBdownmix\fR" 4 .IX Item "downmix" \&\s-1DL+DR\s0 .IP "\fB22.2\fR" 4 .IX Item "22.2" \&\s-1FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR\s0 .PP A custom channel layout can be specified as a sequence of terms, separated by '+'. Each term can be: .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.), each optionally containing a custom name after a '@', (e.g. \fBFL@Left\fR, \&\fBFR@Right\fR, \fBFC@Center\fR, \fBLFE@Low_Frequency\fR, etc.) .PP A standard channel layout can be specified by the following: .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 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 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_channel_layout_default\*(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_channel_layout_from_string\*(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(y, x)\fR" 4 .IX Item "atan2(y, x)" 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(idx)\fR" 4 .IX Item "random(idx)" Return a pseudo random value between 0.0 and 1.0. \fIidx\fR is the index of the internal variable which will be used to save the seed/state. .IP "\fBrandomi(idx, min, max)\fR" 4 .IX Item "randomi(idx, min, max)" Return a pseudo random value in the interval between \fImin\fR and \&\fImax\fR. \fIidx\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 "\fBsgn(x)\fR" 4 .IX Item "sgn(x)" Compute sign of \fIx\fR. .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^50 .IP "\fBE\fR" 4 .IX Item "E" 10^18 / 2^60 .IP "\fBZ\fR" 4 .IX Item "Z" 10^21 / 2^70 .IP "\fBY\fR" 4 .IX Item "Y" 10^24 / 2^80 .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 "\fBpsnr\fR" 4 .IX Item "psnr" Set error[?] variables during encoding. .IP "\fBtruncated\fR" 4 .IX Item "truncated" Input bitstream might be randomly truncated. .IP "\fBdrop_changed\fR" 4 .IX Item "drop_changed" Don't output frames whose parameters differ from first decoded frame in stream. Error \s-1AVERROR_INPUT_CHANGED\s0 is returned when a frame is dropped. .IP "\fBildct\fR" 4 .IX Item "ildct" 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 "\fBilme\fR" 4 .IX Item "ilme" Apply interlaced motion estimation. .IP "\fBcgop\fR" 4 .IX Item "cgop" Use closed gop. .IP "\fBoutput_corrupt\fR" 4 .IX Item "output_corrupt" Output even potentially corrupted frames. .RE .RS 4 .RE .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 "\fBcodec_tag\fR \fIinteger\fR" 4 .IX Item "codec_tag integer" .PD 0 .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 "\fBxvid_ilace\fR" 4 .IX Item "xvid_ilace" .PD 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 "\fBqpel_chroma\fR" 4 .IX Item "qpel_chroma" .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 "\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 "\fBrc_override_count\fR \fIinteger\fR" 4 .IX Item "rc_override_count integer" .IP "\fBmaxrate\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "maxrate integer (encoding,audio,video)" .PD 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 "\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 "\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 "\fBxvid\fR" 4 .IX Item "xvid" .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 "\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. .RS 4 .IP "\fB(1024, \s-1INT_MAX\s0)\fR" 4 .IX Item "(1024, INT_MAX)" full motion estimation(slowest) .IP "\fB(768, 1024]\fR" 4 .IX Item "(768, 1024]" umh motion estimation .IP "\fB(512, 768]\fR" 4 .IX Item "(512, 768]" hex motion estimation .IP "\fB(256, 512]\fR" 4 .IX Item "(256, 512]" l2s diamond motion estimation .IP "\fB[2,256]\fR" 4 .IX Item "[2,256]" var diamond motion estimation .IP "\fB(\-1, 2)\fR" 4 .IX Item "(-1, 2)" small diamond motion estimation .IP "\fB\-1\fR" 4 .IX Item "-1" funny diamond motion estimation .IP "\fB(\s-1INT_MIN,\s0 \-1)\fR" 4 .IX Item "(INT_MIN, -1)" sab diamond motion estimation .RE .RS 4 .RE .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 "\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 "\fBme_range\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4 .IX Item "me_range integer (encoding,video)" Set limit motion vectors range (1023 for DivX player). .IP "\fBglobal_quality\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "global_quality integer (encoding,audio,video)" .PD 0 .IP "\fBslice_flags\fR \fIinteger\fR" 4 .IX Item "slice_flags integer" .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 "\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,subtitles\fR\fB)\fR" 4 .IX Item "flags2 flags (decoding/encoding,audio,video,subtitles)" Possible values: .RS 4 .IP "\fBfast\fR" 4 .IX Item "fast" Allow non spec compliant speedup tricks. .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 "\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. .IP "\fBskip_manual\fR" 4 .IX Item "skip_manual" Do not skip samples and export skip information as frame side data. .IP "\fBass_ro_flush_noop\fR" 4 .IX Item "ass_ro_flush_noop" Do not reset \s-1ASS\s0 ReadOrder field on flush. .IP "\fBicc_profiles\fR" 4 .IX Item "icc_profiles" Generate/parse embedded \s-1ICC\s0 profiles from/to colorimetry tags. .RE .RS 4 .RE .IP "\fBexport_side_data\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video,subtitles\fR\fB)\fR" 4 .IX Item "export_side_data flags (decoding/encoding,audio,video,subtitles)" Possible values: .RS 4 .IP "\fBmvs\fR" 4 .IX Item "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. .IP "\fBprft\fR" 4 .IX Item "prft" Export encoder Producer Reference Time into packet side-data (see \f(CW\*(C`AV_PKT_DATA_PRFT\*(C'\fR) for codecs that support it. .IP "\fBvenc_params\fR" 4 .IX Item "venc_params" Export video encoding parameters through frame side data (see \f(CW\*(C`AV_FRAME_DATA_VIDEO_ENC_PARAMS\*(C'\fR) for codecs that support it. At present, those are H.264 and \s-1VP9.\s0 .IP "\fBfilm_grain\fR" 4 .IX Item "film_grain" Export film grain parameters through frame side data (see \f(CW\*(C`AV_FRAME_DATA_FILM_GRAIN_PARAMS\*(C'\fR). Supported at present by \s-1AV1\s0 decoders. .RE .RS 4 .RE .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 "\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)" Set encoder codec profile. Default value is \fBunknown\fR. Encoder specific profiles are documented in the relevant encoder documentation. .IP "\fBlevel\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "level integer (encoding,audio,video)" Set the encoder level. This level depends on the specific codec, and might correspond to the profile level. It is set by default to \&\fBunknown\fR. .Sp 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 "\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 "\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 "\fBnointra\fR" 4 .IX Item "nointra" Discard all frames except I frames. .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 "\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 "\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 "\fBcompression_level\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4 .IX Item "compression_level integer (encoding,audio,video)" .IP "\fBbits_per_raw_sample\fR \fIinteger\fR" 4 .IX Item "bits_per_raw_sample integer" .IP "\fBchannel_layout\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4 .IX Item "channel_layout integer (decoding/encoding,audio)" .PD See \fBthe Channel Layout section in the \fBffmpeg\-utils\fB\|(1) manual\fR for the required syntax. .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 "\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 .IP "\fBchroma-derived-nc\fR" 4 .IX Item "chroma-derived-nc" Chroma-derived \s-1NCL\s0 .IP "\fBchroma-derived-c\fR" 4 .IX Item "chroma-derived-c" Chroma-derived \s-1CL\s0 .IP "\fBictcp\fR" 4 .IX Item "ictcp" ICtCp .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" .IP "\fBlimited\fR" 4 .IX Item "limited" .PD \&\s-1MPEG\s0 (219*2^(n\-8)) .IP "\fBpc\fR" 4 .IX Item "pc" .PD 0 .IP "\fBjpeg\fR" 4 .IX Item "jpeg" .IP "\fBfull\fR" 4 .IX Item "full" .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 indentation: .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 "av1" .IX Subsection "av1" AOMedia Video 1 (\s-1AV1\s0) decoder. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBoperating_point\fR" 4 .IX Item "operating_point" Select an operating point of a scalable \s-1AV1\s0 bitstream (0 \- 31). Default is 0. .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 "libdav1d" .IX Subsection "libdav1d" dav1d \s-1AV1\s0 decoder. .PP libdav1d allows libavcodec to decode the AOMedia Video 1 (\s-1AV1\s0) codec. Requires the presence of the libdav1d headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libdav1d\*(C'\fR. .PP \fIOptions\fR .IX Subsection "Options" .PP The following options are supported by the libdav1d wrapper. .IP "\fBframethreads\fR" 4 .IX Item "framethreads" Set amount of frame threads to use during decoding. The default value is 0 (autodetect). This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the option \f(CW\*(C`max_frame_delay\*(C'\fR and the global option \f(CW\*(C`threads\*(C'\fR instead. .IP "\fBtilethreads\fR" 4 .IX Item "tilethreads" Set amount of tile threads to use during decoding. The default value is 0 (autodetect). This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the global option \f(CW\*(C`threads\*(C'\fR instead. .IP "\fBmax_frame_delay\fR" 4 .IX Item "max_frame_delay" Set max amount of frames the decoder may buffer internally. The default value is 0 (autodetect). .IP "\fBfilmgrain\fR" 4 .IX Item "filmgrain" Apply film grain to the decoded video if present in the bitstream. Defaults to the internal default of the library. This option is deprecated and will be removed in the future. See the global option \&\f(CW\*(C`export_side_data\*(C'\fR to export Film Grain parameters instead of applying it. .IP "\fBoppoint\fR" 4 .IX Item "oppoint" Select an operating point of a scalable \s-1AV1\s0 bitstream (0 \- 31). Defaults to the internal default of the library. .IP "\fBalllayers\fR" 4 .IX Item "alllayers" Output all spatial layers of a scalable \s-1AV1\s0 bitstream. The default value is false. .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. .SS "libuavs3d" .IX Subsection "libuavs3d" \&\s-1AVS3\-P2/IEEE1857.10\s0 video decoder. .PP libuavs3d allows libavcodec to decode \s-1AVS3\s0 streams. Requires the presence of the libuavs3d headers and library during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libuavs3d\*(C'\fR. .PP \fIOptions\fR .IX Subsection "Options" .PP The following option is supported by the libuavs3d wrapper. .IP "\fBframe_threads\fR" 4 .IX Item "frame_threads" Set amount of frame threads to use during decoding. The default value is 0 (autodetect). .SS "libxevd" .IX Subsection "libxevd" eXtra-fast Essential Video Decoder (\s-1XEVD\s0) \s-1MPEG\-5 EVC\s0 decoder wrapper. .PP This decoder requires the presence of the libxevd headers and library during configuration. You need to explicitly configure the build with \&\fB\-\-enable\-libxevd\fR. .PP The xevd project website is at <\fBhttps://github.com/mpeg5/xevd\fR>. .PP \fIOptions\fR .IX Subsection "Options" .PP The following options are supported by the libxevd wrapper. The xevd-equivalent options or values are listed in parentheses for easy migration. .PP To get a more accurate and extensive documentation of the libxevd options, invoke the command \f(CW\*(C`xevd_app \-\-help\*(C'\fR or consult the libxevd documentation. .IP "\fBthreads (\fR\fIthreads\fR\fB)\fR" 4 .IX Item "threads (threads)" Force to use a specific number of threads .SS "\s-1QSV\s0 Decoders" .IX Subsection "QSV Decoders" The family of Intel QuickSync Video decoders (\s-1VC1, MPEG\-2, H.264, HEVC, JPEG/MJPEG, VP8, VP9, AV1\s0). .PP \fICommon Options\fR .IX Subsection "Common Options" .PP The following options are supported by all qsv decoders. .IP "\fIasync_depth\fR" 4 .IX Item "async_depth" Internal parallelization depth, the higher the value the higher the latency. .IP "\fIgpu_copy\fR" 4 .IX Item "gpu_copy" A GPU-accelerated copy between video and system memory .RS 4 .IP "\fBdefault\fR" 4 .IX Item "default" .PD 0 .IP "\fBon\fR" 4 .IX Item "on" .IP "\fBoff\fR" 4 .IX Item "off" .RE .RS 4 .RE .PD .PP \fI\s-1HEVC\s0 Options\fR .IX Subsection "HEVC Options" .PP Extra options for hevc_qsv. .IP "\fIload_plugin\fR" 4 .IX Item "load_plugin" A user plugin to load in an internal session .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" .PD 0 .IP "\fBhevc_sw\fR" 4 .IX Item "hevc_sw" .IP "\fBhevc_hw\fR" 4 .IX Item "hevc_hw" .RE .RS 4 .RE .IP "\fIload_plugins\fR" 4 .IX Item "load_plugins" .PD A :\-separate list of hexadecimal plugin UIDs to load in an internal session .SS "v210" .IX Subsection "v210" Uncompressed 4:2:2 10\-bit decoder. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBcustom_stride\fR" 4 .IX Item "custom_stride" Set the line size of the v210 data in bytes. The default value is 0 (autodetect). You can use the special \-1 value for a strideless v210 as seen in \&\s-1BOXX\s0 files. .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. The default value is 1. 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 "libaribb24" .IX Subsection "libaribb24" \&\s-1ARIB STD\-B24\s0 caption decoder. .PP Implements profiles A and C of the \s-1ARIB STD\-B24\s0 standard. .PP \fIlibaribb24 Decoder Options\fR .IX Subsection "libaribb24 Decoder Options" .IP "\fB\-aribb24\-base\-path\fR \fIpath\fR" 4 .IX Item "-aribb24-base-path path" Sets the base path for the libaribb24 library. This is utilized for reading of configuration files (for custom unicode conversions), and for dumping of non-text symbols as images under that location. .Sp Unset by default. .IP "\fB\-aribb24\-skip\-ruby\-text\fR \fIboolean\fR" 4 .IX Item "-aribb24-skip-ruby-text boolean" Tells the decoder wrapper to skip text blocks that contain half-height ruby text. .Sp Enabled by default. .SS "libaribcaption" .IX Subsection "libaribcaption" Yet another \s-1ARIB STD\-B24\s0 caption decoder using external \fIlibaribcaption\fR library. .PP Implements profiles A and C of the Japanse \s-1ARIB STD\-B24\s0 standard, Brazilian \s-1ABNT NBR 15606\-1,\s0 and Philippines version of ISDB-T. .PP Requires the presence of the libaribcaption headers and library (<\fBhttps://github.com/xqq/libaribcaption\fR>) during configuration. You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libaribcaption\*(C'\fR. If both \fIlibaribb24\fR and \fIlibaribcaption\fR are enabled, \fIlibaribcaption\fR decoder precedes. .PP \fIlibaribcaption Decoder Options\fR .IX Subsection "libaribcaption Decoder Options" .IP "\fB\-sub_type\fR \fIsubtitle_type\fR" 4 .IX Item "-sub_type subtitle_type" Specifies the format of the decoded subtitles. .RS 4 .IP "\fBbitmap\fR" 4 .IX Item "bitmap" Graphical image. .IP "\fBass\fR" 4 .IX Item "ass" \&\s-1ASS\s0 formatted text. .IP "\fBtext\fR" 4 .IX Item "text" Simple text based output without formatting. .RE .RS 4 .Sp The default is \fIass\fR as same as \fIlibaribb24\fR decoder. Some present players (e.g., \fImpv\fR) expect \s-1ASS\s0 format for \s-1ARIB\s0 caption. .RE .IP "\fB\-caption_encoding\fR \fIencoding_scheme\fR" 4 .IX Item "-caption_encoding encoding_scheme" Specifies the encoding scheme of input subtitle text. .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" Automatically detect text encoding (default). .IP "\fBjis\fR" 4 .IX Item "jis" 8bit\-char \s-1JIS\s0 encoding defined in \s-1ARIB STD B24.\s0 This encoding used in Japan for \s-1ISDB\s0 captions. .IP "\fButf8\fR" 4 .IX Item "utf8" \&\s-1UTF\-8\s0 encoding defined in \s-1ARIB STD B24.\s0 This encoding is used in Philippines for ISDB-T captions. .IP "\fBlatin\fR" 4 .IX Item "latin" Latin character encoding defined in \s-1ABNT NBR 15606\-1.\s0 This encoding is used in South America for \s-1SBTVD /\s0 ISDB-Tb captions. .RE .RS 4 .RE .IP "\fB\-font\fR \fIfont_name[,font_name2,...]\fR" 4 .IX Item "-font font_name[,font_name2,...]" Specify comma-separated list of font family names to be used for \fIbitmap\fR or \fIass\fR type subtitle rendering. Only first font name is used for \fIass\fR type subtitle. .Sp If not specified, use internaly defined default font family. .IP "\fB\-ass_single_rect\fR \fIboolean\fR" 4 .IX Item "-ass_single_rect boolean" \&\s-1ARIB STD\-B24\s0 specifies that some captions may be displayed at different positions at a time (multi-rectangle subtitle). Since some players (e.g., old \fImpv\fR) can't handle multiple \s-1ASS\s0 rectangles in a single AVSubtitle, or multiple \s-1ASS\s0 rectangles of indeterminate duration with the same start timestamp, this option can change the behavior so that all the texts are displayed in a single \s-1ASS\s0 rectangle. .Sp The default is \fIfalse\fR. .Sp If your player cannot handle AVSubtitles with multiple \s-1ASS\s0 rectangles properly, set this option to \fItrue\fR or define \fBASS_SINGLE_RECT=1\fR to change default behavior at compilation. .IP "\fB\-force_outline_text\fR \fIboolean\fR" 4 .IX Item "-force_outline_text boolean" Specify whether always render outline text for all characters regardless of the indication by charactor style. .Sp The default is \fIfalse\fR. .IP "\fB\-outline_width\fR \fInumber\fR \fB(0.0 \- 3.0)\fR" 4 .IX Item "-outline_width number (0.0 - 3.0)" Specify width for outline text, in dots (relative). .Sp The default is \fI1.5\fR. .IP "\fB\-ignore_background\fR \fIboolean\fR" 4 .IX Item "-ignore_background boolean" Specify whether to ignore background color rendering. .Sp The default is \fIfalse\fR. .IP "\fB\-ignore_ruby\fR \fIboolean\fR" 4 .IX Item "-ignore_ruby boolean" Specify whether to ignore rendering for ruby-like (furigana) characters. .Sp The default is \fIfalse\fR. .IP "\fB\-replace_drcs\fR \fIboolean\fR" 4 .IX Item "-replace_drcs boolean" Specify whether to render replaced \s-1DRCS\s0 characters as Unicode characters. .Sp The default is \fItrue\fR. .IP "\fB\-replace_msz_ascii\fR \fIboolean\fR" 4 .IX Item "-replace_msz_ascii boolean" Specify whether to replace \s-1MSZ\s0 (Middle Size; half width) fullwidth alphanumerics with halfwidth alphanumerics. .Sp The default is \fItrue\fR. .IP "\fB\-replace_msz_japanese\fR \fIboolean\fR" 4 .IX Item "-replace_msz_japanese boolean" Specify whether to replace some \s-1MSZ\s0 (Middle Size; half width) fullwidth japanese special characters with halfwidth ones. .Sp The default is \fItrue\fR. .IP "\fB\-replace_msz_glyph\fR \fIboolean\fR" 4 .IX Item "-replace_msz_glyph boolean" Specify whether to replace \s-1MSZ\s0 (Middle Size; half width) characters with halfwidth glyphs if the fonts supports it. This option works under FreeType or DirectWrite renderer with Adobe\-Japan1 compliant fonts. e.g., \s-1IBM\s0 Plex Sans \s-1JP,\s0 Morisawa \s-1BIZ\s0 UDGothic, Morisawa \s-1BIZ\s0 UDMincho, Yu Gothic, Yu Mincho, and Meiryo. .Sp The default is \fItrue\fR. .IP "\fB\-canvas_size\fR \fIimage_size\fR" 4 .IX Item "-canvas_size image_size" Specify the resolution of the canvas to render subtitles to; usually, this should be frame size of input video. This only applies when \f(CW\*(C`\-subtitle_type\*(C'\fR is set to \fIbitmap\fR. .Sp The libaribcaption decoder assumes input frame size for bitmap rendering as below: .RS 4 .IP "1." 4 \&\s-1PROFILE_A : 1440\s0 x 1080 with \s-1SAR\s0 (\s-1PAR\s0) 4:3 .IP "2." 4 \&\s-1PROFILE_C : 320\s0 x 180 with \s-1SAR\s0 (\s-1PAR\s0) 1:1 .RE .RS 4 .Sp If actual frame size of input video does not match above assumption, the rendered captions may be distorted. To make the captions undistorted, add \f(CW\*(C`\-canvas_size\*(C'\fR option to specify actual input video size. .Sp Note that the \f(CW\*(C`\-canvas_size\*(C'\fR option is not required for video with different size but same aspect ratio. In such cases, the caption will be stretched or shrunk to actual video size if \f(CW\*(C`\-canvas_size\*(C'\fR option is not specified. If \f(CW\*(C`\-canvas_size\*(C'\fR option is specified with different size, the caption will be stretched or shrunk as specified size with calculated \s-1SAR.\s0 .RE .PP \fIlibaribcaption decoder usage examples\fR .IX Subsection "libaribcaption decoder usage examples" .PP Display MPEG-TS file with \s-1ARIB\s0 subtitle by \f(CW\*(C`ffplay\*(C'\fR tool: .PP .Vb 1 \& ffplay \-sub_type bitmap MPEG.TS .Ve .PP Display MPEG-TS file with input frame size 1920x1080 by \f(CW\*(C`ffplay\*(C'\fR tool: .PP .Vb 1 \& ffplay \-sub_type bitmap \-canvas_size 1920x1080 MPEG.TS .Ve .PP Embed \s-1ARIB\s0 subtitle in transcoded video: .PP .Vb 1 \& ffmpeg \-sub_type bitmap \-i src.m2t \-filter_complex "[0:v][0:s]overlay" \-vcodec h264 dest.mp4 .Ve .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\-2\fR" 4 .IX Item "-2" .PD Compute clut once if no matching \s-1CLUT\s0 is in the stream. .IP "\fB\-1\fR" 4 .IX Item "-1" 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 commas, 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_default_region\fR" 4 .IX Item "txt_default_region" Set default character set used for decoding, a value between 0 and 87 (see \&\s-1ETS 300 706,\s0 Section 15, Table 32). Default value is \-1, which does not override the libzvbi default. This option is needed for some legacy level 1.0 transmissions which cannot signal the proper charset. .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 (\fItime_scale / num_units_in_display_tick\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. .IP "\fBdelete_padding\fR" 4 .IX Item "delete_padding" Deletes Padding OBUs. .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 except when said packets already exactly begin with the extradata that is intended to be added. .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 \fBk\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 "dv_error_marker" .IX Subsection "dv_error_marker" Blocks in \s-1DV\s0 which are marked as damaged are replaced by blocks of the specified color. .IP "\fBcolor\fR" 4 .IX Item "color" The color to replace damaged blocks by .IP "\fBsta\fR" 4 .IX Item "sta" A 16 bit mask which specifies which of the 16 possible error status values are to be replaced by colored blocks. 0xFFFE is the default which replaces all non 0 error status values. .RS 4 .IP "\fBok\fR" 4 .IX Item "ok" No error, no concealment .IP "\fBerr\fR" 4 .IX Item "err" Error, No concealment .IP "\fBres\fR" 4 .IX Item "res" Reserved .IP "\fBnotok\fR" 4 .IX Item "notok" Error or concealment .IP "\fBnotres\fR" 4 .IX Item "notres" Not reserved .IP "\fBAa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru\fR" 4 .IX Item "Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru" The specific error status code .RE .RS 4 .Sp see page 44\-46 or section 5.5 of <\fBhttp://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf\fR> .RE .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 The types used by pass_types and remove_types correspond to \s-1NAL\s0 unit types (nal_unit_type) in H.264, \s-1HEVC\s0 and H.266 (see Table 7\-1 in the H.264 and \s-1HEVC\s0 specifications or Table 5 in the H.266 specification), to marker values for \s-1JPEG\s0 (without 0xFF prefix) and to start codes without start code prefix (i.e. the byte following the 0x000001) for \s-1MPEG\-2.\s0 For \s-1VP8\s0 and \s-1VP9,\s0 every unit has type zero. .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 .PP To remove all user data from a \s-1MPEG\-2\s0 stream, including Closed Captions: .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=remove_types=178\*(Aq OUTPUT .Ve .PP To remove all \s-1SEI\s0 from a H264 stream, including Closed Captions: .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=remove_types=6\*(Aq OUTPUT .Ve .PP To remove all prefix and suffix \s-1SEI\s0 from a \s-1HEVC\s0 stream, including Closed Captions and dynamic \s-1HDR:\s0 .PP .Vb 1 \& ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=remove_types=39|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 "\fBpass\fR" 4 .IX Item "pass" .PD 0 .IP "\fBinsert\fR" 4 .IX Item "insert" .IP "\fBremove\fR" 4 .IX Item "remove" .RE .RS 4 .PD .Sp Default is pass. .RE .IP "\fBsample_aspect_ratio\fR" 4 .IX Item "sample_aspect_ratio" Set the sample aspect ratio of the stream in the \s-1VUI\s0 parameters. See H.264 table E\-1. .IP "\fBoverscan_appropriate_flag\fR" 4 .IX Item "overscan_appropriate_flag" Set whether the stream is suitable for display using overscan or not (see H.264 section E.2.1). .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 (time_scale / num_units_in_tick) 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 "\fBzero_new_constraint_set_flags\fR" 4 .IX Item "zero_new_constraint_set_flags" Zero constraint_set4_flag and constraint_set5_flag in the \s-1SPS.\s0 These bits were reserved in a previous version of the H.264 spec, and thus some hardware decoders require these to be zero. The result of zeroing this is still a valid bitstream. .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 "\fBdisplay_orientation\fR" 4 .IX Item "display_orientation" Insert, extract or remove Display orientation \s-1SEI\s0 messages. See H.264 section D.1.27 and D.2.27 for syntax and semantics. .RS 4 .IP "\fBpass\fR" 4 .IX Item "pass" .PD 0 .IP "\fBinsert\fR" 4 .IX Item "insert" .IP "\fBremove\fR" 4 .IX Item "remove" .IP "\fBextract\fR" 4 .IX Item "extract" .RE .RS 4 .PD .Sp Default is pass. .Sp Insert mode works in conjunction with \f(CW\*(C`rotate\*(C'\fR and \f(CW\*(C`flip\*(C'\fR options. Any pre-existing Display orientation messages will be removed in insert or remove mode. Extract mode attaches the display matrix to the packet as side data. .RE .IP "\fBrotate\fR" 4 .IX Item "rotate" Set rotation in display orientation \s-1SEI\s0 (anticlockwise angle in degrees). Range is \-360 to +360. Default is NaN. .IP "\fBflip\fR" 4 .IX Item "flip" Set flip in display orientation \s-1SEI.\s0 .RS 4 .IP "\fBhorizontal\fR" 4 .IX Item "horizontal" .PD 0 .IP "\fBvertical\fR" 4 .IX Item "vertical" .RE .RS 4 .PD .Sp Default is unset. .RE .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. .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 (time_scale / num_units_in_tick). 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). .IP "\fBlevel\fR" 4 .IX Item "level" Set the level in the \s-1VPS\s0 and \s-1SPS.\s0 See H.265 section A.4 and tables A.6 and A.7. .Sp The argument must be the name of a level (for example, \fB5.1\fR), a \&\fIgeneral_level_idc\fR value (for example, \fB153\fR for level 5.1), or the special name \fBauto\fR indicating that the filter should attempt to guess the level from the input stream properties. .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 "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" Accepts an expression whose evaluation per-packet determines how often bytes in that packet will be modified. A value below 0 will result in a variable frequency. Default is 0 which results in no modification. However, if neither amount nor drop is specified, amount will be set to \fI\-1\fR. See below for accepted variables. .IP "\fBdrop\fR" 4 .IX Item "drop" Accepts an expression evaluated per-packet whose value determines whether that packet is dropped. Evaluation to a positive value results in the packet being dropped. Evaluation to a negative value results in a variable chance of it being dropped, roughly inverse in proportion to the magnitude of the value. Default is 0 which results in no drops. See below for accepted variables. .IP "\fBdropamount\fR" 4 .IX Item "dropamount" Accepts a non-negative integer, which assigns a variable chance of it being dropped, roughly inverse in proportion to the value. Default is 0 which results in no drops. This option is kept for backwards compatibility and is equivalent to setting drop to a negative value with the same magnitude i.e. \f(CW\*(C`dropamount=4\*(C'\fR is the same as \f(CW\*(C`drop=\-4\*(C'\fR. Ignored if drop is also specified. .PP Both \f(CW\*(C`amount\*(C'\fR and \f(CW\*(C`drop\*(C'\fR accept expressions containing the following variables: .IP "\fBn\fR" 4 .IX Item "n" The index of the packet, starting from zero. .IP "\fBtb\fR" 4 .IX Item "tb" The timebase for packet timestamps. .IP "\fBpts\fR" 4 .IX Item "pts" Packet presentation timestamp. .IP "\fBdts\fR" 4 .IX Item "dts" Packet decoding timestamp. .IP "\fBnopts\fR" 4 .IX Item "nopts" Constant representing \s-1AV_NOPTS_VALUE.\s0 .IP "\fBstartpts\fR" 4 .IX Item "startpts" First non\-AV_NOPTS_VALUE \s-1PTS\s0 seen in the stream. .IP "\fBstartdts\fR" 4 .IX Item "startdts" First non\-AV_NOPTS_VALUE \s-1DTS\s0 seen in the stream. .IP "\fBduration\fR" 4 .IX Item "duration" .PD 0 .IP "\fBd\fR" 4 .IX Item "d" .PD Packet duration, in timebase units. .IP "\fBpos\fR" 4 .IX Item "pos" Packet position in input; may be \-1 when unknown or not set. .IP "\fBsize\fR" 4 .IX Item "size" Packet size, in bytes. .IP "\fBkey\fR" 4 .IX Item "key" Whether packet is marked as a keyframe. .IP "\fBstate\fR" 4 .IX Item "state" A pseudo random integer, primarily derived from the content of packet payload. .PP \fIExamples\fR .IX Subsection "Examples" .PP Apply modification to every byte but don't drop any packets. .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf noise=1 output.mkv .Ve .PP Drop every video packet not marked as a keyframe after timestamp 30s but do not modify any of the remaining packets. .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf:v noise=drop=\*(Aqgt(t\e,30)*not(key)\*(Aq output.mkv .Ve .PP Drop one second of audio every 10 seconds and add some random noise to the rest. .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf:a noise=amount=\-1:drop=\*(Aqbetween(mod(t\e,10)\e,9\e,10)\*(Aq output.mkv .Ve .SS "null" .IX Subsection "null" This bitstream filter passes the packets through unchanged. .SS "pcm_rechunk" .IX Subsection "pcm_rechunk" Repacketize \s-1PCM\s0 audio to a fixed number of samples per packet or a fixed packet rate per second. This is similar to the \fBasetnsamples audio filter\fR but works on audio packets instead of audio frames. .IP "\fBnb_out_samples, n\fR" 4 .IX Item "nb_out_samples, n" Set the number of samples per each output audio packet. The number is intended as the number of samples \fIper each channel\fR. Default value is 1024. .IP "\fBpad, p\fR" 4 .IX Item "pad, p" If set to 1, the filter will pad the last audio packet with silence, so that it will contain the same number of samples (or roughly the same number of samples, see \fBframe_rate\fR) as the previous ones. Default value is 1. .IP "\fBframe_rate, r\fR" 4 .IX Item "frame_rate, r" This option makes the filter output a fixed number of packets per second instead of a fixed number of samples per packet. If the audio sample rate is not divisible by the frame rate then the number of samples will not be constant but will vary slightly so that each packet will start as close to the frame boundary as possible. Using this option has precedence over \fBnb_out_samples\fR. .PP You can generate the well known 1602\-1601\-1602\-1601\-1602 pattern of 48kHz audio for \s-1NTSC\s0 frame rate using the \fBframe_rate\fR option. .PP .Vb 1 \& ffmpeg \-f lavfi \-i sine=r=48000:d=1 \-c pcm_s16le \-bsf pcm_rechunk=r=30000/1001 \-f framecrc \- .Ve .SS "pgs_frame_merge" .IX Subsection "pgs_frame_merge" Merge a sequence of \s-1PGS\s0 Subtitle segments ending with an \*(L"end of display set\*(R" segment into a single packet. .PP This is required by some containers that support \s-1PGS\s0 subtitles (muxer \f(CW\*(C`matroska\*(C'\fR). .SS "prores_metadata" .IX Subsection "prores_metadata" Modify color property metadata embedded in prores stream. .IP "\fBcolor_primaries\fR" 4 .IX Item "color_primaries" Set the color primaries. Available values are: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" Keep the same color primaries property (default). .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBbt709\fR" 4 .IX Item "bt709" .IP "\fBbt470bg\fR" 4 .IX Item "bt470bg" .PD \&\s-1BT601 625\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1BT601 525\s0 .IP "\fBbt2020\fR" 4 .IX Item "bt2020" .PD 0 .IP "\fBsmpte431\fR" 4 .IX Item "smpte431" .PD \&\s-1DCI P3\s0 .IP "\fBsmpte432\fR" 4 .IX Item "smpte432" P3 D65 .RE .RS 4 .RE .IP "\fBtransfer_characteristics\fR" 4 .IX Item "transfer_characteristics" Set the color transfer. Available values are: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" Keep the same transfer characteristics property (default). .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBbt709\fR" 4 .IX Item "bt709" .PD \&\s-1BT 601, BT 709, BT 2020\s0 .IP "\fBsmpte2084\fR" 4 .IX Item "smpte2084" \&\s-1SMPTE ST 2084\s0 .IP "\fBarib\-std\-b67\fR" 4 .IX Item "arib-std-b67" \&\s-1ARIB STD\-B67\s0 .RE .RS 4 .RE .IP "\fBmatrix_coefficients\fR" 4 .IX Item "matrix_coefficients" Set the matrix coefficient. Available values are: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" Keep the same colorspace property (default). .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBbt709\fR" 4 .IX Item "bt709" .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" .PD \&\s-1BT 601\s0 .IP "\fBbt2020nc\fR" 4 .IX Item "bt2020nc" .RE .RS 4 .RE .PP Set Rec709 colorspace for each frame of the file .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov .Ve .PP Set Hybrid Log-Gamma parameters for each frame of the file .PP .Vb 1 \& ffmpeg \-i INPUT \-c copy \-bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib\-std\-b67:colorspace=bt2020nc output.mov .Ve .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 "setts" .IX Subsection "setts" Set \s-1PTS\s0 and \s-1DTS\s0 in packets. .PP It accepts the following parameters: .IP "\fBts\fR" 4 .IX Item "ts" .PD 0 .IP "\fBpts\fR" 4 .IX Item "pts" .IP "\fBdts\fR" 4 .IX Item "dts" .PD Set expressions for \s-1PTS, DTS\s0 or both. .IP "\fBduration\fR" 4 .IX Item "duration" Set expression for duration. .IP "\fBtime_base\fR" 4 .IX Item "time_base" Set output time base. .PP The expressions are evaluated through the eval \s-1API\s0 and can contain the following constants: .IP "\fBN\fR" 4 .IX Item "N" The count of the input packet. Starting from 0. .IP "\fB\s-1TS\s0\fR" 4 .IX Item "TS" The demux timestamp in input in case of \f(CW\*(C`ts\*(C'\fR or \f(CW\*(C`dts\*(C'\fR option or presentation timestamp in case of \f(CW\*(C`pts\*(C'\fR option. .IP "\fB\s-1POS\s0\fR" 4 .IX Item "POS" The original position in the file of the packet, or undefined if undefined for the current packet .IP "\fB\s-1DTS\s0\fR" 4 .IX Item "DTS" The demux timestamp in input. .IP "\fB\s-1PTS\s0\fR" 4 .IX Item "PTS" The presentation timestamp in input. .IP "\fB\s-1DURATION\s0\fR" 4 .IX Item "DURATION" The duration in input. .IP "\fB\s-1STARTDTS\s0\fR" 4 .IX Item "STARTDTS" The \s-1DTS\s0 of the first packet. .IP "\fB\s-1STARTPTS\s0\fR" 4 .IX Item "STARTPTS" The \s-1PTS\s0 of the first packet. .IP "\fB\s-1PREV_INDTS\s0\fR" 4 .IX Item "PREV_INDTS" The previous input \s-1DTS.\s0 .IP "\fB\s-1PREV_INPTS\s0\fR" 4 .IX Item "PREV_INPTS" The previous input \s-1PTS.\s0 .IP "\fB\s-1PREV_INDURATION\s0\fR" 4 .IX Item "PREV_INDURATION" The previous input duration. .IP "\fB\s-1PREV_OUTDTS\s0\fR" 4 .IX Item "PREV_OUTDTS" The previous output \s-1DTS.\s0 .IP "\fB\s-1PREV_OUTPTS\s0\fR" 4 .IX Item "PREV_OUTPTS" The previous output \s-1PTS.\s0 .IP "\fB\s-1PREV_OUTDURATION\s0\fR" 4 .IX Item "PREV_OUTDURATION" The previous output duration. .IP "\fB\s-1NEXT_DTS\s0\fR" 4 .IX Item "NEXT_DTS" The next input \s-1DTS.\s0 .IP "\fB\s-1NEXT_PTS\s0\fR" 4 .IX Item "NEXT_PTS" The next input \s-1PTS.\s0 .IP "\fB\s-1NEXT_DURATION\s0\fR" 4 .IX Item "NEXT_DURATION" The next input duration. .IP "\fB\s-1TB\s0\fR" 4 .IX Item "TB" The timebase of stream packet belongs. .IP "\fB\s-1TB_OUT\s0\fR" 4 .IX Item "TB_OUT" The output timebase. .IP "\fB\s-1SR\s0\fR" 4 .IX Item "SR" The sample rate of stream packet belongs. .IP "\fB\s-1NOPTS\s0\fR" 4 .IX Item "NOPTS" The \s-1AV_NOPTS_VALUE\s0 constant. .PP For example, to set \s-1PTS\s0 equal to \s-1DTS\s0 (not recommended if B\-frames are involved): .PP .Vb 1 \& ffmpeg \-i INPUT \-c:a copy \-bsf:a setts=pts=DTS out.mkv .Ve .SS "showinfo" .IX Subsection "showinfo" Log basic packet information. Mainly useful for testing, debugging, and development. .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 \s-1AV1, H.264, H.265,\s0 (M)JPEG, \s-1MPEG\-2\s0 and \s-1VP9,\s0 but depending on the build only a subset of these may be available. .SS "truehd_core" .IX Subsection "truehd_core" Extract the core from a TrueHD stream, dropping \s-1ATMOS\s0 data. .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. Note that any frame set to \s-1RGB\s0 will be implicitly set to \s-1PC\s0 range and that \s-1RGB\s0 is incompatible with profiles 0 and 2. .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 any value imposed by the color space will take precedence over this value. .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 "\fBmax_probe_packets\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "max_probe_packets integer (input)" Set the maximum number of buffered packets when probing a codec. Default is 2500 packets. .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 also set. In case the \s-1PTS\s0 is set, the \s-1DTS\s0 value is set to \s-1NOPTS.\s0 This is ignored when the \f(CW\*(C`nofillin\*(C'\fR flag is set. .IP "\fBignidx\fR" 4 .IX Item "ignidx" Ignore index. .IP "\fBnobuffer\fR" 4 .IX Item "nobuffer" 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 "\fBshortest\fR" 4 .IX Item "shortest" 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 10000000 (10 seconds). .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 indentation: .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. .IP "\fBstrict, f_strict\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "strict, f_strict integer (input/output)" Specify how strictly to follow the standards. \f(CW\*(C`f_strict\*(C'\fR is deprecated and should be used only via the \fBffmpeg\fR tool. .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 .SS "Format stream specifiers" .IX Subsection "Format stream specifiers" Format stream specifiers allow selection of one or more streams that match specific properties. .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 and documented in the \&\fBStream specifiers section in the \fBffmpeg\fB\|(1) manual\fR. .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 "aac" .IX Subsection "aac" Raw Audio Data Transport Stream \s-1AAC\s0 demuxer. .PP This demuxer is used to demux an \s-1ADTS\s0 input containing a single \s-1AAC\s0 stream alongwith any ID3v1/2 or \s-1APE\s0 tags in it. .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. Default is enabled. .IP "\fB\-max_fps\fR \fIint\fR" 4 .IX Item "-max_fps int" Maximum framerate in frames per second. Default of 0 imposes 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). Default is 15. .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. .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. This directive is deprecated, use \f(CW\*(C`file_packet_meta\*(C'\fR instead. .ie n .IP "\fB\f(CB""file_packet_meta \f(CBkey\f(CB \f(CBvalue\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBfile_packet_meta \f(CBkey\f(CB \f(CBvalue\f(CB\fB\fR" 4 .IX Item "file_packet_meta 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""option \f(CBkey\f(CB \f(CBvalue\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBoption \f(CBkey\f(CB \f(CBvalue\f(CB\fB\fR" 4 .IX Item "option key value" Option to access, open and probe the file. Can be present multiple times. .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. .ie n .IP "\fB\f(CB""stream_meta \f(CBkey\f(CB \f(CBvalue\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBstream_meta \f(CBkey\f(CB \f(CBvalue\f(CB\fB\fR" 4 .IX Item "stream_meta key value" Metadata for the stream. Can be present multiple times. .ie n .IP "\fB\f(CB""stream_codec \f(CBvalue\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBstream_codec \f(CBvalue\f(CB\fB\fR" 4 .IX Item "stream_codec value" Codec for the stream. .ie n .IP "\fB\f(CB""stream_extradata \f(CBhex_string\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBstream_extradata \f(CBhex_string\f(CB\fB\fR" 4 .IX Item "stream_extradata hex_string" Extradata for the string, encoded in hexadecimal. .ie n .IP "\fB\f(CB""chapter \f(CBid\f(CB \f(CBstart\f(CB \f(CBend\f(CB""\fB\fR" 4 .el .IP "\fB\f(CBchapter \f(CBid\f(CB \f(CBstart\f(CB \f(CBend\f(CB\fB\fR" 4 .IX Item "chapter id start end" Add a chapter. \fIid\fR is an unique identifier, possibly small and consecutive. .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 and directives. 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. .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. .PP \fIOptions\fR .IX Subsection "Options" .PP This demuxer accepts the following option: .IP "\fBcenc_decryption_key\fR" 4 .IX Item "cenc_decryption_key" 16\-byte key, in hex, to decrypt files encrypted using \s-1ISO\s0 Common Encryption (\s-1CENC/AES\-128 CTR\s0; \s-1ISO/IEC 23001\-7\s0). .SS "dvdvideo" .IX Subsection "dvdvideo" DVD-Video demuxer, powered by libdvdnav and libdvdread. .PP Can directly ingest \s-1DVD\s0 titles, specifically sequential PGCs, into a conversion pipeline. Menu assets, such as background video or audio, can also be demuxed given the menu's coordinates (at best effort). Seeking is not supported at this time. .PP Block devices (\s-1DVD\s0 drives), \s-1ISO\s0 files, and directory structures are accepted. Activate with \f(CW\*(C`\-f dvdvideo\*(C'\fR in front of one of these inputs. .PP This demuxer does \s-1NOT\s0 have decryption code of any kind. You are on your own working with encrypted DVDs, and should not expect support on the matter. .PP Underlying playback is handled by libdvdnav, and structure parsing by libdvdread. FFmpeg must be built with \s-1GPL\s0 library support available as well as the configure switches \f(CW\*(C`\-\-enable\-libdvdnav\*(C'\fR and \f(CW\*(C`\-\-enable\-libdvdread\*(C'\fR. .PP You will need to provide either the desired \*(L"title number\*(R" or exact \s-1PGC/PG\s0 coordinates. Many open-source \s-1DVD\s0 players and tools can aid in providing this information. If not specified, the demuxer will default to title 1 which works for many discs. However, due to the flexibility of the format, it is recommended to check manually. There are many discs that are authored strangely or with invalid headers. .PP If the input is a real \s-1DVD\s0 drive, please note that there are some drives which may silently fail on reading bad sectors from the disc, returning random bits instead which is effectively corrupt data. This is especially prominent on aging or rotting discs. A second pass and integrity checks would be needed to detect the corruption. This is not an FFmpeg issue. .PP \fIBackground\fR .IX Subsection "Background" .PP DVD-Video is not a directly accessible, linear container format in the traditional sense. Instead, it allows for complex and programmatic playback of carefully muxed MPEG-PS streams that are stored in headerless \s-1VOB\s0 files. To the end-user, these streams are known simply as \*(L"titles\*(R", but the actual logical playback sequence is defined by one or more \*(L"PGCs\*(R", or Program Group Chains, within the title. The \s-1PGC\s0 is in turn comprised of multiple \*(L"PGs\*(R", or Programs", which are the actual video segments (and for a typical video feature, sequentially ordered). The \s-1PGC\s0 structure, along with stream layout and metadata, are stored in \&\s-1IFO\s0 files that need to be parsed. PGCs can be thought of as playlists in easier terms. .PP An actual \s-1DVD\s0 player relies on user \s-1GUI\s0 interaction via menus and an internal \s-1VM\s0 to drive the direction of demuxing. Generally, the user would either navigate (via menus) or automatically be redirected to the \s-1PGC\s0 of their choice. During this process and the subsequent playback, the \s-1DVD\s0 player's internal \s-1VM\s0 also maintains a state and executes instructions that can create jumps to different sectors during playback. This is why libdvdnav is involved, as a linear read of the MPEG-PS blobs on the disc (VOBs) is not enough to produce the right sequence in many cases. .PP There are many other \s-1DVD\s0 structures (a long subject) that will not be discussed here. \&\s-1NAV\s0 packets, in particular, are handled by this demuxer to build accurate timing but not emitted as a stream. For a good high-level understanding, refer to: <\fBhttps://code.videolan.org/videolan/libdvdnav/\-/blob/master/doc/dvd_structures\fR> .PP \fIOptions\fR .IX Subsection "Options" .PP This demuxer accepts the following options: .IP "\fBtitle\fR \fIint\fR" 4 .IX Item "title int" The title number to play. Must be set if \fBpgc\fR and \fBpg\fR are not set. Not applicable to menus. Default is 0 (auto), which currently only selects the first available title (title 1) and notifies the user about the implications. .IP "\fBchapter_start\fR \fIint\fR" 4 .IX Item "chapter_start int" The chapter, or \s-1PTT\s0 (part-of-title), number to start at. Not applicable to menus. Default is 1. .IP "\fBchapter_end\fR \fIint\fR" 4 .IX Item "chapter_end int" The chapter, or \s-1PTT\s0 (part-of-title), number to end at. Not applicable to menus. Default is 0, which is a special value to signal end at the last possible chapter. .IP "\fBangle\fR \fIint\fR" 4 .IX Item "angle int" The video angle number, referring to what is essentially an additional video stream that is composed from alternate frames interleaved in the VOBs. Not applicable to menus. Default is 1. .IP "\fBregion\fR \fIint\fR" 4 .IX Item "region int" The region code to use for playback. Some discs may use this to default playback at a particular angle in different regions. This option will not affect the region code of a real \s-1DVD\s0 drive, if used as an input. Not applicable to menus. Default is 0, \*(L"world\*(R". .IP "\fBmenu\fR \fIbool\fR" 4 .IX Item "menu bool" Demux menu assets instead of navigating a title. Requires exact coordinates of the menu (\fBmenu_lu\fR, \fBmenu_vts\fR, \fBpgc\fR, \fBpg\fR). Default is false. .IP "\fBmenu_lu\fR \fIint\fR" 4 .IX Item "menu_lu int" The menu language to demux. In \s-1DVD,\s0 menus are grouped by language. Default is 0, the first language unit. .IP "\fBmenu_vts\fR \fIint\fR" 4 .IX Item "menu_vts int" The \s-1VTS\s0 where the menu lives, or 0 if it is a \s-1VMG\s0 menu (root-level). Default is 0, \s-1VMG\s0 menu. .IP "\fBpgc\fR \fIint\fR" 4 .IX Item "pgc int" The entry \s-1PGC\s0 to start playback, in conjunction with \fBpg\fR. Alternative to setting \fBtitle\fR. Chapter markers are not supported at this time. Must be explicitly set for menus. Default is 0, automatically resolve from value of \fBtitle\fR. .IP "\fBpg\fR \fIint\fR" 4 .IX Item "pg int" The entry \s-1PG\s0 to start playback, in conjunction with \fBpgc\fR. Alternative to setting \fBtitle\fR. Chapter markers are not supported at this time. Default is 0, automatically resolve from value of \fBtitle\fR, or start from the beginning (\s-1PG 1\s0) of the menu. .IP "\fBpreindex\fR \fIbool\fR" 4 .IX Item "preindex bool" Enable this to have accurate chapter (\s-1PTT\s0) markers and duration measurement, which requires a slow second pass read in order to index the chapter marker timestamps from \s-1NAV\s0 packets. This is non-ideal extra work for real optical drives. It is recommended and faster to use this option with a backup of the \s-1DVD\s0 structure stored on a hard drive. Not compatible with \fBpgc\fR and \fBpg\fR. Not applicable to menus. Default is 0, false. .IP "\fBtrim\fR \fIbool\fR" 4 .IX Item "trim bool" Skip padding cells (i.e. cells shorter than 1 second) from the beginning. There exist many discs with filler segments at the beginning of the \s-1PGC,\s0 often with junk data intended for controlling a real \s-1DVD\s0 player's buffering speed and with no other material data value. Not applicable to menus. Default is 1, true. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Open title 3 from a given \s-1DVD\s0 structure: .Sp .Vb 1 \& ffmpeg \-f dvdvideo \-title 3 \-i ... .Ve .IP "\(bu" 4 Open chapters 3\-6 from title 1 from a given \s-1DVD\s0 structure: .Sp .Vb 1 \& ffmpeg \-f dvdvideo \-chapter_start 3 \-chapter_end 6 \-title 1 \-i ... .Ve .IP "\(bu" 4 Open only chapter 5 from title 1 from a given \s-1DVD\s0 structure: .Sp .Vb 1 \& ffmpeg \-f dvdvideo \-chapter_start 5 \-chapter_end 5 \-title 1 \-i ... .Ve .IP "\(bu" 4 Demux menu with language 1 from \s-1VTS 1, PGC 1,\s0 starting at \s-1PG 1:\s0 .Sp .Vb 1 \& ffmpeg \-f dvdvideo \-menu 1 \-menu_lu 1 \-menu_vts 1 \-pgc 1 \-pg 1 \-i ... .Ve .SS "ea" .IX Subsection "ea" Electronic Arts Multimedia format demuxer. .PP This format is used by various Electronic Arts games. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBmerge_alpha\fR \fIbool\fR" 4 .IX Item "merge_alpha bool" Normally the \s-1VP6\s0 alpha channel (if exists) is returned as a secondary video stream, by setting this option you can make the demuxer return a single video stream which contains the alpha channel in addition to the ordinary video. .SS "imf" .IX Subsection "imf" Interoperable Master Format demuxer. .PP This demuxer presents audio and video streams found in an \s-1IMF\s0 Composition, as specified in <\fBhttps://doi.org/10.5594/SMPTE.ST2067\-2.2020\fR>. .PP .Vb 1 \& ffmpeg [\-assetmaps ,,...] \-i ... .Ve .PP If \f(CW\*(C`\-assetmaps\*(C'\fR is not specified, the demuxer looks for a file called \&\fI\s-1ASSETMAP\s0.xml\fR in the same directory as the \s-1CPL.\s0 .SS "flv, live_flv, kux" .IX Subsection "flv, live_flv, kux" 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. \&\s-1KUX\s0 is a flv variant used on the Youku platform. .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 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". .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 "\fBprefer_x_start\fR" 4 .IX Item "prefer_x_start" prefer to use #EXT\-X\-START if it's in playlist instead of live_start_index. .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 "\fBm3u8_hold_counters\fR" 4 .IX Item "m3u8_hold_counters" The maximum number of times to load m3u8 when it refreshes without new segments. 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. .IP "\fBhttp_seekable\fR" 4 .IX Item "http_seekable" Use \s-1HTTP\s0 partial requests for downloading \s-1HTTP\s0 segments. 0 = disable, 1 = enable, \-1 = auto, Default is auto. .IP "\fBseg_format_options\fR" 4 .IX Item "seg_format_options" Set options for the demuxer of media segments using a list of key=value pairs separated by \f(CW\*(C`:\*(C'\fR. .IP "\fBseg_max_retry\fR" 4 .IX Item "seg_max_retry" Maximum number of times to reload a segment on error, useful when segment skip on network error is not desired. Default value is 0. .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. .IP "\fBexport_path_metadata\fR" 4 .IX Item "export_path_metadata" If set to 1, will add two extra fields to the metadata found in input, making them also available for other filters (see \fIdrawtext\fR filter for examples). Default value is 0. The extra fields are described below: .RS 4 .IP "\fBlavf.image2dec.source_path\fR" 4 .IX Item "lavf.image2dec.source_path" Corresponds to the full path to the input file being read. .IP "\fBlavf.image2dec.source_basename\fR" 4 .IX Item "lavf.image2dec.source_basename" Corresponds to the name of the file being read. .RE .RS 4 .RE .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 <\fBhttps://bitbucket.org/mpyne/game\-music\-emu/overview\fR> for more information. .PP It accepts the following options: .IP "\fBtrack_index\fR" 4 .IX Item "track_index" Set the index of which track to demux. The demuxer can only export one track. Track indexes start at 0. Default is to pick the first track. Number of tracks is exported as \fItracks\fR metadata entry. .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" Set the sampling rate of the exported track. Range is 1000 to 999999. Default is 44100. .IP "\fBmax_size\fR \fI(bytes)\fR" 4 .IX Item "max_size (bytes)" The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size, which in turn, acts as a ceiling for the size of files that can be read. Default is 50 MiB. .SS "libmodplug" .IX Subsection "libmodplug" ModPlug based module demuxer .PP See <\fBhttps://github.com/Konstanty/libmodplug\fR> .PP It will export one 2\-channel 16\-bit 44.1 kHz audio stream. Optionally, a \f(CW\*(C`pal8\*(C'\fR 16\-color video stream can be exported with or without printed metadata. .PP It accepts the following options: .IP "\fBnoise_reduction\fR" 4 .IX Item "noise_reduction" Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default is 0. .IP "\fBreverb_depth\fR" 4 .IX Item "reverb_depth" Set amount of reverb. Range 0\-100. Default is 0. .IP "\fBreverb_delay\fR" 4 .IX Item "reverb_delay" Set delay in ms, clamped to 40\-250 ms. Default is 0. .IP "\fBbass_amount\fR" 4 .IX Item "bass_amount" Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet) to 100 (loud). Default is 0. .IP "\fBbass_range\fR" 4 .IX Item "bass_range" Set cutoff i.e. upper-bound for bass frequencies. Range is 10\-100 Hz. Default is 0. .IP "\fBsurround_depth\fR" 4 .IX Item "surround_depth" Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100 (heavy). Default is 0. .IP "\fBsurround_delay\fR" 4 .IX Item "surround_delay" Set surround delay in ms, clamped to 5\-40 ms. Default is 0. .IP "\fBmax_size\fR" 4 .IX Item "max_size" The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size, which in turn, acts as a ceiling for the size of files that can be read. Range is 0 to 100 MiB. 0 removes buffer size limit (not recommended). Default is 5 MiB. .IP "\fBvideo_stream_expr\fR" 4 .IX Item "video_stream_expr" String which is evaluated using the eval \s-1API\s0 to assign colors to the generated video stream. Variables which can be used are \f(CW\*(C`x\*(C'\fR, \f(CW\*(C`y\*(C'\fR, \f(CW\*(C`w\*(C'\fR, \f(CW\*(C`h\*(C'\fR, \f(CW\*(C`t\*(C'\fR, \f(CW\*(C`speed\*(C'\fR, \&\f(CW\*(C`tempo\*(C'\fR, \f(CW\*(C`order\*(C'\fR, \f(CW\*(C`pattern\*(C'\fR and \f(CW\*(C`row\*(C'\fR. .IP "\fBvideo_stream\fR" 4 .IX Item "video_stream" Generate video stream. Can be 1 (on) or 0 (off). Default is 0. .IP "\fBvideo_stream_w\fR" 4 .IX Item "video_stream_w" Set video frame width in 'chars' where one char indicates 8 pixels. Range is 20\-512. Default is 30. .IP "\fBvideo_stream_h\fR" 4 .IX Item "video_stream_h" Set video frame height in 'chars' where one char indicates 8 pixels. Range is 20\-512. Default is 30. .IP "\fBvideo_stream_ptxt\fR" 4 .IX Item "video_stream_ptxt" Print metadata on video stream. Includes \f(CW\*(C`speed\*(C'\fR, \f(CW\*(C`tempo\*(C'\fR, \f(CW\*(C`order\*(C'\fR, \f(CW\*(C`pattern\*(C'\fR, \&\f(CW\*(C`row\*(C'\fR and \f(CW\*(C`ts\*(C'\fR (time in ms). Can be 1 (on) or 0 (off). Default is 1. .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" .IX Subsection "mov/mp4/3gp" Demuxer for Quicktime File Format & \s-1ISO/IEC\s0 Base Media File Format (\s-1ISO/IEC 14496\-12\s0 or \s-1MPEG\-4\s0 Part 12, \s-1ISO/IEC 15444\-12\s0 or \s-1JPEG 2000\s0 Part 12). .PP Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v .PP \fIOptions\fR .IX Subsection "Options" .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. .IP "\fBseek_streams_individually\fR" 4 .IX Item "seek_streams_individually" When seeking, identify the closest point in each stream individually and demux packets in that stream from identified point. This can lead to a different sequence of packets compared to demuxing linearly from the beginning. Default is true. .IP "\fBignore_editlist\fR" 4 .IX Item "ignore_editlist" Ignore any edit list atoms. The demuxer, by default, modifies the stream index to reflect the timeline described by the edit list. Default is false. .IP "\fBadvanced_editlist\fR" 4 .IX Item "advanced_editlist" Modify the stream index to reflect the timeline described by the edit list. \f(CW\*(C`ignore_editlist\*(C'\fR must be set to false for this option to be effective. If both \f(CW\*(C`ignore_editlist\*(C'\fR and this option are set to false, then only the start of the stream index is modified to reflect initial dwell time or starting timestamp described by the edit list. Default is true. .IP "\fBignore_chapters\fR" 4 .IX Item "ignore_chapters" Don't parse chapters. This includes GoPro 'HiLight' tags/moments. Note that chapters are only parsed when input is seekable. Default is false. .IP "\fBuse_mfra_for\fR" 4 .IX Item "use_mfra_for" For seekable fragmented input, set fragment's starting timestamp from media fragment random access box, if present. .Sp Following options are available: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" Auto-detect whether to set mfra timestamps as \s-1PTS\s0 or \s-1DTS\s0 \fI(default)\fR .IP "\fBdts\fR" 4 .IX Item "dts" Set mfra timestamps as \s-1DTS\s0 .IP "\fBpts\fR" 4 .IX Item "pts" Set mfra timestamps as \s-1PTS\s0 .IP "\fB0\fR" 4 .IX Item "0" Don't use mfra box to set timestamps .RE .RS 4 .RE .IP "\fBuse_tfdt\fR" 4 .IX Item "use_tfdt" For fragmented input, set fragment's starting timestamp to \f(CW\*(C`baseMediaDecodeTime\*(C'\fR from the \f(CW\*(C`tfdt\*(C'\fR box. Default is enabled, which will prefer to use the \f(CW\*(C`tfdt\*(C'\fR box to set \s-1DTS.\s0 Disable to use the \f(CW\*(C`earliest_presentation_time\*(C'\fR from the \f(CW\*(C`sidx\*(C'\fR box. In either case, the timestamp from the \f(CW\*(C`mfra\*(C'\fR box will be used if it's available and \f(CW\*(C`use_mfra_for\*(C'\fR is set to pts or dts. .IP "\fBexport_all\fR" 4 .IX Item "export_all" Export unrecognized boxes within the \fIudta\fR box as metadata entries. The first four characters of the box type are set as the key. Default is false. .IP "\fBexport_xmp\fR" 4 .IX Item "export_xmp" Export entire contents of \fI\s-1XMP_\s0\fR box and \fIuuid\fR box as a string with key \f(CW\*(C`xmp\*(C'\fR. Note that if \f(CW\*(C`export_all\*(C'\fR is set and this option isn't, the contents of \fI\s-1XMP_\s0\fR box are still exported but with key \f(CW\*(C`XMP_\*(C'\fR. Default is false. .IP "\fBactivation_bytes\fR" 4 .IX Item "activation_bytes" 4\-byte key required to decrypt Audible \s-1AAX\s0 and \s-1AAX+\s0 files. See Audible \s-1AAX\s0 subsection below. .IP "\fBaudible_fixed_key\fR" 4 .IX Item "audible_fixed_key" Fixed key used for handling Audible \s-1AAX/AAX+\s0 files. It has been pre-set so should not be necessary to specify. .IP "\fBdecryption_key\fR" 4 .IX Item "decryption_key" 16\-byte key, in hex, to decrypt files encrypted using \s-1ISO\s0 Common Encryption (\s-1CENC/AES\-128 CTR\s0; \s-1ISO/IEC 23001\-7\s0). .IP "\fBmax_stts_delta\fR" 4 .IX Item "max_stts_delta" Very high sample deltas written in a trak's stts box may occasionally be intended but usually they are written in error or used to store a negative value for dts correction when treated as signed 32\-bit integers. This option lets the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when cast to int32 are used to adjust onward dts. .Sp Unit is the track time scale. Range is 0 to \s-1UINT_MAX.\s0 Default is \f(CW\*(C`UINT_MAX \- 48000*10\*(C'\fR which allows up to a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of \f(CW\*(C`uint32\*(C'\fR range. .IP "\fBinterleaved_read\fR" 4 .IX Item "interleaved_read" Interleave packets from multiple tracks at demuxer level. For badly interleaved files, this prevents playback issues caused by large gaps between packets in different tracks, as \s-1MOV/MP4\s0 do not have packet placement requirements. However, this can cause excessive seeking on very badly interleaved files, due to seeking between tracks, so disabling it may prevent I/O issues, at the expense of playback. .PP \fIAudible \s-1AAX\s0\fR .IX Subsection "Audible AAX" .PP Audible \s-1AAX\s0 files are encrypted M4B files, and they can be decrypted by specifying a 4 byte activation secret. .PP .Vb 1 \& ffmpeg \-activation_bytes 1CEB00DA \-i test.aax \-vn \-c:a copy output.mp4 .Ve .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. .IP "\fBmax_packet_size\fR" 4 .IX Item "max_packet_size" Set maximum size, in bytes, of packet emitted by the demuxer. Payloads above this size are split across multiple packets. Range is 1 to \s-1INT_MAX/2.\s0 Default is 204800 bytes. .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 .SS "vapoursynth" .IX Subsection "vapoursynth" Vapoursynth wrapper. .PP Due to security concerns, Vapoursynth scripts will not be autodetected so the input format has to be forced. For ff* \s-1CLI\s0 tools, add \f(CW\*(C`\-f vapoursynth\*(C'\fR before the input \f(CW\*(C`\-i yourscript.vpy\*(C'\fR. .PP This demuxer accepts the following option: .IP "\fBmax_script_size\fR" 4 .IX Item "max_script_size" The demuxer buffers the entire script into memory. Adjust this value to set the maximum buffer size, which in turn, acts as a ceiling for the size of scripts that can be read. Default is 1 MiB. .SS "w64" .IX Subsection "w64" Sony Wave64 Audio demuxer. .PP This demuxer accepts the following options: .IP "\fBmax_size\fR" 4 .IX Item "max_size" See the same option for the \fBwav\fR demuxer. .SS "wav" .IX Subsection "wav" \&\s-1RIFF\s0 Wave Audio demuxer. .PP This demuxer accepts the following options: .IP "\fBmax_size\fR" 4 .IX Item "max_size" Specify the maximum packet size in bytes for the demuxed packets. By default this is set to 0, which means that a sensible value is chosen based on the input format. .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 nanoseconds. .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 "amqp" .IX Subsection "amqp" Advanced Message Queueing Protocol (\s-1AMQP\s0) version 0\-9\-1 is a broker based publish-subscribe communication protocol. .PP FFmpeg must be compiled with \-\-enable\-librabbitmq to support \s-1AMQP. A\s0 separate \&\s-1AMQP\s0 broker must also be run. An example open-source \s-1AMQP\s0 broker is RabbitMQ. .PP After starting the broker, an FFmpeg client may stream data to the broker using the command: .PP .Vb 1 \& ffmpeg \-re \-i input \-f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost] .Ve .PP Where hostname and port (default is 5672) is the address of the broker. The client may also set a user/password for authentication. The default for both fields is \*(L"guest\*(R". Name of virtual host on broker can be set with vhost. The default value is \*(L"/\*(R". .PP Muliple subscribers may stream from the broker using the command: .PP .Vb 1 \& ffplay amqp://[[user]:[password]@]hostname[:port][/vhost] .Ve .PP In RabbitMQ all data published to the broker flows through a specific exchange, and each subscribing client has an assigned queue/buffer. When a packet arrives at an exchange, it may be copied to a client's queue depending on the exchange and routing_key fields. .PP The following options are supported: .IP "\fBexchange\fR" 4 .IX Item "exchange" Sets the exchange to use on the broker. RabbitMQ has several predefined exchanges: \*(L"amq.direct\*(R" is the default exchange, where the publisher and subscriber must have a matching routing_key; \*(L"amq.fanout\*(R" is the same as a broadcast operation (i.e. the data is forwarded to all queues on the fanout exchange independent of the routing_key); and \*(L"amq.topic\*(R" is similar to \&\*(L"amq.direct\*(R", but allows for more complex pattern matching (refer to the RabbitMQ documentation). .IP "\fBrouting_key\fR" 4 .IX Item "routing_key" Sets the routing key. The default value is \*(L"amqp\*(R". The routing key is used on the \*(L"amq.direct\*(R" and \*(L"amq.topic\*(R" exchanges to decide whether packets are written to the queue of a subscriber. .IP "\fBpkt_size\fR" 4 .IX Item "pkt_size" Maximum size of each packet sent/received to the broker. Default is 131072. Minimum is 4096 and max is any large value (representable by an int). When receiving packets, this sets an internal buffer size in FFmpeg. It should be equal to or greater than the size of the published packets to the broker. Otherwise the received message may be truncated causing decoding errors. .IP "\fBconnection_timeout\fR" 4 .IX Item "connection_timeout" The timeout in seconds during the initial connection to the broker. The default value is rw_timeout, or 5 seconds if rw_timeout is not set. .IP "\fBdelivery_mode\fR \fImode\fR" 4 .IX Item "delivery_mode mode" Sets the delivery mode of each message sent to broker. The following values are accepted: .RS 4 .IP "\fBpersistent\fR" 4 .IX Item "persistent" Delivery mode set to \*(L"persistent\*(R" (2). This is the default value. Messages may be written to the broker's disk depending on its setup. .IP "\fBnon-persistent\fR" 4 .IX Item "non-persistent" Delivery mode set to \*(L"non-persistent\*(R" (1). Messages will stay in broker's memory unless the broker is under memory pressure. .RE .RS 4 .RE .SS "async" .IX Subsection "async" Asynchronous data filling wrapper for input stream. .PP Fill data in a background thread, to decouple I/O operation from demux thread. .PP .Vb 3 \& async: \& async:http://host/resource \& async:cache:http://host/resource .Ve .SS "bluray" .IX Subsection "bluray" Read BluRay playlist. .PP The accepted options are: .IP "\fBangle\fR" 4 .IX Item "angle" BluRay angle .IP "\fBchapter\fR" 4 .IX Item "chapter" Start chapter (1...N) .IP "\fBplaylist\fR" 4 .IX Item "playlist" Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls) .PP Examples: .PP Read longest playlist from BluRay mounted to /mnt/bluray: .PP .Vb 1 \& bluray:/mnt/bluray .Ve .PP Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2: .PP .Vb 1 \& \-playlist 4 \-angle 2 \-chapter 2 bluray:/mnt/bluray .Ve .SS "cache" .IX Subsection "cache" Caching wrapper for input stream. .PP Cache the input stream to temporary file. It brings seeking capability to live streams. .PP The accepted options are: .IP "\fBread_ahead_limit\fR" 4 .IX Item "read_ahead_limit" Amount in bytes that may be read ahead when seeking isn't supported. Range is \-1 to \s-1INT_MAX.\s0 \&\-1 for unlimited. Default is 65536. .PP \&\s-1URL\s0 Syntax is .PP .Vb 1 \& cache: .Ve .SS "concat" .IX Subsection "concat" Physical concatenation protocol. .PP Read and seek from many resources in sequence as if they were a unique resource. .PP A \s-1URL\s0 accepted by this protocol has the syntax: .PP .Vb 1 \& concat:||...| .Ve .PP where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the resource to be concatenated, each one possibly specifying a distinct protocol. .PP For example to read a sequence of files \fIsplit1.mpeg\fR, \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the command: .PP .Vb 1 \& ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg .Ve .PP Note that you may need to escape the character \*(L"|\*(R" which is special for many shells. .SS "concatf" .IX Subsection "concatf" Physical concatenation protocol using a line break delimited list of resources. .PP Read and seek from many resources in sequence as if they were a unique resource. .PP A \s-1URL\s0 accepted by this protocol has the syntax: .PP .Vb 1 \& concatf: .Ve .PP where \fI\s-1URL\s0\fR is the url containing a line break delimited list of resources to be concatenated, each one possibly specifying a distinct protocol. Special characters must be escaped with backslash or single quotes. See \fBthe \*(L"Quoting and escaping\*(R" section in the \fBffmpeg\-utils\fB\|(1) manual\fR. .PP For example to read a sequence of files \fIsplit1.mpeg\fR, \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR listed in separate lines within a file \fIsplit.txt\fR with \fBffplay\fR use the command: .PP .Vb 1 \& ffplay concatf:split.txt .Ve .PP Where \fIsplit.txt\fR contains the lines: .PP .Vb 3 \& split1.mpeg \& split2.mpeg \& split3.mpeg .Ve .SS "crypto" .IX Subsection "crypto" AES-encrypted stream reading protocol. .PP The accepted options are: .IP "\fBkey\fR" 4 .IX Item "key" Set the \s-1AES\s0 decryption key binary block from given hexadecimal representation. .IP "\fBiv\fR" 4 .IX Item "iv" Set the \s-1AES\s0 decryption initialization vector binary block from given hexadecimal representation. .PP Accepted \s-1URL\s0 formats: .PP .Vb 2 \& crypto: \& crypto+ .Ve .SS "data" .IX Subsection "data" Data in-line in the \s-1URI.\s0 See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>. .PP For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR: .PP .Vb 1 \& ffmpeg \-i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png .Ve .SS "fd" .IX Subsection "fd" File descriptor access protocol. .PP The accepted syntax is: .PP .Vb 1 \& fd: \-fd .Ve .PP If \fBfd\fR is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. Unlike the pipe protocol, fd protocol has seek support if it corresponding to a regular file. fd protocol doesn't support pass file descriptor via \s-1URL\s0 for security. .PP This protocol accepts the following options: .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow. .IP "\fBfd\fR" 4 .IX Item "fd" Set file descriptor. .SS "file" .IX Subsection "file" File access protocol. .PP Read from or write to a file. .PP A file \s-1URL\s0 can have the form: .PP .Vb 1 \& file: .Ve .PP where \fIfilename\fR is the path of the file to read. .PP An \s-1URL\s0 that does not have a protocol prefix will be assumed to be a file \s-1URL.\s0 Depending on the build, an \s-1URL\s0 that looks like a Windows path with the drive letter at the beginning will also be assumed to be a file \s-1URL\s0 (usually not the case in builds for unix-like systems). .PP For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR use the command: .PP .Vb 1 \& ffmpeg \-i file:input.mpeg output.mpeg .Ve .PP This protocol accepts the following options: .IP "\fBtruncate\fR" 4 .IX Item "truncate" Truncate existing files on write, if set to 1. A value of 0 prevents truncating. Default value is 1. .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable for files on slow medium. .IP "\fBfollow\fR" 4 .IX Item "follow" If set to 1, the protocol will retry reading at the end of the file, allowing reading files that still are being written. In order for this to terminate, you either need to use the rw_timeout option, or use the interrupt callback (for \s-1API\s0 users). .IP "\fBseekable\fR" 4 .IX Item "seekable" Controls if seekability is advertised on the file. 0 means non-seekable, \-1 means auto (seekable for normal files, non-seekable for named pipes). .Sp Many demuxers handle seekable and non-seekable resources differently, overriding this might speed up opening certain files at the cost of losing some features (e.g. accurate seeking). .SS "ftp" .IX Subsection "ftp" \&\s-1FTP\s0 (File Transfer Protocol). .PP Read from or write to remote resources using \s-1FTP\s0 protocol. .PP Following syntax is required. .PP .Vb 1 \& ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg .Ve .PP This protocol accepts the following options. .IP "\fBtimeout\fR" 4 .IX Item "timeout" Set timeout in microseconds of socket I/O operations used by the underlying low level operation. By default it is set to \-1, which means that the timeout is not specified. .IP "\fBftp-user\fR" 4 .IX Item "ftp-user" Set a user to be used for authenticating to the \s-1FTP\s0 server. This is overridden by the user in the \s-1FTP URL.\s0 .IP "\fBftp-password\fR" 4 .IX Item "ftp-password" Set a password to be used for authenticating to the \s-1FTP\s0 server. This is overridden by the password in the \s-1FTP URL,\s0 or by \fBftp-anonymous-password\fR if no user is set. .IP "\fBftp-anonymous-password\fR" 4 .IX Item "ftp-anonymous-password" Password used when login as anonymous user. Typically an e\-mail address should be used. .IP "\fBftp-write-seekable\fR" 4 .IX Item "ftp-write-seekable" Control seekability of connection during encoding. If set to 1 the resource is supposed to be seekable, if set to 0 it is assumed not to be seekable. Default value is 0. .PP \&\s-1NOTE:\s0 Protocol can be used as output, but it is recommended to not do it, unless special care is taken (tests, customized server configuration etc.). Different \s-1FTP\s0 servers behave in different way during seek operation. ff* tools may produce incomplete content due to server limitations. .SS "gopher" .IX Subsection "gopher" Gopher protocol. .SS "gophers" .IX Subsection "gophers" Gophers protocol. .PP The Gopher protocol with \s-1TLS\s0 encapsulation. .SS "hls" .IX Subsection "hls" Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as a uniform one. The M3U8 playlists describing the segments can be remote \s-1HTTP\s0 resources or local files, accessed using the standard file protocol. The nested protocol is declared by specifying "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR is either \*(L"file\*(R" or \*(L"http\*(R". .PP .Vb 2 \& hls+http://host/path/to/remote/resource.m3u8 \& hls+file://path/to/local/resource.m3u8 .Ve .PP Using this protocol is discouraged \- the hls demuxer should work just as well (if not, please report the issues) and is more complete. To use the hls demuxer instead, simply use the direct URLs to the m3u8 files. .SS "http" .IX Subsection "http" \&\s-1HTTP\s0 (Hyper Text Transfer Protocol). .PP This protocol accepts the following options: .IP "\fBseekable\fR" 4 .IX Item "seekable" Control seekability of connection. If set to 1 the resource is supposed to be seekable, if set to 0 it is assumed not to be seekable, if set to \-1 it will try to autodetect if it is seekable. Default value is \-1. .IP "\fBchunked_post\fR" 4 .IX Item "chunked_post" If set to 1 use chunked Transfer-Encoding for posts, default is 1. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set a specific content type for the \s-1POST\s0 messages or for listen mode. .IP "\fBhttp_proxy\fR" 4 .IX Item "http_proxy" set \s-1HTTP\s0 proxy to tunnel through e.g. http://example.com:1234 .IP "\fBheaders\fR" 4 .IX Item "headers" Set custom \s-1HTTP\s0 headers, can override built in default headers. The value must be a string encoding the headers. .IP "\fBmultiple_requests\fR" 4 .IX Item "multiple_requests" Use persistent connections if set to 1, default is 0. .IP "\fBpost_data\fR" 4 .IX Item "post_data" Set custom \s-1HTTP\s0 post data. .IP "\fBreferer\fR" 4 .IX Item "referer" Set the Referer header. Include 'Referer: \s-1URL\s0' header in \s-1HTTP\s0 request. .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified the protocol will use a string describing the libavformat build. (\*(L"Lavf/\*(R") .IP "\fBreconnect_at_eof\fR" 4 .IX Item "reconnect_at_eof" If set then eof is treated like an error and causes reconnection, this is useful for live / endless streams. .IP "\fBreconnect_streamed\fR" 4 .IX Item "reconnect_streamed" If set then even streamed/non seekable streams will be reconnected on errors. .IP "\fBreconnect_on_network_error\fR" 4 .IX Item "reconnect_on_network_error" Reconnect automatically in case of \s-1TCP/TLS\s0 errors during connect. .IP "\fBreconnect_on_http_error\fR" 4 .IX Item "reconnect_on_http_error" A comma separated list of \s-1HTTP\s0 status codes to reconnect on. The list can include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. .IP "\fBreconnect_delay_max\fR" 4 .IX Item "reconnect_delay_max" Sets the maximum delay in seconds after which to give up reconnecting .IP "\fBmime_type\fR" 4 .IX Item "mime_type" Export the \s-1MIME\s0 type. .IP "\fBhttp_version\fR" 4 .IX Item "http_version" Exports the \s-1HTTP\s0 response version number. Usually \*(L"1.0\*(R" or \*(L"1.1\*(R". .IP "\fBicy\fR" 4 .IX Item "icy" If set to 1 request \s-1ICY\s0 (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading the \fBicy_metadata_headers\fR and \fBicy_metadata_packet\fR options. The default is 1. .IP "\fBicy_metadata_headers\fR" 4 .IX Item "icy_metadata_headers" If the server supports \s-1ICY\s0 metadata, this contains the ICY-specific \s-1HTTP\s0 reply headers, separated by newline characters. .IP "\fBicy_metadata_packet\fR" 4 .IX Item "icy_metadata_packet" If the server supports \s-1ICY\s0 metadata, and \fBicy\fR was set to 1, this contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. .IP "\fBcookies\fR" 4 .IX Item "cookies" Set the cookies to be sent in future requests. The format of each cookie is the same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be delimited by a newline character. .IP "\fBoffset\fR" 4 .IX Item "offset" Set initial byte offset. .IP "\fBend_offset\fR" 4 .IX Item "end_offset" Try to limit the request to bytes preceding this offset. .IP "\fBmethod\fR" 4 .IX Item "method" When used as a client option it sets the \s-1HTTP\s0 method for the request. .Sp When used as a server option it sets the \s-1HTTP\s0 method that is going to be expected from the client(s). If the expected and the received \s-1HTTP\s0 method do not match the client will be given a Bad Request response. When unset the \s-1HTTP\s0 method is not checked for now. This will be replaced by autodetection in the future. .IP "\fBlisten\fR" 4 .IX Item "listen" If set to 1 enables experimental \s-1HTTP\s0 server. This can be used to send data when used as an output option, or read data from a client with \s-1HTTP POST\s0 when used as an input option. If set to 2 enables experimental multi-client \s-1HTTP\s0 server. This is not yet implemented in ffmpeg.c and thus must not be used as a command line option. .Sp .Vb 2 \& # Server side (sending): \& ffmpeg \-i somefile.ogg \-c copy \-listen 1 \-f ogg http://: \& \& # Client side (receiving): \& ffmpeg \-i http://: \-c copy somefile.ogg \& \& # Client can also be done with wget: \& wget http://: \-O somefile.ogg \& \& # Server side (receiving): \& ffmpeg \-listen 1 \-i http://: \-c copy somefile.ogg \& \& # Client side (sending): \& ffmpeg \-i somefile.ogg \-chunked_post 0 \-c copy \-f ogg http://: \& \& # Client can also be done with wget: \& wget \-\-post\-file=somefile.ogg http://: .Ve .IP "\fBsend_expect_100\fR" 4 .IX Item "send_expect_100" Send an Expect: 100\-continue header for \s-1POST.\s0 If set to 1 it will send, if set to 0 it won't, if set to \-1 it will try to send if it is applicable. Default value is \-1. .IP "\fBauth_type\fR" 4 .IX Item "auth_type" Set \s-1HTTP\s0 authentication type. No option for Digest, since this method requires getting nonce parameters from the server first and can't be used straight away like Basic. .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" Choose the \s-1HTTP\s0 authentication type automatically. This is the default. .IP "\fBbasic\fR" 4 .IX Item "basic" Choose the \s-1HTTP\s0 basic authentication. .Sp Basic authentication sends a Base64\-encoded string that contains a user name and password for the client. Base64 is not a form of encryption and should be considered the same as sending the user name and password in clear text (Base64 is a reversible encoding). If a resource needs to be protected, strongly consider using an authentication scheme other than basic authentication. \s-1HTTPS/TLS\s0 should be used with basic authentication. Without these additional security enhancements, basic authentication should not be used to protect sensitive or valuable information. .RE .RS 4 .RE .PP \fI\s-1HTTP\s0 Cookies\fR .IX Subsection "HTTP Cookies" .PP Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the request. The \fBcookies\fR option allows these cookies to be specified. At the very least, each cookie must specify a value along with a path and domain. \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited by a newline. .PP The required syntax to play a stream specifying a cookie is: .PP .Vb 1 \& ffplay \-cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 .Ve .SS "Icecast" .IX Subsection "Icecast" Icecast protocol (stream to Icecast servers) .PP This protocol accepts the following options: .IP "\fBice_genre\fR" 4 .IX Item "ice_genre" Set the stream genre. .IP "\fBice_name\fR" 4 .IX Item "ice_name" Set the stream name. .IP "\fBice_description\fR" 4 .IX Item "ice_description" Set the stream description. .IP "\fBice_url\fR" 4 .IX Item "ice_url" Set the stream website \s-1URL.\s0 .IP "\fBice_public\fR" 4 .IX Item "ice_public" Set if the stream should be public. The default is 0 (not public). .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified a string of the form \&\*(L"Lavf/\*(R" will be used. .IP "\fBpassword\fR" 4 .IX Item "password" Set the Icecast mountpoint password. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set the stream content type. This must be set if it is different from audio/mpeg. .IP "\fBlegacy_icecast\fR" 4 .IX Item "legacy_icecast" This enables support for Icecast versions < 2.4.0, that do not support the \&\s-1HTTP PUT\s0 method but the \s-1SOURCE\s0 method. .IP "\fBtls\fR" 4 .IX Item "tls" Establish a \s-1TLS\s0 (\s-1HTTPS\s0) connection to Icecast. .PP .Vb 1 \& icecast://[[:]@]:/ .Ve .SS "ipfs" .IX Subsection "ipfs" InterPlanetary File System (\s-1IPFS\s0) protocol support. One can access files stored on the \s-1IPFS\s0 network through so-called gateways. These are http(s) endpoints. This protocol wraps the \s-1IPFS\s0 native protocols (ipfs:// and ipns://) to be sent to such a gateway. Users can (and should) host their own node which means this protocol will use one's local gateway to access files on the \s-1IPFS\s0 network. .PP This protocol accepts the following options: .IP "\fBgateway\fR" 4 .IX Item "gateway" Defines the gateway to use. When not set, the protocol will first try locating the local gateway by looking at \f(CW$IPFS_GATEWAY\fR, \f(CW$IPFS_PATH\fR and \f(CW\*(C`$HOME/.ipfs/\*(C'\fR, in that order. .PP One can use this protocol in 2 ways. Using \s-1IPFS:\s0 .PP .Vb 1 \& ffplay ipfs:// .Ve .PP Or the \s-1IPNS\s0 protocol (\s-1IPNS\s0 is mutable \s-1IPFS\s0): .PP .Vb 1 \& ffplay ipns:// .Ve .SS "mmst" .IX Subsection "mmst" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP.\s0 .SS "mmsh" .IX Subsection "mmsh" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP.\s0 .PP The required syntax is: .PP .Vb 1 \& mmsh://[:][/][/] .Ve .SS "md5" .IX Subsection "md5" \&\s-1MD5\s0 output protocol. .PP Computes the \s-1MD5\s0 hash of the data to be written, and on close writes this to the designated output or stdout if none is specified. It can be used to test muxers without writing an actual file. .PP Some examples follow. .PP .Vb 2 \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. \& ffmpeg \-i input.flv \-f avi \-y md5:output.avi.md5 \& \& # Write the MD5 hash of the encoded AVI file to stdout. \& ffmpeg \-i input.flv \-f avi \-y md5: .Ve .PP Note that some formats (typically \s-1MOV\s0) require the output protocol to be seekable, so they will fail with the \s-1MD5\s0 output protocol. .SS "pipe" .IX Subsection "pipe" \&\s-1UNIX\s0 pipe access protocol. .PP Read and write from \s-1UNIX\s0 pipes. .PP The accepted syntax is: .PP .Vb 1 \& pipe:[] .Ve .PP If \fBfd\fR isn't specified, \fInumber\fR is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. .PP For example to read from stdin with \fBffmpeg\fR: .PP .Vb 3 \& cat test.wav | ffmpeg \-i pipe:0 \& # ...this is the same as... \& cat test.wav | ffmpeg \-i pipe: .Ve .PP For writing to stdout with \fBffmpeg\fR: .PP .Vb 3 \& ffmpeg \-i test.wav \-f avi pipe:1 | cat > test.avi \& # ...this is the same as... \& ffmpeg \-i test.wav \-f avi pipe: | cat > test.avi .Ve .PP This protocol accepts the following options: .IP "\fBblocksize\fR" 4 .IX Item "blocksize" Set I/O operation maximum block size, in bytes. Default value is \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow. .IP "\fBfd\fR" 4 .IX Item "fd" Set file descriptor. .PP Note that some formats (typically \s-1MOV\s0), require the output protocol to be seekable, so they will fail with the pipe output protocol. .SS "prompeg" .IX Subsection "prompeg" Pro-MPEG Code of Practice #3 Release 2 \s-1FEC\s0 protocol. .PP The Pro-MPEG CoP#3 \s-1FEC\s0 is a 2D parity-check forward error correction mechanism for \s-1MPEG\-2\s0 Transport Streams sent over \s-1RTP.\s0 .PP This protocol must be used in conjunction with the \f(CW\*(C`rtp_mpegts\*(C'\fR muxer and the \f(CW\*(C`rtp\*(C'\fR protocol. .PP The required syntax is: .PP .Vb 1 \& \-f rtp_mpegts \-fec prompeg=