VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 49 of 49
  1. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Thanks for the explanations.

    Referring to Letterbox(), you wrote that it's not a crop operation, it's a mask... isn't that what I want, to mask the crud at the bottom of the screen?

    Back to Crop(), this is what my script looked like:
    Code:
    Crop(0,0,0,-16)
    AddBorders(0,4,0,4)
    That came out as 720x472, according to GSpot. I was following your suggestion from post #3, but I modified the Crop() parameters from what you had written, and left the AddBorders() parameters the same as you had suggested. From your explanation it occurs to me that perhaps if the Crop() parameters change, then the AddBorders() parameters need to change as well to obtain (or retain) the standard NTSC resolution of 720x480. Am I understanding this correctly?
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by TB Player View Post
    Back to Crop(), this is what my script looked like:
    Code:
    Crop(0,0,0,-16)
    AddBorders(0,4,0,4)
    That came out as 720x472, according to GSpot. I was following your suggestion from post #3, but I modified the Crop() parameters from what you had written, and left the AddBorders() parameters the same as you had suggested. From your explanation it occurs to me that perhaps if the Crop() parameters change, then the AddBorders() parameters need to change as well to obtain (or retain) the standard NTSC resolution of 720x480. Am I understanding this correctly?
    Your Crop statement removed 16 pixels vertically, but AddBorders only restored 8 of them (4 + 4 = 8, not 16).

    Code:
    Crop(0,0,0,-16)
    AddBorders(0,8,0,8)
    Quote Quote  
  3. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    OK, now I get the connection between Crop() and AddBorders(). Thanks.

    I ran this avisynth script and the video came out with nice upper/lower borders, standard 720x480 resolution, and all of the lower edge video crud removed:
    Code:
    AVISource("AuntFlo_04.avi")
    Trim(0,1683)
    PixieDust(4)
    Crop(0,0,0,-16)
    AddBorders(0,8,0,8)
    ColorYUV(levels="PC->TV")
    The difference in noise after using PixieDust(4) is subtle but noticeable. I feel that using the setting PixieDust(5) starts to bring out more noticeable artifacts, but maybe I'm too picky. I was reading about avisynth noise filters and Dust() seemed like a very popular filter, but I'm wondering if I would have better results with a different filter. Of course, I realize that I will have limited success considering the source video, but I'd be interested in what others feel are good noise filters.
    Quote Quote  
  4. Try McTemporalDenoise(). It has several presets as well as many individual parameters you can control. Some words of warning though: it's very slow and hard to get set up the first time.

    With VHS you often you want to filter the luma and chroma differently. You can use MergeChroma() to merge chroma from one video with the luma of another (VHS chroma is often much noisier than the luma). For example:

    Code:
     MergeChroma(McTemporalDenoise(settings="low"), McTemporalDenoise(settings="high"))
    That will merge the luma from a lightly filtered version of the video with the chroma of a highly filtered version of the video.

    VHS has very low resolution horizontally leading to colors smearing to the left and right. You can use a filter like aWarpSharp2() to restore some crispness to the chroma without messing up the luma:

    Code:
     MergeChroma(aWarpSharp2(depth=24))
    Finally, the chroma is sometimes shifted horizontall or vertically -- most usually horizontally to the right with VHS. You can use ChromaShift() to shift it back into alignment with the luma. Something like:

    Code:
     ChromaShift(c=-4) # shift chroma 4 pixels to the left
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Re: example_a.avi from post #14.
    Duplicate frames 165-166, 168-172.

    In-camera autogain and autocolor have very nearly ruined this shot. Highlights are blown away. Remedy: turn off everything on amateur cameras that has "auto" in its name.
    Last edited by sanlyn; 25th Mar 2014 at 10:15.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by TB Player View Post
    I corrected the samples in post #14 - they should now be unprocessed huffyuv 720x480.
    Something amiss with interlacing in Example_A.avi. Lots of jaggies and combing. Could fix the combing, but smoothing those jaggies destroyed too much of what was left. Fixed the bag frames in the area of frames 165-172. What a hassle. Another hassle: color cast changes and gamma pumping. Cleared most of it, but that kind of trouble is....well, trouble.
    Image Attached Files
    Quote Quote  
  7. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by jagabo View Post
    Try McTemporalDenoise(). It has several presets as well as many individual parameters you can control. Some words of warning though: it's very slow and hard to get set up the first time.
    Yes, I see what you mean by "hard to set up"!

    Adding your first code line to my script, VDubMod complains that the video isn't YV12. Do I need to convert with something like ConvertToYV12()?

    Trying to add your other code lines causes VDubMod to crash. Is MCTD supported by avisynth 2.5 (the version I'm using)?
    Quote Quote  
  8. Yes, you'll need to convert to yv12, assuming your video is interlaced: ConvertToYV12(interlaced=true). You'll also need to add the interlaced=true parameter to MCTD.
    Quote Quote  
  9. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by sanlyn View Post
    Originally Posted by TB Player View Post
    I corrected the samples in post #14 - they should now be unprocessed huffyuv 720x480.
    Something amiss with interlacing in Example_A.avi. Lots of jaggies and combing. Could fix the combing, but smoothing those jaggies destroyed too much of what was left. Fixed the bag frames in the area of frames 165-172. What a hassle. Another hassle: color cast changes and gamma pumping. Cleared most of it, but that kind of trouble is....well, trouble.
    Well the color improvement is obvious. Smoothing out the artifacts does seem to detract a little bit from the sharpness but I don't think it's a bad trade-off considering the results. Very nice, thanks... I'd be interested in knowing your procedure if you're open to sharing.

    FYI, this video is one of my personal home videos, unlike the other samples posted. It was shot with a VHS home video camera (Panasonic IIRC) and, yes, probably all of "auto" buttons were engaged.
    Quote Quote  
  10. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by jagabo View Post
    Yes, you'll need to convert to yv12, assuming your video is interlaced: ConvertToYV12(interlaced=true). You'll also need to add the interlaced=true parameter to MCTD.
    Do you mean like this:

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true), McTemporalDenoise(settings="high", interlaced=true))
    Quote Quote  
  11. Originally Posted by TB Player View Post
    Do you mean like this:

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true), McTemporalDenoise(settings="high", interlaced=true))
    Yes.
    Quote Quote  
  12. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by TB Player View Post
    Do you mean like this:

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true), McTemporalDenoise(settings="high", interlaced=true))
    Yes.
    Doesn't look right. How about...?

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true))
    or without MergeChroma:

    Code:
    McTemporalDenoise(settings="low", interlaced=true)
    Quote Quote  
  13. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by TB Player View Post
    Do you mean like this:

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true), McTemporalDenoise(settings="high", interlaced=true))
    Yes.
    Well that code is cool , and the picture is certainly a bit clearer.

    I am going to try the other lines, but I am wondering, since I need to convert to YV12 for the filters, if the destination is an NTSC DVD, do I need to convert back to YUV or YUY, or will it be OK to leave the video YV12?
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    DVD (MPEG2) is YV12.
    Quote Quote  
  15. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by sanlyn View Post
    DVD (MPEG2) is YV12.
    I've always capped with huffyuv. If the AVI starts out as YUV, is there somewhere in the process of creating the DVD files where it becomes YV12 (for example, when the mpeg files are created) or does a source YUV create a YUV DVD?
    Quote Quote  
  16. Member TB Player's Avatar
    Join Date
    Jul 2004
    Location
    Beautiful N. California
    Search Comp PM
    Originally Posted by sanlyn View Post
    Doesn't look right. How about...?

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true))
    ??

    Doesn't MergeChroma () need a second parameter to "merge" with?


    or without MergeChroma:

    Code:
    McTemporalDenoise(settings="low", interlaced=true)
    What would be the difference in leaving out MergeChroma() - would McTemporalDenoise() simply be a noise filter at that point?
    Last edited by TB Player; 16th Jul 2013 at 15:52.
    Quote Quote  
  17. Originally Posted by TB Player View Post
    Originally Posted by sanlyn View Post
    Doesn't look right. How about...?

    Code:
    MergeChroma(McTemporalDenoise(settings="low", interlaced=true))
    ??

    Doesn't MergeChroma () need a second parameter to "merge" with?
    If you don't specify a second video the luma from the "last" video is used.

    As a general rule in AviSynth, any time you don't specify a named video "last" is used. For example:

    Code:
    AviSource("filename.avi")
    MergeChroma(McTemporalDenoise(settings="high"))
    means:

    Code:
    last = AviSource("filename.avi")
    last = MergeChroma(last, McTemporalDenoise(last, settings="high"))
    return(last)
    Sanlyn's script results in "low" filtered chroma channel being combined with the original luma channel

    Originally Posted by TB Player View Post
    or without MergeChroma:

    Code:
    McTemporalDenoise(settings="low", interlaced=true)
    What would be the difference in leaving out MergeChroma() - would McTemporalDenoise() simply be a noise filter at that point?
    That would apply "low" filter to both the luma and chroma equally.
    Quote Quote  
  18. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by TB Player View Post
    Originally Posted by sanlyn View Post
    DVD (MPEG2) is YV12.
    I've always capped with huffyuv. If the AVI starts out as YUV, is there somewhere in the process of creating the DVD files where it becomes YV12 (for example, when the mpeg files are created) or does a source YUV create a YUV DVD?
    Huffyuv is a compressor. YV12, YUY2, RGB, etc., are colorspaces. "YUV" is a wide-ranging term (of which YV12 is only one of many matrices) for data storage stratagems that store luma and chroma separately for each image.

    VHS is usually captured to lossless AVI in a YUY2 colorspace because YUY2 more closely resembles the way video data is stored in VHS. There are several compressors that can be used to save AVI file space (huffyuyv, Lagarith, UT, etc.) using several colorspaces, both YUV and RGB.
    Last edited by sanlyn; 16th Jul 2013 at 19:22.
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by TB Player View Post
    Originally Posted by sanlyn View Post
    Originally Posted by TB Player View Post
    I corrected the samples in post #14 - they should now be unprocessed huffyuv 720x480.
    Something amiss with interlacing in Example_A.avi. Lots of jaggies and combing. Could fix the combing, but smoothing those jaggies destroyed too much of what was left. Fixed the bag frames in the area of frames 165-172. What a hassle. Another hassle: color cast changes and gamma pumping. Cleared most of it, but that kind of trouble is....well, trouble.
    Well the color improvement is obvious. Smoothing out the artifacts does seem to detract a little bit from the sharpness but I don't think it's a bad trade-off considering the results. Very nice, thanks... I'd be interested in knowing your procedure if you're open to sharing.
    I can't imagine watching a video with so many artifacts from bad interlacing, but the interlace can be kept if desired. Cleaning bad jaggies would soften quite a bit. This is the script I used for Example_A.mkv, with removal of duplicate frames and fix for pumping luma and gamma:

    Code:
    #---Avisynth plugins & scripts:
    #----QTGMC-3.32.avsi
    #----AutoLevels.dll
    #----ReplaceFramesMC2.avs
    #----LSFmod.avsi    
    
    #---VirtualDub plugin:
    VDpath="D:\VirtualDub\plugins\"
    LoadVirtualDubPlugin(VDpath+"ColorMill.vdf","ColorMill",1)
    
    #----   Discard duplicate frames, maintain audio sync  ----
    #---- (The frames to be discarded are 165,166,168-172) ----
    #----      Coded the "long way" but easier to read     ----
    Xa1=AviSource("path to video\example_a.avi")
    Xa2=Xa1.Trim(0,164)
    xa3=Xa1.Trim(167,-1)
    Xa4=Xa1.Trim(173,0)
    # ---- Join segments Xa2, Xa3, Xa4 ----
    Xa5=Xa2+Xa3+Xa4
    
    Xa5
    AutoLevels(filterRadius=30,autogamma=true,midpoint=0.4)
    # --- correct some mistakes made by AutoLevels ----
    ColorYUV(cont_y=-15,off_y=-10,cont_u=-50,gain_u=-20)
    
    AssumeTFF().QTGMC(preset="fast")
    SelectOdd()
    ReplaceFramesMC2(164,2)
    ConvertToYV12(interlaced=false)
    LSFMod(defaults="slow",strength=75)
    
    ConvertToRGB32(matrix="rec601",interlaced=false)
    ColorMill(25190, 25700, 24929, 25701, 25694, 25693, 29041, 27761, 27756, 25700, 24676, 25677, 25700, 1124, 6148)
    Crop(0,0,0,-10).AddBorders(0,4,0,6)
    return last
    #---- Save as Lagarith RGB32 for VDub gradation curve tweaks and encoder ----
    Last edited by sanlyn; 17th Jul 2013 at 07:38.
    Quote Quote  



Similar Threads

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