MP4
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
MPEG-4 Video Metadata Preview (ISO BMFF).
At a glance
| Original creator | The Moving Picture Experts Group (ISO/IEC JTC 1/SC 29) |
| First published | 2001 |
| Purpose | A container for MPEG-4 audio, video, text and other streams, for the web, mobile devices and broadcasting. |
| Extensions | .mp4 |
| Poka parser | poka-mp4 |
| Viewer | poka-metadata-card-viewer |
| Depth tier | Metadata card (see Depth tiers) |
| Breadth tier | B4 Summary (see Breadth tiers) |
How much Poka reads
B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-21 by the author of the change that gave poka-mp4 its own box walk, not by an independent reviewer: parsers/poka-mp4/src/lib.rs (a separate copy of poka-mov's reader) and its unit tests, and parsers/poka-mp4/tests/samples.rs, which builds the card for every one of the 70 .mp4 files in the corpus and checks the top-level box count, the track count, the samples summed over the tracks (stsz) and the box-tree row count against an independent Python box reader, and pins the whole listing of five of them row for row. The card shows the container (brands, size, top-level boxes), the movie (duration, timescale, creation dates), each track (codec, dimensions, frame rate, sample count, bitrate, language, edit list) and the nested box tree; the decoded video is not read, and playback is the browser's video element, which the card always offers. Judgement: B4 because the container and its metadata are summarised and the main content is not rendered. Covers ISO BMFF files with ftyp or moov; the MP4 v1 and v2 versions are not distinguished. Replaces the 2026-10-16 review (B5, when the parser only passed the file to the player).
What Poka does not read
- no decoding of video or audio frames: playback is the browser's, so a codec it cannot decode (for example HEVC or ProRes where unsupported) fails in the player
- metadata atoms (title, artist, GPS position, cover art) and chapters appear as boxes in the tree but their values are not shown
- subtitle and text tracks are listed but not shown, and there is no track selection
- fragmented MP4 is noted but the sample tables in its moof fragments are not read, so such a file shows no sample count or bitrate
- the box tree is capped at 60 rows and the top-level list at 12 boxes, and only the first 64 MiB of a file is read
- the signature check is loose (any file containing the bytes moov passes)
Background
The Library of Congress says the first MP4 file format was defined in the 2001 edition of MPEG-4 Part 1 and has been superseded by the second, defined in Part 14 (ISO/IEC 14496-14). Both owe a debt to QuickTime, and both build on the ISO base media file format of Part 12. Poka accepts a file with an ftyp box at the start (or, failing that, the bytes moov anywhere), walks the box tree (the ftyp brands, moov and mvhd, and for each trak its mdia, hdlr, mdhd and the stbl tables, edit lists and the nested box tree) and shows it as a metadata card, and hands the original file to the frontend, which plays it in the browser's video element, so the codecs that play are the browser's.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| MP4 file format, version 1 (ISO/IEC 14496-1:2001) | Not recorded | Superseded by version 2; the Library of Congress says it is not widely used. | |
| MP4 file format, version 2 (ISO/IEC 14496-14) | ftyp |
Not recorded |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- mp4 (candidate; MIT; Rust; https://github.com/alfg/mp4-rust)
- mp4-atom (candidate; MIT OR Apache-2.0 (crate), Apache-2.0 (repo); Rust; https://github.com/kixelated/mp4-atom)
- re_mp4 (candidate; MIT; Rust; https://github.com/rerun-io/re_mp4)
- mp4parse (candidate; MPL-2.0; Rust; https://github.com/mozilla/mp4parse-rust) — MPL-2.0 is file-level copyleft; wasm use needs a deny.toml exception
- QuickTime File Format (Apple) (candidate; public spec; spec; https://developer.apple.com/documentation/quicktime-file-format)
- GPAC (reference; LGPL-2.1; C; https://github.com/gpac/gpac) — reference only, not usable in wasm
Sources
- https://loc.gov/preservation/digital/formats/fdd/fdd000037.shtml
- https://loc.gov/preservation/digital/formats/fdd/fdd000155.shtml
- parsers/poka-mp4/src/main.rs
- parsers/poka-mp4/src/lib.rs
- parsers/poka-mp4/tests/samples.rs