Environment:
I have an IP Camera, which is capable of streaming it\'s data over RTP in a H.264 encoded format. This raw stream is recorded from the ethe
Looks like the stream got packetized. Many container formats split up the bitstream into packets and add a bit of info such as time stamps, length of the packet, etc. This gives hooks to the decoder to skip through the file without decoding everything, resynching when a packet is lost, synching audio/video, combining multiple streams, etc.
Look at the MP4 file format info for more information:
http://en.wikipedia.org/wiki/MPEG-4_Part_14
Besides adding the MP4 container, ffmpeg converted your H.264 Annex B byte stream (with NAL prefixes) to a length prefixed format.
Your [0x00 0x00][2 "Random" Bytes] is a 32 bit integer, giving the length of the following NAL unit in bytes.
You can read more about your changes in open h264 specs. Chapter Annex B.