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.

155 lines
5.0KB

  1. All the numerical options, if not specified otherwise, accept in input
  2. a string representing a number, which may contain one of the
  3. International System number postfixes, for example 'K', 'M', 'G'.
  4. If 'i' is appended after the postfix, powers of 2 are used instead of
  5. powers of 10. The 'B' postfix multiplies the value for 8, and can be
  6. appended after another postfix or used alone. This allows using for
  7. example 'KB', 'MiB', 'G' and 'B' as postfix.
  8. Options which do not take arguments are boolean options, and set the
  9. corresponding value to true. They can be set to false by prefixing
  10. with "no" the option name, for example using "-nofoo" in the
  11. command line will set to false the boolean option with name "foo".
  12. @anchor{Stream specifiers}
  13. @section Stream specifiers
  14. Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  15. are used to precisely specify which stream(s) does a given option belong to.
  16. A stream specifier is a string generally appended to the option name and
  17. separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
  18. @code{a:1} stream specifer, which matches the second audio stream. Therefore it
  19. would select the ac3 codec for the second audio stream.
  20. A stream specifier can match several stream, the option is then applied to all
  21. of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
  22. streams.
  23. An empty stream specifier matches all streams, for example @code{-codec copy}
  24. or @code{-codec: copy} would copy all the streams without reencoding.
  25. Possible forms of stream specifiers are:
  26. @table @option
  27. @item @var{stream_index}
  28. Matches the stream with this index. E.g. @code{-threads:1 4} would set the
  29. thread count for the second stream to 4.
  30. @item @var{stream_type}[:@var{stream_index}]
  31. @var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle,
  32. 'd' for data and 't' for attachments. If @var{stream_index} is given, then
  33. matches stream number @var{stream_index} of this type. Otherwise matches all
  34. streams of this type.
  35. @item p:@var{program_id}[:@var{stream_index}]
  36. If @var{stream_index} is given, then matches stream number @var{stream_index} in
  37. program with id @var{program_id}. Otherwise matches all streams in this program.
  38. @end table
  39. @section Generic options
  40. These options are shared amongst the av* tools.
  41. @table @option
  42. @item -L
  43. Show license.
  44. @item -h, -?, -help, --help
  45. Show help.
  46. @item -version
  47. Show version.
  48. @item -formats
  49. Show available formats.
  50. The fields preceding the format names have the following meanings:
  51. @table @samp
  52. @item D
  53. Decoding available
  54. @item E
  55. Encoding available
  56. @end table
  57. @item -codecs
  58. Show all codecs known to libavcodec.
  59. Note that the term 'codec' is used throughout this documentation as a shortcut
  60. for what is more correctly called a media bitstream format.
  61. @item -decoders
  62. Show available decoders.
  63. @item -encoders
  64. Show all available encoders.
  65. @item -bsfs
  66. Show available bitstream filters.
  67. @item -protocols
  68. Show available protocols.
  69. @item -filters
  70. Show available libavfilter filters.
  71. @item -pix_fmts
  72. Show available pixel formats.
  73. @item -sample_fmts
  74. Show available sample formats.
  75. @item -loglevel @var{loglevel} | -v @var{loglevel}
  76. Set the logging level used by the library.
  77. @var{loglevel} is a number or a string containing one of the following values:
  78. @table @samp
  79. @item quiet
  80. @item panic
  81. @item fatal
  82. @item error
  83. @item warning
  84. @item info
  85. @item verbose
  86. @item debug
  87. @end table
  88. By default the program logs to stderr, if coloring is supported by the
  89. terminal, colors are used to mark errors and warnings. Log coloring
  90. can be disabled setting the environment variable
  91. @env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
  92. the environment variable @env{AV_LOG_FORCE_COLOR}.
  93. The use of the environment variable @env{NO_COLOR} is deprecated and
  94. will be dropped in a following Libav version.
  95. @end table
  96. @section AVOptions
  97. These options are provided directly by the libavformat, libavdevice and
  98. libavcodec libraries. To see the list of available AVOptions, use the
  99. @option{-help} option. They are separated into two categories:
  100. @table @option
  101. @item generic
  102. These options can be set for any container, codec or device. Generic options
  103. are listed under AVFormatContext options for containers/devices and under
  104. AVCodecContext options for codecs.
  105. @item private
  106. These options are specific to the given container, device or codec. Private
  107. options are listed under their corresponding containers/devices/codecs.
  108. @end table
  109. For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  110. an MP3 file, use the @option{id3v2_version} private option of the MP3
  111. muxer:
  112. @example
  113. avconv -i input.flac -id3v2_version 3 out.mp3
  114. @end example
  115. All codec AVOptions are obviously per-stream, so the chapter on stream
  116. specifiers applies to them
  117. Note @option{-nooption} syntax cannot be used for boolean AVOptions,
  118. use @option{-option 0}/@option{-option 1}.
  119. Note2 old undocumented way of specifying per-stream AVOptions by prepending
  120. v/a/s to the options name is now obsolete and will be removed soon.
  121. @include avoptions_codec.texi
  122. @include avoptions_format.texi