

There are different methods and philosophies for how best to maintain the integrity of the original data while using as few bytes as possible. I've mentioned multiple times throughout these appendices that media files are rarely ever one-to-one mappings of bytes like a text file is (with our uncompressed BMP file being a rare exception), instead they take the raw bytes (pixels, sound buffers, etc) and encode them into a smaller compressed series of bytes, which keeps the over all file size small. That said, back in 2009 while working closely with my graduate advisers Ben Chang and Jon Cates, I wondered if it would be possible to hack the video codecs themselves rather than the video file.Ī codec (or coder-decoder) is a program (or part of a program) that creates and interprets media files.
#Hex fiend mac datamosh trial
Still, you can achieve some interesting results with enough patience and trial and error.

That said, as explained in the avoiding MP3 frame headers page, this can quickly result in swapping bytes that result in an unplayable file. So you'll need to make large changes, like using the find and replace functionality to swap large numbers of bytes across the entire file. That said, you can get away with hacking at the raw bytes in a hex editor, but small changes won't make much of a difference as replacing a single byte constitutes a much smaller edit in a video than in an image (the former usually being a much larger file). This usually results in an unplayable file. If you want to databend video you won't get very far opening up a video in a text editor and typing in at random.
