Skip to content
AZ Tools

MP4 / ISO Base Media File Inspector

Reads an ISO base media file out of its boxes, in your browser, without uploading anything — .mp4, .m4a, .m4v and QuickTime .mov are all the same container with different brands stamped in the ftyp. The first question it answers is whether the file is fast-start. The moov box holds the index of every sample in the file; if it sits after the mdat, a player cannot begin until the last byte has arrived, which is exactly why a video that opens instantly from a local disk stalls for a minute when the same bytes are served over HTTP. Below that is the box tree: type, byte offset, declared size and share of the file for each box, nested, so it is obvious at a glance whether you are looking at media, at an oversized cover image, or at a stray free box an editor left behind. Per track it reports the identifier, whether the handler is video, audio, subtitle or hint, the codec taken from the sample entry and — where the codec configuration box is there to read — the full RFC 6381 string: avc1.42C01E from avcC, mp4a.40.2 from the esds descriptor chain, vp09.00.30.08 from vpcC. Video tracks add the frame size, audio tracks the sample rate and channel count. Durations are shown as the raw tick count over the timescale that divides it, because a duration of 15360 means nothing until you know whether the timescale is 600 or 15360, and because the movie header is not the last word: a track can run past the movie duration, and a fragmented file usually leaves the movie duration at zero and puts the total in mvex/mehd instead. Creation and modification times are converted from the 1904 epoch that ISO BMFF inherited from QuickTime, and are reported as not set when the muxer left them at zero, which most of them do. No declared size is trusted: a box that claims more bytes than its parent holds is refused with a named error instead of being followed, a size of 0 is read as "to the end of the enclosing box", a size of 1 as a 64-bit largesize, and a uuid box's 16-byte extended type is stepped over before the payload. What it will not do is decode. It cannot tell you whether the picture is intact past the headers, whether the audio is silence, or what bitrate the encoder actually achieved — only what the container says about itself.

How to use

  1. Drop an .mp4, .m4a, .m4v or .mov onto the box. Only the header boxes are read, so a multi-gigabyte movie opens as fast as a short clip.
  2. Read the fast-start line first. If it says no, a browser has to fetch the whole file before it can play a second of it — remux with the moov moved to the front before publishing it.
  3. Check the major brand and the compatible brands when a player refuses the file: "qt " is a QuickTime movie that only claims QuickTime compatibility, while "isom" or "mp42" is what a web player expects.
  4. Open a track to see its codec, its own timescale and duration, and the frame size or sample rate. Divide the duration by the timescale to get seconds; the tool shows both so the arithmetic is visible.
  5. Scan the box tree for anything unexpectedly large. A cover image or a leftover free box can be a surprising fraction of a small file, and the share column makes that obvious.

Frequently asked questions

What does fast-start actually change, and how do I fix a file that is not?
The moov box is the index: it lists the size, the timestamp and the byte offset of every sample in the file. A player needs it before it can decode anything, so when the moov is written after the mdat — which is what a muxer does by default, because the sample table is only complete once the last frame is written — a browser streaming over HTTP must download the entire file, or issue range requests to hunt for the moov, before the first frame appears. Moving it to the front changes nothing about the media; it is a pure reshuffle, done by ffmpeg with -movflags +faststart or by any of the qt-faststart tools. The chunk offsets inside stco or co64 all shift when the moov moves, which is why it has to be a rewrite rather than a copy.
Why is a duration shown as two numbers divided by each other?
ISO base media files store time in ticks, and each header carries its own timescale saying how many ticks make a second. The movie header often uses 600 or 1000; a video track commonly uses something that divides evenly by the frame rate, like 15360 for 15 fps, and an audio track almost always uses the sample rate itself, so 44100 or 48000. A duration of 44032 is meaningless on its own — it is one second of 44.1 kHz audio, or 73 seconds of a 600-tick movie clock. Showing the division rather than just the answer also makes rounding visible: a track duration that is not a whole number of movie ticks is the usual reason a file reports 5.98 seconds where you expected 6.
The creation date says 1904 or not set. Is the file broken?
No. ISO BMFF inherited QuickTime's epoch, which starts at midnight UTC on 1 January 1904, and a great many muxers simply never fill the fields in — ffmpeg writes zero by default, and zero is the epoch itself. So a file that appears to have been created in 1904 was in fact created by a tool that declined to say. When the fields are filled, they are in UTC with no zone information anywhere, so a timestamp cannot tell you where the recording was made, and it is trivially editable, so it is not evidence of anything on its own.
Why does a fragmented file look like it has no samples?
A fragmented MP4 — what DASH, HLS in fMP4, and every recording that has to survive a crash uses — keeps only the track definitions in the moov, with an mvex box saying "expect fragments", and then describes the actual samples in moof boxes scattered through the file, each followed by its own mdat. The sample tables in the moov are legitimately empty, and the movie duration is usually zero because it was not known when the header was written; the total, if anyone recorded it, is in mvex/mehd. That is also why a fragmented file can be cut anywhere and still play up to the cut, and why a plain progressive MP4 cannot.
MP4, M4A, M4V, MOV, 3GP — why do they all open here?
They are one format. ISO/IEC 14496-12 defines the box structure, and the ftyp box at the front declares a major brand plus a list of brands the file is compatible with. "M4A " means the file is audio-only and Apple-flavoured, "M4V" adds Apple's video conventions, "qt " is the original QuickTime layout that everything else descends from, "3gp4" is the mobile profile, and "isom" or "mp42" is the generic one a web player looks for. The extension is a hint to the operating system; the brand list is the actual declaration, and the two disagree often enough that checking it is the first thing to do when a file will not play.
Can this tool repair a file, or change the moov position?
No — it only reads, and it deliberately reads as little as possible: the box headers are walked by slicing the file, so the mdat is never loaded into memory and a very large movie is inspected as quickly as a small one. Nothing is uploaded and nothing is written back. If the box tree stops early with an error about a box claiming more bytes than the file holds, that usually means the file was truncated in transfer or the download was interrupted; a remux from the surviving fragments, not a header edit, is what recovers it.

Related tools