Hotline-Bling

How to datamosh videos with automation

Datamoshing videos can be a time-consuming process, automation can help. For Windows users AutoHotkey is free, open-source macro-creation and automation software that can handle some of the repetitive tasks involved in datamoshing.

The following script for AutoHotkey automates I-frame removal in Avidemux, normally a manual process described in this tutorial. The video above was datamoshed using this automation script.

Load AutoHotkey with the script below and then when it comes time to best watch replica for sale remove I-frames in Avidemux simply focus the slider below the video and press Control+F to trigger the AutoHotkey script. The script will send the appropriate key strokes to remove the next 10 I-frames while you pop out for a break.

; Remove next 10 I-frames
^f::
Loop 10 {
	Send,{Up}
	Sleep, 500
	Send,[
	Sleep, 500
	Send,{Right}
	Sleep, 500
	Send,]
	Sleep, 500
	Send,{Delete}
	Sleep, 1000
}

These types of scripts could also be used to automate key strokes while hex editing images, consider a script which would move a certain number of characters across and then insert a character — that could glitch out an image quite nicely. Similarly one could experiment with automating photo editing processes by scripting with a program like AutoHotkey.

Some of these types of automation could be accomplished through the usage of a programming framework, or scripting language, but automating at the user interface level can remove a lot of overhead and restrictions.

Windows

2 thoughts on “How to datamosh videos with automation”

  1. Nice tutorial!

    The only changes that I made to the script were that I added an “ExitApp” function at the end so the script doesn’t run indefinitely and made the number of frames a variable set by an InputBox.

    ; Remove I-frames
    InputBox, frames , I-frames, Input number of I-frames to be deleted:
    ^f::
    Loop %frames% {
    Send,{Up}
    Sleep, 500
    Send,[
    Sleep, 500
    Send,{Right}
    Sleep, 500
    Send,]
    Sleep, 500
    Send,{Delete}
    Sleep, 1000
    }
    ExitApp

    Still, amazingly helpful page!

Leave a Reply