Hello.
I used datamoshing a lot in my latest film. It was pretty hard to find good tutorials (especially text tutorials) on it, so I’ve decided to make both a video and a text tutorial myself.
I love datamoshing because you can achieve some really cool effects very easily, and there’s a lot of room for experimentation :)
This post is a work in progress, so stay tuned!
Table of contents
Preparing videos (encoding)
Video for datamoshing needs to be encoded in a specific way. This applies to every datamoshing effect.
- Open the video in Avidemux.
- On the left, there is a section called “Video Output”. Click the dropdown menu, by default “Copy” is selected. Choose “Mpeg4 AVC (x264)”.
- Click “configure” under the dropdown menu you just changed.
- In the General tab, check “Use advanced configuration”.
- Go to the Frame tab. Change these parameters:
- Maximum Consecutive B-frames: 0
- GOP Size: Minimum: 0, Maximum: 999
- Save the video using the icon at the top of the window or File > Save.
- Open the video you just encoded (File > Open)
Check for keyframes (I-frames) using the up and down arrow keys. There should be only one, at the beginning of the video. If there’s more, delete them: 1. Make sure you are on an I-frame, check the details bar at the bottom. 2. Press the A button to start a selection. 3. Press the right arrow key to move one frame forward. Now press the B button. 4. Press the red “X” button to delete the selection.
Now you are ready to mosh.
Transition between videos
Have you seen those meme videos of something suddenly appearing? This is the kind of thing we’re going to try to achieve.
First, we need to prepare the videos we want to transition between.
The encoding process is similar to any other kind of datamoshing prep, but we need to have the videos combined before we mosh.
- Open the first video in Avidemux.
- In the application menu, select File > Append. Add your second video.
Now follow the steps for encoding a video.
To create the transition effect, select a fairly long segment between the videos. Then delete the selected fragment.
Now save your video.
At this point, you should have seen at least one warning about corruption. If you haven’t, something has gone wrong.
The saved video should have the transition effect.
The longer the second clip is, the less glitchy it will get by the end of it.
Further reading
- the tutorial I learnt how to datamosh from
- video explaining the types of frames in interframe codecs (like h.264) (highly recommend the video if you’re interested in learning about how digital video works! Everything is explained really well.)