Skip to content

A Bash abomination that slaps two videos together using unsupervised datamoshing magic. Works (barely) on my machine

Notifications You must be signed in to change notification settings

qbixxx/datamosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

🔥 Datamosh - The Glitchy Video Toy™

It Works On My Machine Not for Production Glitch Level

A small command-line tool for creating datamosh effects between video files. Expect glitches, weird colors, pixel trails… and a lot of happy accidents.


What is this?

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.


Works On My Machine™ Guarantee

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.


Installation

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

Usage

Basic usage:

./datamosh.sh input1.mp4 input2.mp4

This will generate an output file named something like:
datamoshed_20250501_123045.mp4

More options

# 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

Profiles

  • glitch – Subtle static-like distortion
  • bloom – Color bleeding effects
  • smear – Trailing/motion smear
  • extreme – Heavy destruction
  • rainbow – Saturated and colorful chaos

How it works (in short)

  1. Convert videos to AVI (Xvid codec)
  2. Extract parts of them as raw binary
  3. Remove or shift bytes in key spots
  4. Concatenate the broken data
  5. Re-encode back to MP4

Not the most efficient process, but it does the job.


Demo

datamoshed_20250502_151612.mp4

Troubleshooting

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.


Disclaimer

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.


License

MIT-style, with extra shrugging. Do what you want, just don’t hold me liable.


Contributions

Pull requests are welcome! Bug fixes, new profiles, or unexpected new bugs that look cool are all appreciated.


Acknowledgments

  • 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.”

About

A Bash abomination that slaps two videos together using unsupervised datamoshing magic. Works (barely) on my machine

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages