fftools-common-opts.texi 9.8 KB

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