Parsing H264 in mdat MP4

Steve McFarlin picture Steve McFarlin · Apr 4, 2011 · Viewed 14.4k times · Source

I have a file that only contains the mdat atom in a MP4 container. The data in the mdat contains AVC data. I know the encoding parameters for the data. The format does not appear to be in the Annex B byte stream format. I am wondering how I would go about parsing this. I have tried searching for the slice header, but have not had much luck.

Is it possible to parse the slices without the NAL's?

Answer

michael picture michael · Apr 8, 2011

AVC NAL units are in the following format in MDAT section: [4 bytes] = NAL length, network order; [NAL bytes] Shortly, start codes are simply replaced by lengths.