Skip to content
Novus Examples
mp47 KB

Intentionally Corrupt — MP4 Truncated Mid-mdat

An intentionally corrupt MP4, cut off at 55% of its length in the middle of the `mdat` box — the shape of an interrupted download or a copy from a failing disk. Not a valid file by design. The interesting property is that it opens perfectly. Because the file was written with faststart the `moov` index sits before the media data, so a probe reads a complete track list and a duration within a tenth of a second of the original, and only decoding reveals that most of the samples the index points to are not there. Tools that validate by probing pass it; tools that validate by decoding do not. The seek bar will happily let you scrub past the end of the data that exists.

mp4

video/mp4

7 KB
Integrity
intentionally corrupt
Damage
truncated to 55% of its bytes
Moov Present
true
Moov Position
before mdat (faststart)
Expected Behaviour
opens cleanly, reports ~3s duration, decode fails partway
Original Bytes
13016

Binary mp4: no in-browser preview. Download it above to open in a compatible application.

Specifications

Integrity
intentionally corrupt
Damage
truncated to 55% of its bytes
Moov Present
true
Moov Position
before mdat (faststart)
Expected Behaviour
opens cleanly, reports ~3s duration, decode fails partway
Original Bytes
13016

Testing contract

Expected to fail
Scenario
Probe the file to read its track list and duration, then decode every frame it claims to contain.
Expected result
The probe succeeds and reports a complete track list with a duration within a tenth of a second of the intact original, because the faststart moov index precedes the mdat it describes. Decoding then fails part way through: the file is 7,158 of the original 13,016 bytes, so most of the samples the index points at are absent. A pipeline that validates by probing passes this file and must not.

What is a .mp4 file?

MP4 (MPEG-4 Part 14) is the dominant container for digital video, holding video, audio, subtitle, and metadata tracks in a tree of typed boxes. `ftyp` declares the brand, `moov` carries the sample tables that make seeking possible, and `mdat` holds the media; when an encoder writes `moov` last, playback cannot begin until the file has fully downloaded, which a faststart remux fixes. It derives from Apple's QuickTime format, generalized by ISO into the ISOBMFF base that MOV, 3GP, and HEIF share.

How to use this file

Use an example MP4 to test box parsing and track detection, seeking, range-request streaming, and transcode or thumbnail pipelines: verifying that a file with a trailing `moov` box is still handled, and that codec support is checked per track rather than inferred from the extension.

How to use this file for testing

“Intentionally Corrupt — MP4 Truncated Mid-mdat” is a deterministic Novus Examples fixture for Error handling, Video QA, Video codecs. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.

Documented properties for this file: damage: truncated to 55% of its bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.

Media fixtures are short and synthetic by design. Prefer waveform or transcript ground truth in the same group when measuring ASR, trim, upscale, or sync tools; do not assume broadcast-quality masters.

Code examples

<video controls preload="metadata" width="640" src="mp4-truncated-mid-mdat.mp4"></video>

Generated by generation/video_accessibility.py. Free for any use, no attribution required, license.