DevTools Logo

MP4 MOOV Atom Inspector

MP4 MOOV Atom Inspector

Walk the ISO BMFF box structure of an MP4 or MOV, check whether moov comes before mdat (FastStart), and read the duration.

Runs in your browser
Try an example

MP4 or MOV file

Choose a file, or try an example.

The file is never uploaded or loaded whole: only the 8 to 16 byte box headers are read, plus the moov box (up to 32 MiB), so multi-gigabyte files are fine.

Box inspection

Choose an MP4 to inspect its boxes

Nothing leaves your browser, and the file is not loaded whole.

Parse the first bytes of an MP4 locally to inspect box order, movie timing, tracks, truncation, and progressive playback readiness.

Examples

Faststart file order

Input
inspectMp4(ftypMoovMdatBytes).fastStart
Output
true

Boxes parse as [ftyp, moov, mdat] with mvhd timescale/duration and one trak counted.

mdat before moov

Input
inspectMp4(mdatMoovBytes).warnings
Output
["moov comes after mdat, so progressive playback may wait for the full file."]

Reversed order clears fastStart and recommends relocating moov with a FastStart optimizer.

About this tool

MP4 Moov Atom Inspector parses ISO BMFF boxes with inspectMp4(bytes) (alias parseMp4): top-level size/type headers (including 64-bit largesize) unfold into { type, size, offset, end, truncated } entries, with moov, trak, mdia, minf, stbl, edts, dinf, and udta recursing into children.

Streaming readiness comes from box order: fastStart is true when moov precedes mdat (or no mdat exists), false otherwise — mdat-before-moov adds a progressive-playback warning plus a +faststart relocation recommendation naming qt-faststart and ffmpeg -movflags +faststart.

Playback metadata reads from the mvhd child (version 0 and 1 both supported) for timescale and duration, trackCount counts trak children, and short or over-declared boxes set truncated with an incomplete-payload warning.

How to use this tool

  1. Feed file bytes

    Pass a Uint8Array or ArrayBuffer to inspectMp4 — parsing is fully client-side.

  2. Check faststart

    Read fastStart plus moovOffset/mdatOffset; false means moov trails mdat and delays playback.

  3. Read timing and tracks

    Use timescale, duration, and trackCount from the mvhd and trak children.

  4. Heed warnings

    Truncated inputs and missing moov boxes surface in warnings with fix recommendations.

Use cases

Verifying web uploads

Confirm exported MP4s are faststart so browsers begin playback before full download.

Debugging broken encodes

Spot truncated boxes and missing moov atoms in failed renders or partial uploads.

Inventorying tracks

Count trak children and read mvhd timescale/duration for media catalogs.

Common mistakes

Mistake:Assuming ftyp is optional.

Fix:Well-formed files start with ftyp (major brand like isom) — inspect boxes[0].type to confirm.

Mistake:Ignoring the truncated flag.

Fix:When a declared box size overruns the buffer, duration and child data are incomplete — re-upload the full file.

Frequently asked questions

What does this tool do?

It parses MP4 box structure with inspectMp4 (alias parseMp4) — fastStart order, mvhd timescale/duration, trak count, and truncation warnings.

What makes a file faststart?

moov before mdat (or no mdat) gives fastStart true; moov after mdat warns that progressive playback waits and recommends qt-faststart or ffmpeg -movflags +faststart.

Is my video uploaded or stored?

No. Box parsing and timing reads run entirely in your browser.

Why a truncated warning or missing duration?

Declared box sizes overrunning the buffer set truncated true, and files without moov/mvhd report null timescale and duration.

References & standards