VideoHelp Forum




+ Reply to Thread
Results 1 to 29 of 29
  1. Sample MPEG2. I tried RGBAdjust but it doesn't seem to have a setting to remove the brown colour.
    Quote Quote  
  2. 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
    Quote Quote  
  3. 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)
    Quote Quote  
  4. Themaster1 I tried what you said but it's still brown. Jagabo I tried what you said but I get an error message saying "I don't know what org means". Is there an avs or plugin file I need? I looked at the Overlay Avisynth page but couldn't find anything.
    Quote Quote  
  5. Originally Posted by VideoFanatic View Post
    Jagabo I tried what you said but I get an error message saying "I don't know what org means". Is there an avs or plugin file I need? I looked at the Overlay Avisynth page but couldn't find anything.
    Sorry. I clipped that out of a longer script where I made a copy of the original called org. So I could see the two side by side. Just add org=last before the sequence. Or change the occurrences of org to last.
    Quote Quote  
  6. 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?
    Quote Quote  
  7. 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
    Quote Quote  
  8. Originally Posted by VideoFanatic View Post
    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.
    It applies the new colors only to the brighter portions of the picture.

    Originally Posted by VideoFanatic View Post
    The video still looks weird, like it's washed out or something
    Then change the third line.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by VideoFanatic View Post
    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.
    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().

    Originally Posted by VideoFanatic View Post
    ...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?
    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.
    Quote Quote  
  10. Originally Posted by sanlyn View Post
    no statement in jagabo's script makes any change in the colors
    ColorYUV(off_u=10, off_v=-2) explicitly changes the colors. It makes the brown skin tones more pink. Overlay() mixes those colors into the original image based on brightness. The gamma_y adjustment indirectly reduces the saturation.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by sanlyn View Post
    no statement in jagabo's script makes any change in the colors
    ColorYUV(off_u=10, off_v=-2) explicitly changes the colors. It makes the brown skin tones more pink. Overlay() mixes those colors into the original image based on brightness. The gamma_y adjustment indirectly reduces the saturation.
    "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.
    Quote Quote  
  12. Originally Posted by sanlyn View Post
    However, that would not correct the problems IMHO.
    Of course it doesn't fix all the problems. Unlike you, I'm not going to waste a lot of time fiddling with the OP's video. My objective i simply to give him some ideas on things he can do, nt do all the work for him.
    Quote Quote  
  13. 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.
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Of course it doesn't fix all the problems. Unlike you, I'm not going to waste a lot of time fiddling with the OP's video. My objective i simply to give him some ideas on things he can do, nt do all the work for him.
    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.

    Originally Posted by VideoFanatic View Post
    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.
    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.
    Quote Quote  
  15. Originally Posted by sanlyn View Post
    Actually I started with your code and thought, yeah, that's the right track.
    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.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    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)
    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.
    Quote Quote  
  17. Originally Posted by VideoFanatic View Post
    Originally Posted by jagabo View Post
    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)
    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))
    Then flip back and forth with the arrow keys in VirtualDub. The difference will jump right out at you.
    Quote Quote  
  18. 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)
    I encoded the video with and without the 2nd line and when viewing it back on my PC I can't see any difference between the 2 videos so I was just wondering how you figured you needed the 2nd line and what it does exactly?
    Quote Quote  
  19. Originally Posted by VideoFanatic View Post
    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)
    I encoded the video with and without the 2nd line and when viewing it back on my PC I can't see any difference between the 2 videos so I was just wondering how you figured you needed the 2nd line and what it does exactly?
    Oh, sorry. The overlay uses the brightness of pixels in the original video (with a contrast stretch) as an alpha mask for the overlay. Look in the dark areas. They will have the colors from the original video, not the new colors.
    Quote Quote  
  20. Could you please show me a screenshot comparison as I still can't see any difference.
    Quote Quote  
  21. 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)
    Click image for larger version

Name:	comp.jpg
Views:	323
Size:	129.6 KB
ID:	16198

    Notice how the dark areas are much more purple without the overlay.
    Quote Quote  
  22. 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
    Any idea why? These are just colour changes so I don't understand why it would effect the bitrate in such a massive way.

    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)
    It seems that adding ColorYUV(levels="PC->TV") makes it encode at the normal bitrates again. Any idea why that is?
    Last edited by VideoFanatic; 12th Feb 2013 at 21:26.
    Quote Quote  
  23. Brighter video requires more bitrate. And making the dark parts brighter increases the noise.
    Quote Quote  
  24. 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?
    Quote Quote  
  25. Originally Posted by VideoFanatic View Post
    should do such as increasing ColorYUV(off_y=-32) to -40?
    That will probably make the darks too dark, ie below IRE 0.
    Quote Quote  
  26. What would you suggest then? I just need to remove the added brightness that this adds: ColorYUV(levels="PC->TV")
    Quote Quote  
  27. 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.
    Quote Quote  
  28. 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
    Quote Quote  
  29. This has gone off topic from the thread title. Dedicated thread is here.
    Last edited by VideoFanatic; 13th Feb 2013 at 04:58.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!