ffprobe.html 53 KB

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