ffprobe.texi 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. \input texinfo @c -*- texinfo -*-
  2. @settitle ffprobe Documentation
  3. @titlepage
  4. @center @titlefont{ffprobe Documentation}
  5. @end titlepage
  6. @top
  7. @contents
  8. @chapter Synopsis
  9. ffprobe [@var{options}] [@file{input_file}]
  10. @chapter Description
  11. @c man begin DESCRIPTION
  12. ffprobe gathers information from multimedia streams and prints it in
  13. human- and machine-readable fashion.
  14. For example it can be used to check the format of the container used
  15. by a multimedia stream and the format and type of each media stream
  16. contained in it.
  17. If a filename is specified in input, ffprobe will try to open and
  18. probe the file content. If the file cannot be opened or recognized as
  19. a multimedia file, a positive exit code is returned.
  20. ffprobe may be employed both as a standalone application or in
  21. combination with a textual filter, which may perform more
  22. sophisticated processing, e.g. statistical processing or plotting.
  23. Options are used to list some of the formats supported by ffprobe or
  24. for specifying which information to display, and for setting how
  25. ffprobe will show it.
  26. ffprobe output is designed to be easily parsable by a textual filter,
  27. and consists of one or more sections of a form defined by the selected
  28. writer, which is specified by the @option{print_format} option.
  29. Sections may contain other nested sections, and are identified by a
  30. name (which may be shared by other sections), and an unique
  31. name. See the output of @option{sections}.
  32. Metadata tags stored in the container or in the streams are recognized
  33. and printed in the corresponding "FORMAT" or "STREAM" section.
  34. @c man end
  35. @chapter Options
  36. @c man begin OPTIONS
  37. @include avtools-common-opts.texi
  38. @section Main options
  39. @table @option
  40. @item -f @var{format}
  41. Force format to use.
  42. @item -unit
  43. Show the unit of the displayed values.
  44. @item -prefix
  45. Use SI prefixes for the displayed values.
  46. Unless the "-byte_binary_prefix" option is used all the prefixes
  47. are decimal.
  48. @item -byte_binary_prefix
  49. Force the use of binary prefixes for byte values.
  50. @item -sexagesimal
  51. Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
  52. @item -pretty
  53. Prettify the format of the displayed values, it corresponds to the
  54. options "-unit -prefix -byte_binary_prefix -sexagesimal".
  55. @item -of, -print_format @var{writer_name}[=@var{writer_options}]
  56. Set the output printing format.
  57. @var{writer_name} specifies the name of the writer, and
  58. @var{writer_options} specifies the options to be passed to the writer.
  59. For example for printing the output in JSON format, specify:
  60. @example
  61. -print_format json
  62. @end example
  63. For more details on the available output printing formats, see the
  64. Writers section below.
  65. @item -sections
  66. Print sections structure and section information, and exit. The output
  67. is not meant to be parsed by a machine.
  68. @item -select_streams @var{stream_specifier}
  69. Select only the streams specified by @var{stream_specifier}. This
  70. option affects only the options related to streams
  71. (e.g. @code{show_streams}, @code{show_packets}, etc.).
  72. For example to show only audio streams, you can use the command:
  73. @example
  74. ffprobe -show_streams -select_streams a INPUT
  75. @end example
  76. To show only video packets belonging to the video stream with index 1:
  77. @example
  78. ffprobe -show_packets -select_streams v:1 INPUT
  79. @end example
  80. @item -show_data
  81. Show payload data, as an hexadecimal and ASCII dump. Coupled with
  82. @option{-show_packets}, it will dump the packets' data. Coupled with
  83. @option{-show_streams}, it will dump the codec extradata.
  84. The dump is printed as the "data" field. It may contain newlines.
  85. @item -show_error
  86. Show information about the error found when trying to probe the input.
  87. The error information is printed within a section with name "ERROR".
  88. @item -show_format
  89. Show information about the container format of the input multimedia
  90. stream.
  91. All the container format information is printed within a section with
  92. name "FORMAT".
  93. @item -show_format_entry @var{name}
  94. Like @option{-show_format}, but only prints the specified entry of the
  95. container format information, rather than all. This option may be given more
  96. than once, then all specified entries will be shown.
  97. This option is deprecated, use @code{show_entries} instead.
  98. @item -show_entries @var{section_entries}
  99. Set list of entries to show.
  100. Entries are specified according to the following
  101. syntax. @var{section_entries} contains a list of section entries
  102. separated by @code{:}. Each section entry is composed by a section
  103. name (or unique name), optionally followed by a list of entries local
  104. to that section, separated by @code{,}.
  105. If section name is specified but is followed by no @code{=}, all
  106. entries are printed to output, together with all the contained
  107. sections. Otherwise only the entries specified in the local section
  108. entries list are printed. In particular, if @code{=} is specified but
  109. the list of local entries is empty, then no entries will be shown for
  110. that section.
  111. Note that the order of specification of the local section entries is
  112. not honored in the output, and the usual display order will be
  113. retained.
  114. The formal syntax is given by:
  115. @example
  116. @var{LOCAL_SECTION_ENTRIES} ::= @var{SECTION_ENTRY_NAME}[,@var{LOCAL_SECTION_ENTRIES}]
  117. @var{SECTION_ENTRY} ::= @var{SECTION_NAME}[=[@var{LOCAL_SECTION_ENTRIES}]]
  118. @var{SECTION_ENTRIES} ::= @var{SECTION_ENTRY}[:@var{SECTION_ENTRIES}]
  119. @end example
  120. For example, to show only the index and type of each stream, and the PTS
  121. time, duration time, and stream index of the packets, you can specify
  122. the argument:
  123. @example
  124. packet=pts_time,duration_time,stream_index : stream=index,codec_type
  125. @end example
  126. To show all the entries in the section "format", but only the codec
  127. type in the section "stream", specify the argument:
  128. @example
  129. format : stream=codec_type
  130. @end example
  131. To show all the tags in the stream and format sections:
  132. @example
  133. format_tags : format_tags
  134. @end example
  135. To show only the @code{title} tag (if available) in the stream
  136. sections:
  137. @example
  138. stream_tags=title
  139. @end example
  140. @item -show_packets
  141. Show information about each packet contained in the input multimedia
  142. stream.
  143. The information for each single packet is printed within a dedicated
  144. section with name "PACKET".
  145. @item -show_frames
  146. Show information about each frame contained in the input multimedia
  147. stream.
  148. The information for each single frame is printed within a dedicated
  149. section with name "FRAME".
  150. @item -show_streams
  151. Show information about each media stream contained in the input
  152. multimedia stream.
  153. Each media stream information is printed within a dedicated section
  154. with name "STREAM".
  155. @item -show_chapters
  156. Show information about chapters stored in the format.
  157. Each chapter is printed within a dedicated section with name "CHAPTER".
  158. @item -count_frames
  159. Count the number of frames per stream and report it in the
  160. corresponding stream section.
  161. @item -count_packets
  162. Count the number of packets per stream and report it in the
  163. corresponding stream section.
  164. @item -show_private_data, -private
  165. Show private data, that is data depending on the format of the
  166. particular shown element.
  167. This option is enabled by default, but you may need to disable it
  168. for specific uses, for example when creating XSD-compliant XML output.
  169. @item -show_program_version
  170. Show information related to program version.
  171. Version information is printed within a section with name
  172. "PROGRAM_VERSION".
  173. @item -show_library_versions
  174. Show information related to library versions.
  175. Version information for each library is printed within a section with
  176. name "LIBRARY_VERSION".
  177. @item -show_versions
  178. Show information related to program and library versions. This is the
  179. equivalent of setting both @option{-show_program_version} and
  180. @option{-show_library_versions} options.
  181. @item -bitexact
  182. Force bitexact output, useful to produce output which is not dependent
  183. on the specific build.
  184. @item -i @var{input_file}
  185. Read @var{input_file}.
  186. @end table
  187. @c man end
  188. @chapter Writers
  189. @c man begin WRITERS
  190. A writer defines the output format adopted by @command{ffprobe}, and will be
  191. used for printing all the parts of the output.
  192. A writer may accept one or more arguments, which specify the options
  193. to adopt. The options are specified as a list of @var{key}=@var{value}
  194. pairs, separated by ":".
  195. A description of the currently available writers follows.
  196. @section default
  197. Default format.
  198. Print each section in the form:
  199. @example
  200. [SECTION]
  201. key1=val1
  202. ...
  203. keyN=valN
  204. [/SECTION]
  205. @end example
  206. Metadata tags are printed as a line in the corresponding FORMAT or
  207. STREAM section, and are prefixed by the string "TAG:".
  208. A description of the accepted options follows.
  209. @table @option
  210. @item nokey, nk
  211. If set to 1 specify not to print the key of each field. Default value
  212. is 0.
  213. @item noprint_wrappers, nw
  214. If set to 1 specify not to print the section header and footer.
  215. Default value is 0.
  216. @end table
  217. @section compact, csv
  218. Compact and CSV format.
  219. The @code{csv} writer is equivalent to @code{compact}, but supports
  220. different defaults.
  221. Each section is printed on a single line.
  222. If no option is specifid, the output has the form:
  223. @example
  224. section|key1=val1| ... |keyN=valN
  225. @end example
  226. Metadata tags are printed in the corresponding "format" or "stream"
  227. section. A metadata tag key, if printed, is prefixed by the string
  228. "tag:".
  229. The description of the accepted options follows.
  230. @table @option
  231. @item item_sep, s
  232. Specify the character to use for separating fields in the output line.
  233. It must be a single printable character, it is "|" by default ("," for
  234. the @code{csv} writer).
  235. @item nokey, nk
  236. If set to 1 specify not to print the key of each field. Its default
  237. value is 0 (1 for the @code{csv} writer).
  238. @item escape, e
  239. Set the escape mode to use, default to "c" ("csv" for the @code{csv}
  240. writer).
  241. It can assume one of the following values:
  242. @table @option
  243. @item c
  244. Perform C-like escaping. Strings containing a newline ('\n'), carriage
  245. return ('\r'), a tab ('\t'), a form feed ('\f'), the escaping
  246. character ('\') or the item separator character @var{SEP} are escaped using C-like fashioned
  247. escaping, so that a newline is converted to the sequence "\n", a
  248. carriage return to "\r", '\' to "\\" and the separator @var{SEP} is
  249. converted to "\@var{SEP}".
  250. @item csv
  251. Perform CSV-like escaping, as described in RFC4180. Strings
  252. containing a newline ('\n'), a carriage return ('\r'), a double quote
  253. ('"'), or @var{SEP} are enclosed in double-quotes.
  254. @item none
  255. Perform no escaping.
  256. @end table
  257. @item print_section, p
  258. Print the section name at the begin of each line if the value is
  259. @code{1}, disable it with value set to @code{0}. Default value is
  260. @code{1}.
  261. @end table
  262. @section flat
  263. Flat format.
  264. A free-form output where each line contains an explicit key=value, such as
  265. "streams.stream.3.tags.foo=bar". The output is shell escaped, so it can be
  266. directly embedded in sh scripts as long as the separator character is an
  267. alphanumeric character or an underscore (see @var{sep_char} option).
  268. The description of the accepted options follows.
  269. @table @option
  270. @item sep_char, s
  271. Separator character used to separate the chapter, the section name, IDs and
  272. potential tags in the printed field key.
  273. Default value is '.'.
  274. @item hierarchical, h
  275. Specify if the section name specification should be hierarchical. If
  276. set to 1, and if there is more than one section in the current
  277. chapter, the section name will be prefixed by the name of the
  278. chapter. A value of 0 will disable this behavior.
  279. Default value is 1.
  280. @end table
  281. @section ini
  282. INI format output.
  283. Print output in an INI based format.
  284. The following conventions are adopted:
  285. @itemize
  286. @item
  287. all key and values are UTF-8
  288. @item
  289. '.' is the subgroup separator
  290. @item
  291. newline, '\t', '\f', '\b' and the following characters are escaped
  292. @item
  293. '\' is the escape character
  294. @item
  295. '#' is the comment indicator
  296. @item
  297. '=' is the key/value separator
  298. @item
  299. ':' is not used but usually parsed as key/value separator
  300. @end itemize
  301. This writer accepts options as a list of @var{key}=@var{value} pairs,
  302. separated by ":".
  303. The description of the accepted options follows.
  304. @table @option
  305. @item hierarchical, h
  306. Specify if the section name specification should be hierarchical. If
  307. set to 1, and if there is more than one section in the current
  308. chapter, the section name will be prefixed by the name of the
  309. chapter. A value of 0 will disable this behavior.
  310. Default value is 1.
  311. @end table
  312. @section json
  313. JSON based format.
  314. Each section is printed using JSON notation.
  315. The description of the accepted options follows.
  316. @table @option
  317. @item compact, c
  318. If set to 1 enable compact output, that is each section will be
  319. printed on a single line. Default value is 0.
  320. @end table
  321. For more information about JSON, see @url{http://www.json.org/}.
  322. @section xml
  323. XML based format.
  324. The XML output is described in the XML schema description file
  325. @file{ffprobe.xsd} installed in the FFmpeg datadir.
  326. An updated version of the schema can be retrieved at the url
  327. @url{http://www.ffmpeg.org/schema/ffprobe.xsd}, which redirects to the
  328. latest schema committed into the FFmpeg development source code tree.
  329. Note that the output issued will be compliant to the
  330. @file{ffprobe.xsd} schema only when no special global output options
  331. (@option{unit}, @option{prefix}, @option{byte_binary_prefix},
  332. @option{sexagesimal} etc.) are specified.
  333. The description of the accepted options follows.
  334. @table @option
  335. @item fully_qualified, q
  336. If set to 1 specify if the output should be fully qualified. Default
  337. value is 0.
  338. This is required for generating an XML file which can be validated
  339. through an XSD file.
  340. @item xsd_compliant, x
  341. If set to 1 perform more checks for ensuring that the output is XSD
  342. compliant. Default value is 0.
  343. This option automatically sets @option{fully_qualified} to 1.
  344. @end table
  345. For more information about the XML format, see
  346. @url{http://www.w3.org/XML/}.
  347. @c man end WRITERS
  348. @chapter Timecode
  349. @c man begin TIMECODE
  350. @command{ffprobe} supports Timecode extraction:
  351. @itemize
  352. @item
  353. MPEG1/2 timecode is extracted from the GOP, and is available in the video
  354. stream details (@option{-show_streams}, see @var{timecode}).
  355. @item
  356. MOV timecode is extracted from tmcd track, so is available in the tmcd
  357. stream metadata (@option{-show_streams}, see @var{TAG:timecode}).
  358. @item
  359. DV, GXF and AVI timecodes are available in format metadata
  360. (@option{-show_format}, see @var{TAG:timecode}).
  361. @end itemize
  362. @c man end TIMECODE
  363. @include config.texi
  364. @ifset config-all
  365. @ifset config-avutil
  366. @include utils.texi
  367. @end ifset
  368. @ifset config-avcodec
  369. @include codecs.texi
  370. @include bitstream_filters.texi
  371. @end ifset
  372. @ifset config-avformat
  373. @include formats.texi
  374. @include protocols.texi
  375. @end ifset
  376. @ifset config-avdevice
  377. @include devices.texi
  378. @end ifset
  379. @ifset config-swresample
  380. @include resampler.texi
  381. @end ifset
  382. @ifset config-swscale
  383. @include scaler.texi
  384. @end ifset
  385. @ifset config-avfilter
  386. @include filters.texi
  387. @end ifset
  388. @end ifset
  389. @chapter See Also
  390. @ifhtml
  391. @ifset config-all
  392. @url{ffprobe.html,ffprobe},
  393. @end ifset
  394. @ifset config-not-all
  395. @url{ffprobe-all.html,ffprobe-all},
  396. @end ifset
  397. @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffserver.html,ffserver},
  398. @url{ffmpeg-utils.html,ffmpeg-utils},
  399. @url{ffmpeg-scaler.html,ffmpeg-scaler},
  400. @url{ffmpeg-resampler.html,ffmpeg-resampler},
  401. @url{ffmpeg-codecs.html,ffmpeg-codecs},
  402. @url{ffmpeg-bitstream-filters.html,ffmpeg-bitstream-filters},
  403. @url{ffmpeg-formats.html,ffmpeg-formats},
  404. @url{ffmpeg-devices.html,ffmpeg-devices},
  405. @url{ffmpeg-protocols.html,ffmpeg-protocols},
  406. @url{ffmpeg-filters.html,ffmpeg-filters}
  407. @end ifhtml
  408. @ifnothtml
  409. @ifset config-all
  410. ffprobe(1),
  411. @end ifset
  412. @ifset config-not-all
  413. ffprobe-all(1),
  414. @end ifset
  415. ffmpeg(1), ffplay(1), ffserver(1),
  416. ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
  417. ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
  418. ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
  419. @end ifnothtml
  420. @include authors.texi
  421. @ignore
  422. @setfilename ffprobe
  423. @settitle ffprobe media prober
  424. @end ignore
  425. @bye