Sunday 2 August 2015

DATA MOSHING TUTORIAL for PC using AviDemux.

Hello everyone,

I have researched many DataMoshing tutorials online and many of them are quite old and not very easy to follow. I have put everything I learned from those tutorials into this tutorial so I think this is one of the best, most comprehensive DataMoshing tutorials you will find online. Toolfarm, the company that sells plugins for VFX software like After Effects, even published an article about DataMoshing which was inspired by THIS tutorial!
But now it's time to make your own awesome DataMoshing video, and don't forget to check out the extra tips below the tutorial to give your video that extra edge!!

So here goes:

First we need to download an older version of AviDemux. Version 2.5.6 to be precise. You can find that version here: http://www.videohelp.com/software/AviDemux/old-versions
You will need to scroll down almost to the bottom of the list to find it. (The date of publishing is 2012-01-01 or 2011-12-30.) Choose the 64 bit or 32 bit version according to the system your computer uses. 64 bit is preferable.

Okay, now you need to make a video, using your preferred editing software (I use Premiere Pro CC), with at least one cut in it so it goes from one scene to an other. Videos with slow moving objects or people work best for Data Moshing. Fast movement in your video means the effect won't last very long. See my test video on YouTube to see what I mean. Sorry it's in black and white. Colour would have been better but when I made the video I hadn't planned on making a tutorial yet.
You can watch the video here:


Save your video as an "AVI" file. This is important otherwise AviDemux can't handle your video properly.

Open 'AviDemux 2.5.6'  Go to 'FILE' and load in the video you want to use.

Go to the 'VIDEO' tab on the left and choose 'MPEG 4 ASP (Xvid)'

Now go to the 'CONFIGURATION' tab and fill in the following settings:

- GENERAL:  here you can set the quality of your video. A lower number means higher quality, however these settings have little to no effect on the DataMoshing effect so you can leave that at the default setting if you wish. Should your finished video have a low quality (some of the presets I offer have a high Quantise number) then you should set Quantisation to 1 and try again.




- MOTION: Turn the 'Rate Distortion Optimisation' off (uncheck the box).
Motion Estimation can stay on 'High'.
Uncheck the box for 'Chroma Motion Estimation' and turn on 'Quarter Pixel Motion Estimation'.



- FRAME:  Turn on (check box) 'Four Motion Vectors per Macroblock.'
Set the 'Maximum I-Frame Interval' to a number of frames that exceeds the number of frames in your video. 90000 will usually be enough.
Set the 'Maximum Consecutive B-Frames' to 0 (zero).



- QUANTISER:  Turn 'Trellis Quantisation' off (uncheck the box).
Set the 'Quantisation Matrix' to 'MPEG Matrix'.



Now save your video. Go to 'FILE' -> 'SAVE' and save it with '.avi' behind the name!! (Important)

Now load the file you just saved back into AviDemux. Now we're going to cut out the I-Frames.

1. Use the blue button with the 2 arrows in it, pointing to the right, to move to the next I-frame in your video.
2. To select this I-frame press 'A'. (see picture below)
3. Now go forward one frame by pressing the blue button with the single arrow pointing to the right.
4. Now press 'B'.  Now this I-frame is selected.
5. Press Delete on your keyboard to cut the I-frame out.

Repeat this process until the blue button with the double arrows to the right doesn't take you to any other frame but the first one of the video (in other words, until pressing that button has no more effect). This means there are no I-frames left to jump to.

(Sometimes it can occur that there is no I-frame at the beginning of your next cut in the video but if you save it, the Datamosh effect doesn't occur. In this case you need to manually go to the first frame of the next clip, by pressing the blue button with the single arrow to the right repeatedly until you come to the first frame of the next clip and then select the first frame using the 'A' 'B' method described above and delete it. Even-though this wasn't an I-frame it still can cause the Datamosh effect to not work so every first frame of a new scene needs to be cut out using the method above. )

Here's a picture of the procedure:



