MP4 MP4 Analyzer by MediaOnDeck

// about

About MP4 Analyzer

MP4 Analyzer is a media container and bitstream inspector that runs entirely in your browser: an ISOBMFF box tree, per-coding-unit QP heatmaps and motion vector overlays. No install, and your files are never uploaded.

1. What it does

It unpacks a video from the container all the way down to individual coding units:

  • Container level — a full ISOBMFF box tree, with every field's type, size and meaning, and a jump straight into the hex view of any box;
  • Frame level — sample offset, size, frame type (I / P / B), POC and reference relationships in decode order, with search and sorting;
  • Coding-unit level — H.264 / H.265 CU partitioning, a QP heatmap and intra/inter prediction mode per block, drawn over the decoded picture;
  • Motion vector level — the MV of every block, its reference frame index and list direction (L0 / L1).

The typical job is diagnosing picture quality. If a section has a normal bitrate but looks soft, is it high QP, a partition that fell back to intra, or a wrong reference choice? None of that is visible in a player — here it is a few coloured blocks on a heatmap.

2. Why it exists

This analysis originally lived in a native macOS app: hardware decoding through VideoToolbox, with per-frame coding-unit data exported for visualisation. It was fast, but it had one hard limitation — it only worked on the Mac it was installed on. Showing a colleague one anomalous GOP meant asking them to install Xcode, build it, and find the same source clip.

A browser fixes exactly that: send a link, and the other person just opens it. No install, no matching hardware, no need to upload the footage anywhere. The price is rebuilding the whole parsing and decoding stack on top of WebAssembly — which is what this project does.

3. How it works

Three layers, stacked:

  • Container parsing — a standalone MP4 parser compiled to WebAssembly expands the ISOBMFF box tree and decodes its fields;
  • Bitstream parsing — FFmpeg compiled to WebAssembly performs H.264 / H.265 slice parsing, coding-unit partitioning, QP extraction and motion vector export;
  • Pixel decoding — the browser's native WebCodecs interface is used first (hardware decoding is very fast). When the browser refuses a bitstream, the tool falls back to the bundled FFmpeg software decoder so that any stream FFmpeg can decode can still be shown.

Everything is computed on your device, the analysis runs in a Web Worker so the interface stays responsive, and large files are handled by loading only the byte window covering the target GOP rather than reading the file into memory. More detail is in How it works.

4. Where your files go

Nowhere. This site has no upload endpoint; the server never receives, stores or processes your video. You can disconnect the network and open a file afterwards — everything still works, and you are welcome to verify that yourself. The details are in the privacy policy.

5. How we verify the numbers

The worst failure mode for an analysis tool is producing plausible-looking output that is wrong. So every numeric export path in this project is cross-checked against ground truth produced by native FFmpeg:

  • Exported pixel planes are compared byte for byte against ffmpeg's yuv420p output — not just the final picture, because comparing pictures mixes in the chroma upsampling strategy and hides real differences;
  • Motion vectors are checked against native output from ffprobe -export_side_data mvs -show_frames, including edge cases such as frames that legitimately have no MVs at all;
  • The two code paths used for large files (GOP byte-window loading vs whole-file loading) are cross-checked against each other and must produce identical output;
  • Block-level statistics are regression-tested on both H.264 and H.265 footage, and the numbers are not allowed to drift.

Known limits

These are written down because knowing the limits is more useful than pretending there are none:

  • Block-level information is available for H.264 / H.265 only. AV1 and VP9 currently expose container structure but no QP or MVs;
  • Because of browser memory limits, files larger than roughly 1 GB will not run on a phone; on desktop they work, but more slowly;
  • Frame preview has to decode forward from the nearest I frame, so later frames take longer (a few seconds at worst). There is a progress indicator and you can cancel at any time;
  • A few encoder outputs are rejected outright by the browser's decoder. Those fall back to the bundled software decoder — you still get a picture, but noticeably slower than hardware decoding.

6. Who builds it

The tool is designed, built and maintained by Liu Hang, out of a very concrete need: doing bitstream triage regularly, without a machine that is always set up for it and without assuming colleagues have the same environment. MediaOnDeck is the name for this family of in-browser media tools; MP4 Analyzer is the first.

All of the parsing logic, the visualisation UI and the verification workflow are implemented by the author. The technical choices and their trade-offs are documented in How it works. For questions, corrections or feature requests, please get in touch.

7. Open source and licensing

Analysis is built on FFmpeg (LGPLv3). As the license requires, the FFmpeg sources used by this project and the full license are published here.

8. Feedback and corrections

If a number here disagrees with a native tool, or a file fails on this site while working elsewhere, that usually means we missed an edge case. Send your browser version, the rough specs of the file (container / codec / resolution / duration) and the error text you saw to liuhang887654@gmail.com and we will check it. Confirmed issues get written into the FAQ rather than just being answered once by email.

Last updated: October 10, 2026