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.

332 lines
11KB

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