ffprobe.html 47 KB

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