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 10th June 2025, 02:27   #1  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 76
Fix for color flickering?

I've been stuck on trying to fix this flickering for a while, in a previous thread from days ago I was given small_deflicker which does not help with this color flickering unfortunately.

sample
https://112.gigafile.nu/0615-cfa53c9...3defceeacae0be
VideoMilk78 is offline   Reply With Quote
Old 11th June 2025, 17:08   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Seems like only the U channel is flickering. Some motion and scene change aware averaging might work,.... (maybe some function ment for luma flickering could work by only applying it on the U channel)
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 11th June 2025, 17:54   #3  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 76
Quote:
Originally Posted by Selur View Post
Seems like only the U channel is flickering. Some motion and scene change aware averaging might work,.... (maybe some function ment for luma flickering could work by only applying it on the U channel)
Any idea how I might go about making something for this?

I tried separating the planes and deflickering the u and merging but this didn't work
VideoMilk78 is offline   Reply With Quote
Old 11th June 2025, 18:39   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Sadly no.
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 11th June 2025, 18:47   #5  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 76
I separated R,G, and B and it seems the culprit is the blu channel

https://7.gigafile.nu/0617-mc30cad10...b401a097e4b2cb
stacked in order of rgb
VideoMilk78 is offline   Reply With Quote
Old 11th June 2025, 19:14   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Ah, good catch. It's not the U, but the B channel. So someone messed up while working in RGB on the input.
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 11th June 2025, 21:46   #7  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,682
If you convert to RGB, all the channels exhibit some flickering, but B has the most. But if you leave it as YUV, Y has no flickering. So I don't think it was an RGB processing thing. It's just U is flickering a lot and V is only flickering a little.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 11th June 2025 at 22:05.
wonkey_monkey is offline   Reply With Quote
Old 12th June 2025, 13:37   #8  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Even when staying in YUV, the main problem is: How to fix the flickering. Maybe there is a pattern?
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 12th June 2025, 16:16   #9  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 76
I'm gonna try matching the color of the blue channel to a green channel using Dr Dre's color matching (already tried gammatch with no luck) and merge like normal
Code:
source
r=extractr(source)
g=extractg(source)
b=g.cube(lut)
merge(rgb)
VideoMilk78 is offline   Reply With Quote
Old 12th June 2025, 20:12   #10  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 5,020
You could try just deflickering the U channel, although after playing around a little I didn't find a way to do it perfectly. It's easy enough to remove the flicker, but doing it without messing with the color at all is a different story. Maybe it'd work better doing the same thing after converting to RGB.

Z = last
Y = ExtractY()
U = ExtractU().Deflicker(percent=100, lag=150, scene=40)
V = ExtractV()
CombinePlanes(Y,U,V, planes="YUV", sample_clip=Z)

This defickers it completely, but as it sets the U plane to a constant value it does change the color.

Z = last
G = Z.Greyscale()
Y = Z.ExtractY()
U = G.ExtractU()
V = Z.ExtractV()
CombinePlanes(Y,U,V, planes="YUV", sample_clip=Z)
hello_hello is offline   Reply With Quote
Old 13th June 2025, 16:59   #11  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Nice!

Code:
Z = last
Y = ExtractY()
U = ExtractU().Deflicker(percent=100, lag=150, scene=40)
V = ExtractV()
CombinePlanes(Y,U,V, planes="YUV", sample_clip=Z)
hmm, trying to do this in Vapoursynth with the Avisynth Plugin
Code:
# requires colorformat YUV444P8
core.avs.LoadPlugin("F:/Hybrid/64bit/Avisynth/avisynthPlugins/Deflicker.dll")
Y, U, V = core.std.SplitPlanes(clip)
U = core.resize.Bicubic(clip=U, format=vs.YUV444P8)
U = core.avs.Deflicker(U, percent=100, lag=150, scene=40)
clip = core.std.ShufflePlanes(clips=[Y, U, V], planes=[0, 0, 0], colorfamily=vs.YUV)
(I first tried without the 'U = core.resize.Bicubic(clip=U, format=vs.YUV444P8)' but that crashed, Vapoursynth without an showing an error.)
The output is different and still flickering a lot, doesn't seem useful to me. :/

Code:
Z = last
G = Z.Greyscale()
Y = Z.ExtractY()
U = G.ExtractU()
V = Z.ExtractV()
CombinePlanes(Y,U,V, planes="YUV", sample_clip=Z)
Okay, that replaces the U channel with the gray scale version. I like the idea.

That should be:
Code:
# requires colorformat YUV444P8
Y, U, V = core.std.SplitPlanes(clip)
U = core.resize.Bicubic(clip=clip, format=vs.GRAY8)
clip = core.std.ShufflePlanes(clips=[Y, U, V], planes=[0, 0, 0], colorfamily=vs.YUV)
in Vapoursynth.

That looks like the more watchable solution to me.


Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 13th June 2025, 18:28   #12  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,641
try
SMDegrain(tr=5, thSAD=3000, plane=3, chroma=false, prefilter=2)

or maybe more advanced

SMDegrain(tr=5, thSAD=3000, plane=1, chroma=false, prefilter=2, Globals=2)
SMDegrain(tr=5, thSAD=1000, plane=2, chroma=false, prefilter=2, Globals=1)
__________________
See My Avisynth Stuff

Last edited by real.finder; 13th June 2025 at 18:48.
real.finder is offline   Reply With Quote
Old 13th June 2025, 19:42   #13  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Uhh, that works nicely. Good catch. (Never thought about SMDegrain for something like that.)
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 13th June 2025, 20:29   #14  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,641
Quote:
Originally Posted by Selur View Post
Uhh, that works nicely. Good catch. (Never thought about SMDegrain for something like that.)
seems you forget/didnt note this https://forum.doom9.org/showthread.p...04#post1788404

anyway, it's the mvtools power, which is used even in qtgmc (We can say that it is the backbone of many things)

as aside note, I am thinking about try/using DTL version of mvtools (dont know why it not merged with pinterf version of mvtools yet)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th June 2025, 21:46   #15  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,698
Quote:
as aside note, I am thinking about try/using DTL version of mvtools (dont know why it not merged with pinterf version of mvtools yet)
Hoping that one day, there will be a Vapoursynth&Avisynth version which incorporates:
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 13th June 2025, 22:17   #16  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 76
I ended up making a LUT that applied blue levels to the green channel use Dr Dre's color correction tool and merged r,g,g
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 00:57.


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