VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 38 of 38
Thread
  1. If I load the script into MeGUI, I can see the green bar in the preview window prior to encoding. Its just barely visible when resizing to the 704x396, but without resizing it is very in your face. I'll try a different editor to see if its just something weird with MeGUI.

    I may end up doing both a new DVD and an x264 encode, and if I did a new DVD then I'd look at those options for getting an exact 25fps. But also like I mentioned a few posts up, someone is mailing me a copy of their DVDR version which is encoded in PAL rather than NTSC and I believe it looks like the original DVD recording before someone converted it to NTSC. So in this case, the script used to improve the PQ would still be applied but the issue with converting back to 25fps should already be taken care of. In any case, I do enjoy the opportunity to learn more about using Avisynth for these projects.
    Quote Quote  
  2. Still waiting on the new copy to arrive in mail before proceeding further with this one, but I also have some other VHS captures that could benefit from similar filtering with color corrections.

    Are there any good guides covering the basics of performing color correction on video such as this? I can experiment with settings and figure it out, but would be helpful if there was a basic tutorial covering how to go about it all
    Quote Quote  
  3. The green bar at the right may be a problem with one of the filters in AviSynth. In the past some required mod16 or mod8 frame sizes. If the versions you have are very old try updating them one at a time to see if it goes away. This is true of encoders and playback decoders too.

    Color correction in AviSynth is pretty difficult. Partly because the feedback loop is slow: edit script, reload video, edit script, reload video... compared an NLE: move a slider and watch image change. And partly because of much of it working in YUV which isn't as intuitive as RGB.

    What I did for the green droop across the frame was create two videos, the original and one where the V channel was moved up 12 units. Then I used a linear horizontal gradient as an alpha channel to mix the two images together with Overlay(). The left of edges of the resulting image was 100 percent the new V, the right was 100 percent the original V, in the middle was a 50:50 mix, etc. The net result was to pull up the V channel more at the left.

    White balance can sometimes be done in RGB with RGBAdjust(). But with this video I worked in YUV. First I located a dark part of the image that I thought should be nearly black. I used VideoScope() to view the U and V channels:

    Code:
    ConvertToYUY2() # videoscope requires YUY2
    VideoScope("both", true, "U", "V", "UV")
    Image
    [Attachment 47514 - Click to enlarge]


    At the top left is the dark patch from the video. The rest are graphs of the U and V channels (U increases left to right, V increases bottom to top). What you want to do is move the little white dot to where the crosshairs meet (perfect grey). In this example U needs to move about 4 units to the right (+4) and the V channel needs to move about 11 units up (+11). In the original sample I used it was 4 and 9. I did the same for the brights and ended up with two versions of the video:

    Code:
    darks = ColorYUV(off_u=4, off_v=9)
    brights = ColorYUV(off_u=18, off_v=3)
    Then I blended the two videos together using an alpha mask generated from the Y channel (brightness).

    Code:
    Overlay(darks, brights, mask=ColorYUV(cont_y=50))
    The end result is that dark parts of the picture get the "darks" adjustment, the bright parts of the picture get the "brights" adjustment, and parts in the middle get a weighted adjustment base on their brightness.
    Quote Quote  
  4. thanks again jagabo

    I'll try your suggestions regarding the green bar and see if that solves it.

    And thanks for taking the time to lay out your approach to color correction here. I will take this info and do my own experiments with some other videos and see if I can make some progress. I don't want to be a pest and keep posting for help with every video I'd like to work on, so it would be great to learn these skills myself. You've been a huge help.
    Quote Quote  
  5. +1 jagabo: color and gamma correction are MUCH easier to do in your NLE. I use Vegas, but almost any NLE will have pretty good correction tools.
    Quote Quote  
  6. Is the color correction better quality in a NLE such as Vegas? I'm fairly well versed in Vegas, but I was under the impression that Avisynth gives better results

    I'm more concerned with quality than ease of use
    Quote Quote  
  7. I doubt AVISynth would give better results. It's main advantage over an NLE is that AVISynth lets the user write scripts that can adapt to what is found in each pixel on each frame (or field) of video. However, its lack of interactivity make it a lousy tool for any activity that requires feedback. This is particularly true of gamma and color correction.

    If you are interested in quality, then the first thing you must do is get a colorimeter (like a Spyder) and calibrate your monitor. Otherwise you will be adjusting all of your videos to a false reference and will end up with a mess. Then, you should learn to use not only the color corrector tools built into Vegas (color corrector, secondary color corrector, levels, color curve, etc.) but also some of the amazing color tools available as plugins, like those from Hitfilm.

    Finally, you need to understand and then use the various "scopes" available in Vegas which provide you with important graphic feedback on color and gamma levels.
    Quote Quote  
  8. You can use the Animate() function in AviSynth to get some interactivity. For example:

    Code:
    ##########################################################################
    
    function _VaryHue(clip v, float value)
    {
        Tweak(v, hue=value) # adjust hue
        Subtitle("hue="+string(value)) #show hue value used
    }
    
    function VaryHue(clip v, int "frame_num", int "num_frames", float "start_val", float "end_val")
    {
        Trim(v, frame_num,frame_num)
        Loop(num_frames, 0, 0)
        Animate(0,num_frames, "_VaryHue", last, start_val, last,end_val)
    }
    
    
    ##########################################################################
    
    
    Mpeg2Source("clip4.d2v", Info=3) 
    TFM()
    TDecimate()
    VaryHue(frame_num=1630, num_frames=360, start_val=0.0, end_val=360.0)
    That will vary hue from 0.0 to 360.0 over 360 copies of frame 1630 (after IVTC). You can open the script in VirtualDub and scrub around to see the result. Once you've found the hue value you want you would replace VaryHue() with Tweak().
    Last edited by jagabo; 17th Dec 2018 at 11:56.
    Quote Quote  



Similar Threads