Ffmpeg ffprobe不会将mpeg传输流的数据包大小显示为188字节

Ffmpeg ffprobe不会将mpeg传输流的数据包大小显示为188字节,ffmpeg,mpeg,mpeg2-ts,ffprobe,Ffmpeg,Mpeg,Mpeg2 Ts,Ffprobe,我使用以下ffmpeg命令从H.264编码文件创建了一个传输流: ffmpeg-i encoded.mp4-c copy-map 0-vbsf h264_mp4toanexb mpgts sample.ts 现在我想检查传输流中的帧和数据包。我曾经 ffprobe-显示帧 其中显示音频和视频帧的帧详细信息。但是我对pkt\u size字段感到困惑。它是每个基本音频和视频流(I/B/P帧)的实际帧大小吗 还有,当我跑步的时候 ffprobe-显示数据包 它应该给出传输流中每个数据包的详细信息吗?因

我使用以下
ffmpeg
命令从
H.264
编码文件创建了一个传输流:

ffmpeg-i encoded.mp4-c copy-map 0-vbsf h264_mp4toanexb mpgts sample.ts

现在我想检查传输流中的帧和数据包。我曾经

ffprobe-显示帧

其中显示音频和视频帧的帧详细信息。但是我对
pkt\u size
字段感到困惑。它是每个基本音频和视频流(I/B/P帧)的实际帧大小吗

还有,当我跑步的时候

ffprobe-显示数据包

它应该给出传输流中每个数据包的详细信息吗?因为每个数据包的
size
字段不是188字节,而是与我用
-show\u frames
得到的
pkt\u size
相同


有人能解释一下为什么传输流的
-show\u数据包的大小不是188字节吗?在将
mp4
多路复用到
TS
时,我是否做错了什么?

这两个pkt\u大小必须相等。看这个

是一样的。pkt_size都是压缩帧的大小


请参见

ffprobe似乎只提供有关PES数据包的信息,而不提供TS数据包的信息,即使输入文件是传输流文件(TS容器)。正确吗?我没有使用ffprobe,但很可能它显示了解复用数据包的大小,即来自基本(h264)流的数据包。你可以尝试使用mpeg ts analyzer软件,网上几乎没有免费的。嗨,安东,谢谢。是的,我使用了ts分析器,现在它正确地显示了每个ts数据包的详细信息,ts数据包的总数正好为(大小为.ts file/188)。我唯一无法确认的是在.TS文件中多路传输的每个TS数据包的时间戳。包含PES报头的TS数据包为每个TS数据包提供PTS、DTS,但不提供时间戳。有没有办法知道在TS中多路复用的每个TS数据包的时间戳?时间戳(pts、dts)存储在PES报头的可选字段中。因此,它们不存在于TS数据包的抽象级别上。
[packets_and_frames.packet.0]
codec_type=audio
stream_index=0
pts=0
pts_time=0.000000
dts=0
dts_time=0.000000
duration=1024
duration_time=0.023220
convergence_duration=N/A
convergence_duration_time=N/A
size=2048
pos=642
flags=K

[packets_and_frames.frame.0]
media_type=audio
stream_index=0
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1024
pkt_duration_time=0.023220
pkt_pos=642
pkt_size=2048
sample_fmt=s16
nb_samples=1024
channels=1
channel_layout=unknown

[packets_and_frames.packet.1]
codec_type=video
stream_index=1
pts=0
pts_time=0.000000
dts=0
dts_time=0.000000
duration=2048
duration_time=0.040000
convergence_duration=N/A
convergence_duration_time=N/A
size=230400
pos=2717
flags=K

[packets_and_frames.frame.1]
media_type=video
stream_index=1
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=2048
pkt_duration_time=0.040000
pkt_pos=2717
pkt_size=230400
width=320
height=240
pix_fmt=rgb24
sample_aspect_ratio=1\:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0

[packets_and_frames.packet.2]
codec_type=video
stream_index=2
pts=0
pts_time=0.000000
dts=0
dts_time=0.000000
duration=2048
duration_time=0.040000
convergence_duration=N/A
convergence_duration_time=N/A
size=30000
pos=233138
flags=K

[packets_and_frames.frame.2]
media_type=video
stream_index=2
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=2048
pkt_duration_time=0.040000
pkt_pos=233138
pkt_size=30000
width=100
height=100
pix_fmt=rgb24
sample_aspect_ratio=1\:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0