ffprobe.texi 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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 -count_frames
  156. Count the number of frames per stream and report it in the
  157. corresponding stream section.
  158. @item -count_packets
  159. Count the number of packets per stream and report it in the
  160. corresponding stream section.
  161. @item -show_private_data, -private
  162. Show private data, that is data depending on the format of the
  163. particular shown element.
  164. This option is enabled by default, but you may need to disable it
  165. for specific uses, for example when creating XSD-compliant XML output.
  166. @item -show_program_version
  167. Show information related to program version.
  168. Version information is printed within a section with name
  169. "PROGRAM_VERSION".
  170. @item -show_library_versions
  171. Show information related to library versions.
  172. Version information for each library is printed within a section with
  173. name "LIBRARY_VERSION".
  174. @item -show_versions
  175. Show information related to program and library versions. This is the
  176. equivalent of setting both @option{-show_program_version} and
  177. @option{-show_library_versions} options.
  178. @item -bitexact
  179. Force bitexact output, useful to produce output which is not dependent
  180. on the specific build.
  181. @item -i @var{input_file}
  182. Read @var{input_file}.
  183. @end table
  184. @c man end
  185. @chapter Writers
  186. @c man begin WRITERS
  187. A writer defines the output format adopted by @command{ffprobe}, and will be
  188. used for printing all the parts of the output.
  189. A writer may accept one or more arguments, which specify the options
  190. to adopt. The options are specified as a list of @var{key}=@var{value}
  191. pairs, separated by ":".
  192. A description of the currently available writers follows.
  193. @section default
  194. Default format.
  195. Print each section in the form:
  196. @example
  197. [SECTION]
  198. key1=val1
  199. ...
  200. keyN=valN
  201. [/SECTION]
  202. @end example
  203. Metadata tags are printed as a line in the corresponding FORMAT or
  204. STREAM section, and are prefixed by the string "TAG:".
  205. A description of the accepted options follows.
  206. @table @option
  207. @item nokey, nk
  208. If set to 1 specify not to print the key of each field. Default value
  209. is 0.
  210. @item noprint_wrappers, nw
  211. If set to 1 specify not to print the section header and footer.
  212. Default value is 0.
  213. @end table
  214. @section compact, csv
  215. Compact and CSV format.
  216. The @code{csv} writer is equivalent to @code{compact}, but supports
  217. different defaults.
  218. Each section is printed on a single line.
  219. If no option is specifid, the output has the form:
  220. @example
  221. section|key1=val1| ... |keyN=valN
  222. @end example
  223. Metadata tags are printed in the corresponding "format" or "stream"
  224. section. A metadata tag key, if printed, is prefixed by the string
  225. "tag:".
  226. The description of the accepted options follows.
  227. @table @option
  228. @item item_sep, s
  229. Specify the character to use for separating fields in the output line.
  230. It must be a single printable character, it is "|" by default ("," for
  231. the @code{csv} writer).
  232. @item nokey, nk
  233. If set to 1 specify not to print the key of each field. Its default
  234. value is 0 (1 for the @code{csv} writer).
  235. @item escape, e
  236. Set the escape mode to use, default to "c" ("csv" for the @code{csv}
  237. writer).
  238. It can assume one of the following values:
  239. @table @option
  240. @item c
  241. Perform C-like escaping. Strings containing a newline ('\n'), carriage
  242. return ('\r'), a tab ('\t'), a form feed ('\f'), the escaping
  243. character ('\') or the item separator character @var{SEP} are escaped using C-like fashioned
  244. escaping, so that a newline is converted to the sequence "\n", a
  245. carriage return to "\r", '\' to "\\" and the separator @var{SEP} is
  246. converted to "\@var{SEP}".
  247. @item csv
  248. Perform CSV-like escaping, as described in RFC4180. Strings
  249. containing a newline ('\n'), a carriage return ('\r'), a double quote
  250. ('"'), or @var{SEP} are enclosed in double-quotes.
  251. @item none
  252. Perform no escaping.
  253. @end table
  254. @item print_section, p
  255. Print the section name at the begin of each line if the value is
  256. @code{1}, disable it with value set to @code{0}. Default value is
  257. @code{1}.
  258. @end table
  259. @section flat
  260. Flat format.
  261. A free-form output where each line contains an explicit key=value, such as
  262. "streams.stream.3.tags.foo=bar". The output is shell escaped, so it can be
  263. directly embedded in sh scripts as long as the separator character is an
  264. alphanumeric character or an underscore (see @var{sep_char} option).
  265. The description of the accepted options follows.
  266. @table @option
  267. @item sep_char, s
  268. Separator character used to separate the chapter, the section name, IDs and
  269. potential tags in the printed field key.
  270. Default value is '.'.
  271. @item hierarchical, h
  272. Specify if the section name specification should be hierarchical. If
  273. set to 1, and if there is more than one section in the current
  274. chapter, the section name will be prefixed by the name of the
  275. chapter. A value of 0 will disable this behavior.
  276. Default value is 1.
  277. @end table
  278. @section ini
  279. INI format output.
  280. Print output in an INI based format.
  281. The following conventions are adopted:
  282. @itemize
  283. @item
  284. all key and values are UTF-8
  285. @item
  286. '.' is the subgroup separator
  287. @item
  288. newline, '\t', '\f', '\b' and the following characters are escaped
  289. @item
  290. '\' is the escape character
  291. @item
  292. '#' is the comment indicator
  293. @item
  294. '=' is the key/value separator
  295. @item
  296. ':' is not used but usually parsed as key/value separator
  297. @end itemize
  298. This writer accepts options as a list of @var{key}=@var{value} pairs,
  299. separated by ":".
  300. The description of the accepted options follows.
  301. @table @option
  302. @item hierarchical, h
  303. Specify if the section name specification should be hierarchical. If
  304. set to 1, and if there is more than one section in the current
  305. chapter, the section name will be prefixed by the name of the
  306. chapter. A value of 0 will disable this behavior.
  307. Default value is 1.
  308. @end table
  309. @section json
  310. JSON based format.
  311. Each section is printed using JSON notation.
  312. The description of the accepted options follows.
  313. @table @option
  314. @item compact, c
  315. If set to 1 enable compact output, that is each section will be
  316. printed on a single line. Default value is 0.
  317. @end table
  318. For more information about JSON, see @url{http://www.json.org/}.
  319. @section xml
  320. XML based format.
  321. The XML output is described in the XML schema description file
  322. @file{ffprobe.xsd} installed in the FFmpeg datadir.
  323. An updated version of the schema can be retrieved at the url
  324. @url{http://www.ffmpeg.org/schema/ffprobe.xsd}, which redirects to the
  325. latest schema committed into the FFmpeg development source code tree.
  326. Note that the output issued will be compliant to the
  327. @file{ffprobe.xsd} schema only when no special global output options
  328. (@option{unit}, @option{prefix}, @option{byte_binary_prefix},
  329. @option{sexagesimal} etc.) are specified.
  330. The description of the accepted options follows.
  331. @table @option
  332. @item fully_qualified, q
  333. If set to 1 specify if the output should be fully qualified. Default
  334. value is 0.
  335. This is required for generating an XML file which can be validated
  336. through an XSD file.
  337. @item xsd_compliant, x
  338. If set to 1 perform more checks for ensuring that the output is XSD
  339. compliant. Default value is 0.
  340. This option automatically sets @option{fully_qualified} to 1.
  341. @end table
  342. For more information about the XML format, see
  343. @url{http://www.w3.org/XML/}.
  344. @c man end WRITERS
  345. @chapter Timecode
  346. @c man begin TIMECODE
  347. @command{ffprobe} supports Timecode extraction:
  348. @itemize
  349. @item
  350. MPEG1/2 timecode is extracted from the GOP, and is available in the video
  351. stream details (@option{-show_streams}, see @var{timecode}).
  352. @item
  353. MOV timecode is extracted from tmcd track, so is available in the tmcd
  354. stream metadata (@option{-show_streams}, see @var{TAG:timecode}).
  355. @item
  356. DV, GXF and AVI timecodes are available in format metadata
  357. (@option{-show_format}, see @var{TAG:timecode}).
  358. @end itemize
  359. @c man end TIMECODE
  360. @chapter See Also
  361. @ifhtml
  362. @url{ffplay.html,ffmpeg}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
  363. @url{ffmpeg-utils.html,ffmpeg-utils},
  364. @url{ffmpeg-scaler.html,ffmpeg-scaler},
  365. @url{ffmpeg-resampler.html,ffmpeg-resampler},
  366. @url{ffmpeg-codecs.html,ffmpeg-codecs},
  367. @url{ffmpeg-bitstream-filters,ffmpeg-bitstream-filters},
  368. @url{ffmpeg-formats.html,ffmpeg-formats},
  369. @url{ffmpeg-devices.html,ffmpeg-devices},
  370. @url{ffmpeg-protocols.html,ffmpeg-protocols},
  371. @url{ffmpeg-filters.html,ffmpeg-filters}
  372. @end ifhtml
  373. @ifnothtml
  374. ffmpeg(1), ffplay(1), ffserver(1),
  375. ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
  376. ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
  377. ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
  378. @end ifnothtml
  379. @include authors.texi
  380. @ignore
  381. @setfilename ffprobe
  382. @settitle ffprobe media prober
  383. @end ignore
  384. @bye