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.

265 lines
8.2KB

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