Test files › Audio and video › empty-ftyp-only.mp4

Minimal MP4 with only an ftyp box

A valid ftyp box declaring isom/mp42 branding, with no moov and no mdat - structurally an MP4, but with zero tracks.

↓ Download empty-ftyp-only.mp4
Filenameempty-ftyp-only.mp4
FormatMP4
Size28 bytes (28 bytes)
MIME typevideo/mp4
SHA-2565c15fbf395d7d984bba8eeedf90f7adbc0c166cfd9e633d6d18b5153231bdd85
What this file catchesProbing code that checks only the ftyp box and reports the file as playable video. Duration and track enumeration should fail cleanly, not return NaN.

Handle it in code

Each snippet below was run against this exact file with Python 3.14.4 and Node 24.15.0 when this page was built, and the output shown is what it printed.

Python

An MP4 is a sequence of boxes: a 4-byte size, a 4-byte type, then the contents. Walking the top level shows a missing moov box (no index, so nothing to play) or a file that is not an MP4 at all, without a media library.

import struct

kinds = []
with open("empty-ftyp-only.mp4", "rb") as f:
    while len(head := f.read(8)) == 8:
        size, kind = struct.unpack(">I4s", head)
        header = 8
        if size == 1:  # a 64-bit size follows
            size, header = struct.unpack(">Q", f.read(8))[0], 16
        kinds.append(kind.decode("ascii") if all(32 <= b < 127 for b in kind) else "0x" + kind.hex())
        if size == 0:
            break  # the box runs to the end of the file
        if size < header:
            print(f"rejected: box {kinds[-1]!r} declares {size} bytes")
            break
        f.seek(size - header, 1)
if not kinds or kinds[0] != "ftyp":
    print("not an MP4: the first box is", kinds[0] if kinds else "missing")
elif "moov" not in kinds:
    print("boxes:", ", ".join(kinds) + "; no moov box, so there is nothing to play")
else:
    print("boxes:", ", ".join(kinds))

Run against this file, it prints: boxes: ftyp; no moov box, so there is nothing to play

Related guides and tools

Sample MP3, WAV and MP4 filesFile signaturesMIME typesCheck a file's real typeVerify its SHA-256

Download & verify

curl -fsSL -o "empty-ftyp-only.mp4" "https://files.hexaqa.com/video/empty-ftyp-only.mp4"
curl -fsSL "https://files.hexaqa.com/video/empty-ftyp-only.mp4" | sha256sum # expect: 5c15fbf395d7d984bba8eeedf90f7adbc0c166cfd9e633d6d18b5153231bdd85

More audio and video test files

declared-length-mismatch.wavno-id3-raw.mp3silence-30s.wavsilence-5s.mp3tone-5s.wavtruncated-header.wavvery-short-10ms.wavfake-mp4-wrong-magic.mp4

← All Audio and video files