MPEG-TS file audio and video frame length

五迷三道 提交于 2019-12-11 02:17:28

问题


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)?


回答1:


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.



来源:https://stackoverflow.com/questions/13677652/mpeg-ts-file-audio-and-video-frame-length

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!