<p>The <a href="http://en.wikipedia.org/wiki/MPEG-4" rel="nofollow">Wikipedia article</a> on MPEG-4 is a great start as the MP4 file specification is part of the MPEG-4 spec.  Specifically version 2 of MP4 is <a href="http://en.wikipedia.org/wiki/MPEG-4_Part_14" rel="nofollow">MPEG-4 Part 14</a>. While not free, you can purchase copies of the ISO spec under <a href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=38538" rel="nofollow">ISO# 14496-14:2003</a>.  A preview with some detail is available from the ISO <a href="http://webstore.iec.ch/preview/info_isoiec14496-14%7Bed1.0%7Den.pdf" rel="nofollow">here</a>.  </p>

<p>It is designed to contain any of the various MPEG video formats, including MPEG, MPEG-2, MPEG-4 Part 2 (generic MPEG-4) and, probably most commonly, MPEG-4 part 10 (H.264).  It can theoretically support almost any format of video stream, however those 4 are the most widely supported for the file type.</p>

<p>The full list of officially registered codec types is available from the MP4 Registration Authority <a href="http://mp4ra.org/codecs.html" rel="nofollow">here</a>.</p>

CC BY-SA 4.0
2019-01-04T00:17:13.043Z
Can't any container theoretically support any codec? Isn't this just a matter of the player being able to understand the two correctly?
user3643
CC BY-SA 4.0
2019-01-04T13:59:43.237Z
@digivisionmedia depends on the container.  Some may have enumerations of allowed codecs as use an int to identify it rather than an open entry.  You could theoretically make a container that can hold any codec though.
AJ Henderson
CC BY-SA 3.0
2014-09-05T15:51:36.720Z
2014-09-05T15:51:36.720Z
AJ Henderson
<p>I have started to learn about mp4 file format, and I just learned that mp4 is nothing but just a container that defines the structure of the video file, and that it has different codecs inside it for audio and video, as well as other data like metadata and subtitles.</p>

<p>I have been searching around for a while now but couldn't find so much on the basics of mp4 containers and the working and complete structure explanation of it.</p>

<p>So far I have read <a href="http://www.videomaker.com/article/15362-video-formats-explained" rel="nofollow">this</a> and <a href="http://www.dr-lex.be/info-stuff/mediaformats.html" rel="nofollow">this</a>, but there is not enough information specifically about mp4 container.</p>

<p>My question is,</p>

<p>There are so many Audio/Video Codecs available which are used, but which Codecs are used with the mp4 container ?</p>

<p>Can we use any Codec with the mp4 container ? because there are like dozen different Codecs and how one would know which can be used with the mp4 container ?, </p>

<p>and is there a book or a paper on Mp4 container structure and explanation ?</p>

CC BY-SA 4.0
2019-01-04T00:19:26.113Z
Old question with a good new answer here: [Understanding containers and codecs](https://video.stackexchange.com/a/23264/3643)
user3643
<video><codec><mp4>
Mp4 Video Container and the Codecs use with it
Sufiyan Ghori
# Mp4 Video Container and the Codecs use with it

(Asked by: username_0 on 2014-09-05)

I have started to learn about mp4 file format, and I just learned that mp4 is nothing but just a container that defines the structure of the video file, and that it has different codecs inside it for audio and video, as well as other data like metadata and subtitles.

I have been searching around for a while now but couldn't find so much on the basics of mp4 containers and the working and complete structure explanation of it.

So far I have read [this](http://www.videomaker.com/article/15362-video-formats-explained) and [this](http://www.dr-lex.be/info-stuff/mediaformats.html), but there is not enough information specifically about mp4 container.

My question is,

There are so many Audio/Video Codecs available which are used, but which Codecs are used with the mp4 container ?

Can we use any Codec with the mp4 container ? because there are like dozen different Codecs and how one would know which can be used with the mp4 container ?,

and is there a book or a paper on Mp4 container structure and explanation ?

**Tags:** video, codec, mp4

> **Comments:**
> **username_1**: Old question with a good new answer here: [Understanding containers and codecs](https://video.stackexchange.com/a/23264/3643)  

---

## 1 answers

### Answer by username_2 on 2014-09-05. Score: 3 | Accepted answer

The [Wikipedia article](http://en.wikipedia.org/wiki/MPEG-4) on MPEG-4 is a great start as the MP4 file specification is part of the MPEG-4 spec. Specifically version 2 of MP4 is [MPEG-4 Part 14](http://en.wikipedia.org/wiki/MPEG-4_Part_14). While not free, you can purchase copies of the ISO spec under [ISO# 14496-14:2003](http://www.iso.org/iso/catalogue_detail.htm?csnumber=38538). A preview with some detail is available from the ISO [here](http://webstore.iec.ch/preview/info_isoiec14496-14%7Bed1.0%7Den.pdf).

It is designed to contain any of the various MPEG video formats, including MPEG, MPEG-2, MPEG-4 Part 2 (generic MPEG-4) and, probably most commonly, MPEG-4 part 10 (H.264). It can theoretically support almost any format of video stream, however those 4 are the most widely supported for the file type.

The full list of officially registered codec types is available from the MP4 Registration Authority [here](http://mp4ra.org/codecs.html).

> **Comments:**
> **username_1**: Can't any container theoretically support any codec? Isn't this just a matter of the player being able to understand the two correctly?  
> **username_2**: @digivisionmedia depends on the container.  Some may have enumerations of allowed codecs as use an int to identify it rather than an open entry.  You could theoretically make a container that can hold any codec though.  

---

