VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 43
Thread
  1. I have a source that the colors look very dull or washed out. I was going to increase it slightly by using Tweak(sat=1.05)

    I noticed when using this though that on all the blacks or dark colors you can see green spots and or rainbow like colors showing up and moving around on the source. It seems to add a green tint to blacks. When I turn the tweak back off, the colors go back to normal.

    This does this even if I raise the saturation even the smallest bit like tweak(sat=1.01) and its very visible and annoying.

    Using a derainbow filter doesn't help at all. Is there an alternative method for increasing saturation using avisynth?



    Heres screenshots of the issue I'm talking about. This scene isnt as washed out as the others I want to use tweak for but it shows what I'm talking about if you look at the black or darker colors like their shirt.


    NO SATURATION INCREASE




    WITH TWEAK SAT=1.04




    NO SATURATION INCREASE




    WITH TWEAK SAT=1.04

    Last edited by killerteengohan; 30th Aug 2014 at 08:18.
    Quote Quote  
  2. If I understand your issue correctly I'd say you can try to use Camcorder Color Denoise for Virtualdub (it can be imported in Avisynth I think).

    Original -> saturated



    Original -> saturated + CCD

    Quote Quote  
  3. O.o thats absolute useless info about what I said above.

    That has nothing to do with the issue I'm having and its completely different type of source and issue. I'd handle the issue in your pictures with an avisynth filter. Also virtualdub is outdated and used for AVI, this is thread for avisynth, not virtualdub and I was asking for an alternative avisynth filter to use or an answer on how to fix tweak to stop it.



    Heres screenshots of the issue I'm talking about. This scene isnt as washed out as the others I want to use tweak for but it shows what I'm talking about.


    NO SATURATION INCREASE




    WITH TWEAK SAT=1.04




    NO SATURATION INCREASE




    WITH TWEAK SAT=1.04

    Last edited by killerteengohan; 30th Aug 2014 at 08:18.
    Quote Quote  
  4. If you look at the U and V planes with VideoScope() in AviSynth you'll see that Tweak() causes the U and V planes to decrease by 1 in the near-grey areas, causing a disproportionate change in saturation of those near greys (this appears to be a rounding issue). Use ColorYUV(cont_u=X, cont_v=X) instead. The rough equivalent for X is (sat - 1.0) * 256. So for 1.04 you get (1.04 - 1.0) * 256 ~= 10.

    Stab() has a similar problem. On some frames the U and V planes drop by one over the entire picture.
    Last edited by jagabo; 30th Aug 2014 at 09:16.
    Quote Quote  
  5. Sorry, I misunderstood you killerteengohan.
    Quote Quote  
  6. Originally Posted by killerteengohan View Post
    Is there an alternative method for increasing saturation using avisynth?

    SmoothTweak() , part of SmoothAdjust.dll

    e.g

    SmoothTweak(saturation=1.04)
    Quote Quote  
  7. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by killerteengohan View Post
    O.o thats absolute useless info about what I said above.

    That has nothing to do with the issue I'm having
    Yes it does.

    Originally Posted by killerteengohan View Post
    Also virtualdub is outdated and used for AVI
    Nonsense.

    Originally Posted by jagabo View Post
    Stab() has a similar problem. On some frames the U and V planes drop by one over the entire picture.
    True. Use Stab() on a true grayscale clip and you'll see the effect.

    Originally Posted by jagabo View Post
    Use ColorYUV(cont_u=X, cont_v=X) instead.
    Unfortunately that will shift the color balance toward magenta. RE increasing contrast: The images show that bright clipping in RGB is already starting to occur.

    Originally Posted by killerteengohan View Post
    Heres screenshots of the issue I'm talking about. This scene isnt as washed out as the others I want to use tweak for but it shows what I'm talking about.
    Your un-tweaked image shows green and red color blotching and macroblocks in dark areas before anything is done to saturation. If you would bother to use a properly calibrated monitor for graphics work, you would have seen those effects right away. Those problems should be cleared before applying any other filters. You'll need to do some debanding and add some fine grain, or you'll get plenty of noise in the darks after encoding.

    Two plugins that can help reduce the discoloration on deinterlaced video or after using SeparateFiels():

    chubbyrain2()
    MergeChroma(MCTemporalDenoise,settings="medium")

    You might have to apply both plugins, and/or you can set MCTD to higher settings. That sort of discoloration is difficult to repair 100%. As a last step try masking the defects with GradFun2DBmod and AddGrainC. most of the problem might have resulted from overly aggressive degraining.

    With uneven color areas like these, it's better to use RGB controls to manage saturation. Or use a clean-working control like ColorMill. If working with lossless AVI and RGB in obsolete apps like VirtualDub, Adobe Premiere Pro, or Vegas Pro is good enough for the pros, it should suffice for your needs. If you don't think Avisynth is decoding your source and working in "AVI", you're in for a surprise.
    - My sister Ann's brother
    Quote Quote  
  8. or use smoothadjust if you don't want to work in RGB

    eg.

    smoothadjust(saturation=1.1)
    Click image for larger version

