MPEG-TS文件音视频帧长 [英] MPEG-TS file audio and video frame length

查看:34
本文介绍了MPEG-TS文件音视频帧长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在 MPEG2 TS 文件中发现每个视频(I、P、B)和音频帧的字节长度,而不是逐字节读取帧内容(例如从 NAL 单元标头)?

Can I discover byte length of each video(I,P,B) and audio frame in MPEG2 TS file not reading frame content byte by byte (from NAL unit header for example)?

推荐答案

在 MPEG-TS 文件中,在 PES 层,有一个名为PES 长度"的字段,它包括所有数据,但没有 PES 头.要准确提取此信息,您必须了解每帧是否有 PES 标头.唉,在大多数视频中,这个字段经常留0,唯一真正计算每帧字节数的方法是在ES级别的视频起始码之间.

in MPEG-TS files, in the PES layer, there is a field called "PES length" which includes all the data but without the PES headers. To extract this information accurately you must understand if there is a PES header per frame or not. Alas, in video mostly, this field is often left 0, and the only true way to count the bytes per frame is between the video start codes in the ES level.

这篇关于MPEG-TS文件音视频帧长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