fftools-common-opts.texi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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.
  85. @item -codecs
  86. Show all codecs known to libavcodec.
  87. Note that the term 'codec' is used throughout this documentation as a shortcut
  88. for what is more correctly called a media bitstream format.
  89. @item -decoders
  90. Show available decoders.
  91. @item -encoders
  92. Show all available encoders.
  93. @item -bsfs
  94. Show available bitstream filters.
  95. @item -protocols
  96. Show available protocols.
  97. @item -filters
  98. Show available libavfilter filters.
  99. @item -pix_fmts
  100. Show available pixel formats.
  101. @item -sample_fmts
  102. Show available sample formats.
  103. @item -layouts
  104. Show channel names and standard channel layouts.
  105. @item -colors
  106. Show recognized color names.
  107. @item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
  108. Set the logging level used by the library.
  109. Adding "repeat+" indicates that repeated log output should not be compressed
  110. to the first line and the "Last message repeated n times" line will be
  111. omitted. "repeat" can also be used alone.
  112. If "repeat" is used alone, and with no prior loglevel set, the default
  113. loglevel will be used. If multiple loglevel parameters are given, using
  114. 'repeat' will not change the loglevel.
  115. @var{loglevel} is a number or a string containing one of the following values:
  116. @table @samp
  117. @item quiet
  118. Show nothing at all; be silent.
  119. @item panic
  120. Only show fatal errors which could lead the process to crash, such as
  121. and assert failure. This is not currently used for anything.
  122. @item fatal
  123. Only show fatal errors. These are errors after which the process absolutely
  124. cannot continue after.
  125. @item error
  126. Show all errors, including ones which can be recovered from.
  127. @item warning
  128. Show all warnings and errors. Any message related to possibly
  129. incorrect or unexpected events will be shown.
  130. @item info
  131. Show informative messages during processing. This is in addition to
  132. warnings and errors. This is the default value.
  133. @item verbose
  134. Same as @code{info}, except more verbose.
  135. @item debug
  136. Show everything, including debugging information.
  137. @end table
  138. By default the program logs to stderr, if coloring is supported by the
  139. terminal, colors are used to mark errors and warnings. Log coloring
  140. can be disabled setting the environment variable
  141. @env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
  142. the environment variable @env{AV_LOG_FORCE_COLOR}.
  143. The use of the environment variable @env{NO_COLOR} is deprecated and
  144. will be dropped in a following FFmpeg version.
  145. @item -report
  146. Dump full command line and console output to a file named
  147. @code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
  148. directory.
  149. This file can be useful for bug reports.
  150. It also implies @code{-loglevel verbose}.
  151. Setting the environment variable @code{FFREPORT} to any value has the
  152. same effect. If the value is a ':'-separated key=value sequence, these
  153. options will affect the report; options values must be escaped if they
  154. contain special characters or the options delimiter ':' (see the
  155. ``Quoting and escaping'' section in the ffmpeg-utils manual). The
  156. following option is recognized:
  157. @table @option
  158. @item file
  159. set the file name to use for the report; @code{%p} is expanded to the name
  160. of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded
  161. to a plain @code{%}
  162. @item level
  163. set the log level
  164. @end table
  165. Errors in parsing the environment variable are not fatal, and will not
  166. appear in the report.
  167. @item -hide_banner
  168. Suppress printing banner.
  169. All FFmpeg tools will normally show a copyright notice, build options
  170. and library versions. This option can be used to suppress printing
  171. this information.
  172. @item -cpuflags flags (@emph{global})
  173. Allows setting and clearing cpu flags. This option is intended
  174. for testing. Do not use it unless you know what you're doing.
  175. @example
  176. ffmpeg -cpuflags -sse+mmx ...
  177. ffmpeg -cpuflags mmx ...
  178. ffmpeg -cpuflags 0 ...
  179. @end example
  180. Possible flags for this option are:
  181. @table @samp
  182. @item x86
  183. @table @samp
  184. @item mmx
  185. @item mmxext
  186. @item sse
  187. @item sse2
  188. @item sse2slow
  189. @item sse3
  190. @item sse3slow
  191. @item ssse3
  192. @item atom
  193. @item sse4.1
  194. @item sse4.2
  195. @item avx
  196. @item avx2
  197. @item xop
  198. @item fma3
  199. @item fma4
  200. @item 3dnow
  201. @item 3dnowext
  202. @item bmi1
  203. @item bmi2
  204. @item cmov
  205. @end table
  206. @item ARM
  207. @table @samp
  208. @item armv5te
  209. @item armv6
  210. @item armv6t2
  211. @item vfp
  212. @item vfpv3
  213. @item neon
  214. @item setend
  215. @end table
  216. @item AArch64
  217. @table @samp
  218. @item armv8
  219. @item vfp
  220. @item neon
  221. @end table
  222. @item PowerPC
  223. @table @samp
  224. @item altivec
  225. @end table
  226. @item Specific Processors
  227. @table @samp
  228. @item pentium2
  229. @item pentium3
  230. @item pentium4
  231. @item k6
  232. @item k62
  233. @item athlon
  234. @item athlonxp
  235. @item k8
  236. @end table
  237. @end table
  238. @item -opencl_bench
  239. Benchmark all available OpenCL devices and show the results. This option
  240. is only available when FFmpeg has been compiled with @code{--enable-opencl}.
  241. @item -opencl_options options (@emph{global})
  242. Set OpenCL environment options. This option is only available when
  243. FFmpeg has been compiled with @code{--enable-opencl}.
  244. @var{options} must be a list of @var{key}=@var{value} option pairs
  245. separated by ':'. See the ``OpenCL Options'' section in the
  246. ffmpeg-utils manual for the list of supported options.
  247. @end table
  248. @section AVOptions
  249. These options are provided directly by the libavformat, libavdevice and
  250. libavcodec libraries. To see the list of available AVOptions, use the
  251. @option{-help} option. They are separated into two categories:
  252. @table @option
  253. @item generic
  254. These options can be set for any container, codec or device. Generic options
  255. are listed under AVFormatContext options for containers/devices and under
  256. AVCodecContext options for codecs.
  257. @item private
  258. These options are specific to the given container, device or codec. Private
  259. options are listed under their corresponding containers/devices/codecs.
  260. @end table
  261. For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  262. an MP3 file, use the @option{id3v2_version} private option of the MP3
  263. muxer:
  264. @example
  265. ffmpeg -i input.flac -id3v2_version 3 out.mp3
  266. @end example
  267. All codec AVOptions are per-stream, and thus a stream specifier
  268. should be attached to them.
  269. Note: the @option{-nooption} syntax cannot be used for boolean
  270. AVOptions, use @option{-option 0}/@option{-option 1}.
  271. Note: the old undocumented way of specifying per-stream AVOptions by
  272. prepending v/a/s to the options name is now obsolete and will be
  273. removed soon.