Name:	smoothadjust.png
Views:	1566
Size:	344.9 KB
ID:	27167
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    or use smoothadjust if you don't want to work in RGB

    eg.

    smoothadjust(saturation=1.1)
    Image
    [Attachment 27167 - Click to enlarge]

    What filter is smoothadjust a function of? I apparently dont have it.

    EDIT: nvm I noticed you gave the dll name in your last post. I thought smoothtweak and smoothadjust were different things.
    Quote Quote  
  10. Originally Posted by jagabo View Post
    If you look at the U and V planes with VideoScope() in AviSynth you'll see that Tweak() causes the U and V planes to decrease by 1 in the near-grey areas, causing a disproportionate change in saturation of those near greys (this appears to be a rounding issue). Use ColorYUV(cont_u=X, cont_v=X) instead. The rough equivalent for X is (sat - 1.0) * 256. So for 1.04 you get (1.04 - 1.0) * 256 ~= 10.

    Stab() has a similar problem. On some frames the U and V planes drop by one over the entire picture.

    While it is doing what you said and not making those show up, its also changing the colors to a slightly different hue/color, making the colors look off from the original shades. Tweak wasn't doing that.
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    Originally Posted by killerteengohan View Post
    Is there an alternative method for increasing saturation using avisynth?

    SmoothTweak() , part of SmoothAdjust.dll

    e.g

    SmoothTweak(saturation=1.04)

    Thanks, that seems to work great and I haven't noticed any problematic side effects from the filter yet except colors seem a little brighter than tweak at the same settings. Why are the colors brighter? Im still looking closely though for side effect I might not like. Ill play around with it some.

    Would smoothtweak be better than tweak for adjusting brightness as well? I was also using tweak(bright=-0.51)




    Heres a small comparison to show the brighter colors I was talking about. The eyes were the most noticable to me. (Of course I'm not gonna use these levels, its just to show the difference in the same settings)


    TWEAK 2.96




    SMOOTHTWEAK 2.96

    Last edited by killerteengohan; 30th Aug 2014 at 23:03.
    Quote Quote  
  12. Not necessarily "better"

    Read the instructions. Lots of settings to adjust

    It's slower because it dithers by default. Levels adjustments might have less banding. But side effect of dithering is requires more bitrate

    Manipulating "brightness" is usually not the best way to go about making adjustments IMO. "brightness" usually shifts the entire Y' waveform up - sometimes you don't want to do that, or need to control the black level as well. You have more control with levels (smoothlevels)
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    Not necessarily "better"

    Read the instructions. Lots of settings to adjust

    It's slower because it dithers by default. Levels adjustments might have less banding. But side effect of dithering is requires more bitrate

    Manipulating "brightness" is usually not the best way to go about making adjustments IMO. "brightness" usually shifts the entire Y' waveform up - sometimes you don't want to do that, or need to control the black level as well. You have more control with levels (smoothlevels)

    I didnt know it dithered by default, thanks for telling me, I started reading the readme fully after hearing that. Should I turn the dithering off?

    I only lowered the brightness some because there was too much white making blacks not look dark enough and other colors too bright or washed out, you could see an obvious white color over them. That's why I reduced it a small bit because it looked better like that to me.

    You have a better suggestion for reducing the white?


    Heres a small visible example. Its MUCH more noticeable in darker scenes and over bright scenes.


    NO BRIGHTNESS OR SATURATION ADJUSTMENT




    TWEAK BRIGHT=-0.51

    Last edited by killerteengohan; 30th Aug 2014 at 23:29.
    Quote Quote  
  14. Those screenshots in the last post look the same, maybe you uploaded the wrong one

    My suggestion is to use histogram() or other monitoring aids so you learn what is actually going on when you adjust brightness or levels . Use it to guide your adjustments , that way you see and measure what the brightest or darkest pixels are . Don't just rely on your "eyes" because humans can make mistakes. Use the tools available to you
    Quote Quote  
  15. Originally Posted by killerteengohan View Post
    Originally Posted by jagabo
    Use ColorYUV(cont_u=X, cont_v=X) instead. The rough equivalent for X is (sat - 1.0) * 256. So for 1.04 you get (1.04 - 1.0) * 256 ~= 10.
    While it is doing what you said and not making those show up, its also changing the colors to a slightly different hue/color, making the colors look off from the original shades. Tweak wasn't doing that.
    They do the same thing. The only difference is the rounding errors and clamping if you go beyond the 16-240 range. By default Tweak() clamps U and V to 16-240. ColorYUV() doesn't. Add opt="coring" if you want ColorYUV() to clamp like Tweak().

    Code:
    function TweakSat(clip clip, float fsat)
    {
        Tweak(clip, sat=fsat).Subtitle(string(fsat))
    #    SmoothTweak(clip, saturation=fsat).Subtitle(string(fsat))
    }
    
    function ColorYUVSat(clip, float fsat)
    {
       ColorYUV(clip, cont_u=((fsat-1.0) * 256.0), cont_v=((fsat-1.0) * 256.0))
    }
    
    ImageSource("attachment.png")
    ConvertToYV12()
    Trim(0,100)
    
    t=Animate(0, 100, "TweakSat", 1.0, 5.0)
    c=Animate(0, 100, "ColorYUVSat", 1.0, 5.0)
    
    StackHorizontal(t,c,Subtract(t,c))
    ConvertToYUY2().VideoScope("bottom", true, "UV", "UV")
    Last edited by jagabo; 30th Aug 2014 at 23:29.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    Originally Posted by killerteengohan View Post
    Originally Posted by jagabo
    Use ColorYUV(cont_u=X, cont_v=X) instead. The rough equivalent for X is (sat - 1.0) * 256. So for 1.04 you get (1.04 - 1.0) * 256 ~= 10.
    While it is doing what you said and not making those show up, its also changing the colors to a slightly different hue/color, making the colors look off from the original shades. Tweak wasn't doing that.
    They do the same thing. The only difference is the rounding errors and clamping if you go beyond the 16-240 range. By default Tweak() clamps U and V to 16-240. ColorYUV() doesn't. Add opt="coring" if you want ColorYUV() to clamp like Tweak().

    Code:
    function TweakSat(clip clip, float fsat)
    {
        Tweak(clip, sat=fsat).Subtitle(string(fsat))
    #    SmoothTweak(clip, saturation=fsat).Subtitle(string(fsat))
    }
    
    function ColorYUVSat(clip, float fsat)
    {
       ColorYUV(clip, cont_u=((fsat-1.0) * 256.0), cont_v=((fsat-1.0) * 256.0))
    }
    
    ImageSource("attachment.png")
    ConvertToYV12()
    Trim(0,100)
    
    t=Animate(0, 100, "TweakSat", 1.0, 5.0)
    c=Animate(0, 100, "ColorYUVSat", 1.0, 5.0)
    
    StackHorizontal(t,c,Subtract(t,c))
    ConvertToYUY2().VideoScope("bottom", true, "UV", "UV")

    Ill give a screenshot comparison and show you what I was referring to asap.
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    Those screenshots in the last post look the same, maybe you uploaded the wrong one

    My suggestion is to use histogram() or other monitoring aids so you learn what is actually going on when you adjust brightness or levels . Use it to guide your adjustments , that way you see and measure what the brightest or darkest pixels are . Don't just rely on your "eyes" because humans can make mistakes. Use the tools available to you

    okay well heres the picture re-uploaded.


    NO BRIGHTNESS OR SATURATION ADJUSTMENT




    TWEAK BRIGHT=-0.51

    Quote Quote  
  18. I honestly have no idea how to read this first histogram. I even looked it up and read here http://avisynth.org.ru/docs/english/corefilters/histogram.htm and its still confusing. If I'm understanding right then none of these should be invalid range.

    All they are to me is a black box with white dots all over it which apparently shows luma in a way I dont understand. All I get out of it is left of the line is below 128 and right of the line is above 128 but still just a bunch of dots to me and looks nothing like the video.


    Heres the histogram results. Is lowering the brightness really that bad for it?



    NO TWEAK




    TWEAK BRIGHT -0.51




    NO TWEAK




    TWEAK BRIGHT -0.51




    NO TWEAK




    TWEAK BRIGHT -0.51




    NO TWEAK




    TWEAK BRIGHT -0.51

    Last edited by killerteengohan; 31st Aug 2014 at 00:54.
    Quote Quote  
  19. Heres the color comparison I promised Jagabo. I flipped back and forth between the original and the tweak, then the original and the coloryuv then the tweak and the color yuv while staring at the purple shirt and it looks like coloryuv has a slightly different shade of color or its brighter or something. Its as if the setting of 10 was stronger than tweaks 1.04 setting. The shirt got brighter and the pants seem to have gotten darker when tweak and coloryuv are compared. I guess its kinda doing what smoothtweak was doing above when I mentioned the colors were a brighter shade than the original or tweak was but I dont recall seeing it making anything darker looking like the pants.



    NO SATURATION INCREASE




    TWEAK SAT=1.04



    COLORYUV=10





    EDIT: yeah I guess its just that coloryuv is a tad bit stronger than tweak 1.04 at those settings of 10. I turned tweak up to 1.06 and its colors changed more similar to that of coloryuv.
    Last edited by killerteengohan; 31st Aug 2014 at 02:20.
    Quote Quote  
  20. Okay well I've decided to go with smoothtweak with dithering and interpolate turned off because it was ruining fine details on the wood with them on. (If you save both of those pictures I posted above with 2.96 saturation and flip back and forth between them, you will see the details that are being lost or ruined in the smoothtweak that still has them both on.)

    It seems to be perfectly fine from the looks of it. The ColorYUV seems to do pretty much the same exact thing as smoothtweak does when it comes to what Im looking to do, so they both are doing what I originally wanted.

    Thanks for the assistance on that one.



    Would anyone know how to get rid of or reduce these?





    There's these small pixels that are dancing around all over the darker things in some scenes like his shirt here for example. They look like little green cubes if you look close enough. Once it goes to the next scene, I don't notice them but in some parts they can be annoying. Its a bit less noticeable without the brightness tweak I did but they are still there. I took off the light denoiser I was using and it went from obvious blocks to just terrible looking artifact/grain that does the same exact thing only their not as broken up or as small as these ones.

    I took everything off the script except crop and resize and they are still there and it looks like this.


    Last edited by killerteengohan; 31st Aug 2014 at 03:37.
    Quote Quote  
  21. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    If you're talking about what I think you're talking about, I used multiple iterations of temporal soften and deen, but I'd like to know if there's a better way too (the filters would have to look very far temporally in both directions to be able to deal with it properly).
    Quote Quote  
  22. Originally Posted by killerteengohan View Post
    I honestly have no idea how to read this first histogram. I even looked it up and read here http://avisynth.org.ru/docs/english/corefilters/histogram.htm and its still confusing. If I'm understanding right then none of these should be invalid range.

    All they are to me is a black box with white dots all over it which apparently shows luma in a way I dont understand.
    That is a waveform monitor, not really a historgram. It's basically a graph where the brightness of pixels is plotted as height. The graph of all scan lines are overlaid to produce the final graph. The traditional waveform monitor is horizontal because CRT TVs scanned horizontally. The video signal was fed to an oscilloscope which scanned left to right, deflecting upward with the brightness of the signal.

    https://forum.videohelp.com/threads/340804-colorspace-conversation-elaboration?p=212156...=1#post2121568

    AviSynth's waveform monitor is vertical instead of horizontal. Instead of dark at the bottom and bright at the top, it is dark at the left, bright at the right. If you want a more traditional horizontal waveform monitor with AviSynth rotate the picture before calling Histogram then rotate it back to normal:

    Code:
    TurnRight().Histogram().TurnLeft()
    That will give you a horizontal histogram at the top of the frame.

    TurnRight().Histogram().TurnLeft():
    Click image for larger version

Name:	hist.jpg
Views:	502
Size:	47.2 KB
ID:	27185

    I prefer VideoScope() because the dimmer dots are a little brighter. Unfortunately, VideoScope() doesn't explicitly mark the superblacks and superbrights like Histogram() does.

    VideoScope("bottom"):
    Click image for larger version

Name:	vscope.jpg
Views:	426
Size:	74.7 KB
ID:	27186
    Quote Quote  
  23. Originally Posted by killerteengohan View Post
    I guess its just that coloryuv is a tad bit stronger than tweak 1.04 at those settings of 10. I turned tweak up to 1.06 and its colors changed more similar to that of coloryuv.
    It's just a matter of rounding errors. They both start and finish with 8 bit integers but use slightly different equations get there.
    Quote Quote  
  24. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by killerteengohan View Post
    There's these small pixels that are dancing around all over the darker things in some scenes like his shirt here for example. They look like little green cubes if you look close enough. Once it goes to the next scene, I don't notice them but in some parts they can be annoying. Its a bit less noticeable without the brightness tweak I did but they are still there. I took off the light denoiser I was using and it went from obvious blocks to just terrible looking artifact/grain that does the same exact thing only their not as broken up or as small as these ones.
    That noise was seen right away in your earliest images and has been explained in post #7, a couple of days ago.

    Originally Posted by killerteengohan View Post
    I took everything off the script except crop and resize

    Wait a minute. You have all this chroma noise and macroblocks in your video and you crop and resize while it's still there?
    And you've done all this other crap, told us nothing about it, filled up a whole web page with frame captures that look nothing like the original frames, and no one here has any idea what your original source looks like ? ????


    Where's jman98 when we need him?

    Maybe you should step back and post a short sample from your original, unprocessed video, so people here will know what's going on.
    Last edited by LMotlow; 31st Aug 2014 at 15:27.
    - My sister Ann's brother
    Quote Quote  
  25. Thanks Jagabo, that explains that waveform to where I actually understand it now. It seems so simple once you explained it.

    Can you tell me whats the deal with that square in the first color one? I notice a darker outline in the square but after brightness change, it seems to go away. Is that bad and means I shouldnt lower the brightness?

    Whats my goal with that color one? do I want to keep that square outline or get rid of it? How should that look when done?
    Quote Quote  
  26. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by killerteengohan View Post
    Fine Lmotlow heres your untouched sample.
    Thank you. It should make things go smoother this way.
    Last edited by LMotlow; 31st Aug 2014 at 21:26.
    - My sister Ann's brother
    Quote Quote  
  27. Originally Posted by killerteengohan View Post
    Can you tell me whats the deal with that square in the first color one? I notice a darker outline in the square but after brightness change, it seems to go away.
    That is a color vectorscope, or UV plot of the image. Much like the waveform monitor is a graph of brightness vs. position, the UV plot is a graph of U vs. V of all pixels. The darker border around the UV plot marks the illegal U and V values, like the brown borders on the waveform monitor marks illegal Y values. U and V must be between 16 and 240 -- the borders are the values outside that range (we're talking rec.601 or rec.709 colors here).

    The reason the dark edges disappeared when you used Tweak() to change the brightness is because you used Tweak() after building the UV plot. The inner part of the box has Y set to 16, the outer part has Y set to 0. By default, Tweak() clamps Y values to the 16-240 range -- so the dark outer portion of the box became the same brightness as the inner portion, 16.

    Originally Posted by killerteengohan View Post
    Is that bad and means I shouldnt lower the brightness?
    No, just run Tweak() (or any other YUV alterations) before calling Histogram(). Historgram() won't show you the results of those function if you call them after Histogram().

    Originally Posted by killerteengohan View Post
    Whats my goal with that color one? do I want to keep that square outline or get rid of it? How should that look when done?
    The UV plot is of limited usefulness. For sure you want to keep pixels within the inner box. U or V outside the 16-240 range is definitely illegal. But not all combinations of Y, U, and V within their individual legal ranges result in legal colors. If you look at an image of the RGB colorspace inside the YUV colorspace you'll see that most YUV values result in illegal RGB values:


    http://techpubs.sgi.com/library/dynaweb_docs/0650/SGI_Developer/books/DIVO_OG/sgi_html/apd.html

    Only YUV values within the inner RGB cube give legal RGB colors. At Y=16 and Y=235 there is only one legal U and one legal V value -- 128. Around the middle of the Y range (half way up the Y cube) you have the largest number of legal U and V values.

    That also explains the green/purple splotches you are seeing in dark areas. In those dark areas there are only a few legal U and V values and the difference between successive values are big enough that you can't get smooth gradients (actually, this is true over the entire RGB cube but it's most visible at nearly pure greys). Some noise in the original source combined with blockiness from the MPEG compression resulted in those splotches.
    Quote Quote  
  28. Thanks, I get it now Jagabo.

    So does that mean when using smoothtweak I should enable clamping? That keeps all values between 16-235 or 16-240 right? Is clamping better than letting it go unrestricted? If unrestricted it can go out of legal values right?
    Quote Quote  
  29. Originally Posted by killerteengohan View Post
    So does that mean when using smoothtweak I should enable clamping?
    That will prevent illegal values that some devices might not display correctly (mostly older devices).

    Originally Posted by killerteengohan View Post
    That keeps all values between 16-235 or 16-240 right?
    You shouldn't be generating illegal colors in the first place. In that sense, clamping isn't necessary.

    Originally Posted by killerteengohan View Post
    Is clamping better than letting it go unrestricted? If unrestricted it can go out of legal values right?
    Illegal values may not display correctly. I've seen cases where bright blue became bright red, problems like that.

    You can test for illegal YUV values with my HighlightBadRGB() function. It's a bit crude but a good first pass test. You can choose what color you want the bad colors to appear -- the default is bright red. Don't worry about small errors -- almost all videos will have a few edges with illegal values.

    https://forum.videohelp.com/threads/360935-Capturing-Correct-Chroma-and-Hue-Levels-From...=1#post2289672

    That version requires AviSynth 2.6. A few posts later there's a version that works with AviSynth 2.5.

    Earlier in that thread there's a link to a Doom 9 thread with a more accurate YUV checker:

    http://forum.doom9.org/showthread.php?t=154731

    That is a little different in that it colors the legal areas black and shows the illegal colors. And it's very very slow to get started (a few minutes). I have a modified version that works more like HighlightBadRGB() if you need it.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!