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

574 lines
16KB

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