一、前言
FFmpeg的Static版本的bin檔案夾中隻有三個.exe檔案,分别是: ffmpeg.exe、ffplay.exe、ffprobe.exe,這三個是FFmpeg源代碼編譯後生成的可執行檔案,也就是FFmpeg的三大工具,本文章主要介紹ffprobe。
ffprobe主要用來檢視多媒體檔案的資訊。
二、ffprobe指令查詢解析
可以通過
ffprobe --help
來檢視詳細的幫助資訊
C:\Users\wangjichuan>ffprobe --help //輸入指令
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
Main options:
-L show license
-h topic show help
-? topic show help
-help topic show help
--help topic show help
-version show version
-buildconf show build configuration
-formats show available formats
-muxers show available muxers
-demuxers show available demuxers
-devices show available devices
-codecs show available codecs
-decoders show available decoders
-encoders show available encoders
-bsfs show available bit stream filters
-protocols show available protocols
-filters show available filters
-pix_fmts show available pixel formats
-layouts show standard channel layouts
-sample_fmts show available audio sample formats
-colors show available color names
-loglevel loglevel set logging level
-v loglevel set logging level
-report generate a report
-max_alloc bytes set maximum size of a single allocated block
-cpuflags flags force specific cpu flags
-hide_banner hide_banner do not show program banner
-sources device list sources of the input device
-sinks device list sinks of the output device
-f format force format
-unit show unit of the displayed values
-prefix use SI prefixes for the displayed values
-byte_binary_prefix use binary prefixes for byte units
-sexagesimal use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units
-pretty prettify the format of displayed values, make it more human readable
-print_format format set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)
-of format alias for -print_format
-select_streams stream_specifier select the specified streams
-sections print sections structure and section information, and exit
-show_data show packets data
-show_data_hash show packets data hash
-show_error show probing error
-show_format show format/container info
-show_frames show frames info
-show_format_entry entry show a particular entry from the format/container info
-show_entries entry_list show a set of specified entries
-show_log show log
-show_packets show packets info
-show_programs show programs info
-show_streams show streams info
-show_chapters show chapters info
-count_frames count the number of frames per stream
-count_packets count the number of packets per stream
-show_program_version show ffprobe version
-show_library_versions show library versions
-show_versions show program and library versions
-show_pixel_formats show pixel format descriptions
-show_private_data show private data
-private same as show_private_data
-bitexact force bitexact output
-read_intervals read_intervals set read intervals
-default generic catch all option
-i input_file read specified file
-find_stream_info read and decode the streams to fill missing information with heuristics
三、指令測試執行個體
使用 ffprobe -show_packets input.flv
檢視多媒體資料包資訊
ffprobe -show_packets input.flv
[PACKET]
codec_type=audio
stream_index=1
pts=735240
pts_time=15.317500
dts=735240
dts_time=15.317500
duration=1024
duration_time=0.021333
convergence_duration=N/A
convergence_duration_time=N/A
size=337
pos=1775648
flags=K_
[/PACKET]
字段 | 說明 |
codec_type | 多媒體類型,如視訊包、音頻包等 |
stream_index | 多媒體的stream索引 |
pts | 多媒體的顯示時間值 |
pts_time | 根據不同格式計算過後的多媒體的顯示時間 |
dts | 多媒體解碼時間值 |
dts_time | 根據不同格式計算過後的多媒體解碼時間值 |
duration | 多媒體包占用的時間值 |
duration_time | 根據不同格式計算過後的多媒體包所占用的時間值 |
size | 多媒體包的大小 |
pos | 多媒體包所在的檔案偏移位置 |
flags | 多媒體包标記,如關鍵包與非關鍵包的标記 |
使用 ffprobe -show_data -show_packets input.flv
ffprobe -show_data -show_packets input.flv
C:\Users\wangjichuan\Desktop>ffprobe -show_data -show_packets 1.mp4 //輸入指令
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[PACKET]
codec_type=video
stream_index=0
pts=0
pts_time=0.000000
dts=-1280
dts_time=-0.080000
duration=640
duration_time=0.040000
convergence_duration=N/A
convergence_duration_time=N/A
size=2322
pos=48
flags=K_
data=
00000000: 0000 002f 0605 2bdc 45e9 bde6 d948 b796 .../..+.E....H..
00000010: 2cd8 20d9 23ee ef42 696c 6942 696c 6920 ,. .#..BiliBili
00000020: 4832 3634 2045 6e63 6f64 6572 2076 312e H264 Encoder v1.
00000030: 3000 8000 0008 db65 8884 003f fffe f6ec 0......e...?....
00000040: be05 3614 c850 9711 2cc5 da4a 703e 2aa4 ..6..P..,..Jp>*.
00000050: 8080 7734 c000 0003 0000 0300 0003 0000 ..w4............
00000060: 0300 0019 7504 d093 9ebb 66db a800 0003 ....u.....f.....
00000070: 0000 0300 00f8 0000 04cb af96 4747 fc40 ............GG.@
00000080: 4f43 dfb4 0217 160a 3296 e581 b6ba 55b8 OC......2.....U.
00000090: 92ac 81de 9471 f967 5bed d9af fcb9 b817 .....q.g[.......
000000a0: 7af5 2a0a 6c30 5379 f3c2 5285 1fbc ba47 z.*.l0Sy..R....G
000000b0: 33f4 8239 d6a1 1758 fdc1 c375 d05d 6660 3..9...X...u.]f`
000000c0: 4ca2 f73d 34eb cf6a 88b6 a21b 260e 4a83 L..=4..j....&.J.
000000d0: 6115 fa7b 615c 389a 74eb 9630 e23c d91b a..{a\8.t..0.<..
000000e0: 2b60 f7c7 2d46 797c 7965 0638 066d 50c9 +`..-Fy|ye.8.mP.
000000f0: 8595 45f5 5692 cf3d 19e3 942d 01eb 5042 ..E.V..=...-..PB
00000100: 67d7 909a b038 b174 7460 8619 f7a5 11b2 g....8.tt`......
00000110: fe05 1e3a aa51 de34 ae5a a2cd db9e a95d ...:.Q.4.Z.....]
00000120: b9f7 68e2 de87 1e0d 7074 ca3b 86c7 1a52 ..h.....pt.;...R
00000130: d92f 4663 5872 a5d8 c64e 5c93 072b 335b ./FcXr...N\..+3[
00000140: ed82 70b8 7319 5eb5 6000 002d 42cd b96c ..p.s.^.`..-B..l
00000150: 537c d4a9 1e17 ee0b ac07 679d 59ea d708 S|........g.Y...
00000160: 666c 62dc 45e9 91c9 55bc fc39 61ed 7bfc flb.E...U..9a.{.
00000170: 7ce9 0657 e66c bd40 d46f a9b8 0fc7 b50e |[email protected]......
00000180: 253d 6520 9bd5 9011 ae67 e839 617d ad36 %=e .....g.9a}.6
00000190: 2db6 b5c8 2971 ffd9 4302 84a6 2b7e 6346 -...)q..C...+~cF
000001a0: 72a9 162c e9c5 c1bb f87b 06cd b8b3 ce63 r..,.....{.....c
000001b0: e686 ea4d 1715 af9a 1770 7c8c d919 88b0 ...M.....p|.....
000001c0: a3e1 47f7 a106 c3f5 6ab6 895a 0b03 6e90 ..G.....j..Z..n.
000001d0: 6d4d 0735 48cb cb57 b3a8 61dc a5a9 a05d mM.5H..W..a....]
000001e0: 398f c486 45e1 f3df 75dc 76e8 2e64 077d 9...E...u.v..d.}
000001f0: 829e 1930 16cf d96b ec13 5ec1 08d1 6209 ...0...k..^...b.
00000200: db84 e380 132f 50d1 56ac e26e 07ca f8eb ...../P.V..n....
00000210: f4ac f9f9 d44e 820e de51 a255 8fe2 5408 .....N...Q.U..T.
00000220: f3b5 8fe9 eb38 f573 02ec eadd 721a 60d7 .....8.s....r.`.
00000230: b42a ae25 b9e7 66ef f6a1 d05d 22ae 04e1 .*.%..f....]"...
00000240: 3423 1df7 cb04 6c78 1b91 f8c2 06be d6bd 4#....lx........
00000250: b7e6 0de9 1643 72ed cf43 0b0b 346a ffb4 .....Cr..C..4j..
00000260: 2b04 1960 6a38 ea3e 0651 7e59 c74a ecd1 +..`j8.>.Q~Y.J..
00000270: 64a3 3be9 4cbb 475a 09dd 7bcf 8e53 6838 d.;.L.GZ..{..Sh8
00000280: 2b9e 2045 bb6e adde 93b4 b70e 755b 2eaa +. E.n......u[..
00000290: 62aa 72d2 d414 0409 135a 6769 a0cc 2cc6 b.r......Zgi..,.
000002a0: 58de 8745 86a6 2e34 9409 98c5 4bbe 643c X..E...4....K.d<
000002b0: 48dd 892c f84c 06f0 0928 c215 ecd9 9711 H..,.L...(......
000002c0: 27fe c62f cbdd d383 ab6f ae9f a7eb d493 '../.....o......
000002d0: 9662 8366 30aa c6d4 097e 0ff3 0a4f 64da .b.f0....~...Od.
000002e0: 2edc c00b d98e 8446 a1d4 88f2 2444 0016 .......F....$D..
000002f0: 1fb5 09b7 9b06 d1ec 2a7c 4328 f192 26d7 ........*|C(..&.
00000300: 0460 b789 76bd e02e d8ca d55d 78c4 3420 .`..v......]x.4
00000310: e436 7c97 d63d 9294 901c 20f3 f812 51d0 .6|..=.... ...Q.
00000320: 5040 72e0 7892 433d 21d3 d0ae c598 82ab [email protected]=!.......
00000330: 98c5 6a0a 1795 9bbd 2533 ead5 ff7f 8f43 ..j.....%3.....C
00000340: 8113 498d a521 211c 71b9 a897 b95d 92ff ..I..!!.q....]..
00000350: 23b2 dea9 5a8a 1373 c2fd d4e6 d874 ee19 #...Z..s.....t..
00000360: 45c7 7d32 58db 9240 1eb2 0c0b 941e 2b2e E.}2X..@......+.
00000370: 3e5f 2354 8dd8 4af7 63bb 4649 e2b5 2d73 >_#T..J.c.FI..-s
00000380: 1391 5ecf c6ed ee1b aa22 fc64 d21c cc5e ..^......".d...^
00000390: 00b6 4085 b411 07f8 49f1 9fa3 640b c8cd [email protected]...
000003a0: e9b3 c42f 33bb b688 1b2b 6f1d 45d6 118e .../3....+o.E...
000003b0: 73de 6b42 333d fc1e 62c3 fde7 b7cd cb7b s.kB3=..b......{
000003c0: 8cb9 8291 93d2 8468 0826 dbe7 31bd b3ed .......h.&..1...
000003d0: 4604 ff5e 1a37 69f9 a9a9 82f9 9f1f 3545 F..^.7i.......5E
000003e0: 697c af07 a0b5 827e 39a9 3ee0 2f3e d58c i|.....~9.>./>..
000003f0: c88f aedd 2d5f 74fc 614b ac87 7800 0003 ....-_t.aK..x...
00000400: 0000 0300 0007 e7ba 7bf5 2f57 fcba 4587 ........{./W..E.
00000410: 257c 140d 8f13 aa5c 85d1 928c 034a 593f %|.....\.....JY?
00000420: 54bc 6c5e 87c0 adc4 f0d2 d8b1 a986 4dcd T.l^..........M.
00000430: 44d6 6152 3f99 17a5 f41c d989 1580 e253 D.aR?..........S
00000440: f958 37f9 595b 4898 2eac 6274 7ce2 cd21 .X7.Y[H...bt|..!
00000450: a03a dbcc 070a 727b 7001 207f 4927 327f .:....r{p. .I'2.
00000460: 3f46 9c5f f072 f45c 8aca bc74 b7d4 b10b ?F._.r.\...t....
00000470: 76db c89b 3919 ec6a 7027 ebea 71cc 7360 v...9..jp'..q.s`
00000480: 375a 2266 1dd3 f543 4a0f 9951 2ec0 db63 7Z"f...CJ..Q...c
00000490: 9641 b055 404a 104e 5d6c bec3 a3e4 1dae [email protected]]l......
000004a0: e17a 825e 1b85 9e2b 71de 9021 fb1d 48ec .z.^...+q..!..H.
000004b0: 3c52 806b 677c 0221 1e24 ea6c 3a44 b708 <R.kg|.!.$.l:D..
000004c0: bb5b c5c4 295e 3da2 37fb 7506 9f7c ac22 .[..)^=.7.u..|."
000004d0: b740 792d acd8 54e2 b4bd 38f8 4e65 6b1b [email protected].
000004e0: 6ee5 5b2a a8f7 9360 65d4 11e8 31d6 b9d3 n.[*...`e...1...
000004f0: f0f8 1c5b 20ef 0f76 d96b 8c6a c748 2499 ...[ ..v.k.j.H$.
00000500: 276d 46a2 b13c f140 3b87 f080 b5cb 5e91 'mF..<.@;.....^.
00000510: adba e1bb bd2c 7513 dddd 13f6 7170 86e3 .....,u.....qp..
00000520: 9c5a 1366 c175 1a16 432f cf6b f574 d5dc .Z.f.u..C/.k.t..
00000530: c06a 7bb4 4fff d7f1 a779 419a 3152 dfbc .j{.O....yA.1R..
00000540: 724a 4f8c fec7 a17a 9455 899d 1889 0d7f rJO....z.U......
00000550: 0a4d 687c 291c 2015 a8c5 a7fd 62d9 be3f .Mh|). .....b..?
00000560: b7e2 ef0f 6c62 844c 76c3 9dc5 4446 93d9 ....lb.Lv...DF..
00000570: 3a81 52a5 e95a 9381 826f 6047 da78 1a53 :.R..Z...o`G.x.S
00000580: 933a 4f7b caf5 d90e 2794 ba30 1ee9 24f5 .:O{....'..0..$.
00000590: 54d2 8c5d a8ca 4e95 2cb4 d48a 6ecc 8b30 T..]..N.,...n..0
000005a0: 7ee9 b3db 943f 552f 10c1 683e 2b97 ec82 ~....?U/..h>+...
000005b0: f94f 3591 2e93 5862 79f5 be49 9cea ce07 .O5...Xby..I....
000005c0: c044 f5f7 0c93 2fd5 ec60 aa30 85d0 3e5a .D..../..`.0..>Z
000005d0: aa9c d8cb 8004 796e 78af e020 9afe dbab ......ynx.. ....
000005e0: a7ff e4c5 a5e2 3861 4724 9150 7e45 d575 ......8aG$.P~E.u
000005f0: ebf8 da1a 6c70 5afa 6651 28ca 8100 8275 ....lpZ.fQ(....u
00000600: f6ed c7fb 1f61 e611 c3df 6797 871d cf41 .....a....g....A
00000610: b898 2295 0828 bc37 4c6e 8f5b 7cf8 f901 .."..(.7Ln.[|...
00000620: 0019 c2f1 7543 4f23 413d 5de5 bd7e 3f2c ....uCO#A=]..~?,
00000630: 8703 ec10 4efd 03e4 c77f f0e3 3e84 ca7c ....N.......>..|
00000640: e79e 40d2 f332 b9d7 7066 3ee6 1ff9 afa8 [email protected]>.....
00000650: 5c53 db8d 10e8 97ab 85ea f75b 1bf5 01ab \S.........[....
00000660: 376b 27b4 9bdf b898 7c08 f3a8 0a99 dd7f 7k'.....|.......
00000670: b51b 8451 dcf3 a5f9 e341 036e 57cf 3b24 ...Q.....A.nW.;$
00000680: a9cf 9458 21fb 5a78 42aa ed38 4b23 e624 ...X!.ZxB..8K#.$
00000690: 22a4 94f7 b724 7bb9 060e aad8 4b37 35fa "....${.....K75.
000006a0: c96d 9ae1 4657 71c1 5006 f2c8 6ab7 883b .m..FWq.P...j..;
000006b0: 2221 d24d e636 89a7 bdfe 47d9 fa6e f148 "!.M.6....G..n.H
000006c0: eefd edb3 2724 6e19 e7a6 7382 3bca 2039 ....'$n...s.;. 9
000006d0: 991c 5108 0000 0300 0003 0000 0300 6cf3 ..Q...........l.
000006e0: ee3d 641c adbc 5f86 53d0 5456 83e0 0e83 .=d..._.S.TV....
000006f0: d2a0 a77f 231f cbff 04cd dc63 53d5 9fb2 ....#......cS...
00000700: d66c 234b 9045 199a 15ec 9424 c4f8 5905 .l#K.E.....$..Y.
00000710: 7a12 ba5d 16b1 6298 f04e d85a 3dc1 b000 z..]..b..N.Z=...
00000720: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000730: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000740: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000750: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000760: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000770: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000780: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000790: 0300 0003 0000 0300 0003 0000 0300 0003 ................
000007a0: 0000 0300 0003 0000 0300 0003 0000 0300 ................
000007b0: 0003 0000 0300 0003 0000 0300 0003 0000 ................
000007c0: 0300 0003 0000 0300 0003 0000 0300 0003 ................
000007d0: 0000 0300 0003 0000 0300 0003 0000 0300 ................
000007e0: 0003 0000 0300 0003 0000 0300 0003 0000 ................
000007f0: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000800: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000810: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000820: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000830: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000840: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000850: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000860: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000870: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000880: 0300 0003 0000 0300 0003 0000 0300 0003 ................
00000890: 0000 0300 0003 0000 0300 0003 0000 0300 ................
000008a0: 0003 0000 0300 0003 0000 0300 0003 0000 ................
000008b0: 0300 0003 0000 0300 0003 0000 0300 0003 ................
000008c0: 0000 0300 0003 0000 0300 0003 0000 0300 ................
000008d0: 0003 0000 0300 0003 0000 0300 0003 0000 ................
000008e0: 0300 0003 0000 0300 0003 0000 0300 0003 ................
000008f0: 0000 0300 0003 0000 0300 0003 0000 0300 ................
00000900: 0003 0000 0300 0003 0000 0300 0003 0000 ................
00000910: 1611 ..
[/PACKET]
使用 ffprobe -show_format input.flv
ffprobe -show_format input.flv
C:\Users\wangjichuan\Desktop>ffprobe -show_format 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[FORMAT]
filename=1.mp4 //檔案名
nb_streams=2 //媒體中包含的流的個數
nb_programs=0 //節目數
format_name=mov,mp4,m4a,3gp,3g2,mj2 //使用的封裝子產品的名稱
format_long_name=QuickTime / MOV //封裝的完整名稱
start_time=0.000000 //媒體檔案的起始時間
duration=453.867000 //媒體檔案的總時間長度
size=86997649 //媒體檔案的大小
bit_rate=1533447 //媒體檔案的碼率
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf57.83.100
TAG:description=Packed by Bilibili XCoder v2.0.2
[/FORMAT]
使用 ffprobe -show_frames input.flv
檢視視訊檔案中的幀資訊
ffprobe -show_frames input.flv
C:\Users\wangjichuan\Desktop>ffprobe -show_frames 1.mp4 //輸入指令
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[FRAME]
media_type=video //幀的類型(視訊、音頻、字幕等)
stream_index=0 //幀所在的索引區域
key_frame=1 //是否為關鍵幀
pkt_pts=0 //Frame包的pts
pkt_pts_time=0.000000 //Frame包的pts的時間顯示
pkt_dts=0 //Frame包的的dts
pkt_dts_time=0.000000 //Frame包的dts的時間顯示
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=640 //Frame包的時長
pkt_duration_time=0.040000 //Frame包的時長時間顯示
pkt_pos=48 //Frame包的所在檔案的偏移位置
pkt_size=2322
width=1920 //幀顯示的寬度
height=1080 //幀顯示的高度
pix_fmt=yuv420p //幀的圖像色彩格式
sample_aspect_ratio=N/A
pict_type=I //幀類型
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
使用 ffprobe -show_streams
檢視多媒體檔案的流資訊
ffprobe -show_streams
C:\Users\wangjichuan\Desktop>ffprobe -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[STREAM]//視訊流
index=0 //流所在的索引區域
codec_name=h264 //編碼名
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 //編碼全名
profile=High //編碼的profile
codec_type=video //編碼類型
codec_time_base=1/50 //編碼的時間戳計算基礎機關
codec_tag_string=avc1 //編碼的标簽資料
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920 //圖像的寬度
coded_height=1080 //圖像的高度
has_b_frames=2 //包含B幀資訊
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=yuv420p //圖像顯示的色彩格式
level=40 //編碼的level
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=25/1 //實際幀率
avg_frame_rate=25/1 //平均幀率
time_base=1/16000 //時間基數(用來進行timestamp計算)
start_pts=0
start_time=0.000000
duration_ts=7261440
duration=453.840000
bit_rate=1399668 //碼率
max_bit_rate=N/A //最大碼率
bits_per_raw_sample=8
nb_frames=11346 //幀數
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=und
TAG:handler_name=VideoHandler
[/STREAM]
[STREAM] //音頻流
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=21785616
duration=453.867000
bit_rate=127872
max_bit_rate=127872
bits_per_raw_sample=N/A
nb_frames=21275
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=und
TAG:handler_name=SoundHandler
[/STREAM]
使用 ffprobe -print_format
或者 ffprobe -of
參數來進行相應的格式輸出
ffprobe -print_format
ffprobe -of
以XML格式輸出: ffprobe -of xml -show_streams input.flv
ffprobe -of xml -show_streams input.flv
C:\Users\wangjichuan\Desktop>ffprobe -of xml -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
<streams>
<stream index="0" codec_name="h264" codec_long_name="H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10" profile="High" codec_type="video" codec_time_base="1/50" codec_tag_string="avc1" codec_tag="0x31637661" width="1920" height="1080" coded_width="1920" coded_height="1080" has_b_frames="2" sample_aspect_ratio="0:1" display_aspect_ratio="0:1" pix_fmt="yuv420p" level="40" chroma_location="left" refs="1" is_avc="true" nal_length_size="4" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/16000" start_pts="0" start_time="0.000000" duration_ts="7261440" duration="453.840000" bit_rate="1399668" bits_per_raw_sample="8" nb_frames="11346">
<disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="VideoHandler"/>
</stream>
<stream index="1" codec_name="aac" codec_long_name="AAC (Advanced Audio Coding)" profile="LC" codec_type="audio" codec_time_base="1/48000" codec_tag_string="mp4a" codec_tag="0x6134706d" sample_fmt="fltp" sample_rate="48000" channels="2" channel_layout="stereo" bits_per_sample="0" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/48000" start_pts="0" start_time="0.000000" duration_ts="21785616" duration="453.867000" bit_rate="127872" max_bit_rate="127872" nb_frames="21275">
<disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="SoundHandler"/>
</stream>
</streams>
</ffprobe>
以INI格式輸出: ffprobe -of ini -show_streams input.flv
ffprobe -of ini -show_streams input.flv
C:\Users\wangjichuan\Desktop>ffprobe -of ini -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
# ffprobe output
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_time_base=1/50
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1080
has_b_frames=2
sample_aspect_ratio=0\:1
display_aspect_ratio=0\:1
pix_fmt=yuv420p
level=40
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/16000
start_pts=0
start_time=0.000000
duration_ts=7261440
duration=453.840000
bit_rate=1399668
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=11346
nb_read_frames=N/A
nb_read_packets=N/A
[streams.stream.0.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0
[streams.stream.0.tags]
language=und
handler_name=VideoHandler
[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=21785616
duration=453.867000
bit_rate=127872
max_bit_rate=127872
bits_per_raw_sample=N/A
nb_frames=21275
nb_read_frames=N/A
nb_read_packets=N/A
[streams.stream.1.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0
[streams.stream.1.tags]
language=und
handler_name=SoundHandler
以FLAT格式輸出: ffprobe -of flat -show_streams input.flv
ffprobe -of flat -show_streams input.flv
C:\Users\wangjichuan\Desktop>ffprobe -of flat -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
streams.stream.0.index=0
streams.stream.0.codec_name="h264"
streams.stream.0.codec_long_name="H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"
streams.stream.0.profile="High"
streams.stream.0.codec_type="video"
streams.stream.0.codec_time_base="1/50"
streams.stream.0.codec_tag_string="avc1"
streams.stream.0.codec_tag="0x31637661"
streams.stream.0.width=1920
streams.stream.0.height=1080
streams.stream.0.coded_width=1920
streams.stream.0.coded_height=1080
streams.stream.0.has_b_frames=2
streams.stream.0.sample_aspect_ratio="0:1"
streams.stream.0.display_aspect_ratio="0:1"
streams.stream.0.pix_fmt="yuv420p"
streams.stream.0.level=40
streams.stream.0.color_range="unknown"
streams.stream.0.color_space="unknown"
streams.stream.0.color_transfer="unknown"
streams.stream.0.color_primaries="unknown"
streams.stream.0.chroma_location="left"
streams.stream.0.field_order="unknown"
streams.stream.0.timecode="N/A"
streams.stream.0.refs=1
streams.stream.0.is_avc="true"
streams.stream.0.nal_length_size="4"
streams.stream.0.id="N/A"
streams.stream.0.r_frame_rate="25/1"
streams.stream.0.avg_frame_rate="25/1"
streams.stream.0.time_base="1/16000"
streams.stream.0.start_pts=0
streams.stream.0.start_time="0.000000"
streams.stream.0.duration_ts=7261440
streams.stream.0.duration="453.840000"
streams.stream.0.bit_rate="1399668"
streams.stream.0.max_bit_rate="N/A"
streams.stream.0.bits_per_raw_sample="8"
streams.stream.0.nb_frames="11346"
streams.stream.0.nb_read_frames="N/A"
streams.stream.0.nb_read_packets="N/A"
streams.stream.0.disposition.default=1
streams.stream.0.disposition.dub=0
streams.stream.0.disposition.original=0
streams.stream.0.disposition.comment=0
streams.stream.0.disposition.lyrics=0
streams.stream.0.disposition.karaoke=0
streams.stream.0.disposition.forced=0
streams.stream.0.disposition.hearing_impaired=0
streams.stream.0.disposition.visual_impaired=0
streams.stream.0.disposition.clean_effects=0
streams.stream.0.disposition.attached_pic=0
streams.stream.0.disposition.timed_thumbnails=0
streams.stream.0.tags.language="und"
streams.stream.0.tags.handler_name="VideoHandler"
streams.stream.1.index=1
streams.stream.1.codec_name="aac"
streams.stream.1.codec_long_name="AAC (Advanced Audio Coding)"
streams.stream.1.profile="LC"
streams.stream.1.codec_type="audio"
streams.stream.1.codec_time_base="1/48000"
streams.stream.1.codec_tag_string="mp4a"
streams.stream.1.codec_tag="0x6134706d"
streams.stream.1.sample_fmt="fltp"
streams.stream.1.sample_rate="48000"
streams.stream.1.channels=2
streams.stream.1.channel_layout="stereo"
streams.stream.1.bits_per_sample=0
streams.stream.1.id="N/A"
streams.stream.1.r_frame_rate="0/0"
streams.stream.1.avg_frame_rate="0/0"
streams.stream.1.time_base="1/48000"
streams.stream.1.start_pts=0
streams.stream.1.start_time="0.000000"
streams.stream.1.duration_ts=21785616
streams.stream.1.duration="453.867000"
streams.stream.1.bit_rate="127872"
streams.stream.1.max_bit_rate="127872"
streams.stream.1.bits_per_raw_sample="N/A"
streams.stream.1.nb_frames="21275"
streams.stream.1.nb_read_frames="N/A"
streams.stream.1.nb_read_packets="N/A"
streams.stream.1.disposition.default=1
streams.stream.1.disposition.dub=0
streams.stream.1.disposition.original=0
streams.stream.1.disposition.comment=0
streams.stream.1.disposition.lyrics=0
streams.stream.1.disposition.karaoke=0
streams.stream.1.disposition.forced=0
streams.stream.1.disposition.hearing_impaired=0
streams.stream.1.disposition.visual_impaired=0
streams.stream.1.disposition.clean_effects=0
streams.stream.1.disposition.attached_pic=0
streams.stream.1.disposition.timed_thumbnails=0
streams.stream.1.tags.language="und"
streams.stream.1.tags.handler_name="SoundHandler"
以FLAT格式輸出: ffprobe -of json -show_streams input.flv
ffprobe -of json -show_streams input.flv
C:\Users\wangjichuan\Desktop>ffprobe -of json -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_time_base": "1/50",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"has_b_frames": 2,
"sample_aspect_ratio": "0:1",
"display_aspect_ratio": "0:1",
"pix_fmt": "yuv420p",
"level": 40,
"chroma_location": "left",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/16000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 7261440,
"duration": "453.840000",
"bit_rate": "1399668",
"bits_per_raw_sample": "8",
"nb_frames": "11346",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
},
{
"index": 1,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 21785616,
"duration": "453.867000",
"bit_rate": "127872",
"max_bit_rate": "127872",
"nb_frames": "21275",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "SoundHandler"
}
}
]
}
以FLAT格式輸出: ffprobe -of csv -show_streams input.flv
ffprobe -of csv -show_streams input.flv
C:\Users\wangjichuan\Desktop>ffprobe -of csv -show_streams 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
stream,0,h264,H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10,High,video,1/50,avc1,0x31637661,1920,1080,1920,1080,2,0:1,0:1,yuv420p,40,unknown,unknown,unknown,unknown,left,unknown,N/A,1,true,4,N/A,25/1,25/1,1/16000,0,0.000000,7261440,453.840000,1399668,N/A,8,11346,N/A,N/A,1,0,0,0,0,0,0,0,0,0,0,0,und,VideoHandler
stream,1,aac,AAC (Advanced Audio Coding),LC,audio,1/48000,mp4a,0x6134706d,fltp,48000,2,stereo,0,N/A,0/0,0/0,1/48000,0,0.000000,21785616,453.867000,127872,127872,N/A,21275,N/A,N/A,1,0,0,0,0,0,0,0,0,0,0,0,und,SoundHandler
使用select_streams可以隻檢視音頻(a)、視訊(v)、字幕(s)的資訊
C:\Users\wangjichuan\Desktop>ffprobe -show_streams -select_streams v -of xml 1.mp4
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
description : Packed by Bilibili XCoder v2.0.2
Duration: 00:07:33.87, start: 0.000000, bitrate: 1533 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 1399 kb/s, 25 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
<streams>
<stream index="0" codec_name="h264" codec_long_name="H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10" profile="High" codec_type="video" codec_time_base="1/50" codec_tag_string="avc1" codec_tag="0x31637661" width="1920" height="1080" coded_width="1920" coded_height="1080" has_b_frames="2" sample_aspect_ratio="0:1" display_aspect_ratio="0:1" pix_fmt="yuv420p" level="40" chroma_location="left" refs="1" is_avc="true" nal_length_size="4" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/16000" start_pts="0" start_time="0.000000" duration_ts="7261440" duration="453.840000" bit_rate="1399668" bits_per_raw_sample="8" nb_frames="11346">
<disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="VideoHandler"/>
</stream>
</streams>
</ffprobe>