Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / doc / fftools-common-opts.texi
CommitLineData
2ba45a60
DM
1All the numerical options, if not specified otherwise, accept a string
2representing a number as input, which may be followed by one of the SI
3unit prefixes, for example: 'K', 'M', or 'G'.
4
5If 'i' is appended to the SI unit prefix, the complete prefix will be
6interpreted as a unit prefix for binary multiples, which are based on
7powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit
8prefix multiplies the value by 8. This allows using, for example:
9'KB', 'MiB', 'G' and 'B' as number suffixes.
10
11Options which do not take arguments are boolean options, and set the
12corresponding value to true. They can be set to false by prefixing
13the option name with "no". For example using "-nofoo"
14will set the boolean option with name "foo" to false.
15
16@anchor{Stream specifiers}
17@section Stream specifiers
18Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
19are used to precisely specify which stream(s) a given option belongs to.
20
21A stream specifier is a string generally appended to the option name and
22separated 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
24would select the ac3 codec for the second audio stream.
25
26A stream specifier can match several streams, so that the option is applied to all
27of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
28streams.
29
30An empty stream specifier matches all streams. For example, @code{-codec copy}
31or @code{-codec: copy} would copy all the streams without reencoding.
32
33Possible forms of stream specifiers are:
34@table @option
35@item @var{stream_index}
36Matches the stream with this index. E.g. @code{-threads:1 4} would set the
37thread 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
41stream number @var{stream_index} of this type. Otherwise, it matches all
42streams of this type.
43@item p:@var{program_id}[:@var{stream_index}]
44If @var{stream_index} is given, then it matches the stream with number @var{stream_index}
45in the program with the id @var{program_id}. Otherwise, it matches all streams in the
46program.
47@item #@var{stream_id} or i:@var{stream_id}
48Match the stream by stream id (e.g. PID in MPEG-TS container).
49@item m:@var{key}[:@var{value}]
50Matches streams with the metadata tag @var{key} having the specified value. If
51@var{value} is not given, matches streams that contain the given tag with any
52value.
53
54Note that in @command{ffmpeg}, matching by metadata will only work properly for
55input files.
56@end table
57
58@section Generic options
59
60These options are shared amongst the ff* tools.
61
62@table @option
63
64@item -L
65Show license.
66
67@item -h, -?, -help, --help [@var{arg}]
68Show help. An optional parameter may be specified to print help about a specific
69item. If no argument is specified, only basic (non advanced) tool
70options are shown.
71
72Possible values of @var{arg} are:
73@table @option
74@item long
75Print advanced tool options in addition to the basic tool options.
76
77@item full
78Print complete list of options, including shared and private options
79for encoders, decoders, demuxers, muxers, filters, etc.
80
81@item decoder=@var{decoder_name}
82Print detailed information about the decoder named @var{decoder_name}. Use the
83@option{-decoders} option to get a list of all decoders.
84
85@item encoder=@var{encoder_name}
86Print detailed information about the encoder named @var{encoder_name}. Use the
87@option{-encoders} option to get a list of all encoders.
88
89@item demuxer=@var{demuxer_name}
90Print detailed information about the demuxer named @var{demuxer_name}. Use the
91@option{-formats} option to get a list of all demuxers and muxers.
92
93@item muxer=@var{muxer_name}
94Print detailed information about the muxer named @var{muxer_name}. Use the
95@option{-formats} option to get a list of all muxers and demuxers.
96
97@item filter=@var{filter_name}
98Print detailed information about the filter name @var{filter_name}. Use the
99@option{-filters} option to get a list of all filters.
100@end table
101
102@item -version
103Show version.
104
105@item -formats
f6fa7814
DM
106Show available formats (including devices).
107
108@item -devices
109Show available devices.
2ba45a60
DM
110
111@item -codecs
112Show all codecs known to libavcodec.
113
114Note that the term 'codec' is used throughout this documentation as a shortcut
115for what is more correctly called a media bitstream format.
116
117@item -decoders
118Show available decoders.
119
120@item -encoders
121Show all available encoders.
122
123@item -bsfs
124Show available bitstream filters.
125
126@item -protocols
127Show available protocols.
128
129@item -filters
130Show available libavfilter filters.
131
132@item -pix_fmts
133Show available pixel formats.
134
135@item -sample_fmts
136Show available sample formats.
137
138@item -layouts
139Show channel names and standard channel layouts.
140
141@item -colors
142Show recognized color names.
143
f6fa7814
DM
144@item -sources @var{device}[,@var{opt1}=@var{val1}[,@var{opt2}=@var{val2}]...]
145Show autodetected sources of the intput device.
146Some devices may provide system-dependent source names that cannot be autodetected.
147The returned list cannot be assumed to be always complete.
148@example
149ffmpeg -sources pulse,server=192.168.0.4
150@end example
151
152@item -sinks @var{device}[,@var{opt1}=@var{val1}[,@var{opt2}=@var{val2}]...]
153Show autodetected sinks of the output device.
154Some devices may provide system-dependent sink names that cannot be autodetected.
155The returned list cannot be assumed to be always complete.
156@example
157ffmpeg -sinks pulse,server=192.168.0.4
158@end example
159
2ba45a60
DM
160@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
161Set the logging level used by the library.
162Adding "repeat+" indicates that repeated log output should not be compressed
163to the first line and the "Last message repeated n times" line will be
164omitted. "repeat" can also be used alone.
165If "repeat" is used alone, and with no prior loglevel set, the default
166loglevel will be used. If multiple loglevel parameters are given, using
167'repeat' will not change the loglevel.
168@var{loglevel} is a number or a string containing one of the following values:
169@table @samp
170@item quiet
171Show nothing at all; be silent.
172@item panic
173Only show fatal errors which could lead the process to crash, such as
174and assert failure. This is not currently used for anything.
175@item fatal
176Only show fatal errors. These are errors after which the process absolutely
177cannot continue after.
178@item error
179Show all errors, including ones which can be recovered from.
180@item warning
181Show all warnings and errors. Any message related to possibly
182incorrect or unexpected events will be shown.
183@item info
184Show informative messages during processing. This is in addition to
185warnings and errors. This is the default value.
186@item verbose
187Same as @code{info}, except more verbose.
188@item debug
189Show everything, including debugging information.
190@end table
191
192By default the program logs to stderr, if coloring is supported by the
193terminal, colors are used to mark errors and warnings. Log coloring
194can be disabled setting the environment variable
195@env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
196the environment variable @env{AV_LOG_FORCE_COLOR}.
197The use of the environment variable @env{NO_COLOR} is deprecated and
198will be dropped in a following FFmpeg version.
199
200@item -report
201Dump full command line and console output to a file named
202@code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
203directory.
204This file can be useful for bug reports.
205It also implies @code{-loglevel verbose}.
206
207Setting the environment variable @code{FFREPORT} to any value has the
208same effect. If the value is a ':'-separated key=value sequence, these
209options will affect the report; options values must be escaped if they
210contain special characters or the options delimiter ':' (see the
211``Quoting and escaping'' section in the ffmpeg-utils manual). The
212following option is recognized:
213@table @option
214@item file
215set the file name to use for the report; @code{%p} is expanded to the name
216of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded
217to a plain @code{%}
218@item level
219set the log level
220@end table
221
222Errors in parsing the environment variable are not fatal, and will not
223appear in the report.
224
225@item -hide_banner
226Suppress printing banner.
227
228All FFmpeg tools will normally show a copyright notice, build options
229and library versions. This option can be used to suppress printing
230this information.
231
232@item -cpuflags flags (@emph{global})
233Allows setting and clearing cpu flags. This option is intended
234for testing. Do not use it unless you know what you're doing.
235@example
236ffmpeg -cpuflags -sse+mmx ...
237ffmpeg -cpuflags mmx ...
238ffmpeg -cpuflags 0 ...
239@end example
240Possible flags for this option are:
241@table @samp
242@item x86
243@table @samp
244@item mmx
245@item mmxext
246@item sse
247@item sse2
248@item sse2slow
249@item sse3
250@item sse3slow
251@item ssse3
252@item atom
253@item sse4.1
254@item sse4.2
255@item avx
256@item xop
257@item fma4
258@item 3dnow
259@item 3dnowext
260@item cmov
261@end table
262@item ARM
263@table @samp
264@item armv5te
265@item armv6
266@item armv6t2
267@item vfp
268@item vfpv3
269@item neon
270@end table
271@item PowerPC
272@table @samp
273@item altivec
274@end table
275@item Specific Processors
276@table @samp
277@item pentium2
278@item pentium3
279@item pentium4
280@item k6
281@item k62
282@item athlon
283@item athlonxp
284@item k8
285@end table
286@end table
287
288@item -opencl_bench
289Benchmark all available OpenCL devices and show the results. This option
290is only available when FFmpeg has been compiled with @code{--enable-opencl}.
291
292@item -opencl_options options (@emph{global})
293Set OpenCL environment options. This option is only available when
294FFmpeg has been compiled with @code{--enable-opencl}.
295
296@var{options} must be a list of @var{key}=@var{value} option pairs
297separated by ':'. See the ``OpenCL Options'' section in the
298ffmpeg-utils manual for the list of supported options.
299@end table
300
301@section AVOptions
302
303These options are provided directly by the libavformat, libavdevice and
304libavcodec libraries. To see the list of available AVOptions, use the
305@option{-help} option. They are separated into two categories:
306@table @option
307@item generic
308These options can be set for any container, codec or device. Generic options
309are listed under AVFormatContext options for containers/devices and under
310AVCodecContext options for codecs.
311@item private
312These options are specific to the given container, device or codec. Private
313options are listed under their corresponding containers/devices/codecs.
314@end table
315
316For example to write an ID3v2.3 header instead of a default ID3v2.4 to
317an MP3 file, use the @option{id3v2_version} private option of the MP3
318muxer:
319@example
320ffmpeg -i input.flac -id3v2_version 3 out.mp3
321@end example
322
323All codec AVOptions are per-stream, and thus a stream specifier
324should be attached to them.
325
326Note: the @option{-nooption} syntax cannot be used for boolean
327AVOptions, use @option{-option 0}/@option{-option 1}.
328
329Note: the old undocumented way of specifying per-stream AVOptions by
330prepending v/a/s to the options name is now obsolete and will be
331removed soon.