Log in

View Full Version : Film stabilisation filters


alexh110
16th May 2009, 12:14
Could some kind person direct me to a good plugin for film stabilisation (i.e. to remove film bounce and weave)?
Preferably with an example of how to use it within an avs script.

My source footage is in the form of an HD monochrome raw video file with FOURCC=Y8 (filename totp_ch08.y).
So I'm using the following script to import it into Virtual Dub:

loadplugin("rawsource.dll")
RawSource("H:\totp_ch08.y", 1920, 1080, "Y8")

Adub
16th May 2009, 19:30
DePan + DePanEstimate or Deshaker

http://avisynth.org.ru/depan/depan.html

http://forum.doom9.org/showthread.php?t=49597

18fps
17th May 2009, 11:44
In my limited experience these work best if you cut scene by scene. Also, by using Depan and Depanestimate (which I prefer, because I haven't found how to avoid the strange rotations Deshaker introduces each time a character in CU shakes his head) you should crop the reference clip to the zone more free of characters movement.

alexh110
17th May 2009, 12:26
Thanks.

I tried this script:


loadplugin("rawsource.dll")
RawSource("G:\totp_ch03.y", 1920, 1080, "Y8")

LoadPlugin("depanestimate.dll")
LoadPlugin("depan.dll")
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata)


However it didn't work that well due to the problem you mentioned with character's movement.

Suppose I wanted to use the upper left quadrant of the frame as a reference, how would I alter the script to accomplish this?

scharfis_brain
17th May 2009, 12:29
you should try deshaker as it is much more proof against motion that is different from the global motion of the whole frame than depan is.

depan seems only to use the average of all vectors to make a single shift vector for each frame out of them.
Deshaker discards vectors that differ by a certain amount from the global motion. Plus it also is able to remember discarded areas so it isn't
affected by a person or car moving through the image covering nearly the whole background.

Undead Sega
17th May 2009, 13:57
Plus it also is able to remember discarded areas so it isn't
affected by a person or car moving through the image covering nearly the whole background.

this is actually one of my problems in soem segments of my video footage, where its just a person that wuld be in motion, as well as the camera but deshaker picks up ther person's motions and uses that to stabilize, which doesnt really at the end.

either way, ive used Deshaker, and it has worked wonders for me :D

2Bdecided
18th May 2009, 17:53
For Camcorder footage I find deshaker better (though slower!), but the parameters in videoFred's script for depan seem to work well most of the time...
http://forum.doom9.org/showthread.php?t=144271

For the specific case of film gate weave, someone helpfully pointed me to stab()...
http://avisynth.org/mediawiki/External_filters#Stabilization
...which is a script that calls depan with specific parameters. Try it.

Cheers,
David.

smok3
18th May 2009, 18:21
something usefull for mac-s?

alexh110
19th May 2009, 14:50
Thanks David.

I tried stab() and it works better than any of the others.

hanfrunz
22nd May 2009, 15:15
something usefull for mac-s?

"shake" ;) but's not free...

smok3
24th May 2009, 20:43
unfortunatelly 'send to shake' was ghosted on this system, i did it with AE at the end. Can motion do such stuff?