Aug 04, 2019 VirtualDub Deshaker filter is last time updated back in 2014, which is a very long time measured in software years. Still, it has some kick left, and on occasion (more than once), it wiped the floor with both DaVinci Resolve 15 (version 16 was still in beta when this article was originally published) and Adobe Premiere CC 2019. See full list on blog.sergem.net.
The Deshaker filter was designed to be a video stabilizer for VirtualDub. It eliminates camera shakiness and makes panning, rotation and zooming smoother. Usage: Place Deshaker.vdf under the VirtualDub plugins directory and (re)start VirtualDub. Features: Stabilizes horizontal/vertical panning.
Action video is often lacking clear persistent references to stabilize video with – they either are not present in the frame for very long, or often compressed out of frame as the codec is trying to spend most of its bandwidth on moving objects in the shot.
Deshaker, a plugin for Windows program VirtualDub, with its capability to find and track multiple visual references (literally hundreds of them) automatically from frame to frame is the king of action video stabilization. (It works on Linux, too, see below).
Deshaker works in 2 passes – analysis and stabilization. During pass 1, a log file is created that contains correction numbers necessary for each frame.
This file could be used in Blender as a source for transform track. Here is how:
Creating Deshaker Log
- Export video from Blender, audio is not necessary. It’s OK to use 50% render resolution (IMPORTANT: make sure to use the same resolution during Deshaker log import).
- Run VirtualDub.exe with Deshaker plugin installed in VirtualDub’s “plugins” folder
- Enable Deshaker with Video > Filters > Add > Deshaker
- Set or note location for log file, click OK – OK
- Open Blender video made in step 1
- I like to right-click and reduce input (left) video window to 25% at this point
- Make sure Video > Full Processing Mode is set
- Run analysis by invoking File > Save as AVI and setting some dummy file name. This file is discardable.
- Use Deshaker.log file for next step:
Using Deshaker Log in Blender
- Install one of 2 plugins from https://github.com/sergem155/blender-deshaker-log-import . There are 2 versions, using different stabilization algorithms (more below, but “damper” version is working well, “sinc” version is experimental).
- Import the plugin into Blender: File > User Preferences > Add-ons > Install from File
- Right-click the video (movie) track to stabilize. (It might make sense to make a metastrip out of the composition first.)
- IMPORTANT: make sure to use the same render resolution % used to render file for Deshaker analysis, as the log numbers are divided by that %!
- Import Deshaker log: File > Import > Import Deshaker log
- To speed things up a little, in Graph Editor, set interpolation type: Key > Interpolation Type > Linear
- Now you can scrub through video and see the Deshaker tracking data applied
Example output
Simple damper algorithm – the distance from center is reduced by 10% in each frame:
Music is Skeewiff – Blue Crystal (feat Rayna)
The black bars are kind of large, I’ve done a couple of attempts to reduce them, using a digital filter to remove low frequency motion from stabilization movement and remove “DC bias” building up. I still like simple damper better, but maybe I wasn’t playing with settings long enough, or windowed sinc’s ripples were acting up, and another algo would have been better.
Windowed sinc filter (17 points) – remove all motion < 1Hz, but with less steep roll-off:
Raw video without stabilization, for comparison:
Other Cool Features of Deshaker
I implemented just motion. Free camera train sim world. Deshaker can also do adaptive zoom, rolling shutter rubber panning effect correction and can paint black bars with contents of previous frames, to name a few. If you’d like to code that, be my guest, the code is open.
What About Manual Correction?
It would have been awesome to put a second transform track and correct the movement a bit, but sadly, Blender’s transforms are fully applied and cropped between strips, so you get a crop upon crop:
I also tried to put the sequence as a source strip in another scene’s sequence, with a smaller viewport. While this is possible, the strip is scaled to the second composition’s size, even with image offset option turned on, so it is, unfortunately, useless too:
Running VirtualDub on Linux
It works very nice:
- Install Wine Windows Emulator
- Install MP4 Windows codec https://sourceforge.net/projects/x264vfw/files/latest/download
- Enable vcrun2005 in winetricks (Wine utility)
- Download and unpack VirtualDub
- Download Deshaker and put Deshaker.vdf into virtualdub’s plugin folder
- Run virtualdub.exe
Update
There was a bug (sorry) in the code that was shifting all transforms 2 frames back, that is now fixed in github. (And once again, make sure to import the log with the same render resolution % you used to export it).
Skip to end of metadataGo to start of metadataFAQ
Where to get VirtualDUB & Deshaker:
-https://www.guthspot.se/video/deshaker.htm
- http://www.virtualdub.org/
It doesn't work at all.
- Please start by carefully following the guide above. Also, make sure you're not using the 64-bit version of VirtualDub. If it still won't work, feel free to email me. Try to explain what you do, and what happens, as precisely as possible.
The output video has tiny dots and lines all over it.
- You need to run pass 2 too. And use the original video (not any video from pass 1) for pass 2. Please follow The Short Guide above carefully.
There are black borders in the stabilized video.
- You can fix that with either one (or more) of the settings: Edge compensation, Previous and future frames to fill in borders and Extrapolate colors into border.
The stabilized video is shaky.
- For best results, always try to make sure the white vectors end up on the background in the frames during pass 1, i.e. try to make Deshaker completely ignore objects moving in front of the background. If the white vectors jump around between different objects from frame to frame, you need to do something to get a good result. Either use the Ignore area settings or something else. There are many things you can do. Experiment with the settings!
- If the background consists of several layers at different distances, or if there is basically no visible background at all, it's often best to stabilize on pretty much everything except the fastest moving objects. To do that, increase the value of Discard motion of blocks that move more than X pixels in wrong direction.
As a last resort, you can make Deshaker skip the problematic frames by either increasing the threshold for skipping frames, or by deleting the corresponding lines from the log file.
I get zero-length motion vectors (appearing as dots) in clear areas, such as in the sky, or on a wall.
- Try increasing the value for Discard motion of blocks that have maximum pixel value difference less than X. Cara download file torrent di hp.
The stabilized video has a severe 'jello' effect. Also, far from all vectors are white even on a solid background during pass 1, when the video shakes a bit.
- Make sure you have enabled the rolling shutter setting if your camera has a rolling shutter. (Most cameras today have a rolling shutter.)
I have enabled the rolling shutter setting but Deshaker still won't remove the rolling shutter distortions.
- Deshaker can only remove rolling shutter distortions linearly. If you have one of those compact CMOS cameras with bad (or no) internal stabilization, and the clip has very fast shakes (for example if the camera is mounted on a bike or similar), you probably won't be able to get a very good result from Deshaker, since the distortions will be far from linear in this case. Get a CCD camera capable of high shutter speeds for these kind of videos.
I get a slight waving effect when objects move slightly, even when the camera is completely still.
- Try decreasing the value for Discard motion of blocks that move more than X pixels in wrong direction.
I get a slight waving effect and distorted geometry when the camera shakes a lot.
- If you're filming with a rather wide angle, this effect is probably due to some geometrical properties of perspective, that Deshaker unfortunately doesn't deal with. The only things you can do to make it better is to shake less during filming, and/or add some zoom, either during filming or in Deshaker.
I get some blurring/shimmering in frames where the camera shakes the most.
- What you see is probably motion blur, i.e. motion occuring within a frame. This is present in the source video too, but it doesn't become distracting until Deshaker has removed the motion between the frames. To get rid of this effect you need to use a faster shutter speed while filming. How fast it needs to be depends on the camera and the amount of shake. For a camera with built-in stabilizer, I'd recommend at least 1/200 sec, or so. (Faster if it doesn't have built-in stabilizer.)
I get sudden jumps in zoom, or other jumps.
- Make sure Deshaker didn't incorrectly detect new scenes during pass 1.
I get unwanted zooming in the stabilized video.
- Deshaker can add two types of zoom. One is for stabilizing zooming that it detects in the video. If this detected zooming isn't really camera zoom (for example, Deshaker usually detects zoom if the camera moves forward), or if you just don't want the camera zoom stabilized, you can turn it off by setting the zoom motion smoothness to 0. It's always a good idea to do this if there's no real zooming in the video.
- The other kind of zoom that Deshaker can add is adaptive zoom. Coreldraw 2019 crack reddit. If you don't like it, choose another Edge compensation option.
The output video says 'This frame was not processed in pass 1', even though I did run pass 1.
- Unless the Append to file option is enabled, the log file will be emptied as soon as you start processing in pass 1, even if you just happened to process one frame. Make sure this is not the case. Also, make sure you have write access to the log file location. In either case, try opening the log file from pass 1 in notepad and maybe you can figure out what happened.
Deshaker Plugin
I want to be able to save my Deshaker settings.- Save processing settings in VirtualDub will save everything, including Deshaker settings. There is no way to save only the Deshaker settings.
Can I try different pass 2 settings without running pass 1 again?
- Yes.
Deshaker Stabilization
Deshaker says 'Deshaking..' for a very long time.
- Certain settings will make the deshaking procedure a lot more time consuming. Especially low values for Max. correction limits and using Adaptive zoom full.