fftools-common-opts.texi 11 KB

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