Now to save our video:
Under 'VIDEO' choose 'copy'. Go to 'FILE' -> 'SAVE'. Fill in a name and make sure you put '.avi' at the end of it. If it asks you to use Smart Copy, select NO.
And that's it. Play the video back in any video player and the Data Moshing effect should be there, even if you import it into your preferred editing software.

The UI look as you save your video:


SMEARING EFFECT.

An other technique used a lot with the DataMoshing effect is the so called 'Smearing' effect. This is where the picture stands still and the pixels get smeared out. You can see that in the music-video, Evident Utensil by Chairlift. Right at the beginning of that video, in the opening shot, you can see the effect I mean.
This is simply done by copying and pasting a bunch of the same frames after eachother.
First you load in the video you made in the first part of the tutorial, the one with only one I frame at the start of each cut in the video. Then, when you are cutting out the I-frames and you come to the part where you want the smearing effect to take place, you select that frame using the A-B method described above. Now you hit CTRL+C to copy the frame and then you simply hit CTRL+V a number of times to paste the frame in. Paste in at least 24 copies of the frame for one second of smearing effect (depending on the frame-rate of your video of course). When you are done pasting them in continue cutting out the I-frames.
Now simply save the video as mentioned above.
That's all there is to it. The smearing effect will go in the direction of the general movement in that clip. So if for instance the video shows a head that moves upward and in the middle of that movement you pasted in the duplicate frames, then the pixels will smear out the image in an upward movement.
It looks really cool, have fun experimenting with this.

EXTRA TIPS!

Tip 1:
Something that works very well with the Datamoshing effect is having a picture be torn apart by an ink-flow video. Make a little AVI video (with the method described above) which starts with a still picture and is followed by a video of an inkflow (or a shock-wave), like those you get in the RiotGear FX or Action Essentials by VideoCoPilot. Make sure the inkflow is already in full view at the start and not completely black at frame 1.
Watch this little experimental video to see the effect.



Tip 2:
If you want a really glitchy and heavy Datamoshing effect then try also deleting the very first frame of the video. In the tutorial above we leave the first frame intact. If you don't do this then your video will be seen by some players as 'broken' and they won't play it back. Your video will also have no thumbnail with some players (VLC for instance) BUT VLC player will play it back without problems and the datamoshing effect is really heavy if you delete the very first frame too. Try it out and see what happens.

SIDE-NOTE FOR PREMIERE PRO CC (and up).

When preparing a video for the Datamosh treatment in Premiere Pro I have encountered problems when exporting the video (from CC2015) as an AVI file. I couldn't get the 'square pixel' format with the AVI codec. To counteract that I save it as an MP4 file and then open it in After Effects and there I render it out in the AVI format. In the render queue I choose AVI and in Format Options I choose the TechSmith Screen Capture Codec. This codec won't be available to you unless you have Camtasia Screencapture software installed on your computer. However, you can download it for free from their website. Here is the link for the download of just the codec alone: https://www.techsmith.com/codecs.html
(All you need to do is only install the codec, not the rest of the software. Premiere will automatically see it and add it to the AVI codecs.)
In the Codec Settings I set the Compression Control all the way left to Faster Compression to get as small a filesize as possible. AviDemux can crash if you use videos with a very high bitrate.
Now if you don't have this TechSmith codec or don't want to install it from the link above, I suggest you experiment with the different options to find one that allows you to render with high compression and low filesizes, or use a different video editor for the purpose of Datamoshing. If you found a good solution for this problem I'd be interested to hear it from you. Please comment below and tell me how you solved this problem so I can share it in this tutorial.


Okay, this concludes this DataMosh tutorial. If you have any comments or discovered an error in the above text or if you have any questions, feel free to comment either here or on the YouTube video posted in this tutorial.

I have a few AviDemux PRESETS for you to download (for free)  which you can install into your AviDemux software and that will give you the best settings for a few different scenarios. Like best pixel carry-over for slow videos of for fast video movement etc.
You can download those here:
http://www.mediafire.com/download/p4t1h40czeptp04/DataMosh+Presets+Avidemux+2.5.6.zip

