Datamoshing is a technique that manipulates the frames in a compressed video. Compressed video is made up of several kinds of frames.


Key frames, or I-frames, are frames that usually occur in the beginning of a new scene. These frames contain mostly new information, or information that cannot be compressed. Then we have the in between frames, also referred to as p-frames. These frames contain information that has changed from the previous frame and are used to construct the next frame.

"I P and B frames" by Petteri Aimonen
“I P and B frames” by Petteri Aimonen

The technique of datamoshing involves removing key frames and manipulating transition frames to achieve a unique glitch aesthetic.

This post is an effort to guide through and simplify the process of datamoshing using free tools.

To use this technique, you need a way to manipulate these frames. AVIDemux is a free program that allows for video compression as well as frame by frame editing.

It is recommended to use version 2.5.X as this version allows for easier frame cut and paste operations. However, 2.6.X works fine for the basic datamoshing technique and is the only version I have found that works for recent versions of OSX.

You will also need two compatible videos of the same resolution to “mosh” together.

First we want to compress the videos as an AVI using the Xvid codec. During this process we will also want to minimize the number of key frames in our converted video.

Open the first video in AVIDemux using File->Open from the menu. From the video output drop-down, select the Xvid codec.


Click configure to adjust settings. Change the number of “B-Frames” to 0, and “GOP Size” to  500.


* If you are using version 2.5.X instead change the “maximum I-Frame” interval, under the frame tab, to a large value (or as many frames your video contains).


Now save the file using File->Save from the menu. This is now a compressed compatible video where we minimized the amount of I-frames/ key frames. Repeat this process for the second video.

Next we open our first converted video, scrub through and remove all key frames except the first frame. To skip through key frames we can use these buttons.


We can also see the type of frame here. I for I-frame and P for P-frame. Sometimes you may have two consecutive I-frames/key frames.


To select our key frames, start at an I-frame and start the selection by clicking the starting point button (Button with an “A”).


Then we advance to the next frame that is not a key frame using these buttons. (Usually 1 or 2 frames forward).


Then to end the selection we press the ending point button (Button with a “B”).

Now we have a selection of the frames we want to remove, this selection can be seen as a blue rectangle on the timeline.

2014-11-29 22_50_40-rambox.avi - Avidemux

To remove these frames we can hit delete on the keyboard, or Edit->Delete from the menu. We repeat this process for the rest of the key frames making sure the first frame is still an I-frame/key frame.

Now our first video is ready. Next, we append our second video and again remove the key frames from the second clip by repeating process above.


Finally, once all the extra key frames are removed and making sure the first frame is a key frame, we can save our video. Make sure video output is set to copy, and then File->Save to save the video to disk.

Congratulations, we have our datamoshed video. All that’s left is to save the video and preview it in a video player. VLC is a great player with great compatibility. Optionally, it is possible to capture the playing video using a screen recording software to create a final video without having to worry about playing a manipulated file.

Try manipulating the p-frames

Why not try duplicating them? You can see this effect in the sample video below and it is called the Bloom effect. Since you are duplicating a p-frame you are essentially duplicating the motion from a single frame. This creates a frozen in time aesthetic where pixels continue to deform for as long as the number of frames duplicated.

Tips & Common Problems

  • Crashes are inevitable. If you do run into a crash, try again. This is a volatile process so patience is key.
  • Removing the audio track to a video may help avoiding crashes.
  • Save often. If you are working on a larger scale, saving in between helps to minimize time spent recovering from a possible crash.
  • Moshing with a video that has static elements yields interesting results
  • Keep experimenting! Don’t be afraid to try things like reversing frames, or speeding up the frame rate. You might discover something awesome.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s