11

I am making a app which supports video calls and I am looking for a tutorial/doc explaining the structure of the h.264 codec. I want to be able to package the stream, wrap it in datagrams, send and unpack on the receiving side.

Any suggestions/reading materials?

gop
  • 2,150
  • 5
  • 26
  • 54

3 Answers3

11

What do you mean by structure? If you are talking about the bitstream syntax, you can download the H.264 standard for free. There are also many books/papers about H.264 such as the one by Iain Richardson.

If you are more interested in the network transport of H.264 over IP, why don't you use the RTP standard and associated payload format?

Community
  • 1
  • 1
Ralf
  • 9,405
  • 2
  • 28
  • 46
  • I am more interested in the RTP packaging process. I am making a video streaming app on blackberry and I have access to the video stream and I need to be able to package it in RTP packs in a correct way that it could be used properly on the receiving end regardless of datagram loss. So thanks these links seem exactly what I need. One last thing - does a video file with h.264 encoded video have a header? I mean when i record in a file with h.264 encoding it saves the video in a .3gp file format and there seems to be a header at the beginning of the file - where can I read about this? – gop Oct 17 '11 at 18:39
  • You can find that in the 3GPP specification: AFAICT it looks like it could be the following one but double check that: http://www.3gpp.org/ftp/Specs/html-info/26244.htm Otherwise search under http://www.3gpp.org/specifications. Keep in mind that the .3gp file is just a container format (in your case one used on mobile phones) and has nothing to do with the network packetization. Also, you might need/be able to read the H.264 SPS and PPS somewhere in the header. It could be important for you to extract that info. – Ralf Oct 18 '11 at 12:09
6

Here is very basic principles of H.264

If you are writing an application for network cameras, RTP is what you are looking for. And If you are implementing it in C++, there is ffmpeg library would choose.

Elshan
  • 7,339
  • 4
  • 71
  • 106
1

Have a look at x264 which is an existing implementation of the codec. You might even want to consider using that codec rather than implementing AVC from scratch.

Michael Goldshteyn
  • 71,784
  • 24
  • 131
  • 181