formats.texi 7.1 KB

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