星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ffprobe.html 46KB

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