Two types of hashes, two different problems
When people say "change the video hash," they mean one of two things:
Cryptographic hash (MD5, SHA-256): The file's byte-level fingerprint. Any change to any byte changes the hash. Easy to change.
Perceptual hash (pHash, dHash): A fingerprint of what the video looks like. Survives re-encoding, format changes, and minor modifications. Hard to change without visible impact.
Duplicate detection systems use both. You need to defeat both. This guide shows how to do it with minimal quality loss.
Changing the cryptographic hash
The cryptographic hash changes whenever any byte in the file changes. The easiest way:
Even if CRF 23 produces visually identical output, the file bytes are completely different. The MD5 and SHA-256 hashes will not match.
Why? Because:
The encoder makes different frame-level decisions each run
Timestamps in the container change
Metadata differs
This is the trivial case. Any re-encoding changes the cryptographic hash.
Verify it worked
Changing the perceptual hash
This is the hard part. Perceptual hashing compares what the video looks like, not the file bytes. The algorithm:
Downscales each frame to 32x32
Converts to grayscale
Applies DCT (Discrete Cosine Transform)
Generates a binary hash from frequency components
Two videos that look the same produce similar perceptual hashes. The Hamming distance between them is low (0-5 bits out of 64).
To change the perceptual hash, you need to change what the video looks like at a structural level. The question is: how much can you change while keeping quality loss invisible?
The quality-preserving toolkit
Technique 1: Micro-crop (zero visible quality loss)
Crop 2-6 pixels from each edge. On a 1920x1080 video, this is 0.1-0.3% of the frame. Invisible on any display.
This shifts the center of mass of the frame and changes which pixels map to the 32x32 downscale used in pHash computation. The quality loss is 2 pixels per edge, which nobody will notice.
Technique 2: Sub-threshold brightness shift
Human vision can't detect brightness changes below ~1%. FFmpeg's eq filter operates in a range where 0.01 = 1%.
A 0.8% brightness increase shifts the grayscale values used in hash computation. That's enough to nudge some values across the DCT median boundary, changing the resulting hash. Not enough for anyone to see.
Technique 3: Noise at the visibility threshold
Noise strength 3-5 in FFmpeg is below the threshold of visibility for video played at normal size. At strength 8+, it becomes visible on close inspection.
Random noise disrupts the DCT frequency components used in pHash, especially at lower frequencies. At strength 4, it's invisible during normal playback. You'd only see it at 200% zoom on a still frame.
Technique 4: CRF adjustment
Different CRF values change which details the encoder preserves. CRF 22 and CRF 23 produce visually identical output to most viewers, but the encoder makes different decisions about DCT coefficients.
The pHash impact is low on its own since the visual content is nearly identical at adjacent CRF values. Above CRF 25, artifacts may become visible in high-motion scenes.
Technique 5: Lossless audio pitch shift
Audio perceptual fingerprints are separate from video. A 0.3-0.5% pitch shift is inaudible to virtually everyone.
Even a 0.3% shift moves frequency peaks enough to change the Chromaprint fingerprint. The just-noticeable difference for pitch is around 1% for most people, so 0.3% flies under the radar.
The optimal combination
Combining techniques produces a larger total change while keeping each individual change below the visibility threshold:
Changes applied:
2px crop per edge (invisible)
0.8% brightness shift (invisible)
Noise at strength 4 (invisible at normal viewing)
0.3% audio pitch shift (inaudible)
CRF 22 re-encode (different file, same quality)
Metadata stripped (no creator fingerprints)
At normal viewing conditions, the output is indistinguishable from the original. The cryptographic hash is completely different. The perceptual video hash has a Hamming distance of 8-15 from the original, enough to pass duplicate detection. The audio fingerprint won't match either.
How to verify your hash actually changed
Changing the hash is only half the job. You need to confirm it worked. Here's how to compare hashes before and after.
Cryptographic hash verification
Perceptual hash comparison
You need a pHash library. Python's imagehash with ffmpeg frame extraction works:
For batch processing, wrap this in a loop and log the distances to a CSV. You want every variation to have a Hamming distance of at least 8 from every other variation.
Platform-specific detection notes
Different platforms use different detection approaches. What works on one might not work on another.
TikTok
TikTok uses a combination of video fingerprinting, audio fingerprinting, and content-based matching. The micro-crop + brightness + noise combination works well because TikTok's system weighs visual similarity heavily. The audio pitch shift matters too, since TikTok scans audio separately. For more on how TikTok's detection works, see the TikTok video fingerprinting deep dive.
For making duplicate TikTok videos unique at scale, you'll want to vary the parameters across copies rather than using the same values for every variation.
Instagram's duplicate detection focuses on exact and near-exact matches. The perceptual threshold is more forgiving than TikTok's. A micro-crop alone often passes. But Instagram also checks audio against their music library, so the pitch shift matters if your video uses copyrighted audio.
YouTube
YouTube has the most aggressive content matching (Content ID). It matches both audio and video independently, with high tolerance for modifications. The techniques in this guide will change the hash, but Content ID operates at a different level than pHash. It compares longer time-windowed features. For YouTube, you typically need more aggressive visual changes (color grading shifts, speed changes) to avoid matching.
API call for the optimal combination
Generating multiple unique hashes
For batch generation, vary the parameters slightly for each copy:
Five variations. Each with a different cryptographic hash, a different perceptual hash, and a different audio fingerprint. All visually and audibly identical to the source.
For scaling this to hundreds of variations, the batch uniqueness guide covers automation workflows. You might also want to strip video metadata as a separate step if you need to remove specific tags without re-encoding, or avoid TikTok duplicate detection at scale with platform-specific strategies.
What about lossless changes?
Can you change the hash without any quality loss at all? Yes, but only the cryptographic hash:
This copies the streams bit-for-bit but changes the container metadata. The cryptographic hash changes. The perceptual hash stays identical.
For perceptual hash changes, some degree of re-encoding is required. The techniques above keep quality loss below the threshold of human perception. That's as close to "lossless" as you can get while actually changing what the video looks like.
If you need to reduce file size at the same time, video compression with CRF 22-24 handles both goals in one pass.
Pricing
The Starter plan at $9/mo includes 500 commands. Each hash change is one command. If you're generating 5 variations per source video, that's 100 source videos per month.
FAQ
Can platforms detect hash-changed videos?
It depends on the platform and how aggressively you change the hash. The combined technique (crop + brightness + noise + pitch shift) reliably defeats pHash-based duplicate detection with a Hamming distance of 8-15. Content ID systems (like YouTube's) operate differently and are harder to defeat with these techniques alone.
Does changing the hash affect video quality?
With the settings in this guide, no. Each individual change is below the human perception threshold. A 2px crop, 0.8% brightness shift, and noise strength of 4 are all invisible during normal playback. The CRF 22 re-encode preserves quality at a level visually identical to the source.
How many unique variations can I generate from one video?
Practically unlimited. By varying the crop amount (2-6px), brightness direction and magnitude (-0.01 to +0.01), noise strength (3-5), pitch shift direction (0.997 to 1.004), and CRF value (22-24), you get thousands of unique parameter combinations. Each produces a different hash.
What's the difference between MD5/SHA-256 and pHash?
MD5 and SHA-256 are cryptographic hashes based on the raw file bytes. Any change to any byte changes the hash. pHash (perceptual hash) is based on what the video looks like visually. Two files can have completely different MD5s but identical pHashes if they look the same. Duplicate detection systems use pHash because it survives format conversion, compression, and trivial modifications.
Do I need to change both hashes?
For duplicate detection evasion, yes. Most platforms check both. Changing only the cryptographic hash (by re-encoding) won't help if the perceptual hash matches. Changing only the perceptual hash without re-encoding isn't possible since you need to modify the visual content, which requires re-encoding.