You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

290 lines
9.4KB

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