You'll need to place these presets in a folder that is normally invisible in Windows:
C: > (your username) > AppData > Roaming > avidemux > xvid
Place the presets in the 'xvid' folder and they should be available under the 'CONFIGURE' tab. Press the 'Configure: Default' option and they'll pop up.  If there is no 'xvid' folder at the above mentioned address then make one and put the presets inside it. That folder is only generated when people make their own presets so if you haven't done that before there won't be an 'xvid' folder.

There is now a Datamosh Plugin available for Adobe After Effects. It costs $39,99 and is available here:  https://aescripts.com/datamosh/

The Datamoshing article on the Toolfarm website is no longer available and it now has a tutorial on it for the Datamoshing plugin for After Effects. Check it out here: http://www.toolfarm.com/blog/entry/datamosh

I found this video tutorial on Datamoshing by NebulousNova on YouTube which was inspired by my DataMoshing article.

OKAY, THAT'S IT!!  ENJOY!! And please, if you want, share the videos you made with this tutorial with me. I would love to see them! Just leave a link in the comments below. Thank you!! ^____^

Some inspiration, LOL  :)

Click here for Datamoshing music video.


25 comments:

  1. thannk you so much man, great tutorial !

    ReplyDelete
  2. A big thanks from me too! Kudos :D

    ReplyDelete
  3. anyway you could make the presets available for OSX?

    ReplyDelete
    Replies
    1. I'm very sorry Erwyn but I can't because I don't have an Apple computer.
      But I can do the next best thing and give you the settings for each of the 5 presets.

      Preset 1: Best Carry-over:
      General -> Quantiser=20 Multithreading: Disable
      Motion -> Motion Estimation=High Chroma Motion Estimation=on The rest is unchecked.
      Frame -> Max I-Frame interval=99999999 Max consecutive B-frames=0
      Quantiser -> Trellis Quantisation is turned off. Quantisation matrix is MPEG

      Preset 2: Carry-over with movement:
      General -> Quantiser=20 Multithreading: Disable
      Motion -> Motion Estimation=High Chroma Motion Estimation=on Quarter Pixel Motion Estimation=on, The rest is unchecked.
      Frame -> Four motion vectors per macroblock=on, Max I-Frame interval=99999999 Max consecutive B-frames=0
      Quantiser -> Trellis Quantisation is turned off. Quantisation matrix is MPEG

      Preset 3: Best with movement:
      General -> Quantiser=27 Multithreading: Disable
      Motion -> Motion Estimation=High Chroma Motion Estimation=off, Quarter Pixel Motion Estimation=on, The rest is unchecked.
      Frame -> Four motion vectors per macroblock=on, Max I-Frame interval=99999999 Max consecutive B-frames=0
      Quantiser -> Trellis Quantisation is turned off. Quantisation matrix is MPEG

      Preset 4: Highest Image Quality:
      General -> Quantiser=1 Multithreading: Disable
      Motion -> Motion Estimation=High Chroma Motion Estimation=on Quarter Pixel Motion Estimation=on, The rest is unchecked.
      Frame -> Four motion vectors per macroblock=on, Max I-Frame interval=99999999 Max consecutive B-frames=0
      Quantiser -> Trellis Quantisation is turned off. Quantisation matrix is MPEG

      Preset 5: Most Glitchy and Colorful:
      General -> Quantiser=22 Multithreading: Disable
      Motion -> Motion Estimation=High Chroma Motion Estimation=on Quarter Pixel Motion Estimation=on, The rest is unchecked.
      Frame -> Four motion vectors per macroblock=on, Max I-Frame interval=99999999 Max consecutive B-frames=0
      Quantiser -> Trellis Quantisation is turned off. Quantisation matrix is MPEG

      Hope this helps you out.

      Delete
    2. OMG Thank You very much!! ^_^ :P

      Delete
  4. This music video attracted me to seek out the effect which eventually lead up to discovering your site. You think I could accomplish a video like this using these presets?

    https://www.youtube.com/watch?v=tt7gP_IW-1w

    ReplyDelete
    Replies
    1. That's a great video! Yes, you should be able to get the same effects with these settings.
      They probably used the same technique for that video as I use in this tutorial so it shouldn't be a problem.
      If you run into problems, let me know. If I can help you out, I will.

      Delete
  5. Gracias!! Thanks!! This is perfect for a video that I have to prepare for university. To generate some interesting transitions edition

    ReplyDelete
    Replies
    1. You're welcome Martin. I hope your project works out and if you can, send me a link to the finished video. I'd love to see it :)
      Greetings, Eddy

      Delete
  6. hi
    first of all thank you for this tutorial and for giving this info for the people
    I have a doubt and I hope you can answer me
    do I need the first AVI file to be with some specific settings?
    because I'm working on mac os and I export from premiere to mov and them I convert it to AVI
    thank you so much for your time
    and congrats again on this tutorial

    ReplyDelete
    Replies
    1. Well, if it works then it's okay, of course. I don't have experience doing this on a Mac machine I must admit but I say in the tutorial to export your video to AVI because I know that that will work best with AviDemux. But if AviDemux works well with MOV files then of course you can use that. I must say that I never even tried that.
      The first AVI file, the one you render from Premiere Pro, doesn't have to have specific settings. That is all done like I show in the tutorial, in the first time you import the video into AviDemux. THAT video is then ready in such a way that it only has I-frames at the start of every new scene in the video. Then, in the second part these I-frames are removed. You see I am not sure that AviDemux can produce a video that is ready for I-frame removal from a MOV file. But if it works for you then I am obviously wrong. Like I said, I have never tried that myself. I hope this answered your question and thank you for commenting. I'm glad you enjoyed the tutorial :)

      Delete
  7. After I'm done changing the settings as indicated and resave it, when I reopen the file I cannot navigate I-Frames. There are no other ones than the inital one, and the rest are p's and b's. What have I done wrong?

    ReplyDelete
    Replies
    1. Ah yes, you haven't done anything wrong but that sometimes happens with some files. I don't know the reason why it happens. But in this case you need to navigate manually to the next scene in your video and cut out the first frame. Do that to all the scene changes in your video. Eventhough they are not I-frames, the first frame of every new cut in the video still needs to be cut out for the Datamoshing effect to occur. Or simply try an other video. Does this happen with every video that you try or only with the current one?
      Hope this info helped you out and if you have anymore questions, don't hesitate to ask.

      Delete
    2. So far it has been every single one, but I eventually came to that conclusion myself. I spent 5 hours yesterday trying to figure it out and eventually had a eureka moment, now I'm going to wow my friends. Thanks for the tutorial!

      Delete
    3. Ah excellent! I'm glad it worked out for you. Your friends will be amazed :) It's a cool effect isn't it. ^_____^

      Delete
    4. I have the same problem, it just detects the first I-Frame but i can't move to the next one. What can I do?

      Delete
    5. Like I mentioned in the other comment, you'll have to manually move to the first frame of every scene-change, and cut out that first frame. Eventhough they're not I-frames they still need to be removed to make the Datamoshing effect work. If that doesn't work the only other thing to do is to re-render your original AVI video with an other codec in the hope you'll get I-frames at the beginning of scene changes.

      Delete
    6. thanks a lot! i will try

      Delete
    7. Okay, I hope this works for you.

      Delete
  8. I just want to say you are truly wonderful person, I don't know you but I can tell you are truly decent and awesome guy with good hart. Thank you for this wonderful tutorial and sharing your knowlage with us. Thank you!

    ReplyDelete
  9. Thanks! my only problem is the final footage stutters and shakes. I know whats causing this (saving on xvid video profile instead of copy) but i dont know how to avoid it. its because we have to save it and then load it again and if we dont save it as xvid when we first start it doesnt datamosh. do you have any idea on how to fix this?

    ReplyDelete
    Replies
    1. Sorry this reply comes half a year too late. I wouldn't know how to solve that particular problem. I haven't come across it myself.

      Delete

Note: comments are moderated and do not appear straightaway. Your first comment is not allowed to contain any links.