ArticleslgStudy

computer science

MP4 file format

MP4 file format is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MP4 file format rather than just read about it. In short: MP4, officially MPEG-4 Part 14, is a digital multimedia container format most commonly used to store video and audio, but it can also be used to store other data such as subtitles and still images. Like most modern container formats, it allows streaming over the Internet.

MP4 file format — main illustration
MP4 file format — illustration

Key takeaways

  • MP4 file format belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MP4 file format to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MP4 file format from memory before moving on to harder problems.

Reference excerpt

MP4, officially MPEG-4 Part 14, is a digital multimedia container format most commonly used to store video and audio, but it can also be used to store other data such as subtitles and still images. Like most modern container formats, it allows streaming over the Internet. The only filename extension for MPEG-4 Part 14 files as defined by the specification is .mp4. MPEG-4 Part 14 is a standard specified as a part of the MPEG-4 specifications, formally as ISO/IEC 14496-14:2003. Unlike the audio-only compression formats MP3 and MP2, MP4 is a container format that can hold various types of media from various codecs. During the 2000s, portable media players were sometimes erroneously advertised as "MP4 players", even if they may play a different format like AMV video and not necessarily the MPEG-4 Part 14 format.

Data streams Most kinds of data can be embedded in MPEG-4 Part 14 files through private streams. A separate hint track is used to include streaming information in the file. The registered codecs for MPEG-4 Part 12-based files are published on the website of MP4 Registration authority (mp4ra.org), but most of them are not widely supported by MP4 players. The widely supported codecs and additional data streams are (but many more are also supported, including audio like FLAC or TrueHD):

Video: MPEG-H Part 2 (H.265/HEVC), MPEG-4 Part 10 (H.264/AVC), MPEG-4 Part 2 and AV1 Other compression formats are less used: MPEG-2 and MPEG-1 Audio: Advanced Audio Coding (AAC) Also MPEG-4 Part 3 audio objects, such as Audio Lossless Coding (ALS), Scalable Lossless Coding (SLS), MP3, MPEG-1 Audio Layer II (MP2), MPEG-1 Audio Layer I (MP1), CELP, HVXC (speech), TwinVQ, Text To Speech Interface (TTSI) and Structured Audio Orchestra Language (SAOL) Other compression formats are less used: Apple Lossless, Free Lossless Audio Codec (added in late 2018), and Opus (added in late 2018) Subtitles: MPEG-4 Timed Text (also known as 3GPP Timed Text). Nero Digital uses DVD Video subtitles in MP4 files The moov atom contains information about video resolution, frame rates, orientation, display characteristics, and more. It might be placed at the beginning or end of the file. In the latter case, the video file is not playable if the file is incomplete (truncated).

Metadata MP4 files can contain metadata as defined by the format standard, and in addition, can contain Extensible Metadata Platform (XMP) metadata.

Filename extensions While the only filename extension defined by the standard is .mp4, various filename extensions are commonly used to indicate intended content:

MPEG-4 files with audio and video generally use the standard .mp4 extension. Audio-only MPEG-4 files generally have a .m4a (MPEG-4 Audio) extension. This is especially true of unprotected content. MPEG-4 files with audio streams encrypted by FairPlay digital rights management as were sold through the iTunes Store use the .m4p (MPEG-4 Protected) extension. iTunes Plus tracks that the iTunes Store currently sells are unencrypted and use .m4a accordingly. Audiobook and podcast files, which also contain metadata including chapter markers, images, and hyperlinks, can use the extension .m4a, but more commonly use the .m4b (MPEG-4 Audiobook) extension. The Apple iPhone uses MPEG-4 audio for its ringtones but uses the .m4r extension rather than the .m4a extension. Raw MPEG-4 Visual bitstreams are named .m4v but this extension is also sometimes used for video in MP4 container format or in the M4V container format. Mobile phones used to use 3GP, an implementation of MPEG-4 Part 12 (a.k.a. MPEG-4/JPEG2000 ISO Base Media file format), similar to MP4. It uses .3gp and .3g2 extensions. These files also store non-MPEG-4 data (H.263, AMR, TX3G). In practice, most (if not all) low end phones and feature phones recorded in this format, as most (if not all) other mobile phones and smartphones record MP4 files using the .mp4 file extension, and some high end phones can record in .raw. By the time that 4G technology was widespread, 3GP started to be phased out, and is now rarely seen.

History MPEG-4 Part 14 is an instance of the more general ISO/IEC 14496-12:2004 (MPEG-4 Part 12: ISO base media file format), which is directly based upon the QuickTime File Format, which was published in 2001. MPEG-4 Part 14 is essentially identical to the QuickTime File Format but formally specifies support for Initial Object Descriptors (IOD) and other MPEG features. MPEG-4 Part 14 revises and completely replaces Clause 13 of ISO/IEC 14496-1 (MPEG-4 Part 1: Systems), in which the file format for MPEG-4 content was previously specified. The MPEG-4 file format, version 1, was published in 2001 as ISO/IEC 14496-1:2001, which is a revision of the MPEG-4 Part 1: Systems specification published in 1999 (ISO/IEC 14496-1:1999). In 2003, the first version of the MP4 file format was revised and replaced by MPEG-4 Part 14: MP4 file format (ISO/IEC 14496-14:2003), commonly named as MPEG-4 file format version 2. The MP4 file format was generalized into the ISO Base Media File format ISO/IEC 14496-12:2004, which defines a general structure for time-based media files. It in turn is used as the basis for other file formats in the family (for example, MP4, 3GP, and Motion JPEG 2000).

The MP4 file format defined some extensions over the ISO Base Media File Format to support MPEG-4 visual/audio codecs and various MPEG-4 Systems features such as object descriptors and scene descriptions. Some of these extensions are also used by other formats based on the ISO base media file format (e.g., 3GP). A list of all registered extensions for ISO Base Media File Format is published on the official registration authority website. The registration authority for code-points (identifier values) in "MP4 Family" files is Apple Inc., and it is named in Annex D (informative) in MPEG-4 Part 12. Codec designers should register the codes they invent, but registration is not mandatory, and some invented and used code-points are not registered. When someone is creating a new specification derived from the ISO Base Media File Format, all the existing specifications should be used both as examples and as a source of definitions and technology. If an existing specification already covers how a particular media type is stored in the file format (e.g., MPEG-4 audio or video in MP4), that definition should be used, and a new one should not be invented.

… excerpt ends here. Continue reading the full article.

Illustrations

MP4 file format illustration

Worked examples

Example 1 — a first encounter with MP4 file format

Start with the simplest possible case. Write down what MP4 file format claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MP4 file format before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MP4 file format ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MP4 file format

In research
MP4 file format appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MP4 file format in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MP4 file format is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 2003, Digital container formats, MPEG-4, so understanding it makes those chapters shorter.
In everyday life
Look for MP4 file format outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “MP4 file format” →

How to study MP4 file format in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MP4 file format means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MP4 file format out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MP4 file format in simple terms?

MP4, officially MPEG-4 Part 14, is a digital multimedia container format most commonly used to store video and audio, but it can also be used to store other data such as subtitles and still images. Like most modern container formats, it allows streaming over the Internet.

Why does MP4 file format matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MP4 file format?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MP4 file format.

Tags

  • Computer-related introductions in 2003
  • Digital container formats
  • MPEG-4

Keep exploring