[英]How to read audio and video packets from mp4 file
I am trying to write a code in c/c++ (objective c) to parse the audio and video data from mp4 file. 我正在尝试用c / c ++(目标c)编写代码以解析mp4文件中的音频和视频数据。 I know that data in mp4 file contains under the mp4 atom but not sure how i can parse out the audio and video data separately. 我知道mp4文件中的数据包含在mp4原子下,但不确定我如何分别解析音频和视频数据。
Thanks in advance for any help. 在此先感谢您的帮助。
Mp4 format is fairly complicated. mp4格式相当复杂。 I suggest you use a library. 我建议您使用图书馆。 But if you can't use a library, or just wan to learn the format, Than you must parse about a dozen boxes
or atoms
under the root moov
box. 但是,如果您不能使用库,或者只是想学习格式,则必须解析根moov
框下的大约十二个boxes
或atoms
。 The information from there can be used to find frames within the mdat
atom. 来自那里的信息可用于查找mdat
原子内的帧。 The full specifications is numbered ISO/IEC 14496-12 You should be able to find a copy online. 完整的规范编号为ISO / IEC 14496-12。您应该可以在线找到副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.