Video Metadata Inspector
Operator: Abdulla Al Fahad. How tools are built and checked
A 66,084-byte clip that lasts four seconds averages 132 kilobits a second, and inside it a video track says avc1.64000d, which means H.264 High profile at level 1.3, and an audio track says mp4a.40.2, which is AAC-LC. None of that needs a player: it is written in the file's headers. This page reads those headers for MP4, MOV, M4V, WebM and MKV files and lays them out as a summary, one card per track, a tag list and the raw box or element tree, with a JSON file of everything. It is a reader, not an editor. It will tell you that a phone clip carries a GPS position and a 90-degree rotation flag; removing them means making a new file, for example with the Video Converter.
What is read from MP4 boxes and Matroska elements
For MP4 and MOV the page reads the 8 or 16-byte header of each top-level box to find ftyp, moov and mdat, then loads the moov box (up to 96 MB) and walks it: mvhd for the movie length and creation date, then for each trak the tkhd (track id, enabled flag, display matrix, display size), mdhd (language and time scale), hdlr (video, sound, text, timecode), stsd (the codec and its configuration box: avcC, hvcC, av1C, vpcC, esds, dOps, colr, btrt), stts and stsz (frame count, frame rate and bit rate) and stss (keyframes). The udta and meta boxes are searched for tags and a GPS position. Media data itself is never read.
For WebM and MKV it reads the first 4 MB and parses the EBML header (DocType), then the Segment's Info (time scale, duration, writing application, date) and Tracks (codec ID, pixel size, display size, frame duration, sample rate, channels, colour) until the first Cluster. Anything else, such as an AVI, a transport stream or a text file, is named as not supported rather than guessed at.
How it works
Two bit rates appear and they mean different things. The overall figure is the file size divided by the movie duration, container overhead included. A track's own figure is the sum of its sample sizes from the stsz table divided by the track's duration, or the value a codec box declares when the table is absent. Frame rate is the sample count divided by the sample table's total duration, so a clip recorded at a nominal 30 fps by a browser can come out at 29.508. Rotation comes from the tkhd matrix: the page takes atan2(b, a) of its first two entries. A portrait iPhone clip stores 1920 by 1080 frames with a matrix that rotates them 90 degrees, so the displayed size is 1080 by 1920.
When this helps
- Checking whether a clip from a phone has a location in it before sharing the original
- Finding out why a video appears sideways in one player: the stored size, the rotation flag and the displayed size are all listed
- Confirming that a video is H.264 High at level 4.1 before uploading it to a service with limits
- Seeing whether a recording is HDR, from its PQ or HLG transfer characteristics
Opening a file
- Drop the video or choose it. The file is read in slices, so a multi-gigabyte file is handled quickly.
- Read the summary, then the track cards; the notes list anything unusual, such as a missing duration.
- Open the box tree if you need offsets and sizes. Download or copy the JSON to keep the report.
Example
A 4-second test clip recorded in a browser and saved as MP4
File size 66,084 bytes, mvhd duration 4 s
video: 120 samples over 4.067 s, 5 keyframes, ctts present
video avcC: profile 100, level 13
audio: 175 samples, 44,100 HzWhat the page reports (from running the code)
Overall bit rate 132 kbit/s (video 90 kbit/s, audio 33 kbit/s)
Video H.264 High, level 1.3, avc1.64000d, 320 x 180, 29.508 fps,
a keyframe about every 0.8 s, B-frames in use
Audio AAC-LC, 44,100 Hz, mp4a.40.2
Index position moov after mdat (not fast-start)Tips for best results
- Look at Index position for web use: a file with moov before mdat starts playing before it has fully downloaded; one with moov after must be fetched to the end first.
- A video track at 29.97 or 59.94 fps is normal NTSC timing; the page shows the real ratio, so 29.97 means 30000/1001.
- The codec string on each card is what you would pass to MediaSource.isTypeSupported or put in a type attribute, such as video/mp4; codecs="avc1.64000d".
Limits
A fragmented MP4 (used for streaming) keeps its samples in moof boxes, so frame rate, per-track bit rate and keyframe counts that come from the moov sample tables are not available, and they are reported as unavailable.
A WebM recorded by a browser usually has no Duration in its header, so the length, overall bit rate and the seek behaviour of players are affected; the page reports that instead of a length.
Only the first 4 MB of a WebM or MKV is read. Cues and tags that are written at the end of the file are not seen.
A GPS position is only reported when it is in the file in a standard place (udta ©xyz or the QuickTime location key). Some devices store it in separate timed-metadata tracks, which are listed as tracks but not decoded.
Common errors and how to fix them
- The report says the file is not an MP4, MOV, WebM or MKV.
- The first bytes did not match. The message names common cases such as RIFF (AVI or WAV), MPEG transport streams, FLV and Ogg, which this page does not read.
- A box says it is larger than the file.
- The file is cut short, usually by an interrupted copy or download. The tree marks the box as truncated and the tracks that could be read are still listed.
- There is no moov box.
- A recording that was stopped without being finished has the media data but not the index. Players cannot open it; a repair tool that rebuilds the index from a reference file is needed.
Fields you will meet
A short key to the labels on the track cards:
- Codec and codec string: the sample entry's four-letter name (avc1, hvc1, av01, mp4a, Opus) and the RFC 6381 string built from its configuration
- Profile and level: for H.264, the profile_idc and level_idc bytes; for HEVC, the general profile and level; for AV1, the sequence profile and level index
- Stored size and displayed size: the frames as encoded and the picture after the rotation flag
- Colour: primaries, transfer and matrix from a colr box or Matroska Colour element; PQ (16) or HLG (18) transfer flags HDR
- Samples and keyframes: counts from the stsz, stts and stss tables
Where location and device tags live
QuickTime-style files can hold a position as ISO 6709 text such as +37.3318-122.0312+012.345/ in a udta ©xyz atom, or in a meta box whose keys list contains com.apple.quicktime.location.ISO6709. Make, model and software tags are usually keys in the same meta box. The page looks in both places, converts the text to latitude, longitude and altitude, and lists the tags it found.
Frequently asked questions
Why does the page show a different bit rate from my player?
Players often show the track's declared bit rate or an average over a window. This page computes the overall figure from the file size and duration and each track's figure from its sample sizes.
Why does Created say not stored?
The movie header holds a creation time of zero when the encoder did not set one, which screen recorders and some converters do. The page shows that as not stored instead of 1904.