Log in

View Full Version : Color flickering - Need help.


color
14th September 2016, 18:04
Hello.

I got some old vhs that has color flickering, every second frame has another color to it, so it works with dropping every second frame but it does not run smooth. Is there a way to fix this.

Also I need help with some older vhs that looks like this, I can not find his avisynth-script when searching if anyone know how this was made?

https://www.youtube.com/watch?v=agxQ3zpXOww

StainlessS
14th September 2016, 19:19
Maybe take a look here (CNR2), http://avisynth.nl/index.php/External_filters#Temporal_Denoisers

Also take a peek at all other filters on that wiki page.

EDIT: Dont forget to do page search for 'VHS', (there may be other filters that dont mention VHS).

johnmeyer
14th September 2016, 19:34
You have two separate issues.

The YouTube video is relatively straightforward to fix (at least to the extent shown in that video), and a combination of CNR2 and MDegrain2 should work. I've posted a script many times that handles this. Just search on my name and "CNR2" and "MDegrain2."

I've never seen color that is different on even frames than it is on odd frames. You most definitely need to post a sample of that because it sounds quite unique.

color
14th September 2016, 19:58
StainlessS, Oh thank you. That did the job for the movie. I do have only one problem, but its no big deal, I just tried it on two movies that has that problem with color flickering. In the begining there is a title that flashes green and blue, but rest looks good. Don't know how to fix that.

I did edit so it worked good for me:

DirectShowSource("my movie")
Cnr2(mode="oxx", scdthr=10.0, lm=192, un=255, um=255, vn=194, vm=255, log=false, sceneChroma=true)

I don't know how I missed that plugin.

color
14th September 2016, 20:38
johnmeyer, i did not find the plugin "MDegrain2" when searching, I tried some other tools and did not got it to work.

This is how the image looks like:
http://forumbilder.se/FB28T/did-not-fix-color010956.bmp

I know, the color is also horrible!

StainlessS
14th September 2016, 20:41
Have a look at deflicker filters, also note what JohnMeyer said, (site expert for such dodgy stuff), and post a sample as requested.

EDIT: There is a SEARCH button at top of every forum page.
And a pic is nice, but not much use in fixing video, need video sample (see SendSpace or MediaFire).

EDIT: I use MCDegrain() rather MDegrain2() [MCDegrain(frames=2) is a wrapper for MDegrain, but more convenient].
http://forum.doom9.org/showthread.php?p=1508289#post1508289

johnmeyer
14th September 2016, 22:35
johnmeyer, i did not find the plugin "MDegrain2" when searching, I tried some other tools and did not got it to work.

This is how the image looks like:
http://forumbilder.se/FB28T/did-not-fix-color010956.bmp

I know, the color is also horrible!I can't help you without a video sample. You only need to post 10 seconds or so. Use Medifire or similar free sharing service.

It looks like you may have some ghosting due to this possibly being a 2nd gen video (i.e., a copy of a VHS tape onto another VHS tape). There is code to deal with that separate problem as well.

You really need to learn to use the forum search feature. I just searched on this subforum, limiting results to my user name, with the search terms "mdegrain2" and "cnr2". As expected, it turned up dozens of threads where I've posted desnoising scripts, such as this one:

Dealing with a big amount of VHS noise (http://forum.doom9.org/showthread.php?p=1777487#post1777487)

You will find code in one of the functions that can be enabled in order to shift the chroma ghosts to the left.

color
1st April 2018, 17:52
I have almost forgotten this. I have now cut 10 seconds, I hope someone can help me with a good script in avisynth. :)

https://fil.email/4hW4UBEz

PS. It will be deleted in 7 days.

And thank you johnmeyer. My english and "technical terms" is not the best so I have some problem, I did try a few but I can not get good resault.

Mounir
1st April 2018, 21:53
Try this:


