View Full Version : Stabilize clip1 using clip2 as reference
spoRv
5th April 2020, 11:03
Usual potentially good idea, without technical knowledge to put it in practice... :D
Let's say that you have two versions of the same movie;
first, let's call it clip1, has better image but "wobbles" on almost every frame by few pixels - up, down, left, right, without a precise pattern
second, let's call it clip2, has worst image (definition, colors, frame size etc.) but rock solid stable image.
Now, is it possible to stabilize clip1, using clip2 as reference?
At least for steady shots - where no panning, zooming etc. occours; I thought, maybe a script that will "explore" all the borders for few pixels, and if nothing change (or change very slightly) at least in one border, it could be considered a steady shot.
Perfect solution: to get the biggest frame size using several frames of the wobbling shot, instead of cropping them all.
Thanks!
scharfis_brain
5th April 2020, 12:05
I would simply throw deshaker over it by using extremly tight constraints in terms of stabilization settings.
Matching both sources sounds like a huge PITA.
Just post a sample clip...
spoRv
5th April 2020, 12:30
Not matching, the reference clip should be used only to know if a certain shot is steady - hence stabilization filter would be used or not; which is the best filter frankly I don't know...
Or, alternatively, a stabilization filter that have a threshold setting where it works below a certain pixel shift (steady shot) while not over it (panning, zooming etc.)
wonkey_monkey
5th April 2020, 12:32
Is this a job for http://avisynth.nl/index.php/AutoOverlay ?
scharfis_brain
5th April 2020, 12:54
Whoa! I wasn't aware of this Filter!
In the past I constantly broke my mind how to combine the IRE-DVD (4x3 Openmatte) and the Bluray (cropped 16x9) of Koyaanisqatsi.
It seems AutoOverlay perfectly fits the bill...
spoRv
5th April 2020, 13:13
Is this a job for http://avisynth.nl/index.php/AutoOverlay ?
Sadly the wobble is still there even using it... :(
scharfis_brain
5th April 2020, 13:26
I suspect there might be warping of the film-material within the frames.
So let's have a look.
Please post two non-recompressed sample clips.
spoRv
6th April 2020, 23:29
Stab does the job quite well, with no need of reference clip: http://avisynth.nl/index.php/Stab
Now, if only black borders could be filled with previous and/or next frame (when they are from a steady shot) this would be perfect!
johnmeyer
7th April 2020, 04:11
If you need really good stabilization, Mercalli is one of the best on the market. It is not free, but if you really need the best result, it is the tool to use.
StainlessS
7th April 2020, 10:01
Couple of Mercalli alternatives here:- https://alternativeto.net/software/mercalli-prodad/
vReveal(Freemium) and Dynapel SteadyHand(commercial), both now discontinued (no updates).
vReveal on Major Geeks:- https://www.majorgeeks.com/files/details/vreveal.html
No idea if any good.
wonkey_monkey
7th April 2020, 10:19
No stabiliser's ever going to get it exactly right, though. spoRv having a stable source means a more accurate result can be achieved. If the sources are similar enough, maybe even interleaving them and throwing mcompensate at it might do some good, although it probably needs something more bespoke.
spoRv
17th April 2020, 18:50
I think a conditional filter in avisynth would do.
Let's say that image "wobbles" by few pixels up and/or down; the "right" size should be 1920x800, but sometimes the frame is smaller and top and/or bottom there is a border up to Y pixel...
So, there must be a filter that says something like:
if horizontal line 1 is black but line 800 is not, then crop(0,1,0,0).whateverresize(1920,800)
if horizontal line 1 is black and line 800 is too, then crop(0,1,0,-1).whateverresize(1920,800)
if horizontal lines 1&2 are black but line 800 is not, then crop(0,2,0,0).whateverresize(1920,800)
etc. up to lines 1&2&3... up to Y
Anyone would dare to try? ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.