Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st March 2025, 19:59   #1  |  Link
TruthOverFacts
Fact Checker
 
Join Date: Jan 2022
Posts: 28
Stabilizing Color Footage

I'm working on some color projects from material transferred from film and need to stabilize the footage. I've only ever used Stab() which I understand can only be applied to black-and-white footage, so I'm looking for the best approach for color material.

Any tips or example scripts would be much appreciated! Thanks
TruthOverFacts is offline   Reply With Quote
Old 21st March 2025, 20:42   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by TruthOverFacts View Post
I've only ever used Stab() which I understand can only be applied to black-and-white footage
Stab is not limited to black and white
poisondeathray is offline   Reply With Quote
Old 21st March 2025, 21:43   #3  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,741
You can look at the long threads about film restoration started by VideoFred. You will find scripts there fore doing all sorts of film restoration, including stabilizing camera shake and gate weave. His scripts use Depan. It's an old technology, but works really well.

I had to adjust this to make it standalone and hopefully I didn't break anything. Here is code to show how it's done:

Code:
source=Avisource(film)
stab_reference=source.tweak(cont=0.6).MT_binarize(threshold=80).greyscale().invert()
mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=10,dymax=10)
stab=DePanStabilize(source,data=mdata,cutoff=0.5,dxmax=10,dymax=10,method=1,mirror=15)
johnmeyer is offline   Reply With Quote
Old 22nd March 2025, 15:55   #4  |  Link
TruthOverFacts
Fact Checker
 
Join Date: Jan 2022
Posts: 28
Quote:
Originally Posted by poisondeathray View Post
Stab is not limited to black and white
Oh I assumed it couldn't. I saw this on the wiki:

"This filter may not be suitable for color footage; apply with caution."

That scared me away from it.
TruthOverFacts is offline   Reply With Quote
Old 22nd March 2025, 15:56   #5  |  Link
TruthOverFacts
Fact Checker
 
Join Date: Jan 2022
Posts: 28
Quote:
Originally Posted by johnmeyer View Post
You can look at the long threads about film restoration started by VideoFred. You will find scripts there fore doing all sorts of film restoration, including stabilizing camera shake and gate weave. His scripts use Depan. It's an old technology, but works really well.

I had to adjust this to make it standalone and hopefully I didn't break anything. Here is code to show how it's done:

Code:
source=Avisource(film)
stab_reference=source.tweak(cont=0.6).MT_binarize(threshold=80).greyscale().invert()
mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=10,dymax=10)
stab=DePanStabilize(source,data=mdata,cutoff=0.5,dxmax=10,dymax=10,method=1,mirror=15)
I'm confused. This script has greyscale in it? I'm working with color.
TruthOverFacts is offline   Reply With Quote
Old 22nd March 2025, 16:39   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,741
Quote:
Originally Posted by TruthOverFacts View Post
I'm confused. This script has greyscale in it? I'm working with color.
It's a mask.
johnmeyer is offline   Reply With Quote
Old 23rd March 2025, 00:06   #7  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 39
Quote:
Originally Posted by TruthOverFacts View Post
I'm confused. This script has greyscale in it? I'm working with color.
To elaborate on what John said: the grayscale is part a mask used as the Stab Reference, which in turn results in better stabilization
VideoMilk78 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.