A small command-line tool for creating datamosh effects between video files. Expect glitches, weird colors, pixel trails… and a lot of happy accidents.
This is a bash script that intentionally manipulates video data to create the well-known glitch aesthetic: colors blend in strange ways, shapes smear across frames, and compression artifacts turn into visuals of their own.
It’s not meant for professional use—think of it more like a digital art toy. Perfect for experimentation, music videos, or just messing around.
This was tested on my setup and it produced actual glitchy videos without catastrophic side effects. Your results may vary depending on OS, ffmpeg version, or cosmic alignment.
If it runs fine for you, great! 🎉
If not… well, glitches are part of the charm.
You’ll need a couple of tools installed:
ffmpeg
(video processing)bc
(basic math)
# Install dependencies
sudo apt install ffmpeg bc
# Clone this repository
git clone https://github.com/qbixxx/datamosh.git
cd datamosh
# Make the script executable
chmod +x datamosh.sh
Basic usage:
./datamosh.sh input1.mp4 input2.mp4
This will generate an output file named something like:
datamoshed_20250501_123045.mp4
# Custom output filename (timestamp still added)
./datamosh.sh input1.mp4 input2.mp4 my_output.mp4
# Apply a glitch profile
./datamosh.sh --profile bloom input1.mp4 input2.mp4
# Set intensity level (1–5)
./datamosh.sh input1.mp4 input2.mp4 3
# Also create a GIF
./datamosh.sh --gif input1.mp4 input2.mp4
# Show help
./datamosh.sh --help
- glitch – Subtle static-like distortion
- bloom – Color bleeding effects
- smear – Trailing/motion smear
- extreme – Heavy destruction
- rainbow – Saturated and colorful chaos
- Convert videos to AVI (Xvid codec)
- Extract parts of them as raw binary
- Remove or shift bytes in key spots
- Concatenate the broken data
- Re-encode back to MP4
Not the most efficient process, but it does the job.
datamoshed_20250502_151612.mp4
Q: Output is just black?
A: That’s still valid glitch art—minimalist edition.
Q: The video crashes my player?
A: Try VLC or MPV. Some players don’t enjoy corrupted streams.
Q: Doesn’t look glitchy enough?
A: Use --profile extreme
or increase intensity.
This script breaks video files on purpose. Use at your own risk. No warranties.
If it accidentally generates your next music video masterpiece, even better.
MIT-style, with extra shrugging. Do what you want, just don’t hold me liable.
Pull requests are welcome! Bug fixes, new profiles, or unexpected new bugs that look cool are all appreciated.
- Codec developers everywhere (sorry for abusing your work 🙏)
- ffmpeg, for being endlessly hackable
- Everyone who sees glitches and says “that looks broken”… when in fact, it’s working perfectly
👉 If someone asks what you’re doing, just say:
“I’m experimenting with video compression artifacts.”