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.

271 lines
8.6KB

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