Thursday, 11 September 2014

Deshoogling Shoogled Video

I have previously posted some advice about how to use VirtualDub and deshaker to get rid of the shaky video that is a feature of the Sanyo HD2000 that I use. In the intervening years, lots of other cheap HD cameras have hit the market that are even shakier. I am thinking of the GO Pros and the iPhones.

SO it is time to revisit my post - which could not get audio working.

Here is my fresh solution.

We open the file through a ffmpeg virtualdub input plugin, apply the deshaker filter once, then frameserve the second pass through avisynth proxy, to avidemux to apply final filters and compression settings.

So lets get started. To actually open the file we need VirtualDub. You don't want the portable version, so get the full fat version here:

I have been using version 1.10.4, so anything later than that should be fine.

You simply unzip the file to wherever you want, and then go into the folder. You will find a file in there called "auxsetup.exe". Run that. You want to choose the option to "Install Handler". This is going to let you frameserve out of VirtualDub. This is why you can't use the portable version, because it needs to make system changes.

Next you need to be able to open the file. I am dealing with mp4 files containing x264 and AAC streams. If ffmpeg can't decode your file, it's officially weird. There is a very useful plugin for virtualdub which lets you open any file that ffmpeg can access. You can download it here:

Again, you just need to unzip the that results. You end up with two folders and a readme. Copy the contents of the plugins32 folder into the plugins32 folder in your virtualdub installation folder. You need to include the "ffdlls" sub-folder.

So far, so good. You can now test your system by running virtualdub, and trying to open your mp4 file. Hopefully that should work. You can further test the system by choosing the file menu, and "Start Frame server...". In the dialogue box that follows, just choose "Start". You will not be running multiple frameservers, but if you are here is where you would give them individual names. In the next window, you need to name your placeholder file. This is the signpost that avisynth is going to open to access the frameserved data. I name my file "frameserver.vdr" and stick it in a temp folder. It's tiny. Once you save this, virtualdub shrinks down to a frameserver info window, with the only option to "Stop Frameserving".

Next, open a new instance of virtualdub, and try to open the frameserver.vdr file. This should work, and should give you access to the data. You should be able to see the counters change on the info window as you browse through the file.

You might be able to open this .vdr file directly in avidemux, or any other encoder of your choice. If so, best of luck you you. I couldn't. Even when I renamed it to "frameserver.avs", which is the avisynth file type.

Tune in next time for more hilarious adventure of how to deshoogle!