ffprobe.html 57 KB

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