一. 获取mp4文件信息7 - 查找关键帧
查找过程与查找sample的过程非常类似,只是需要利用sync sample atom来确定key frame的sample序号
- 确定给定时间的sample序号
- 检查sync sample atom来发现这个sample序号之后的key frame
- 检查sample-to-chunk atom来发现对应该sample的chunk
- 从chunk offset atom中提取该trunk的偏移量
- 利用sample size atom找到sample在trunk内的偏移量和sample的大小
二、如何判断3gp,MP4的视频压缩格式
1.video和audio的码流属性(如视频width/height,codec id, 音频采样率声道数等)存放在stsd box里
2.moov:trak: mdia: minf: stbl: stsd:s263 moov:trak: mdia: minf: stbl: stsd:avc1