LWLibavVideoSource(source="title00 (1)-026.mkv")
assumetff()
ConverttoRGB32(matrix="rec601",interlaced=true)
separatefields()
LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Denoise_sse2.vdf", "CCD", 0)
CCD(10,1) # 0 to 100 (maximum strength)
weave()
ConvertToYV16(interlaced=true)
orig=last
ev=orig.assumetff().separatefields().selecteven()
od=orig.assumetff().separatefields().selectodd()
ev
ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6)
ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6)
YToUV(ue_chroma, ve_chroma)
MergeLuma(ev)
ev_filtered=last
od
uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6)
vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6)
YToUV(uo_chroma, vo_chroma)
MergeLuma(od)
od_filtered=last
interleave(ev_filtered,od_filtered)
assumefieldbased().assumetff().weave()
# Edit: some awarpsharp2 can help aswell:
ConvertToYV12(interlaced=true)
a=last
luma=last
SeparateFields()
aWarpSharp2(depth=30)
Weave()
MergeChroma(a,last)


result (frame 413)
https://image.noelshack.com/fichiers/2018/13/7/1522616145-title00-1-026000413.jpg

color
1st April 2018, 22:12
I will give it a try tomorrow. It's a bit late now. On the frame it looks mutch better. Even if there is some color bleading on his arm.

johnmeyer
1st April 2018, 22:17
This person PM'd me. I wish people wouldn't do that.

I downloaded the zip file. The clip of the singer (the one shown above by Mounir) looks like a 2nd generation VHS copy, recorded at EP speed, captured from a deck without a TBC. In other words, it is really bad.

There is no way you can do anything to improve the detail. The best you can hope for is to average out the flickering in the red channel. I don't have any time to do this now, but CNR2, which is in the script I posted a year and a half ago when this thread first started, may be able to do some good. Also simply reducing the saturation of the red channel may help. That's all I have time for now.

color
2nd April 2018, 07:21
Thank you Mounir, I did use this, but added ghostbuster and did try deflicker in VD, It did make the red color also better a bit. :D

Johnmeyer, It has been fixed and I'm happy with the resault. :) And I'm sorry for sending you a PM to notify you that I've posted an update, I've seen your job and you do an amazing job with avisynthscript.

GMJCZP
2nd April 2018, 13:35
Try with small_deflicker, the link is in my signature.

color
2nd April 2018, 13:49
GMJCZP, I did try small_deflicker, but I get error "cache_getchild_cache_mode. 178010200" on the line "35":

o2=o.mt_makediff(mt_makediff(sm,smm,u=3,v=3).bicubicresize(width(o),height(o),0,0),u=3,v=3)

I did try the other versions on masktools2.dll but can't get it to work.

GMJCZP
2nd April 2018, 15:07
Masktools2 last version:

Here (https://github.com/pinterf/masktools/releases)

You must use the version according to your OS.

Mounir
2nd April 2018, 16:10
I'm tryin small deflicker out of curiosity, it returns the video should be Mod16. So for a video of 720x480 what that gives me ? Pardon my ignorance on this subject

color
2nd April 2018, 16:36
I do have Masktools2 2.2.14, updated a week ago. I do have Masktool also, can that make a problem?

GMJCZP
2nd April 2018, 19:36
@ Mounir:
I do not understand very well, for 720 * 480 it should work without problems, because it is mod 16.

@ color:
Try leaving only version masktools2 2.2.14 in your plugins folder.

color
2nd April 2018, 19:51
I have another plugin using masktools, but It worked when removing masktools and leaving the masktools2 in the folder. Thank you. :D

GMJCZP
3rd April 2018, 11:22
I have another plugin using masktools, but It worked when removing masktools and leaving the masktools2 in the folder.

I suggest using LoadPlugin for call the old version of masktools, placing it in a different folder from the plugins directory.

Edit: How did you do with small_deflicker?

Edit2: It seems that the guy of the youtube video used Median, but he has not shared the script, so he does not know for sure how he did it.