This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Image Stabilization

Tags: None
(comma "," separated)
diffid
Registered Member
Posts
40
Karma
0

Image Stabilization

Sun May 24, 2009 11:04 pm
Does anyone have a process for image stablization, I guess there's no Frei0r plugin for this. I'm looking at Deshaker for VirtualDub but really how many times does anyone want to render their footage out through one work around or another. Thanks.


anubis4d
Registered Member
Posts
39
Karma
0

Re: Image Stabilization

Fri May 29, 2009 9:49 pm
As I have said many time I´m not a coder but kdenlive could get a cool stabilization system out of the motion analysis cinelerra plugin.

In After Effects you have the TACKING MOTION tool which folows a pattern on an area of the image, the motion stabilization is THE SAME process, but it actually multiplies the resulting tracking motion values by (-1), so if som image moves 55 pixel right and 14 pixels down, the software simply moves the image -55 pixels left and 14 pixels up to get that spot motionless while the est of the frame is moving.



Kdenlive should fork the motion analyzer form cinelerra and make this a feature. For long interviews when your cameraman had no tripod, you could record in HD and stabilyze on SD (you won´t see the black borders because HD image is bigger).

Marcos Caballero
http://anubis4d.com.ar/home/videofx.php

PS: I can´t wait to se a node editor in KDENLIVE!


ddennedy
Registered Member
Posts
1315
Karma
1

Re: Image Stabilization

Sat May 30, 2009 6:20 am
MLT already has a motion estimation plugin, and Kdenlive's Auto Mask filter uses it. The Auto Mask (motion_est -> mask -> obscure filter) is just the only one, usable filter written for it at this time. The motion_est filter simply attaches motion vector data to the frame objects that subsequent effects use. I just need more time to make more effects including image stabilization and general purpose masking for any other image filter. However, this is low priority compared to fixing bugs and more basic, necessary functions like smooth keyframable pan and zoom (Ken Burns for stills). Actually, I will likely attempt the image stabilizer when the improved pan/zoom is ready.


ArtInvent
Registered Member
Posts
85
Karma
0

Re: Image Stabilization

Tue Jun 02, 2009 4:25 am
Would have to agree. The smooth pan and zoom 'Ken Burns' is really essential and can't be faked. A stabilization filter would be nice, but then again there's these newfangled high tech contraptions called tripods and dollies and shoulder mounts.
anubis4d
Registered Member
Posts
39
Karma
0

Re: Image Stabilization

Thu Jun 04, 2009 9:46 pm
I have a Glidecam Smooth Shooter with 4000pro, but still there are some cool effects which can only be reached with digital camera stabilization. I will check out the feature, wasn´t aware of this you are working on.
There are good stuff in kdenlive.

Marquitux
http://www.anubis4d.com.ar


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Thu Aug 06, 2009 10:43 pm
As anyone who knows me will testify, I'm pretty pathetic when it comes to MS-Windows. Still, I note John Meyer's script for the VirtualDub/Deshaker combination works pretty good (under MS-Windows) where in the case of Sony Vegas NLE, a script was created which completely automates the stabilization. Its impressive to watch in action and even a Windows incompetent like myself can get it to work in Vegas:
http://www.lawrence-arnold.com/Vegas/DeshakerScript.htm

Of course the advantage being it will make, in many cases, completely unusable video clip, suddenly usable. It does not work in all cases. Scenes from a fast moving car, or from a train if looking at the same scene WILL work most of the time. But if the scene is constantly changing, then there can be wave type effects or jumps, where the scene was changing too much for the stabilization software settings to compensate. I find if one is at maximum zoom on their camcorder, and there is movement because of an inability to stabilize the subject at such a zoom, the Deshaker stabilization works great.

Overall, I find it is indispensable to have a stabilizer in software.

For now I am taking my more interesting (but unfortunately unsteady clips) into a Virtual Box session, stabilizing them in software, and then dragging them back to Linux kdenlive.

It would be nice to see a more friendly packaged application for Linux to take a directory of input videos, launch the stabilization software, and have then all sequentially processed.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Sun Oct 25, 2009 12:40 pm
I disliked having to boot to MS-Windows to stabilize my videos with Sony Vegas and Deshaker, save them, and then copy them back to Linux. And Sony Vegas/Deshaker ran too slow under a WinXP Virtual Box client session for my liking.

So I eventually managed to run Virtual Dub under wine, and I installed the Deshaker plugin. It runs faster than under winXP/Vegas and it works ok for stabilizing (in software) videos prior to dropping them into kdenlive. However I have not been able to get Virtual Dub under wine to accept the raw AVCHD videos from my Canon HF S10 (but the raw videos will be accepted under winXP with Sony Vegas and the VirtualDub/Deshaker combo) so clearly my wine implementation is missing some raw codecs. I suspect Sony Vegas has the needed codecs.

