ffprobe.html 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by , GNU Texinfo 7.1 -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. ffprobe Documentation
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. ffprobe Documentation
  17. </h1>
  18. <div class="top-level-extent" id="SEC_Top">
  19. <div class="element-contents" id="SEC_Contents">
  20. <h2 class="contents-heading">Table of Contents</h2>
  21. <div class="contents">
  22. <ul class="toc-numbered-mark">
  23. <li><a id="toc-Synopsis" href="#Synopsis">1 Synopsis</a></li>
  24. <li><a id="toc-Description" href="#Description">2 Description</a></li>
  25. <li><a id="toc-Options" href="#Options">3 Options</a>
  26. <ul class="toc-numbered-mark">
  27. <li><a id="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
  28. <li><a id="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
  29. <li><a id="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
  30. <li><a id="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
  31. </ul></li>
  32. <li><a id="toc-Writers" href="#Writers">4 Writers</a>
  33. <ul class="toc-numbered-mark">
  34. <li><a id="toc-default" href="#default">4.1 default</a></li>
  35. <li><a id="toc-compact_002c-csv" href="#compact_002c-csv">4.2 compact, csv</a></li>
  36. <li><a id="toc-flat" href="#flat">4.3 flat</a></li>
  37. <li><a id="toc-ini" href="#ini">4.4 ini</a></li>
  38. <li><a id="toc-json" href="#json">4.5 json</a></li>
  39. <li><a id="toc-xml" href="#xml">4.6 xml</a></li>
  40. </ul></li>
  41. <li><a id="toc-Timecode" href="#Timecode">5 Timecode</a></li>
  42. <li><a id="toc-See-Also" href="#See-Also">6 See Also</a></li>
  43. <li><a id="toc-Authors" href="#Authors">7 Authors</a></li>
  44. </ul>
  45. </div>
  46. </div>
  47. <ul class="mini-toc">
  48. <li><a href="#Synopsis" accesskey="1">Synopsis</a></li>
  49. <li><a href="#Description" accesskey="2">Description</a></li>
  50. <li><a href="#Options" accesskey="3">Options</a></li>
  51. <li><a href="#Writers" accesskey="4">Writers</a></li>
  52. <li><a href="#Timecode" accesskey="5">Timecode</a></li>
  53. <li><a href="#See-Also" accesskey="6">See Also</a></li>
  54. <li><a href="#Authors" accesskey="7">Authors</a></li>
  55. </ul>
  56. <div class="chapter-level-extent" id="Synopsis">
  57. <h2 class="chapter"><span>1 Synopsis<a class="copiable-link" href="#Synopsis"> &para;</a></span></h2>
  58. <p>ffprobe [<var class="var">options</var>] <samp class="file">input_url</samp>
  59. </p>
  60. </div>
  61. <div class="chapter-level-extent" id="Description">
  62. <h2 class="chapter"><span>2 Description<a class="copiable-link" href="#Description"> &para;</a></span></h2>
  63. <p>ffprobe gathers information from multimedia streams and prints it in
  64. human- and machine-readable fashion.
  65. </p>
  66. <p>For example it can be used to check the format of the container used
  67. by a multimedia stream and the format and type of each media stream
  68. contained in it.
  69. </p>
  70. <p>If a url is specified in input, ffprobe will try to open and
  71. probe the url content. If the url cannot be opened or recognized as
  72. a multimedia file, a positive exit code is returned.
  73. </p>
  74. <p>If no output is specified as output with <samp class="option">o</samp> ffprobe will write
  75. to stdout.
  76. </p>
  77. <p>ffprobe may be employed both as a standalone application or in
  78. combination with a textual filter, which may perform more
  79. sophisticated processing, e.g. statistical processing or plotting.
  80. </p>
  81. <p>Options are used to list some of the formats supported by ffprobe or
  82. for specifying which information to display, and for setting how
  83. ffprobe will show it.
  84. </p>
  85. <p>ffprobe output is designed to be easily parsable by a textual filter,
  86. and consists of one or more sections of a form defined by the selected
  87. writer, which is specified by the <samp class="option">output_format</samp> option.
  88. </p>
  89. <p>Sections may contain other nested sections, and are identified by a
  90. name (which may be shared by other sections), and an unique
  91. name. See the output of <samp class="option">sections</samp>.
  92. </p>
  93. <p>Metadata tags stored in the container or in the streams are recognized
  94. and printed in the corresponding &quot;FORMAT&quot;, &quot;STREAM&quot;, &quot;STREAM_GROUP_STREAM&quot;
  95. or &quot;PROGRAM_STREAM&quot; section.
  96. </p>
  97. </div>
  98. <div class="chapter-level-extent" id="Options">
  99. <h2 class="chapter"><span>3 Options<a class="copiable-link" href="#Options"> &para;</a></span></h2>
  100. <p>All the numerical options, if not specified otherwise, accept a string
  101. representing a number as input, which may be followed by one of the SI
  102. unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;.
  103. </p>
  104. <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be
  105. interpreted as a unit prefix for binary multiples, which are based on
  106. powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit
  107. prefix multiplies the value by 8. This allows using, for example:
  108. &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes.
  109. </p>
  110. <p>Options which do not take arguments are boolean options, and set the
  111. corresponding value to true. They can be set to false by prefixing
  112. the option name with &quot;no&quot;. For example using &quot;-nofoo&quot;
  113. will set the boolean option with name &quot;foo&quot; to false.
  114. </p>
  115. <p>Options that take arguments support a special syntax where the argument given on
  116. the command line is interpreted as a path to the file from which the actual
  117. argument value is loaded. To use this feature, add a forward slash &rsquo;/&rsquo;
  118. immediately before the option name (after the leading dash). E.g.
  119. </p><div class="example">
  120. <pre class="example-preformatted">ffmpeg -i INPUT -/filter:v filter.script OUTPUT
  121. </pre></div>
  122. <p>will load a filtergraph description from the file named <samp class="file">filter.script</samp>.
  123. </p>
  124. <a class="anchor" id="Stream-specifiers"></a><ul class="mini-toc">
  125. <li><a href="#Stream-specifiers-1" accesskey="1">Stream specifiers</a></li>
  126. <li><a href="#Generic-options" accesskey="2">Generic options</a></li>
  127. <li><a href="#AVOptions" accesskey="3">AVOptions</a></li>
  128. <li><a href="#Main-options" accesskey="4">Main options</a></li>
  129. </ul>
  130. <div class="section-level-extent" id="Stream-specifiers-1">
  131. <h3 class="section"><span>3.1 Stream specifiers<a class="copiable-link" href="#Stream-specifiers-1"> &para;</a></span></h3>
  132. <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  133. are used to precisely specify which stream(s) a given option belongs to.
  134. </p>
  135. <p>A stream specifier is a string generally appended to the option name and
  136. separated from it by a colon. E.g. <code class="code">-codec:a:1 ac3</code> contains the
  137. <code class="code">a:1</code> stream specifier, which matches the second audio stream. Therefore, it
  138. would select the ac3 codec for the second audio stream.
  139. </p>
  140. <p>A stream specifier can match several streams, so that the option is applied to all
  141. of them. E.g. the stream specifier in <code class="code">-b:a 128k</code> matches all audio
  142. streams.
  143. </p>
  144. <p>An empty stream specifier matches all streams. For example, <code class="code">-codec copy</code>
  145. or <code class="code">-codec: copy</code> would copy all the streams without reencoding.
  146. </p>
  147. <p>Possible forms of stream specifiers are:
  148. </p><dl class="table">
  149. <dt><samp class="option"><var class="var">stream_index</var></samp></dt>
  150. <dd><p>Matches the stream with this index. E.g. <code class="code">-threads:1 4</code> would set the
  151. thread count for the second stream to 4. If <var class="var">stream_index</var> is used as an
  152. additional stream specifier (see below), then it selects stream number
  153. <var class="var">stream_index</var> from the matching streams. Stream numbering is based on the
  154. order of the streams as detected by libavformat except when a stream group
  155. specifier or program ID is also specified. In this case it is based on the
  156. ordering of the streams in the group or program.
  157. </p></dd>
  158. <dt><samp class="option"><var class="var">stream_type</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  159. <dd><p><var class="var">stream_type</var> is one of following: &rsquo;v&rsquo; or &rsquo;V&rsquo; for video, &rsquo;a&rsquo; for audio, &rsquo;s&rsquo;
  160. for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. &rsquo;v&rsquo; matches all video
  161. streams, &rsquo;V&rsquo; only matches video streams which are not attached pictures, video
  162. thumbnails or cover arts. If <var class="var">additional_stream_specifier</var> is used, then
  163. it matches streams which both have this type and match the
  164. <var class="var">additional_stream_specifier</var>. Otherwise, it matches all streams of the
  165. specified type.
  166. </p></dd>
  167. <dt><samp class="option">g:<var class="var">group_specifier</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  168. <dd><p>Matches streams which are in the group with the specifier <var class="var">group_specifier</var>.
  169. if <var class="var">additional_stream_specifier</var> is used, then it matches streams which both
  170. are part of the group and match the <var class="var">additional_stream_specifier</var>.
  171. <var class="var">group_specifier</var> may be one of the following:
  172. </p><dl class="table">
  173. <dt><samp class="option"><var class="var">group_index</var></samp></dt>
  174. <dd><p>Match the stream with this group index.
  175. </p></dd>
  176. <dt><samp class="option">#<var class="var">group_id</var> or i:<var class="var">group_id</var></samp></dt>
  177. <dd><p>Match the stream with this group id.
  178. </p></dd>
  179. </dl>
  180. </dd>
  181. <dt><samp class="option">p:<var class="var">program_id</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  182. <dd><p>Matches streams which are in the program with the id <var class="var">program_id</var>. If
  183. <var class="var">additional_stream_specifier</var> is used, then it matches streams which both
  184. are part of the program and match the <var class="var">additional_stream_specifier</var>.
  185. </p>
  186. </dd>
  187. <dt><samp class="option">#<var class="var">stream_id</var> or i:<var class="var">stream_id</var></samp></dt>
  188. <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container).
  189. </p></dd>
  190. <dt><samp class="option">m:<var class="var">key</var>[:<var class="var">value</var>]</samp></dt>
  191. <dd><p>Matches streams with the metadata tag <var class="var">key</var> having the specified value. If
  192. <var class="var">value</var> is not given, matches streams that contain the given tag with any
  193. value.
  194. </p></dd>
  195. <dt><samp class="option">u</samp></dt>
  196. <dd><p>Matches streams with usable configuration, the codec must be defined and the
  197. essential information such as video dimension or audio sample rate must be present.
  198. </p>
  199. <p>Note that in <code class="command">ffmpeg</code>, matching by metadata will only work properly for
  200. input files.
  201. </p></dd>
  202. </dl>
  203. </div>
  204. <div class="section-level-extent" id="Generic-options">
  205. <h3 class="section"><span>3.2 Generic options<a class="copiable-link" href="#Generic-options"> &para;</a></span></h3>
  206. <p>These options are shared amongst the ff* tools.
  207. </p>
  208. <dl class="table">
  209. <dt><samp class="option">-L</samp></dt>
  210. <dd><p>Show license.
  211. </p>
  212. </dd>
  213. <dt><samp class="option">-h, -?, -help, --help [<var class="var">arg</var>]</samp></dt>
  214. <dd><p>Show help. An optional parameter may be specified to print help about a specific
  215. item. If no argument is specified, only basic (non advanced) tool
  216. options are shown.
  217. </p>
  218. <p>Possible values of <var class="var">arg</var> are:
  219. </p><dl class="table">
  220. <dt><samp class="option">long</samp></dt>
  221. <dd><p>Print advanced tool options in addition to the basic tool options.
  222. </p>
  223. </dd>
  224. <dt><samp class="option">full</samp></dt>
  225. <dd><p>Print complete list of options, including shared and private options
  226. for encoders, decoders, demuxers, muxers, filters, etc.
  227. </p>
  228. </dd>
  229. <dt><samp class="option">decoder=<var class="var">decoder_name</var></samp></dt>
  230. <dd><p>Print detailed information about the decoder named <var class="var">decoder_name</var>. Use the
  231. <samp class="option">-decoders</samp> option to get a list of all decoders.
  232. </p>
  233. </dd>
  234. <dt><samp class="option">encoder=<var class="var">encoder_name</var></samp></dt>
  235. <dd><p>Print detailed information about the encoder named <var class="var">encoder_name</var>. Use the
  236. <samp class="option">-encoders</samp> option to get a list of all encoders.
  237. </p>
  238. </dd>
  239. <dt><samp class="option">demuxer=<var class="var">demuxer_name</var></samp></dt>
  240. <dd><p>Print detailed information about the demuxer named <var class="var">demuxer_name</var>. Use the
  241. <samp class="option">-formats</samp> option to get a list of all demuxers and muxers.
  242. </p>
  243. </dd>
  244. <dt><samp class="option">muxer=<var class="var">muxer_name</var></samp></dt>
  245. <dd><p>Print detailed information about the muxer named <var class="var">muxer_name</var>. Use the
  246. <samp class="option">-formats</samp> option to get a list of all muxers and demuxers.
  247. </p>
  248. </dd>
  249. <dt><samp class="option">filter=<var class="var">filter_name</var></samp></dt>
  250. <dd><p>Print detailed information about the filter named <var class="var">filter_name</var>. Use the
  251. <samp class="option">-filters</samp> option to get a list of all filters.
  252. </p>
  253. </dd>
  254. <dt><samp class="option">bsf=<var class="var">bitstream_filter_name</var></samp></dt>
  255. <dd><p>Print detailed information about the bitstream filter named <var class="var">bitstream_filter_name</var>.
  256. Use the <samp class="option">-bsfs</samp> option to get a list of all bitstream filters.
  257. </p>
  258. </dd>
  259. <dt><samp class="option">protocol=<var class="var">protocol_name</var></samp></dt>
  260. <dd><p>Print detailed information about the protocol named <var class="var">protocol_name</var>.
  261. Use the <samp class="option">-protocols</samp> option to get a list of all protocols.
  262. </p></dd>
  263. </dl>
  264. </dd>
  265. <dt><samp class="option">-version</samp></dt>
  266. <dd><p>Show version.
  267. </p>
  268. </dd>
  269. <dt><samp class="option">-buildconf</samp></dt>
  270. <dd><p>Show the build configuration, one option per line.
  271. </p>
  272. </dd>
  273. <dt><samp class="option">-formats</samp></dt>
  274. <dd><p>Show available formats (including devices).
  275. </p>
  276. </dd>
  277. <dt><samp class="option">-demuxers</samp></dt>
  278. <dd><p>Show available demuxers.
  279. </p>
  280. </dd>
  281. <dt><samp class="option">-muxers</samp></dt>
  282. <dd><p>Show available muxers.
  283. </p>
  284. </dd>
  285. <dt><samp class="option">-devices</samp></dt>
  286. <dd><p>Show available devices.
  287. </p>
  288. </dd>
  289. <dt><samp class="option">-codecs</samp></dt>
  290. <dd><p>Show all codecs known to libavcodec.
  291. </p>
  292. <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut
  293. for what is more correctly called a media bitstream format.
  294. </p>
  295. </dd>
  296. <dt><samp class="option">-decoders</samp></dt>
  297. <dd><p>Show available decoders.
  298. </p>
  299. </dd>
  300. <dt><samp class="option">-encoders</samp></dt>
  301. <dd><p>Show all available encoders.
  302. </p>
  303. </dd>
  304. <dt><samp class="option">-bsfs</samp></dt>
  305. <dd><p>Show available bitstream filters.
  306. </p>
  307. </dd>
  308. <dt><samp class="option">-protocols</samp></dt>
  309. <dd><p>Show available protocols.
  310. </p>
  311. </dd>
  312. <dt><samp class="option">-filters</samp></dt>
  313. <dd><p>Show available libavfilter filters.
  314. </p>
  315. </dd>
  316. <dt><samp class="option">-pix_fmts</samp></dt>
  317. <dd><p>Show available pixel formats.
  318. </p>
  319. </dd>
  320. <dt><samp class="option">-sample_fmts</samp></dt>
  321. <dd><p>Show available sample formats.
  322. </p>
  323. </dd>
  324. <dt><samp class="option">-layouts</samp></dt>
  325. <dd><p>Show channel names and standard channel layouts.
  326. </p>
  327. </dd>
  328. <dt><samp class="option">-dispositions</samp></dt>
  329. <dd><p>Show stream dispositions.
  330. </p>
  331. </dd>
  332. <dt><samp class="option">-colors</samp></dt>
  333. <dd><p>Show recognized color names.
  334. </p>
  335. </dd>
  336. <dt><samp class="option">-sources <var class="var">device</var>[,<var class="var">opt1</var>=<var class="var">val1</var>[,<var class="var">opt2</var>=<var class="var">val2</var>]...]</samp></dt>
  337. <dd><p>Show autodetected sources of the input device.
  338. Some devices may provide system-dependent source names that cannot be autodetected.
  339. The returned list cannot be assumed to be always complete.
  340. </p><div class="example">
  341. <pre class="example-preformatted">ffmpeg -sources pulse,server=192.168.0.4
  342. </pre></div>
  343. </dd>
  344. <dt><samp class="option">-sinks <var class="var">device</var>[,<var class="var">opt1</var>=<var class="var">val1</var>[,<var class="var">opt2</var>=<var class="var">val2</var>]...]</samp></dt>
  345. <dd><p>Show autodetected sinks of the output device.
  346. Some devices may provide system-dependent sink names that cannot be autodetected.
  347. The returned list cannot be assumed to be always complete.
  348. </p><div class="example">
  349. <pre class="example-preformatted">ffmpeg -sinks pulse,server=192.168.0.4
  350. </pre></div>
  351. </dd>
  352. <dt><samp class="option">-loglevel [<var class="var">flags</var>+]<var class="var">loglevel</var> | -v [<var class="var">flags</var>+]<var class="var">loglevel</var></samp></dt>
  353. <dd><p>Set logging level and flags used by the library.
  354. </p>
  355. <p>The optional <var class="var">flags</var> prefix can consist of the following values:
  356. </p><dl class="table">
  357. <dt>&lsquo;<samp class="samp">repeat</samp>&rsquo;</dt>
  358. <dd><p>Indicates that repeated log output should not be compressed to the first line
  359. and the &quot;Last message repeated n times&quot; line will be omitted.
  360. </p></dd>
  361. <dt>&lsquo;<samp class="samp">level</samp>&rsquo;</dt>
  362. <dd><p>Indicates that log output should add a <code class="code">[level]</code> prefix to each message
  363. line. This can be used as an alternative to log coloring, e.g. when dumping the
  364. log to file.
  365. </p></dd>
  366. </dl>
  367. <p>Flags can also be used alone by adding a &rsquo;+&rsquo;/&rsquo;-&rsquo; prefix to set/reset a single
  368. flag without affecting other <var class="var">flags</var> or changing <var class="var">loglevel</var>. When
  369. setting both <var class="var">flags</var> and <var class="var">loglevel</var>, a &rsquo;+&rsquo; separator is expected
  370. between the last <var class="var">flags</var> value and before <var class="var">loglevel</var>.
  371. </p>
  372. <p><var class="var">loglevel</var> is a string or a number containing one of the following values:
  373. </p><dl class="table">
  374. <dt>&lsquo;<samp class="samp">quiet, -8</samp>&rsquo;</dt>
  375. <dd><p>Show nothing at all; be silent.
  376. </p></dd>
  377. <dt>&lsquo;<samp class="samp">panic, 0</samp>&rsquo;</dt>
  378. <dd><p>Only show fatal errors which could lead the process to crash, such as
  379. an assertion failure. This is not currently used for anything.
  380. </p></dd>
  381. <dt>&lsquo;<samp class="samp">fatal, 8</samp>&rsquo;</dt>
  382. <dd><p>Only show fatal errors. These are errors after which the process absolutely
  383. cannot continue.
  384. </p></dd>
  385. <dt>&lsquo;<samp class="samp">error, 16</samp>&rsquo;</dt>
  386. <dd><p>Show all errors, including ones which can be recovered from.
  387. </p></dd>
  388. <dt>&lsquo;<samp class="samp">warning, 24</samp>&rsquo;</dt>
  389. <dd><p>Show all warnings and errors. Any message related to possibly
  390. incorrect or unexpected events will be shown.
  391. </p></dd>
  392. <dt>&lsquo;<samp class="samp">info, 32</samp>&rsquo;</dt>
  393. <dd><p>Show informative messages during processing. This is in addition to
  394. warnings and errors. This is the default value.
  395. </p></dd>
  396. <dt>&lsquo;<samp class="samp">verbose, 40</samp>&rsquo;</dt>
  397. <dd><p>Same as <code class="code">info</code>, except more verbose.
  398. </p></dd>
  399. <dt>&lsquo;<samp class="samp">debug, 48</samp>&rsquo;</dt>
  400. <dd><p>Show everything, including debugging information.
  401. </p></dd>
  402. <dt>&lsquo;<samp class="samp">trace, 56</samp>&rsquo;</dt>
  403. </dl>
  404. <p>For example to enable repeated log output, add the <code class="code">level</code> prefix, and set
  405. <var class="var">loglevel</var> to <code class="code">verbose</code>:
  406. </p><div class="example">
  407. <pre class="example-preformatted">ffmpeg -loglevel repeat+level+verbose -i input output
  408. </pre></div>
  409. <p>Another example that enables repeated log output without affecting current
  410. state of <code class="code">level</code> prefix flag or <var class="var">loglevel</var>:
  411. </p><div class="example">
  412. <pre class="example-preformatted">ffmpeg [...] -loglevel +repeat
  413. </pre></div>
  414. <p>By default the program logs to stderr. If coloring is supported by the
  415. terminal, colors are used to mark errors and warnings. Log coloring
  416. can be disabled setting the environment variable
  417. <code class="env">AV_LOG_FORCE_NOCOLOR</code>, or can be forced setting
  418. the environment variable <code class="env">AV_LOG_FORCE_COLOR</code>.
  419. </p>
  420. </dd>
  421. <dt><samp class="option">-report</samp></dt>
  422. <dd><p>Dump full command line and log output to a file named
  423. <code class="code"><var class="var">program</var>-<var class="var">YYYYMMDD</var>-<var class="var">HHMMSS</var>.log</code> in the current
  424. directory.
  425. This file can be useful for bug reports.
  426. It also implies <code class="code">-loglevel debug</code>.
  427. </p>
  428. <p>Setting the environment variable <code class="env">FFREPORT</code> to any value has the
  429. same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these
  430. options will affect the report; option values must be escaped if they
  431. contain special characters or the options delimiter &rsquo;:&rsquo; (see the
  432. &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual).
  433. </p>
  434. <p>The following options are recognized:
  435. </p><dl class="table">
  436. <dt><samp class="option">file</samp></dt>
  437. <dd><p>set the file name to use for the report; <code class="code">%p</code> is expanded to the name
  438. of the program, <code class="code">%t</code> is expanded to a timestamp, <code class="code">%%</code> is expanded
  439. to a plain <code class="code">%</code>
  440. </p></dd>
  441. <dt><samp class="option">level</samp></dt>
  442. <dd><p>set the log verbosity level using a numerical value (see <code class="code">-loglevel</code>).
  443. </p></dd>
  444. </dl>
  445. <p>For example, to output a report to a file named <samp class="file">ffreport.log</samp>
  446. using a log level of <code class="code">32</code> (alias for log level <code class="code">info</code>):
  447. </p>
  448. <div class="example">
  449. <pre class="example-preformatted">FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
  450. </pre></div>
  451. <p>Errors in parsing the environment variable are not fatal, and will not
  452. appear in the report.
  453. </p>
  454. </dd>
  455. <dt><samp class="option">-hide_banner</samp></dt>
  456. <dd><p>Suppress printing banner.
  457. </p>
  458. <p>All FFmpeg tools will normally show a copyright notice, build options
  459. and library versions. This option can be used to suppress printing
  460. this information.
  461. </p>
  462. </dd>
  463. <dt><samp class="option">-cpuflags flags (<em class="emph">global</em>)</samp></dt>
  464. <dd><p>Allows setting and clearing cpu flags. This option is intended
  465. for testing. Do not use it unless you know what you&rsquo;re doing.
  466. </p><div class="example">
  467. <pre class="example-preformatted">ffmpeg -cpuflags -sse+mmx ...
  468. ffmpeg -cpuflags mmx ...
  469. ffmpeg -cpuflags 0 ...
  470. </pre></div>
  471. <p>Possible flags for this option are:
  472. </p><dl class="table">
  473. <dt>&lsquo;<samp class="samp">x86</samp>&rsquo;</dt>
  474. <dd><dl class="table">
  475. <dt>&lsquo;<samp class="samp">mmx</samp>&rsquo;</dt>
  476. <dt>&lsquo;<samp class="samp">mmxext</samp>&rsquo;</dt>
  477. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  478. <dt>&lsquo;<samp class="samp">sse2</samp>&rsquo;</dt>
  479. <dt>&lsquo;<samp class="samp">sse2slow</samp>&rsquo;</dt>
  480. <dt>&lsquo;<samp class="samp">sse3</samp>&rsquo;</dt>
  481. <dt>&lsquo;<samp class="samp">sse3slow</samp>&rsquo;</dt>
  482. <dt>&lsquo;<samp class="samp">ssse3</samp>&rsquo;</dt>
  483. <dt>&lsquo;<samp class="samp">atom</samp>&rsquo;</dt>
  484. <dt>&lsquo;<samp class="samp">sse4.1</samp>&rsquo;</dt>
  485. <dt>&lsquo;<samp class="samp">sse4.2</samp>&rsquo;</dt>
  486. <dt>&lsquo;<samp class="samp">avx</samp>&rsquo;</dt>
  487. <dt>&lsquo;<samp class="samp">avx2</samp>&rsquo;</dt>
  488. <dt>&lsquo;<samp class="samp">xop</samp>&rsquo;</dt>
  489. <dt>&lsquo;<samp class="samp">fma3</samp>&rsquo;</dt>
  490. <dt>&lsquo;<samp class="samp">fma4</samp>&rsquo;</dt>
  491. <dt>&lsquo;<samp class="samp">3dnow</samp>&rsquo;</dt>
  492. <dt>&lsquo;<samp class="samp">3dnowext</samp>&rsquo;</dt>
  493. <dt>&lsquo;<samp class="samp">bmi1</samp>&rsquo;</dt>
  494. <dt>&lsquo;<samp class="samp">bmi2</samp>&rsquo;</dt>
  495. <dt>&lsquo;<samp class="samp">cmov</samp>&rsquo;</dt>
  496. </dl>
  497. </dd>
  498. <dt>&lsquo;<samp class="samp">ARM</samp>&rsquo;</dt>
  499. <dd><dl class="table">
  500. <dt>&lsquo;<samp class="samp">armv5te</samp>&rsquo;</dt>
  501. <dt>&lsquo;<samp class="samp">armv6</samp>&rsquo;</dt>
  502. <dt>&lsquo;<samp class="samp">armv6t2</samp>&rsquo;</dt>
  503. <dt>&lsquo;<samp class="samp">vfp</samp>&rsquo;</dt>
  504. <dt>&lsquo;<samp class="samp">vfpv3</samp>&rsquo;</dt>
  505. <dt>&lsquo;<samp class="samp">neon</samp>&rsquo;</dt>
  506. <dt>&lsquo;<samp class="samp">setend</samp>&rsquo;</dt>
  507. </dl>
  508. </dd>
  509. <dt>&lsquo;<samp class="samp">AArch64</samp>&rsquo;</dt>
  510. <dd><dl class="table">
  511. <dt>&lsquo;<samp class="samp">armv8</samp>&rsquo;</dt>
  512. <dt>&lsquo;<samp class="samp">vfp</samp>&rsquo;</dt>
  513. <dt>&lsquo;<samp class="samp">neon</samp>&rsquo;</dt>
  514. </dl>
  515. </dd>
  516. <dt>&lsquo;<samp class="samp">PowerPC</samp>&rsquo;</dt>
  517. <dd><dl class="table">
  518. <dt>&lsquo;<samp class="samp">altivec</samp>&rsquo;</dt>
  519. </dl>
  520. </dd>
  521. <dt>&lsquo;<samp class="samp">Specific Processors</samp>&rsquo;</dt>
  522. <dd><dl class="table">
  523. <dt>&lsquo;<samp class="samp">pentium2</samp>&rsquo;</dt>
  524. <dt>&lsquo;<samp class="samp">pentium3</samp>&rsquo;</dt>
  525. <dt>&lsquo;<samp class="samp">pentium4</samp>&rsquo;</dt>
  526. <dt>&lsquo;<samp class="samp">k6</samp>&rsquo;</dt>
  527. <dt>&lsquo;<samp class="samp">k62</samp>&rsquo;</dt>
  528. <dt>&lsquo;<samp class="samp">athlon</samp>&rsquo;</dt>
  529. <dt>&lsquo;<samp class="samp">athlonxp</samp>&rsquo;</dt>
  530. <dt>&lsquo;<samp class="samp">k8</samp>&rsquo;</dt>
  531. </dl>
  532. </dd>
  533. </dl>
  534. </dd>
  535. <dt><samp class="option">-cpucount <var class="var">count</var> (<em class="emph">global</em>)</samp></dt>
  536. <dd><p>Override detection of CPU count. This option is intended
  537. for testing. Do not use it unless you know what you&rsquo;re doing.
  538. </p><div class="example">
  539. <pre class="example-preformatted">ffmpeg -cpucount 2
  540. </pre></div>
  541. </dd>
  542. <dt><samp class="option">-max_alloc <var class="var">bytes</var></samp></dt>
  543. <dd><p>Set the maximum size limit for allocating a block on the heap by ffmpeg&rsquo;s
  544. family of malloc functions. Exercise <strong class="strong">extreme caution</strong> when using
  545. this option. Don&rsquo;t use if you do not understand the full consequence of doing so.
  546. Default is INT_MAX.
  547. </p></dd>
  548. </dl>
  549. </div>
  550. <div class="section-level-extent" id="AVOptions">
  551. <h3 class="section"><span>3.3 AVOptions<a class="copiable-link" href="#AVOptions"> &para;</a></span></h3>
  552. <p>These options are provided directly by the libavformat, libavdevice and
  553. libavcodec libraries. To see the list of available AVOptions, use the
  554. <samp class="option">-help</samp> option. They are separated into two categories:
  555. </p><dl class="table">
  556. <dt><samp class="option">generic</samp></dt>
  557. <dd><p>These options can be set for any container, codec or device. Generic options
  558. are listed under AVFormatContext options for containers/devices and under
  559. AVCodecContext options for codecs.
  560. </p></dd>
  561. <dt><samp class="option">private</samp></dt>
  562. <dd><p>These options are specific to the given container, device or codec. Private
  563. options are listed under their corresponding containers/devices/codecs.
  564. </p></dd>
  565. </dl>
  566. <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  567. an MP3 file, use the <samp class="option">id3v2_version</samp> private option of the MP3
  568. muxer:
  569. </p><div class="example">
  570. <pre class="example-preformatted">ffmpeg -i input.flac -id3v2_version 3 out.mp3
  571. </pre></div>
  572. <p>All codec AVOptions are per-stream, and thus a stream specifier
  573. should be attached to them:
  574. </p><div class="example">
  575. <pre class="example-preformatted">ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4
  576. </pre></div>
  577. <p>In the above example, a multichannel audio stream is mapped twice for output.
  578. The first instance is encoded with codec ac3 and bitrate 640k.
  579. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using
  580. absolute index of the output stream.
  581. </p>
  582. <p>Note: the <samp class="option">-nooption</samp> syntax cannot be used for boolean
  583. AVOptions, use <samp class="option">-option 0</samp>/<samp class="option">-option 1</samp>.
  584. </p>
  585. <p>Note: the old undocumented way of specifying per-stream AVOptions by
  586. prepending v/a/s to the options name is now obsolete and will be
  587. removed soon.
  588. </p>
  589. </div>
  590. <div class="section-level-extent" id="Main-options">
  591. <h3 class="section"><span>3.4 Main options<a class="copiable-link" href="#Main-options"> &para;</a></span></h3>
  592. <dl class="table">
  593. <dt><samp class="option">-f <var class="var">format</var></samp></dt>
  594. <dd><p>Force format to use.
  595. </p>
  596. </dd>
  597. <dt><samp class="option">-unit</samp></dt>
  598. <dd><p>Show the unit of the displayed values.
  599. </p>
  600. </dd>
  601. <dt><samp class="option">-prefix</samp></dt>
  602. <dd><p>Use SI prefixes for the displayed values.
  603. Unless the &quot;-byte_binary_prefix&quot; option is used all the prefixes
  604. are decimal.
  605. </p>
  606. </dd>
  607. <dt><samp class="option">-byte_binary_prefix</samp></dt>
  608. <dd><p>Force the use of binary prefixes for byte values.
  609. </p>
  610. </dd>
  611. <dt><samp class="option">-sexagesimal</samp></dt>
  612. <dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
  613. </p>
  614. </dd>
  615. <dt><samp class="option">-pretty</samp></dt>
  616. <dd><p>Prettify the format of the displayed values, it corresponds to the
  617. options &quot;-unit -prefix -byte_binary_prefix -sexagesimal&quot;.
  618. </p>
  619. </dd>
  620. <dt><samp class="option">-output_format, -of, -print_format <var class="var">writer_name</var>[=<var class="var">writer_options</var>]</samp></dt>
  621. <dd><p>Set the output printing format.
  622. </p>
  623. <p><var class="var">writer_name</var> specifies the name of the writer, and
  624. <var class="var">writer_options</var> specifies the options to be passed to the writer.
  625. </p>
  626. <p>For example for printing the output in JSON format, specify:
  627. </p><div class="example">
  628. <pre class="example-preformatted">-output_format json
  629. </pre></div>
  630. <p>For more details on the available output printing formats, see the
  631. Writers section below.
  632. </p>
  633. </dd>
  634. <dt><samp class="option">-sections</samp></dt>
  635. <dd><p>Print sections structure and section information, and exit. The output
  636. is not meant to be parsed by a machine.
  637. </p>
  638. </dd>
  639. <dt><samp class="option">-select_streams <var class="var">stream_specifier</var></samp></dt>
  640. <dd><p>Select only the streams specified by <var class="var">stream_specifier</var>. This
  641. option affects only the options related to streams
  642. (e.g. <code class="code">show_streams</code>, <code class="code">show_packets</code>, etc.).
  643. </p>
  644. <p>For example to show only audio streams, you can use the command:
  645. </p><div class="example">
  646. <pre class="example-preformatted">ffprobe -show_streams -select_streams a INPUT
  647. </pre></div>
  648. <p>To show only video packets belonging to the video stream with index 1:
  649. </p><div class="example">
  650. <pre class="example-preformatted">ffprobe -show_packets -select_streams v:1 INPUT
  651. </pre></div>
  652. </dd>
  653. <dt><samp class="option">-show_data</samp></dt>
  654. <dd><p>Show payload data, as a hexadecimal and ASCII dump. Coupled with
  655. <samp class="option">-show_packets</samp>, it will dump the packets&rsquo; data. Coupled with
  656. <samp class="option">-show_streams</samp>, it will dump the codec extradata.
  657. </p>
  658. <p>The dump is printed as the &quot;data&quot; field. It may contain newlines.
  659. </p>
  660. </dd>
  661. <dt><samp class="option">-show_data_hash <var class="var">algorithm</var></samp></dt>
  662. <dd><p>Show a hash of payload data, for packets with <samp class="option">-show_packets</samp> and for
  663. codec extradata with <samp class="option">-show_streams</samp>.
  664. </p>
  665. </dd>
  666. <dt><samp class="option">-show_error</samp></dt>
  667. <dd><p>Show information about the error found when trying to probe the input.
  668. </p>
  669. <p>The error information is printed within a section with name &quot;ERROR&quot;.
  670. </p>
  671. </dd>
  672. <dt><samp class="option">-show_format</samp></dt>
  673. <dd><p>Show information about the container format of the input multimedia
  674. stream.
  675. </p>
  676. <p>All the container format information is printed within a section with
  677. name &quot;FORMAT&quot;.
  678. </p>
  679. </dd>
  680. <dt><samp class="option">-show_format_entry <var class="var">name</var></samp></dt>
  681. <dd><p>Like <samp class="option">-show_format</samp>, but only prints the specified entry of the
  682. container format information, rather than all. This option may be given more
  683. than once, then all specified entries will be shown.
  684. </p>
  685. <p>This option is deprecated, use <code class="code">show_entries</code> instead.
  686. </p>
  687. </dd>
  688. <dt><samp class="option">-show_entries <var class="var">section_entries</var></samp></dt>
  689. <dd><p>Set list of entries to show.
  690. </p>
  691. <p>Entries are specified according to the following
  692. syntax. <var class="var">section_entries</var> contains a list of section entries
  693. separated by <code class="code">:</code>. Each section entry is composed by a section
  694. name (or unique name), optionally followed by a list of entries local
  695. to that section, separated by <code class="code">,</code>.
  696. </p>
  697. <p>If section name is specified but is followed by no <code class="code">=</code>, all
  698. entries are printed to output, together with all the contained
  699. sections. Otherwise only the entries specified in the local section
  700. entries list are printed. In particular, if <code class="code">=</code> is specified but
  701. the list of local entries is empty, then no entries will be shown for
  702. that section.
  703. </p>
  704. <p>Note that the order of specification of the local section entries is
  705. not honored in the output, and the usual display order will be
  706. retained.
  707. </p>
  708. <p>The formal syntax is given by:
  709. </p><div class="example">
  710. <pre class="example-preformatted"><var class="var">LOCAL_SECTION_ENTRIES</var> ::= <var class="var">SECTION_ENTRY_NAME</var>[,<var class="var">LOCAL_SECTION_ENTRIES</var>]
  711. <var class="var">SECTION_ENTRY</var> ::= <var class="var">SECTION_NAME</var>[=[<var class="var">LOCAL_SECTION_ENTRIES</var>]]
  712. <var class="var">SECTION_ENTRIES</var> ::= <var class="var">SECTION_ENTRY</var>[:<var class="var">SECTION_ENTRIES</var>]
  713. </pre></div>
  714. <p>For example, to show only the index and type of each stream, and the PTS
  715. time, duration time, and stream index of the packets, you can specify
  716. the argument:
  717. </p><div class="example">
  718. <pre class="example-preformatted">packet=pts_time,duration_time,stream_index : stream=index,codec_type
  719. </pre></div>
  720. <p>To show all the entries in the section &quot;format&quot;, but only the codec
  721. type in the section &quot;stream&quot;, specify the argument:
  722. </p><div class="example">
  723. <pre class="example-preformatted">format : stream=codec_type
  724. </pre></div>
  725. <p>To show all the tags in the stream and format sections:
  726. </p><div class="example">
  727. <pre class="example-preformatted">stream_tags : format_tags
  728. </pre></div>
  729. <p>To show only the <code class="code">title</code> tag (if available) in the stream
  730. sections:
  731. </p><div class="example">
  732. <pre class="example-preformatted">stream_tags=title
  733. </pre></div>
  734. </dd>
  735. <dt><samp class="option">-show_packets</samp></dt>
  736. <dd><p>Show information about each packet contained in the input multimedia
  737. stream.
  738. </p>
  739. <p>The information for each single packet is printed within a dedicated
  740. section with name &quot;PACKET&quot;.
  741. </p>
  742. </dd>
  743. <dt><samp class="option">-show_frames</samp></dt>
  744. <dd><p>Show information about each frame and subtitle contained in the input
  745. multimedia stream.
  746. </p>
  747. <p>The information for each single frame is printed within a dedicated
  748. section with name &quot;FRAME&quot; or &quot;SUBTITLE&quot;.
  749. </p>
  750. </dd>
  751. <dt><samp class="option">-show_log <var class="var">loglevel</var></samp></dt>
  752. <dd><p>Show logging information from the decoder about each frame according to
  753. the value set in <var class="var">loglevel</var>, (see <code class="code">-loglevel</code>). This option requires <code class="code">-show_frames</code>.
  754. </p>
  755. <p>The information for each log message is printed within a dedicated
  756. section with name &quot;LOG&quot;.
  757. </p>
  758. </dd>
  759. <dt><samp class="option">-show_streams</samp></dt>
  760. <dd><p>Show information about each media stream contained in the input
  761. multimedia stream.
  762. </p>
  763. <p>Each media stream information is printed within a dedicated section
  764. with name &quot;STREAM&quot;.
  765. </p>
  766. </dd>
  767. <dt><samp class="option">-show_programs</samp></dt>
  768. <dd><p>Show information about programs and their streams contained in the input
  769. multimedia stream.
  770. </p>
  771. <p>Each media stream information is printed within a dedicated section
  772. with name &quot;PROGRAM_STREAM&quot;.
  773. </p>
  774. </dd>
  775. <dt><samp class="option">-show_stream_groups</samp></dt>
  776. <dd><p>Show information about stream groups and their streams contained in the
  777. input multimedia stream.
  778. </p>
  779. <p>Each media stream information is printed within a dedicated section
  780. with name &quot;STREAM_GROUP_STREAM&quot;.
  781. </p>
  782. </dd>
  783. <dt><samp class="option">-show_chapters</samp></dt>
  784. <dd><p>Show information about chapters stored in the format.
  785. </p>
  786. <p>Each chapter is printed within a dedicated section with name &quot;CHAPTER&quot;.
  787. </p>
  788. </dd>
  789. <dt><samp class="option">-count_frames</samp></dt>
  790. <dd><p>Count the number of frames per stream and report it in the
  791. corresponding stream section.
  792. </p>
  793. </dd>
  794. <dt><samp class="option">-count_packets</samp></dt>
  795. <dd><p>Count the number of packets per stream and report it in the
  796. corresponding stream section.
  797. </p>
  798. </dd>
  799. <dt><samp class="option">-read_intervals <var class="var">read_intervals</var></samp></dt>
  800. <dd>
  801. <p>Read only the specified intervals. <var class="var">read_intervals</var> must be a
  802. sequence of interval specifications separated by &quot;,&quot;.
  803. <code class="command">ffprobe</code> will seek to the interval starting point, and will
  804. continue reading from that.
  805. </p>
  806. <p>Each interval is specified by two optional parts, separated by &quot;%&quot;.
  807. </p>
  808. <p>The first part specifies the interval start position. It is
  809. interpreted as an absolute position, or as a relative offset from the
  810. current position if it is preceded by the &quot;+&quot; character. If this first
  811. part is not specified, no seeking will be performed when reading this
  812. interval.
  813. </p>
  814. <p>The second part specifies the interval end position. It is interpreted
  815. as an absolute position, or as a relative offset from the current
  816. position if it is preceded by the &quot;+&quot; character. If the offset
  817. specification starts with &quot;#&quot;, it is interpreted as the number of
  818. packets to read (not including the flushing packets) from the interval
  819. start. If no second part is specified, the program will read until the
  820. end of the input.
  821. </p>
  822. <p>Note that seeking is not accurate, thus the actual interval start
  823. point may be different from the specified position. Also, when an
  824. interval duration is specified, the absolute end time will be computed
  825. by adding the duration to the interval start point found by seeking
  826. the file, rather than to the specified start value.
  827. </p>
  828. <p>The formal syntax is given by:
  829. </p><div class="example">
  830. <pre class="example-preformatted"><var class="var">INTERVAL</var> ::= [<var class="var">START</var>|+<var class="var">START_OFFSET</var>][%[<var class="var">END</var>|+<var class="var">END_OFFSET</var>]]
  831. <var class="var">INTERVALS</var> ::= <var class="var">INTERVAL</var>[,<var class="var">INTERVALS</var>]
  832. </pre></div>
  833. <p>A few examples follow.
  834. </p><ul class="itemize mark-bullet">
  835. <li>Seek to time 10, read packets until 20 seconds after the found seek
  836. point, then seek to position <code class="code">01:30</code> (1 minute and thirty
  837. seconds) and read packets until position <code class="code">01:45</code>.
  838. <div class="example">
  839. <pre class="example-preformatted">10%+20,01:30%01:45
  840. </pre></div>
  841. </li><li>Read only 42 packets after seeking to position <code class="code">01:23</code>:
  842. <div class="example">
  843. <pre class="example-preformatted">01:23%+#42
  844. </pre></div>
  845. </li><li>Read only the first 20 seconds from the start:
  846. <div class="example">
  847. <pre class="example-preformatted">%+20
  848. </pre></div>
  849. </li><li>Read from the start until position <code class="code">02:30</code>:
  850. <div class="example">
  851. <pre class="example-preformatted">%02:30
  852. </pre></div>
  853. </li></ul>
  854. </dd>
  855. <dt><samp class="option">-show_private_data, -private</samp></dt>
  856. <dd><p>Show private data, that is data depending on the format of the
  857. particular shown element.
  858. This option is enabled by default, but you may need to disable it
  859. for specific uses, for example when creating XSD-compliant XML output.
  860. </p>
  861. </dd>
  862. <dt><samp class="option">-show_program_version</samp></dt>
  863. <dd><p>Show information related to program version.
  864. </p>
  865. <p>Version information is printed within a section with name
  866. &quot;PROGRAM_VERSION&quot;.
  867. </p>
  868. </dd>
  869. <dt><samp class="option">-show_library_versions</samp></dt>
  870. <dd><p>Show information related to library versions.
  871. </p>
  872. <p>Version information for each library is printed within a section with
  873. name &quot;LIBRARY_VERSION&quot;.
  874. </p>
  875. </dd>
  876. <dt><samp class="option">-show_versions</samp></dt>
  877. <dd><p>Show information related to program and library versions. This is the
  878. equivalent of setting both <samp class="option">-show_program_version</samp> and
  879. <samp class="option">-show_library_versions</samp> options.
  880. </p>
  881. </dd>
  882. <dt><samp class="option">-show_pixel_formats</samp></dt>
  883. <dd><p>Show information about all pixel formats supported by FFmpeg.
  884. </p>
  885. <p>Pixel format information for each format is printed within a section
  886. with name &quot;PIXEL_FORMAT&quot;.
  887. </p>
  888. </dd>
  889. <dt><samp class="option">-show_optional_fields <var class="var">value</var></samp></dt>
  890. <dd><p>Some writers viz. JSON and XML, omit the printing of fields with invalid or non-applicable values,
  891. while other writers always print them. This option enables one to control this behaviour.
  892. Valid values are <code class="code">always</code>/<code class="code">1</code>, <code class="code">never</code>/<code class="code">0</code> and <code class="code">auto</code>/<code class="code">-1</code>.
  893. Default is <var class="var">auto</var>.
  894. </p>
  895. </dd>
  896. <dt><samp class="option">-bitexact</samp></dt>
  897. <dd><p>Force bitexact output, useful to produce output which is not dependent
  898. on the specific build.
  899. </p>
  900. </dd>
  901. <dt><samp class="option">-i <var class="var">input_url</var></samp></dt>
  902. <dd><p>Read <var class="var">input_url</var>.
  903. </p>
  904. </dd>
  905. <dt><samp class="option">-o <var class="var">output_url</var></samp></dt>
  906. <dd><p>Write output to <var class="var">output_url</var>. If not specified, the output is sent
  907. to stdout.
  908. </p>
  909. </dd>
  910. </dl>
  911. </div>
  912. </div>
  913. <div class="chapter-level-extent" id="Writers">
  914. <h2 class="chapter"><span>4 Writers<a class="copiable-link" href="#Writers"> &para;</a></span></h2>
  915. <p>A writer defines the output format adopted by <code class="command">ffprobe</code>, and will be
  916. used for printing all the parts of the output.
  917. </p>
  918. <p>A writer may accept one or more arguments, which specify the options
  919. to adopt. The options are specified as a list of <var class="var">key</var>=<var class="var">value</var>
  920. pairs, separated by &quot;:&quot;.
  921. </p>
  922. <p>All writers support the following options:
  923. </p>
  924. <dl class="table">
  925. <dt><samp class="option">string_validation, sv</samp></dt>
  926. <dd><p>Set string validation mode.
  927. </p>
  928. <p>The following values are accepted.
  929. </p><dl class="table">
  930. <dt>&lsquo;<samp class="samp">fail</samp>&rsquo;</dt>
  931. <dd><p>The writer will fail immediately in case an invalid string (UTF-8)
  932. sequence or code point is found in the input. This is especially
  933. useful to validate input metadata.
  934. </p>
  935. </dd>
  936. <dt>&lsquo;<samp class="samp">ignore</samp>&rsquo;</dt>
  937. <dd><p>Any validation error will be ignored. This will result in possibly
  938. broken output, especially with the json or xml writer.
  939. </p>
  940. </dd>
  941. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  942. <dd><p>The writer will substitute invalid UTF-8 sequences or code points with
  943. the string specified with the <samp class="option">string_validation_replacement</samp>.
  944. </p></dd>
  945. </dl>
  946. <p>Default value is &lsquo;<samp class="samp">replace</samp>&rsquo;.
  947. </p>
  948. </dd>
  949. <dt><samp class="option">string_validation_replacement, svr</samp></dt>
  950. <dd><p>Set replacement string to use in case <samp class="option">string_validation</samp> is
  951. set to &lsquo;<samp class="samp">replace</samp>&rsquo;.
  952. </p>
  953. <p>In case the option is not specified, the writer will assume the empty
  954. string, that is it will remove the invalid sequences from the input
  955. strings.
  956. </p></dd>
  957. </dl>
  958. <p>A description of the currently available writers follows.
  959. </p>
  960. <ul class="mini-toc">
  961. <li><a href="#default" accesskey="1">default</a></li>
  962. <li><a href="#compact_002c-csv" accesskey="2">compact, csv</a></li>
  963. <li><a href="#flat" accesskey="3">flat</a></li>
  964. <li><a href="#ini" accesskey="4">ini</a></li>
  965. <li><a href="#json" accesskey="5">json</a></li>
  966. <li><a href="#xml" accesskey="6">xml</a></li>
  967. </ul>
  968. <div class="section-level-extent" id="default">
  969. <h3 class="section"><span>4.1 default<a class="copiable-link" href="#default"> &para;</a></span></h3>
  970. <p>Default format.
  971. </p>
  972. <p>Print each section in the form:
  973. </p><div class="example">
  974. <pre class="example-preformatted">[SECTION]
  975. key1=val1
  976. ...
  977. keyN=valN
  978. [/SECTION]
  979. </pre></div>
  980. <p>Metadata tags are printed as a line in the corresponding FORMAT, STREAM,
  981. STREAM_GROUP_STREAM or PROGRAM_STREAM section, and are prefixed by the
  982. string &quot;TAG:&quot;.
  983. </p>
  984. <p>A description of the accepted options follows.
  985. </p>
  986. <dl class="table">
  987. <dt><samp class="option">nokey, nk</samp></dt>
  988. <dd><p>If set to 1 specify not to print the key of each field. Default value
  989. is 0.
  990. </p>
  991. </dd>
  992. <dt><samp class="option">noprint_wrappers, nw</samp></dt>
  993. <dd><p>If set to 1 specify not to print the section header and footer.
  994. Default value is 0.
  995. </p></dd>
  996. </dl>
  997. </div>
  998. <div class="section-level-extent" id="compact_002c-csv">
  999. <h3 class="section"><span>4.2 compact, csv<a class="copiable-link" href="#compact_002c-csv"> &para;</a></span></h3>
  1000. <p>Compact and CSV format.
  1001. </p>
  1002. <p>The <code class="code">csv</code> writer is equivalent to <code class="code">compact</code>, but supports
  1003. different defaults.
  1004. </p>
  1005. <p>Each section is printed on a single line.
  1006. If no option is specified, the output has the form:
  1007. </p><div class="example">
  1008. <pre class="example-preformatted">section|key1=val1| ... |keyN=valN
  1009. </pre></div>
  1010. <p>Metadata tags are printed in the corresponding &quot;format&quot; or &quot;stream&quot;
  1011. section. A metadata tag key, if printed, is prefixed by the string
  1012. &quot;tag:&quot;.
  1013. </p>
  1014. <p>The description of the accepted options follows.
  1015. </p>
  1016. <dl class="table">
  1017. <dt><samp class="option">item_sep, s</samp></dt>
  1018. <dd><p>Specify the character to use for separating fields in the output line.
  1019. It must be a single printable character, it is &quot;|&quot; by default (&quot;,&quot; for
  1020. the <code class="code">csv</code> writer).
  1021. </p>
  1022. </dd>
  1023. <dt><samp class="option">nokey, nk</samp></dt>
  1024. <dd><p>If set to 1 specify not to print the key of each field. Its default
  1025. value is 0 (1 for the <code class="code">csv</code> writer).
  1026. </p>
  1027. </dd>
  1028. <dt><samp class="option">escape, e</samp></dt>
  1029. <dd><p>Set the escape mode to use, default to &quot;c&quot; (&quot;csv&quot; for the <code class="code">csv</code>
  1030. writer).
  1031. </p>
  1032. <p>It can assume one of the following values:
  1033. </p><dl class="table">
  1034. <dt><samp class="option">c</samp></dt>
  1035. <dd><p>Perform C-like escaping. Strings containing a newline (&lsquo;<samp class="samp">\n</samp>&rsquo;), carriage
  1036. return (&lsquo;<samp class="samp">\r</samp>&rsquo;), a tab (&lsquo;<samp class="samp">\t</samp>&rsquo;), a form feed (&lsquo;<samp class="samp">\f</samp>&rsquo;), the escaping
  1037. character (&lsquo;<samp class="samp">\</samp>&rsquo;) or the item separator character <var class="var">SEP</var> are escaped
  1038. using C-like fashioned escaping, so that a newline is converted to the
  1039. sequence &lsquo;<samp class="samp">\n</samp>&rsquo;, a carriage return to &lsquo;<samp class="samp">\r</samp>&rsquo;, &lsquo;<samp class="samp">\</samp>&rsquo; to &lsquo;<samp class="samp">\\</samp>&rsquo; and
  1040. the separator <var class="var">SEP</var> is converted to &lsquo;<samp class="samp">\<var class="var">SEP</var></samp>&rsquo;.
  1041. </p>
  1042. </dd>
  1043. <dt><samp class="option">csv</samp></dt>
  1044. <dd><p>Perform CSV-like escaping, as described in RFC4180. Strings
  1045. containing a newline (&lsquo;<samp class="samp">\n</samp>&rsquo;), a carriage return (&lsquo;<samp class="samp">\r</samp>&rsquo;), a double quote
  1046. (&lsquo;<samp class="samp">&quot;</samp>&rsquo;), or <var class="var">SEP</var> are enclosed in double-quotes.
  1047. </p>
  1048. </dd>
  1049. <dt><samp class="option">none</samp></dt>
  1050. <dd><p>Perform no escaping.
  1051. </p></dd>
  1052. </dl>
  1053. </dd>
  1054. <dt><samp class="option">print_section, p</samp></dt>
  1055. <dd><p>Print the section name at the beginning of each line if the value is
  1056. <code class="code">1</code>, disable it with value set to <code class="code">0</code>. Default value is
  1057. <code class="code">1</code>.
  1058. </p>
  1059. </dd>
  1060. </dl>
  1061. </div>
  1062. <div class="section-level-extent" id="flat">
  1063. <h3 class="section"><span>4.3 flat<a class="copiable-link" href="#flat"> &para;</a></span></h3>
  1064. <p>Flat format.
  1065. </p>
  1066. <p>A free-form output where each line contains an explicit key=value, such as
  1067. &quot;streams.stream.3.tags.foo=bar&quot;. The output is shell escaped, so it can be
  1068. directly embedded in sh scripts as long as the separator character is an
  1069. alphanumeric character or an underscore (see <var class="var">sep_char</var> option).
  1070. </p>
  1071. <p>The description of the accepted options follows.
  1072. </p>
  1073. <dl class="table">
  1074. <dt><samp class="option">sep_char, s</samp></dt>
  1075. <dd><p>Separator character used to separate the chapter, the section name, IDs and
  1076. potential tags in the printed field key.
  1077. </p>
  1078. <p>Default value is &lsquo;<samp class="samp">.</samp>&rsquo;.
  1079. </p>
  1080. </dd>
  1081. <dt><samp class="option">hierarchical, h</samp></dt>
  1082. <dd><p>Specify if the section name specification should be hierarchical. If
  1083. set to 1, and if there is more than one section in the current
  1084. chapter, the section name will be prefixed by the name of the
  1085. chapter. A value of 0 will disable this behavior.
  1086. </p>
  1087. <p>Default value is 1.
  1088. </p></dd>
  1089. </dl>
  1090. </div>
  1091. <div class="section-level-extent" id="ini">
  1092. <h3 class="section"><span>4.4 ini<a class="copiable-link" href="#ini"> &para;</a></span></h3>
  1093. <p>INI format output.
  1094. </p>
  1095. <p>Print output in an INI based format.
  1096. </p>
  1097. <p>The following conventions are adopted:
  1098. </p>
  1099. <ul class="itemize mark-bullet">
  1100. <li>all key and values are UTF-8
  1101. </li><li>&lsquo;<samp class="samp">.</samp>&rsquo; is the subgroup separator
  1102. </li><li>newline, &lsquo;<samp class="samp">\t</samp>&rsquo;, &lsquo;<samp class="samp">\f</samp>&rsquo;, &lsquo;<samp class="samp">\b</samp>&rsquo; and the following characters are
  1103. escaped
  1104. </li><li>&lsquo;<samp class="samp">\</samp>&rsquo; is the escape character
  1105. </li><li>&lsquo;<samp class="samp">#</samp>&rsquo; is the comment indicator
  1106. </li><li>&lsquo;<samp class="samp">=</samp>&rsquo; is the key/value separator
  1107. </li><li>&lsquo;<samp class="samp">:</samp>&rsquo; is not used but usually parsed as key/value separator
  1108. </li></ul>
  1109. <p>This writer accepts options as a list of <var class="var">key</var>=<var class="var">value</var> pairs,
  1110. separated by &lsquo;<samp class="samp">:</samp>&rsquo;.
  1111. </p>
  1112. <p>The description of the accepted options follows.
  1113. </p>
  1114. <dl class="table">
  1115. <dt><samp class="option">hierarchical, h</samp></dt>
  1116. <dd><p>Specify if the section name specification should be hierarchical. If
  1117. set to 1, and if there is more than one section in the current
  1118. chapter, the section name will be prefixed by the name of the
  1119. chapter. A value of 0 will disable this behavior.
  1120. </p>
  1121. <p>Default value is 1.
  1122. </p></dd>
  1123. </dl>
  1124. </div>
  1125. <div class="section-level-extent" id="json">
  1126. <h3 class="section"><span>4.5 json<a class="copiable-link" href="#json"> &para;</a></span></h3>
  1127. <p>JSON based format.
  1128. </p>
  1129. <p>Each section is printed using JSON notation.
  1130. </p>
  1131. <p>The description of the accepted options follows.
  1132. </p>
  1133. <dl class="table">
  1134. <dt><samp class="option">compact, c</samp></dt>
  1135. <dd><p>If set to 1 enable compact output, that is each section will be
  1136. printed on a single line. Default value is 0.
  1137. </p></dd>
  1138. </dl>
  1139. <p>For more information about JSON, see <a class="url" href="http://www.json.org/">http://www.json.org/</a>.
  1140. </p>
  1141. </div>
  1142. <div class="section-level-extent" id="xml">
  1143. <h3 class="section"><span>4.6 xml<a class="copiable-link" href="#xml"> &para;</a></span></h3>
  1144. <p>XML based format.
  1145. </p>
  1146. <p>The XML output is described in the XML schema description file
  1147. <samp class="file">ffprobe.xsd</samp> installed in the FFmpeg datadir.
  1148. </p>
  1149. <p>An updated version of the schema can be retrieved at the url
  1150. <a class="url" href="http://www.ffmpeg.org/schema/ffprobe.xsd">http://www.ffmpeg.org/schema/ffprobe.xsd</a>, which redirects to the
  1151. latest schema committed into the FFmpeg development source code tree.
  1152. </p>
  1153. <p>Note that the output issued will be compliant to the
  1154. <samp class="file">ffprobe.xsd</samp> schema only when no special global output options
  1155. (<samp class="option">unit</samp>, <samp class="option">prefix</samp>, <samp class="option">byte_binary_prefix</samp>,
  1156. <samp class="option">sexagesimal</samp> etc.) are specified.
  1157. </p>
  1158. <p>The description of the accepted options follows.
  1159. </p>
  1160. <dl class="table">
  1161. <dt><samp class="option">fully_qualified, q</samp></dt>
  1162. <dd><p>If set to 1 specify if the output should be fully qualified. Default
  1163. value is 0.
  1164. This is required for generating an XML file which can be validated
  1165. through an XSD file.
  1166. </p>
  1167. </dd>
  1168. <dt><samp class="option">xsd_strict, x</samp></dt>
  1169. <dd><p>If set to 1 perform more checks for ensuring that the output is XSD
  1170. compliant. Default value is 0.
  1171. This option automatically sets <samp class="option">fully_qualified</samp> to 1.
  1172. </p></dd>
  1173. </dl>
  1174. <p>For more information about the XML format, see
  1175. <a class="url" href="https://www.w3.org/XML/">https://www.w3.org/XML/</a>.
  1176. </p>
  1177. </div>
  1178. </div>
  1179. <div class="chapter-level-extent" id="Timecode">
  1180. <h2 class="chapter"><span>5 Timecode<a class="copiable-link" href="#Timecode"> &para;</a></span></h2>
  1181. <p><code class="command">ffprobe</code> supports Timecode extraction:
  1182. </p>
  1183. <ul class="itemize mark-bullet">
  1184. <li>MPEG1/2 timecode is extracted from the GOP, and is available in the video
  1185. stream details (<samp class="option">-show_streams</samp>, see <var class="var">timecode</var>).
  1186. </li><li>MOV timecode is extracted from tmcd track, so is available in the tmcd
  1187. stream metadata (<samp class="option">-show_streams</samp>, see <var class="var">TAG:timecode</var>).
  1188. </li><li>DV, GXF and AVI timecodes are available in format metadata
  1189. (<samp class="option">-show_format</samp>, see <var class="var">TAG:timecode</var>).
  1190. </li></ul>
  1191. </div>
  1192. <div class="chapter-level-extent" id="See-Also">
  1193. <h2 class="chapter"><span>6 See Also<a class="copiable-link" href="#See-Also"> &para;</a></span></h2>
  1194. <p><a class="url" href="ffprobe-all.html">ffprobe-all</a>,
  1195. <a class="url" href="ffmpeg.html">ffmpeg</a>, <a class="url" href="ffplay.html">ffplay</a>,
  1196. <a class="url" href="ffmpeg-utils.html">ffmpeg-utils</a>,
  1197. <a class="url" href="ffmpeg-scaler.html">ffmpeg-scaler</a>,
  1198. <a class="url" href="ffmpeg-resampler.html">ffmpeg-resampler</a>,
  1199. <a class="url" href="ffmpeg-codecs.html">ffmpeg-codecs</a>,
  1200. <a class="url" href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>,
  1201. <a class="url" href="ffmpeg-formats.html">ffmpeg-formats</a>,
  1202. <a class="url" href="ffmpeg-devices.html">ffmpeg-devices</a>,
  1203. <a class="url" href="ffmpeg-protocols.html">ffmpeg-protocols</a>,
  1204. <a class="url" href="ffmpeg-filters.html">ffmpeg-filters</a>
  1205. </p>
  1206. </div>
  1207. <div class="chapter-level-extent" id="Authors">
  1208. <h2 class="chapter"><span>7 Authors<a class="copiable-link" href="#Authors"> &para;</a></span></h2>
  1209. <p>The FFmpeg developers.
  1210. </p>
  1211. <p>For details about the authorship, see the Git history of the project
  1212. (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
  1213. <code class="command">git log</code> in the FFmpeg source directory, or browsing the
  1214. online repository at <a class="url" href="https://git.ffmpeg.org/ffmpeg">https://git.ffmpeg.org/ffmpeg</a>.
  1215. </p>
  1216. <p>Maintainers for the specific components are listed in the file
  1217. <samp class="file">MAINTAINERS</samp> in the source code tree.
  1218. </p>
  1219. </div>
  1220. </div>
  1221. <p style="font-size: small;">
  1222. This document was generated using <a class="uref" href="https://www.gnu.org/software/texinfo/"><em class="emph">makeinfo</em></a>.
  1223. </p>
  1224. </div>
  1225. </body>
  1226. </html>