title: MP4 / ISO 14496-12 : How do you find the video and audio access units?
body: <p>I am writing a tool for inspecting MP4 files (aka ISO base media file format , ISO 14496 part 12).</p>
  
  <p>I can interpret the majority of the boxes listed in ISO 14496-12 that are generated by OSS.
  I have yet to figure out how to extract individual video access units and audio access units.</p>
  
  <p>I'm reasonably confident that the H.264 video in the 'mdat' box does not have the ISO 14496-10 Annex B "0x000001" prefix on the NAL units.</p>
  
  <p>I have experimented with interpreting the SampleToChunkBox('stsc'), SampleSizeBox('stsz'), and ChunkOffsetBox('stco') to locate media samples inside the 'mdat', but I can't seem to find anything that I can interpret as a nal_unit() (ISO 14496-10 section 7.3.1) or a slice_header() ( section 7.3.3 ).</p>
  
  <p>I am also curious where the SPS (7.3.2.1) and PPS (7.3.2.2) live.  I have a suspicion these live somewhere inside the 'trak' box, but I haven't figured out where.</p>
  
  <p>Pointers to applications or libraries are of limited utility.  I'm writing an application, and external source code is harder to understand (being encumbered by its own framework) when compared to a mathematical explanation.</p>