1 All the numerical options, if not specified otherwise, accept a string
2 representing a number as input, which may be followed by one of the SI
3 unit prefixes, for example: 'K', 'M', or 'G'.
5 If 'i' is appended to the SI unit prefix, the complete prefix will be
6 interpreted as a unit prefix for binary multiplies, which are based on
7 powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit
8 prefix multiplies the value by 8. This allows using, for example:
9 'KB', 'MiB', 'G' and 'B' as number suffixes.
11 Options which do not take arguments are boolean options, and set the
12 corresponding value to true. They can be set to false by prefixing
13 the option name with "no". For example using "-nofoo"
14 will set the boolean option with name "foo" to false.
16 @anchor{Stream specifiers}
17 @section Stream specifiers
18 Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
19 are used to precisely specify which stream(s) a given option belongs to.
21 A stream specifier is a string generally appended to the option name and
22 separated from it by a colon. E.g. @code{-codec:a:1 ac3} contains the
23 @code{a:1} stream specifier, which matches the second audio stream. Therefore, it
24 would select the ac3 codec for the second audio stream.
26 A stream specifier can match several streams, so that the option is applied to all
27 of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
30 An empty stream specifier matches all streams. For example, @code{-codec copy}
31 or @code{-codec: copy} would copy all the streams without reencoding.
33 Possible forms of stream specifiers are:
35 @item @var{stream_index}
36 Matches the stream with this index. E.g. @code{-threads:1 4} would set the
37 thread count for the second stream to 4.
38 @item @var{stream_type}[:@var{stream_index}]
39 @var{stream_type} is one of following: 'v' for video, 'a' for audio, 's' for subtitle,
40 'd' for data, and 't' for attachments. If @var{stream_index} is given, then it matches
41 stream number @var{stream_index} of this type. Otherwise, it matches all
43 @item p:@var{program_id}[:@var{stream_index}]
44 If @var{stream_index} is given, then it matches the stream with number @var{stream_index}
45 in the program with the id @var{program_id}. Otherwise, it matches all streams in the
47 @item #@var{stream_id}
48 Matches the stream by a format-specific ID.
51 @section Generic options
53 These options are shared amongst the ff* tools.
60 @item -h, -?, -help, --help [@var{arg}]
61 Show help. An optional parameter may be specified to print help about a specific
62 item. If no argument is specified, only basic (non advanced) tool
65 Possible values of @var{arg} are:
68 Print advanced tool options in addition to the basic tool options.
71 Print complete list of options, including shared and private options
72 for encoders, decoders, demuxers, muxers, filters, etc.
74 @item decoder=@var{decoder_name}
75 Print detailed information about the decoder named @var{decoder_name}. Use the
76 @option{-decoders} option to get a list of all decoders.
78 @item encoder=@var{encoder_name}
79 Print detailed information about the encoder named @var{encoder_name}. Use the
80 @option{-encoders} option to get a list of all encoders.
82 @item demuxer=@var{demuxer_name}
83 Print detailed information about the demuxer named @var{demuxer_name}. Use the
84 @option{-formats} option to get a list of all demuxers and muxers.
86 @item muxer=@var{muxer_name}
87 Print detailed information about the muxer named @var{muxer_name}. Use the
88 @option{-formats} option to get a list of all muxers and demuxers.
90 @item filter=@var{filter_name}
91 Print detailed information about the filter name @var{filter_name}. Use the
92 @option{-filters} option to get a list of all filters.
99 Show available formats.
102 Show all codecs known to libavcodec.
104 Note that the term 'codec' is used throughout this documentation as a shortcut
105 for what is more correctly called a media bitstream format.
108 Show available decoders.
111 Show all available encoders.
114 Show available bitstream filters.
117 Show available protocols.
120 Show available libavfilter filters.
123 Show available pixel formats.
126 Show available sample formats.
129 Show channel names and standard channel layouts.
131 @item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
132 Set the logging level used by the library.
133 Adding "repeat+" indicates that repeated log output should not be compressed
134 to the first line and the "Last message repeated n times" line will be
135 omitted. "repeat" can also be used alone.
136 If "repeat" is used alone, and with no prior loglevel set, the default
137 loglevel will be used. If multiple loglevel parameters are given, using
138 'repeat' will not change the loglevel.
139 @var{loglevel} is a number or a string containing one of the following values:
142 Show nothing at all; be silent.
144 Only show fatal errors which could lead the process to crash, such as
145 and assert failure. This is not currently used for anything.
147 Only show fatal errors. These are errors after which the process absolutely
148 cannot continue after.
150 Show all errors, including ones which can be recovered from.
152 Show all warnings and errors. Any message related to possibly
153 incorrect or unexpected events will be shown.
155 Show informative messages during processing. This is in addition to
156 warnings and errors. This is the default value.
158 Same as @code{info}, except more verbose.
160 Show everything, including debugging information.
163 By default the program logs to stderr, if coloring is supported by the
164 terminal, colors are used to mark errors and warnings. Log coloring
165 can be disabled setting the environment variable
166 @env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
167 the environment variable @env{AV_LOG_FORCE_COLOR}.
168 The use of the environment variable @env{NO_COLOR} is deprecated and
169 will be dropped in a following FFmpeg version.
172 Dump full command line and console output to a file named
173 @code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
175 This file can be useful for bug reports.
176 It also implies @code{-loglevel verbose}.
178 Setting the environment variable @code{FFREPORT} to any value has the
179 same effect. If the value is a ':'-separated key=value sequence, these
180 options will affect the report; options values must be escaped if they
181 contain special characters or the options delimiter ':' (see the
182 ``Quoting and escaping'' section in the ffmpeg-utils manual). The
183 following option is recognized:
186 set the file name to use for the report; @code{%p} is expanded to the name
187 of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded
191 Errors in parsing the environment variable are not fatal, and will not
192 appear in the report.
194 @item -cpuflags flags (@emph{global})
195 Allows setting and clearing cpu flags. This option is intended
196 for testing. Do not use it unless you know what you're doing.
198 ffmpeg -cpuflags -sse+mmx ...
199 ffmpeg -cpuflags mmx ...
200 ffmpeg -cpuflags 0 ...
202 Possible flags for this option are:
237 @item Specific Processors
250 @item -opencl_options options (@emph{global})
251 Set OpenCL environment options. This option is only available when
252 FFmpeg has been compiled with @code{--enable-opencl}.
254 @var{options} must be a list of @var{key}=@var{value} option pairs
255 separated by ':'. See the ``OpenCL Options'' section in the
256 ffmpeg-utils manual for the list of supported options.
261 These options are provided directly by the libavformat, libavdevice and
262 libavcodec libraries. To see the list of available AVOptions, use the
263 @option{-help} option. They are separated into two categories:
266 These options can be set for any container, codec or device. Generic options
267 are listed under AVFormatContext options for containers/devices and under
268 AVCodecContext options for codecs.
270 These options are specific to the given container, device or codec. Private
271 options are listed under their corresponding containers/devices/codecs.
274 For example to write an ID3v2.3 header instead of a default ID3v2.4 to
275 an MP3 file, use the @option{id3v2_version} private option of the MP3
278 ffmpeg -i input.flac -id3v2_version 3 out.mp3
281 All codec AVOptions are per-stream, and thus a stream specifier
282 should be attached to them.
284 Note: the @option{-nooption} syntax cannot be used for boolean
285 AVOptions, use @option{-option 0}/@option{-option 1}.
287 Note: the old undocumented way of specifying per-stream AVOptions by
288 prepending v/a/s to the options name is now obsolete and will be