annotate ffmpeg/doc/avtools-common-opts.texi @ 13:844d341cf643 tip

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