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?
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?
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, ...