提要:
输出格式信息:ffprobe -show_format audio_721f5c38b357b86e5c4562028c04b137.mp4
输出每个流的具体信息(以JSON格式):ffprobe -print_format json -show_streams audio_721f5c38b357b86e5c4562028c04b137.mp4
显示帧信息:ffprobe -show_frames audio_721f5c38b357b86e5c4562028c04b137.mp4
查看包信息:ffprobe -show_packets audio_721f5c38b357b86e5c4562028c04b137.mp4
输出格式信息
参数:-show_format
示例:ffprobe -show_format audio_721f5c38b357b86e5c4562028c04b137.mp4
[root@cloud-codec-worker-dev002-bjdx11 71to51]# ffprobe -show_format audio_721f5c38b357b86e5c4562028c04b137.mp4
ffprobe version N-89871-g388a0f7 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --enable-shared --disable-yasm --enable-libx264 --enable-libx265 --enable-gpl --prefix=/usr/local/ffmpeg
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 5.100 / 58. 5.100
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'audio_721f5c38b357b86e5c4562028c04b137.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.5.100
Duration: 01:16:18.88, start: 0.000000, bitrate: 9216 kb/s
Stream #0:0(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
Metadata:
handler_name : SoundHandler
[FORMAT]
filename=audio_721f5c38b357b86e5c4562028c04b137.mp4
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=4578.880000
size=5274945822
bit_rate=9216132
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2mp41
TAG:encoder=Lavf58.5.100
[/FORMAT]
输出每个流的具体信息(以JSON格式)
参数:-print_format json -show_streams
示例:ffprobe -print_format json -show_streams audio_721f5c38b357b86e5c4562028c04b137.mp4
[root@cloud-codec-worker-dev002-bjdx11 71to51]# ffprobe -print_format json -show_streams audio_721f5c38b357b86e5c4562028c04b137.mp4
ffprobe version N-89871-g388a0f7 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --enable-shared --disable-yasm --enable-libx264 --enable-libx265 --enable-gpl --prefix=/usr/local/ffmpeg
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 5.100 / 58. 5.100
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'audio_721f5c38b357b86e5c4562028c04b137.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.5.100
Duration: 01:16:18.88, start: 0.000000, bitrate: 9216 kb/s
Stream #0:0(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
Metadata:
handler_name : SoundHandler
"streams": [
{
"index": 0,
"codec_name": "pcm_s24be",
"codec_long_name": "PCM signed 24-bit big-endian",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "in24",
"codec_tag": "0x34326e69",
"sample_fmt": "s32",
"sample_rate": "48000",
"channels": 2,
"bits_per_sample": 24,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 219786240,
"duration": "4578.880000",
"bit_rate": "2304000",
"bits_per_raw_sample": "24",
"nb_frames": "219786240",
"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": "eng",
"handler_name": "SoundHandler"
}
}
]
}
显示帧信息
参数:-show_frames
示例:ffprobe -show_frames audio_721f5c38b357b86e5c4562028c04b137.mp4
[FRAME]
media_type=audio
stream_index=0
key_frame=1
pkt_pts=6678272
pkt_pts_time=139.130667
pkt_dts=6678272
pkt_dts_time=139.130667
best_effort_timestamp=6678272
best_effort_timestamp_time=139.130667
pkt_duration=1024
pkt_duration_time=0.021333
pkt_pos=159854636
pkt_size=6144
sample_fmt=s32
nb_samples=1024
channels=2
channel_layout=unknown
[/FRAME]
[FRAME]
media_type=audio
stream_index=0
key_frame=1
pkt_pts=6679296
pkt_pts_time=139.152000
pkt_dts=6679296
pkt_dts_time=139.152000
best_effort_timestamp=6679296
best_effort_timestamp_time=139.152000
pkt_duration=1024
pkt_duration_time=0.021333
pkt_pos=159860780
pkt_size=6144
sample_fmt=s32
nb_samples=1024
channels=2
channel_layout=unknown
[/FRAME]
......
查看包信息
参数:-show_packets
示例:ffprobe -show_packets audio_721f5c38b357b86e5c4562028c04b137.mp4
[PACKET]
codec_type=audio
stream_index=0
pts=16918400
pts_time=352.466667
dts=16918400
dts_time=352.466667
duration=1024
duration_time=0.021333
convergence_duration=N/A
convergence_duration_time=N/A
size=6144
pos=405986348
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=16919424
pts_time=352.488000
dts=16919424
dts_time=352.488000
duration=1024
duration_time=0.021333
convergence_duration=N/A
convergence_duration_time=N/A
size=6144
pos=405992492
flags=K_
[/PACKET]
......