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.

282 lines
9.1KB

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