2

I am going to write a program to encapsulate H.264 in MP4 container (wrapper). Is there any open specification about the bitstream?

RTP have a specific payload format for H.264, does MP4 has a specific format for H.264?

Community
  • 1
  • 1
Hamed
  • 1,175
  • 3
  • 20
  • 46
  • 1
    [ISO/IEC 14496-14:2003 "Information technology -- Coding of audio-visual objects -- Part 14: MP4 file format"](http://www.iso.org/iso/catalogue_detail.htm?csnumber=38538) – Roman R. Sep 14 '15 at 07:43
  • Thank you for the link. However, it is not open, it's commercial. Do I have to pay money just to download the file, or I must pay for using it too? – Hamed Sep 14 '15 at 07:47
  • 1
    The specification is available for a fee. Having it's code and title you can find it online left there by peer developers. To my best knowledge there is no licensing fees for using/implementing it (unlike codec part of the MPEG-4 spec). – Roman R. Sep 14 '15 at 07:51
  • There should be libraries available you can use. Check gstreamer, ffmpeg, VLC et al. – usr1234567 Sep 14 '15 at 08:19

1 Answers1

4

The carriage of H.264|AVC in MP4 files is documented in two places:

  • the ISO Base Media File Format (ISO/IEC 14496-12) which defines some core tools and is officially available for free on the ITTF Web Site. For some obscure reason, the same text is also available for purchase on the ISO web site.

  • ISO/IEC 14496-15 which defines how to use the ISOBMFF for H.264|AVC streams. Unfortunately, that specification is not available for free, only corrigenda are. It can be purchased from here.

The MP4 file format (i.e. 14496-12) is NOT what you need here, as it defines the carriage of MPEG-4 Systems (e.g. MPEG-4 BIFS) in the ISOBMFF.

You should look at the numerous open source projects that support carriage of AVC such as: GPAC's MP4Box or MP4Box.js, or Bento4, ...

cconcolato
  • 1,186
  • 10
  • 9