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.

227 lines
6.9KB

  1. @chapter Format Options
  2. @c man begin FORMAT OPTIONS
  3. The libavformat library provides some generic global options, which
  4. can be set on all the muxers and demuxers. In addition each muxer or
  5. demuxer may support so-called private options, which are specific for
  6. that component.
  7. Options may be set by specifying -@var{option} @var{value} in the
  8. FFmpeg tools, or by setting the value explicitly in the
  9. @code{AVFormatContext} options or using the @file{libavutil/opt.h} API
  10. for programmatic use.
  11. The list of supported options follows:
  12. @table @option
  13. @item avioflags @var{flags} (@emph{input/output})
  14. Possible values:
  15. @table @samp
  16. @item direct
  17. Reduce buffering.
  18. @end table
  19. @item probesize @var{integer} (@emph{input})
  20. Set probing size in bytes, i.e. the size of the data to analyze to get
  21. stream information. A higher value will allow to detect more
  22. information in case it is dispersed into the stream, but will increase
  23. latency. Must be an integer not lesser than 32. It is 5000000 by default.
  24. @item packetsize @var{integer} (@emph{output})
  25. Set packet size.
  26. @item fflags @var{flags} (@emph{input/output})
  27. Set format flags.
  28. Possible values:
  29. @table @samp
  30. @item ignidx
  31. Ignore index.
  32. @item genpts
  33. Generate PTS.
  34. @item nofillin
  35. Do not fill in missing values that can be exactly calculated.
  36. @item noparse
  37. Disable AVParsers, this needs @code{+nofillin} too.
  38. @item igndts
  39. Ignore DTS.
  40. @item discardcorrupt
  41. Discard corrupted frames.
  42. @item sortdts
  43. Try to interleave output packets by DTS.
  44. @item keepside
  45. Do not merge side data.
  46. @item latm
  47. Enable RTP MP4A-LATM payload.
  48. @item nobuffer
  49. Reduce the latency introduced by optional buffering
  50. @item bitexact
  51. Only write binary portable, build and time independant data.
  52. @end table
  53. @item seek2any @var{integer} (@emph{input})
  54. Allow seeking to non-keyframes on demuxer level when supported if set to 1.
  55. Default is 0.
  56. @item analyzeduration @var{integer} (@emph{input})
  57. Specify how many microseconds are analyzed to probe the input. A
  58. higher value will allow to detect more accurate information, but will
  59. increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
  60. @item cryptokey @var{hexadecimal string} (@emph{input})
  61. Set decryption key.
  62. @item indexmem @var{integer} (@emph{input})
  63. Set max memory used for timestamp index (per stream).
  64. @item rtbufsize @var{integer} (@emph{input})
  65. Set max memory used for buffering real-time frames.
  66. @item fdebug @var{flags} (@emph{input/output})
  67. Print specific debug info.
  68. Possible values:
  69. @table @samp
  70. @item ts
  71. @end table
  72. @item max_delay @var{integer} (@emph{input/output})
  73. Set maximum muxing or demuxing delay in microseconds.
  74. @item fpsprobesize @var{integer} (@emph{input})
  75. Set number of frames used to probe fps.
  76. @item audio_preload @var{integer} (@emph{output})
  77. Set microseconds by which audio packets should be interleaved earlier.
  78. @item chunk_duration @var{integer} (@emph{output})
  79. Set microseconds for each chunk.
  80. @item chunk_size @var{integer} (@emph{output})
  81. Set size in bytes for each chunk.
  82. @item err_detect, f_err_detect @var{flags} (@emph{input})
  83. Set error detection flags. @code{f_err_detect} is deprecated and
  84. should be used only via the @command{ffmpeg} tool.
  85. Possible values:
  86. @table @samp
  87. @item crccheck
  88. Verify embedded CRCs.
  89. @item bitstream
  90. Detect bitstream specification deviations.
  91. @item buffer
  92. Detect improper bitstream length.
  93. @item explode
  94. Abort decoding on minor error detection.
  95. @item careful
  96. Consider things that violate the spec and have not been seen in the
  97. wild as errors.
  98. @item compliant
  99. Consider all spec non compliancies as errors.
  100. @item aggressive
  101. Consider things that a sane encoder should not do as an error.
  102. @end table
  103. @item use_wallclock_as_timestamps @var{integer} (@emph{input})
  104. Use wallclock as timestamps.
  105. @item avoid_negative_ts @var{integer} (@emph{output})
  106. Possible values:
  107. @table @samp
  108. @item make_non_negative
  109. Shift timestamps to make them non-negative.
  110. Also note that this affects only leading negative timestamps, and not
  111. non-monotonic negative timestamps.
  112. @item make_zero
  113. Shift timestamps so that the first timestamp is 0.
  114. @item auto (default)
  115. Enables shifting when required by the target format.
  116. @item disabled
  117. Disables shifting of timestamp.
  118. @end table
  119. When shifting is enabled, all output timestamps are shifted by the
  120. same amount. Audio, video, and subtitles desynching and relative
  121. timestamp differences are preserved compared to how they would have
  122. been without shifting.
  123. @item skip_initial_bytes @var{integer} (@emph{input})
  124. Set number of bytes to skip before reading header and frames if set to 1.
  125. Default is 0.
  126. @item correct_ts_overflow @var{integer} (@emph{input})
  127. Correct single timestamp overflows if set to 1. Default is 1.
  128. @item flush_packets @var{integer} (@emph{output})
  129. Flush the underlying I/O stream after each packet. Default 1 enables it, and
  130. has the effect of reducing the latency; 0 disables it and may slightly
  131. increase performance in some cases.
  132. @item output_ts_offset @var{offset} (@emph{output})
  133. Set the output time offset.
  134. @var{offset} must be a time duration specification,
  135. see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
  136. The offset is added by the muxer to the output timestamps.
  137. Specifying a positive offset means that the corresponding streams are
  138. delayed bt the time duration specified in @var{offset}. Default value
  139. is @code{0} (meaning that no offset is applied).
  140. @item format_whitelist @var{list} (@emph{input})
  141. "," separated List of allowed demuxers. By default all are allowed.
  142. @item dump_separator @var{string} (@emph{input})
  143. Separator used to separate the fields printed on the command line about the
  144. Stream parameters.
  145. For example to separate the fields with newlines and indention:
  146. @example
  147. ffprobe -dump_separator "
  148. " -i ~/videos/matrixbench_mpeg2.mpg
  149. @end example
  150. @end table
  151. @c man end FORMAT OPTIONS
  152. @anchor{Format stream specifiers}
  153. @section Format stream specifiers
  154. Format stream specifiers allow selection of one or more streams that
  155. match specific properties.
  156. Possible forms of stream specifiers are:
  157. @table @option
  158. @item @var{stream_index}
  159. Matches the stream with this index.
  160. @item @var{stream_type}[:@var{stream_index}]
  161. @var{stream_type} is one of following: 'v' for video, 'a' for audio,
  162. 's' for subtitle, 'd' for data, and 't' for attachments. If
  163. @var{stream_index} is given, then it matches the stream number
  164. @var{stream_index} of this type. Otherwise, it matches all streams of
  165. this type.
  166. @item p:@var{program_id}[:@var{stream_index}]
  167. If @var{stream_index} is given, then it matches the stream with number
  168. @var{stream_index} in the program with the id
  169. @var{program_id}. Otherwise, it matches all streams in the program.
  170. @item #@var{stream_id}
  171. Matches the stream by a format-specific ID.
  172. @end table
  173. The exact semantics of stream specifiers is defined by the
  174. @code{avformat_match_stream_specifier()} function declared in the
  175. @file{libavformat/avformat.h} header.
  176. @ifclear config-writeonly
  177. @include demuxers.texi
  178. @end ifclear
  179. @ifclear config-readonly
  180. @include muxers.texi
  181. @end ifclear
  182. @include metadata.texi