View Full Version : Stabilization using existing stabilization keyframe data?
TomArrow
26th October 2022, 23:07
I made an importer for an image format that already contains stabilization data. Is there some way I could maybe save the stabilization info into props or something like that inside the plugin and then use it with an existing stabilizer plugin? I feel like me attempting to rewrite a repositioning algorithm would be kind of a waste of time as surely someone has done so better already.
Or maybe this can be achieved through the script language itself somehow? Open to any suggestions.
VoodooFX
27th October 2022, 03:24
How do you get keyframes in Avisynth?
poisondeathray
27th October 2022, 03:33
Is it raw position x,y, rotation measurement data ? Or is the stabilization already applied ?
Maybe look at deshaker and the it's log file format for ideas . guth made deshaker open source on github . There is no native avs plugin (yet), but it can work through LoadVirtualDubPlugin . Maybe modify your existing data to fit the deshaker log file format, or modify some part of deshaker to read another format.
Also Depan/Depanstabilize can read a log file in deshaker format
inputlog - name of input log file in Deshaker format (default - none, not read)
johnmeyer
27th October 2022, 03:50
Yes, Deshaker saves a LOG file in pass one and then uses those vectors during pass 2 to actually do the translation. It also lets you specify rotation, in addition to the X-Y offsets.
So, once you convert your vector information to Deshaker's LOG format, you should be able to use Deshaker to actually move each frame.
I wrote a long guide on how to use Deshaker. It has disappeared from all the Internet sites that used to host it, but you can still get it here:
Deshaker Guide (https://docs.google.com/document/d/1hgJGIyxH1Sdbm8Cl19dyD_rUxm09ylnD/edit?usp=sharing&ouid=104316921892803180742&rtpof=true&sd=true)
On the last page I mention using the LOG file as a way to interface to other apps. However, I did not provide any information on the LOG data format. As I remember, however, I think it is "self-evident."
If you want to keep everything in AVISynth, I believe Depan/Depanstabilize also uses the Deshaker LOG format, and I think you can also read that into Depanstabilize.
http://avisynth.org.ru/depan/depan.html
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.