annotate ffmpeg/doc/ffprobe.pod @ 13:844d341cf643 tip

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