Sample MPEG2. I tried RGBAdjust but it doesn't seem to have a setting to remove the brown colour.
+ Reply to Thread
Results 1 to 29 of 29
-
-
try something like this:
coloryuv(cont_v=-10)
tweak(sat=1.5,hue=9.3)
converttorgb32(interlaced=true)
RGBAdjust(1.0, 0.9, 1.0, 1)
converttoyv12(interlaced=true)*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
Something like this?
Code:ColorYUV(off_u=10, off_v=-2) Overlay(org,last,0,0,GreyScale(org).ColorYUV(cont_y=100)) ColorYUV(gamma_y=200, off_y=-32)
-
-
Thanks your script definitely improves the colours. What does the second line do? If I remove it I can't see any difference to the picture.
The video still looks weird, like it's washed out or something yet when I add more Sat then it looks like there's too much colour. Are there any suggestions you could make to fix the colours? -
Well it's normal jagabo's script return 0-237 for Y and a high gamma so you get a washed out picture
it's way off the mark if you ask me
edit, let me know what you think about this (same settings from a video i have restored lately and compared with a hq source):
A=Last
B=A.Greyscale()
Overlay(B,A,X=6,Y=-3,Mode="Chroma") #
separatefields()
Ylevels(0,1.000,255,16,247)
coloryuv(off_u=0,off_v=4,cont_u=10,cont_v=0,gain_u =17,gain_v=0,gamma_v=0,gamma_u=0)
tweak(hue=17.4,sat=0.9,cont=1.0,coring=false)
weave()
#
pointresize(last.width, last.height*2).ConverttoRGB32(matrix="rec601",inte rlaced=true).pointresize(last.width, last.height)
separatefields()
#### CCD COLOR DENOISING :
LoadVirtualDubPlugin("E:\Program Files\VirtualDub-1.9.8\plugins\Camcorder_Color_Denoise_sse2.vdf","C CD",1)
CCD(30,1) #
weave()
converttoyv12(interlaced=true)Last edited by themaster1; 3rd Feb 2013 at 11:30.
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
-
That's a rather odd remark, since no statement in jagabo's script makes any change in the colors. In any case, the colors aren't too "brown". They're too yellow in the darks and midtones, and too blue in the brights. You balance yellow in darks and mids by adding blue in the darks and midtones, you balance too much bright blue by adding yellow at the bright end. You can't do that with RGBAdjust().
Reducing "sat" is what's needed, not increasing it, as well as reducing gamma quite a bit. As it is, the colors are out of spec for TV anyway before any filtering. All it takes is one look at a histogram to tell you what needs correction.Last edited by sanlyn; 25th Mar 2014 at 05:59.
-
-
"ColorYUV(off_u=10, off_v=-2)" ?? Did something change or was I looking at the wrong damn post? Jeez, I need to make a self-correct, as I see you're right. Multiple mea culpa's!
However, that would not correct the problems IMHO. I think anyone would have to go thru some kind of coding yoga to fix the color in that video. But the code did bring up some shadow detail, and I added your clever contrast mask to my "jagabo clever fixes" collection. I even tried some SmoothLevels curves on it, but they didn't work correctly so I didn't post.
One would first need to use ColorYUV to keep elements from smashing against both sides of a histogram, then secondary and even tertiary curves to make it look, well, anything near "correct". And even then you'd be guessing from similar videos that look better. So I guess the best one could do is something more basic, such as your code, and let the rest go. Considering all the other problems, it would take forever and likely wouldn't be worth it.Last edited by sanlyn; 25th Mar 2014 at 06:00.
-
-
The code you gave was good enough so thanks. I never really understood ColorYUV as it's not easy to understand like Tweak and RGBAdjust are. I read the ColorYUV avisynth page but it doesn't really explain anything in a way that makes sense, particularly the purple text at the top of the page. However now that I have an obvious colour issue that needs fixing (the brown and yellow) and I can see the obvious changes that your script made, I'm starting to understand it now but it's slow going.
-
Actually I started with your code and thought, yeah, that's the right track. Then I spent about an hour tweaking -- being stubborn to begin with, always trying to get some new insights from "problems". Masking and the likes of MaskTools are giving me fits, I don't know why I'm having such a tough time with it.
Don't feel alone. ColorYUV is mighty handy. I learned more about it by working with a histogram and watching what happens when I fiddle with one channel at a time. Without histograms and 'scopes, there's no way to see what's going on. But once you see it drawn out for you, it makes a lot of sense.Last edited by sanlyn; 25th Mar 2014 at 06:00.
-
I suspect what happens with some video tape recordings is the luma channel "leaks" into the chroma channels. That's why I used Overlay() with a mask based on the luma channel. Fully correcting the problem would involve figuring out exactly what form that leak takes, and reversing it.
-
How did you know to add the 2nd line since in the sample video I gave you since I can't see any difference to the video when I have that line or not?
Your script works brilliantly though, on some videos I didn't even realise they had that brown darkness crap until I tried your script then I could see the difference. -
I can see the difference with just the first line. It's not huge, but it's visible. Try just this:
Code:WhateverSource() Interleave(last, ColorYUV(off_u=10, off_v=-2))
-
I know you can see a difference with the first line, I'm referring to the 2nd line in this:
Code:ColorYUV(off_u=10, off_v=-2) Overlay(org,last,0,0,GreyScale(org).ColorYUV(cont_y=100)) ColorYUV(gamma_y=200, off_y=-32)
-
-
Could you please show me a screenshot comparison as I still can't see any difference.
-
Code:
Mpeg2Source("Brown.d2v", CPU=6, Info=3) org=last ColorYUV(off_u=10, off_v=-2) StackHorizontal(Subtitle(last, "without overlay"), Overlay(org,last,0,0,GreyScale(org).ColorYUV(cont_y=100)).Subtitle("with overlay")) ColorYUV(gamma_y=200, off_y=-32)
Notice how the dark areas are much more purple without the overlay. -
I'm encoding h264 videos and when I use the following line for reason it encodes at double the normal bitrate:
Code:ColorYUV(gamma_y=200, off_y=-32) # Removes darkness blur
This is my whole script that I'm using:
Code:setmtmode(5,9) Mpeg2Source("E:\2 = New\z = Encode\ECW Hardcore TV February 17 1998 Fixed.d2v", CPU=6) setmtmode(2,0) McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast") Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() Tweak(Hue=0, Sat=1.5, Bright=0, Cont=0.9, Coring=False) ColorYUV(gamma_y=200, off_y=-32) # Removes darkness blur Crop(6,0,-6,-8) AddBorders(14,4,14,4, $000000)
Last edited by VideoFanatic; 12th Feb 2013 at 21:26.
-
Brighter video requires more bitrate. And making the dark parts brighter increases the noise.
-
ColorYUV(levels="PC->TV") seems to lower the bitrate back to normal however it adds brightness to the video. Should I just add -15 brightness to Tweak to remove that added brightness or is there something else I should do such as increasing ColorYUV(off_y=-32) to -40?
-
-
What would you suggest then? I just need to remove the added brightness that this adds: ColorYUV(levels="PC->TV")
-
I don't have your video here any more so I can't test it. You want to make sure your levels are within the valid range. You should know how to do that by now.
Last edited by jagabo; 12th Feb 2013 at 23:20.
-
I haven't looked at your script but i'd say coloryuv pc>tv levels is a wrong choice because it'll lower UV (255->240) so try ylevels instead and lower the gamma or tweak's brightness with coring=false)
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
Similar Threads
-
How to remove tint with Avisynth?
By VideoFanatic in forum RestorationReplies: 55Last Post: 6th Oct 2013, 16:24 -
how to remove logo by avisynth scripts and filters?
By poluhale2 in forum EditingReplies: 15Last Post: 8th Oct 2012, 08:31 -
Remove an opaque logo using Xlogo in Avisynth
By AlanHK in forum User guidesReplies: 34Last Post: 4th Oct 2012, 23:17 -
How to Fix Patchy Colour with Avisynth?
By VideoFanatic in forum RestorationReplies: 59Last Post: 14th Feb 2012, 10:20 -
Colour Conversion problems with Avisynth
By wiseant in forum Video ConversionReplies: 6Last Post: 16th Mar 2011, 11:40