title: H264 elementary stream format confusion
body: <p>I've become confused on the format for H264 video streams. Put simply I've read from ISO spec and other sources both that H264 NAL units are delimited by a start code and contain no length information <strong>AND</strong> that they <strong>don't</strong> have a start codes and are led by 4 bytes (I know this can vary) giving the length of the NAL unit. To make matters more confusing I've been looking at code in <a href="http://code.google.com/p/spydroid-ipcamera/" rel="nofollow">Spydroid</a> and it appears to address both scenarios. Are there two different formats that I'm getting mixed up and if so could anyone direct me to information explaining the two.</p>
  
  <h2>Background</h2>
  
  <p>To give some background in case it helps I'm working on doing live streaming from Android cameras. The stream will either be split up on device for RTP or sent as the raw MP4 data to be split on a server. Either way the stream will be live so there will be no MOOV info to find the audio and video frames. I believe I have much of the project figured out but I'm basically confused on what it is I should be seeing in the H264 stream. If the length is indeed included in the NAL unit it would definitely help me. </p>