Methodology: how every sample file is built and verified
Last verified: 14 November 2026 · Every file on SampleTestFiles is synthesized deterministically from published format specifications, mathematical test patterns, and open-source command-line encoders—never scraped from third-party websites.
1. Core engineering principles
- Zero third-party scraping: Scraping sample files from random websites risks redistributing copyrighted media, embedded personal EXIF/author metadata, or malformed headers. We generate 100% of our files from scratch.
- Bit-exact determinism: When invoking FFmpeg, Pillow, PyArrow, SQLite, or our in-browser JavaScript generator, we pass deterministic flags (such as
-fflags +bitexact -flags:v +bitexact -flags:a +bitexactin FFmpeg and fixed integer PRNG seeds in JavaScript) and normalize archive member timestamps so the generated bytes and SHA-256 hash are reproducible. - Spec-compliant padding for exact byte sizes: When a file is built to an exact byte target (such as a 10,240-byte PDF or a 1,048,576-byte PNG), padding is placed inside a structure defined by the format's specification—such as PDF comment lines before the
xreftable, a PNGtEXtancilliary chunk with a recomputed IEEE CRC-32, or a ZIP extra field—never arbitrary garbage appended past the end-of-file marker.
2. Exact commands used to generate hosted media and container fixtures
You can reproduce our hosted video, audio, image, database, and archive fixtures on any Linux, macOS, or Windows workstation using the exact commands below:
# 1. Video fixtures: SMPTE testsrc pattern + 440 Hz sine audio with bitexact flags
ffmpeg -y -hide_banner -fflags +bitexact -flags:v +bitexact -flags:a +bitexact \
-f lavfi -i "testsrc=size=640x360:rate=24:duration=3" \
-f lavfi -i "sine=frequency=440:sample_rate=44100:duration=3" \
-c:v mpeg4 -q:v 5 -c:a pcm_s16le sample-avi-640x360.avi
# 2. Audio fixtures: ADTS AAC, Ogg Opus (RFC 7845), Dolby AC-3, and Apple AIFF
ffmpeg -y -hide_banner -fflags +bitexact -flags:a +bitexact \
-f lavfi -i "sine=frequency=440:sample_rate=44100:duration=2" \
-ac 2 -c:a aac -b:a 128k -f adts sample-aac-44khz-stereo.aac
ffmpeg -y -hide_banner -fflags +bitexact -flags:a +bitexact \
-f lavfi -i "sine=frequency=500:sample_rate=48000:duration=3" \
-c:a libopus -b:a 96k sample-opus-48khz.opus
# 3. Media edge cases: 90-degree rotation metadata and dual-language audio tracks
ffmpeg -y -hide_banner -fflags +bitexact -flags:v +bitexact \
-f lavfi -i "testsrc=size=360x640:rate=24:duration=2" \
-c:v libx264 -pix_fmt yuv420p -metadata:s:v:0 rotate=90 video-rotated-90deg.mp4
# 4. Next-gen AVIF and OpenEXR HDR images
ffmpeg -y -hide_banner -f lavfi -i "color=c=0x1746c0:s=128x128:d=1" \
-frames:v 1 -c:v libaom-av1 -still-picture 1 sample.avif
ffmpeg -y -hide_banner -f lavfi -i "testsrc=size=128x128:rate=1:duration=1" \
-frames:v 1 -pix_fmt gbrpf32le -c:v exr sample.exr3. Automated build-time verification checks
Before any build of SampleTestFiles is packaged for deployment, our verification script audits every HTML page and binary fixture against seven mandatory gates:
- Zero broken internal links: Every
hrefandsrcattribute across all HTML pages is resolved against the built filesystem and/_redirectstable. - File size and magic-byte verification: Every hosted file is confirmed to be under 20 MiB (the largest hosted asset is under 1 MB), its leading bytes are checked against its declared extension and MIME type, and its SHA-256 hash is matched against /checksums.txt and /files.json.
- edge CDN file-count budget: Total files in the static bundle are kept well below standard deployment bundle limits.
- Content originality and shingle similarity: Tier 1 format pages and guides are audited with 5-word shingle Jaccard similarity to prevent repetitive template overlap, and every indexable page is verified to contain at least 600 words of substantive main text.
- Zero external runtime requests: Apart from Google AdSense on indexable pages, the site makes zero third-party network requests—all CSS, scripts, icons, and search indexes are self-hosted.