Still this lack of codecs is not completely blocking on stabilizing, but rather its only time consuming, as instead I batch convert my AVCHD raw videos to an intermediary recognized codec format (by VirtalDub under wine) prior to "deshaking"/"stabilizing". This success with VirtualDub/Deshaker/wine combination was on a 64-bit openSUSE-11.1 running KDE-3.5.10.

It does mean there are extra steps though:
* step-1 - change all raw Canon HF S10 videos to intermediary format accepted by VitualDub (under wine) [very easy to do with an ffmpeg script/batch file]
* step-2 - destabilize all videos with Virtual Dub/Deshaker under wine (takes a while to setup a "job" to do this, but once set up VirtualDub can run for hours doing multiple conversions);
* step-3 - take output files from Virtual Dub/Deshaker under wine and drop into KDEnlive for nominal video editing.

I run the KDE4 kdenlive-0.7.6 on KDE3 using the kdenlive packaged by the openSUSE community Packman packagers.


geoffrey
Registered Member
Posts
100
Karma
0

Re: Image Stabilization

Sun Oct 25, 2009 6:39 pm
Any tips for getting deshaker to be recognized as a plugin in virtualdub? I get an error saying it cannot load the module. I tried using winetricks to install some libraries as I read elsewhere:
vcrun2005 MS Visual C++ 2005 libraries (mfc80,msvcp80,msvcr80)
vcrun2005sp1 MS Visual C++ 2005 sp1 libraries
ffdshow ffdshow video codecs

So far it works pretty well, except I cannot use deshaker. .
Thanks, Geoff


geoffrey
Registered Member
Posts
100
Karma
0

Re: Image Stabilization

Sun Oct 25, 2009 7:15 pm
Got deshaker working. Also had to use winetricks to install MFC42.DLL

This look cool, but maybe too much of a pain for me with the multiple steps of conversion and processing. At least its nice to know I can use it if needed.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Mon Oct 26, 2009 7:24 pm
The multiple steps required to destabilize a video with win/VirtualDub/deshaker is a bit of a pain to use. I find I need to load the video, then select the 1st pass with the deshaker plugin and then process that. After that processing is complete then the 2nd pass needs to be selected with the deshaker plugin.

If I have multiple videos to stabilize, I've been using the VirtualDub job control, but even that requires a lot of time to setup. On occasion I spent an hour setting up multiple jobs, and then wine/VirtualDub/deshaker spent 5 hours on my Intel Core i7 920 based PC (w/openSUSE-11.1) processing 50+ video clips, applying a stabilizing effect to them.

Still, the 1 hour of setup for the 50+ clips was very repetitive. There must be an easier way.

I notice there are batch/script plugins for VirtualDub, and in the course of the next few weeks I hope to find one of them that will let me deshake (stabilize) an entire directory of files without having to spend 1 hour in setup (albeit all clips will be processed with the same deshaker settings, which may not be optimized).

... anyway ... I'm looking forward to the day when kdenlive will have its own internal destabilizer.



geoffrey
Registered Member
Posts
100
Karma
0

Re: Image Stabilization

Wed Oct 28, 2009 1:07 am
I ran into a problem and I seem not to be able to run deshaker on wine. I get a black/blank output monitor during the first pass that says: No previous frame to match on.
I guess I'll give up on that for now since it works fine on windows XP.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Wed Nov 04, 2009 10:53 pm
Reads to me like either a codec it does not recognize or possibly a bad setting. You could simply remove virtual dub under wine and re-install it.

However if you boot to windoze regularly then no problem. I rarely boot to WinXP and hence I would find that (having to boot to XP) a major inconvenience. Fortunately virtualdub/deshaker works well under wine for me, and I'm getting more adept at using it all the time, as the days go by.


Jerem
Registered Member
Posts
10
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 10:32 am
Refer to oldcpu comment :
> I notice there are batch/script plugins for VirtualDub, and in the course of the next few weeks I hope to find one of them that will let me deshake (stabilize) an entire directory of files without having to spend 1 hour in setup (albeit all clips will be processed with the same deshaker settings, which may not be optimized).



I have the same need, so I created a shell script that deshake videos by:

-conversion of the original video with ffmpeg into mjpeg avi
-use VirtualDub with wine to deshake
-delete temporary files

I'll post the script tomorrow if you want
MJ Peg
Registered Member
Posts
67
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 1:22 pm
If you don't mind running Windows/Wine for this... I went through all that myself trying to automate VirtualDub and Deshake to do a load of mts files. In the end I came up with the batch files I posted here :
http://forums.virtualdub.org/index.php?act=ST&f=5&t=17772&st=15&hl=

Sometimes it still fails with a clip here and there, but I do those manually :)

AVCHD goes into VirtualDub OK using AviSynth scripts. Hope that helps
Jerem
Registered Member
Posts
10
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 3:24 pm
I will look if I can improve my script with yours.
But what I wanted was a script that can be run from Linux without doing anything else.

Now I can do a right-click a (lots of) file(s) and use the Nautilus scripts on any video to deshake it.

I had some trouble trying some windows script for VirtualDub to Deshacker on Linux. Your script can be run on Linux with Wine ?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]