VideoHelp Forum
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. I'm converting a VHS TV movie to DVD. Here is my script. it is telecined, so I will IVTC it.
    http://www.mediafire.com/watch/nqfh41vpmv9jgwl/VOHsample.avi

    A couple newbie questions.
    1. If I encode the audio separately, will it still be in synch with the video when the frame rate changes such as in IVTC?
    2. Is ColorYUV is only for analog sources such as VHS, Video8, Hi8? It's not recommended for digital sources such as miniDV and Digital8.
    3. Why do most people killaudio when using avisource?

    Code:
    SetMemoryMax(768)
    SetMTMode(5,8)
    AviSource(clip,false) 
    Tweak(Bright=13,Cont=0.8,Coring=False)
    YLevelsS(0,1.8,255,0,255)
    AssumeBFF()
    TFM()
    TDecimate()
    
    SetMTMode(2)
    Spline64Resize(width/2, height)
    QTGMC(preset="ultra fast")
    Dehalo_alpha(rx=2, ry=1)
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
    TurnRight().nnedi3(dh=true).TurnLeft()
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    
    distributor()
    Is the output video progressive or interlaced?
    I want it to be progressive. I only added SeparateFields().SelectEvery(4,0,3).Weave() because it made the video smoother.
    I checked in VirtualDub and didn't see any split frames, so the output video has to be progressive.
    I just don't understand how it can be progressive when SeparateFields().SelectEvery(4,0,3).Weave() is supposed to make it interlaced.
    Last edited by digicube; 8th Oct 2015 at 02:05.
    Quote Quote  
  2. I have no idea what you are trying to do, but the script is a mess. If you want to take a 24p movie that was encoded onto VHS tape, then it will be hard telecined to 29.97. To get back to 24p (23.976 fps progressive), all you need is

    TFM()
    Tdecimate()

    Unless your source has all sorts of problems, I'd just use those two lines, encode the result to DVD, making sure to set the pulldown flag, and get on with life.
    Quote Quote  
  3. Yes TFM().Tdecimate() is enough but avisynth has so many cool filters that can make the picture look better.
    I'm just using the filters jagabo previously recommended on my previous VHS tapes.
    Quote Quote  
  4. Originally Posted by digicube View Post
    I'm just using the filters jagabo previously recommended on my previous VHS tapes.
    What works on one source may not, and probably won't, work with a different source. I'm with johnmeyer that the script is a mess. The tweak and ylevelss settings alone are probably enough to ruin it. I haven't checked the sample yet.

    Rather than blindly using filters you've been given, learn what they do, when they might be needed, and how they might be tweaked for different sources.
    Quote Quote  
  5. Here is a sample. It was in my original post.
    http://www.mediafire.com/watch/nqfh41vpmv9jgwl/VOHsample.avi

    But it was you, manono, who taught me that blacks and whites have to be inside 16-235. I learnt Tweak(Bright=12,Cont=0.75,Coring=False).YLevelsS(0 ,1.8,255,0,255) from you.
    https://forum.videohelp.com/threads/374253-Newbie-Avisynth-script-for-these-VHS-captures
    Quote Quote  
  6. Oh, so you're saying you did tweak the settings for this film? Then good. I was thinking you were using the same script for this as for a previous capture:

    I'm just using the filters jagabo previously recommended on my previous VHS tapes.
    Quote Quote  
  7. I didn't tweak the filters jagabo recommended, only yours which is Tweak and YLevelsS. I have to read up on these commands, they are more complicated.

    Spline64Resize(width/2, height)
    QTGMC(preset="ultra fast")
    Dehalo_alpha(rx=2, ry=1)
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
    TurnRight().nnedi3(dh=true).TurnLeft()
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    Last edited by digicube; 8th Oct 2015 at 07:33.
    Quote Quote  
  8. Did you even look at the results of your script? What a horrifying mess.

    The contrast/brightness adjustments are terrible. The video only needs minor levels adjustments to get brights out of the 235-255 range.

    The denoising is overdone. The detail in the trees is destroyed.

    Spline64Resize(width/2, height) and TurnRight().nnedi3(dh=true).TurnLeft() has lost too much detail.

    QTGMC() and interlacing afterward is a mistake. Leave the video 23.976p (the result of TFM().TDecimate()) and encode with pulldown flags if your intent is to make a DVD.

    Does your capture device have a sharpening feature? Turn it down. It's way overdoing it. Removing halos after capture isn't as good as not creating them in the first place. Does it have proc amp controls? Turn the brightness/contrast down a little and you won't have to fix them later.
    Last edited by jagabo; 8th Oct 2015 at 08:44.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Did you even look at the results of your script? What a horrifying mess.
    Yes but I'm a layman, not a videophile.

    Originally Posted by jagabo View Post
    The contrast/brightness adjustments are terrible. The video only needs minor levels adjustments to get brights out of the 235-255 range.
    But manono recommended blacks and whites within range of 16-235. I use ColorYUV(Analyze=True).Limiter(Show="Luma") to determine Tweak's Bright and Cont values.

    Originally Posted by jagabo View Post
    The denoising is overdone. The detail in the trees is destroyed.

    Spline64Resize(width/2, height) and TurnRight().nnedi3(dh=true).TurnLeft() has lost too much detail.
    OK I will delete this part.

    Originally Posted by jagabo View Post
    QTGMC() and interlacing afterward is a mistake. Leave the video 23.976p (the result of TFM().TDecimate()) and encode with pulldown flags if your intent is to make a DVD.
    If I delete the interlacing part, the fps will be double of 23.976 = 47.952. Why is that?

    Originally Posted by jagabo View Post
    Does your capture device have a sharpening feature? Turn it down. It's way overdoing it. Removing halos after capture isn't as good as not creating them in the first place. Does it have proc amp controls? Turn the brightness/contrast down a little and you won't have to fix them later.
    I use ADVC110. I'm not sure if it filters the video. I will delete aWarpSharp(depth=5).Sharpen(0.3, 0.0).


    Code:
    SetMemoryMax(512)
    SetMTMode(5,8)
    AviSource() 
    AssumeBFF()
    TFM()
    TDecimate()
    
    SetMTMode(2)
    QTGMC(preset="ultra fast")
    Dehalo_alpha(rx=2, ry=1)
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    distributor()
    FPS is 47.952 however. QTGMC and TemporalDegrain are the cause.
    Last edited by digicube; 8th Oct 2015 at 09:26.
    Quote Quote  
  10. You made minor (but too much) brightness/contrast adjustments with Tweak() but then you followed up with a gamma adjustment with YLevelsS(). That has brightened up the low level darks too much in my opinion. This isn't as bad as I originally thought. I didn't have YLevelsS() so I used Levels() instead. But after downloading it I see it doesn't have as large an effect on gamma.

    Maybe it's your VCR that's adding the overshapening halos. Turn down it's sharpness control if you can.

    Why are you using QTGMC()? That's causing the frame rate doubling. Your video is already progressive after TFM().TDecimate() so there's no need for a deinterlacer. If you're using QTGMC to smooth the video after IVTC add the InputType=1 argument. Or just use a filter like vInverse() to remove small comb artifacts from time base errors.
    Quote Quote  
  11. I have a Sony SLV-N88 VCR. It doesn't have any image adjustments control. Thinking of getting JVC HRS 7X00 VCR eventually. I haven't read up on QTGMC, Dehalo_alpha, TemporalDegrain, hence the mistake. Looks like this is the final script.

    Code:
    SetMemoryMax(512)
    SetMTMode(5,8)
    AviSource() 
    AssumeBFF()
    TFM()
    TDecimate()
    
    SetMTMode(2)
    Dehalo_alpha(rx=2, ry=1)
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    distributor()
    Quote Quote  
  12. Originally Posted by digicube View Post
    Yes TFM().Tdecimate() is enough but avisynth has so many cool filters that can make the picture look better.
    It also has a lot of filters that will make your video look much worse. Many of the posts here and in doom9.org are all about trying to "rescue" video that was screwed up by someone trying to make it look "better."

    The architect Mies van der Rohe said it best: "less is more."
    Quote Quote  
  13. Originally Posted by johnmeyer View Post
    The architect Mies van der Rohe said it best: "less is more."
    Until less is less!
    Quote Quote  
  14. Originally Posted by digicube View Post
    Code:
    SetMemoryMax(512)
    SetMTMode(5,8)
    AviSource() 
    AssumeBFF()
    TFM()
    TDecimate()
    
    SetMTMode(2)
    Dehalo_alpha(rx=2, ry=1)
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    distributor()
    You need to adjust the levels a little bit to get brights down below 235.

    To reduce some of the residual comb artifacts from time base and brightness errors try vInverse().

    Those dehalo_alpha() settings won't do anything useful. You need something like Dehalo_alpha(rx=4, ry=3, lowsens=70, highsens=50) to significantly reduce the halos in that video. Unfortunately, that destroys a lot of small detail. I'd probably leave it out.

    That's still too much TemporalDegrain(). I'd try half those values. Or leave it out completely.

    Code:
    AviSource("D:\Downloads\VOHsample.avi") 
    
    ColorYUV(gain_y=-20, cont_u=-20, cont_v=-20)
    
    ConvertToYV12(interlaced=true)
    AssumeBFF()
    TFM()
    TDecimate()
    vInverse()
    
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    Quote Quote  
  15. Originally Posted by jagabo View Post
    You need to adjust the levels a little bit to get brights down below 235.
    How about the blacks? Do the blacks and whites have to be within 16-235 for all VHS videos?

    Can you show me how to SetMTMode properly? I tried using SetMTMode(2,0) but HCenc crashed.
    If I don't use SetMTMode, I get CACHE_GETCHILD_CACHE_MODE error. I'm using Avisynth 2.6 MT, so looks like I have to use SetMTMode.

    Code:
    SetMemoryMax(768)
    SetMTMode(2,0)
    AviSource("D:\Downloads\VOHsample.avi") 
    ColorYUV(gain_y=-20, cont_u=-20, cont_v=-20)
    ConvertToYV12(interlaced=true)
    AssumeBFF()
    TFM()
    TDecimate()
    vInverse()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    distributor()
    Quote Quote  
  16. Originally Posted by digicube View Post
    Originally Posted by jagabo View Post
    You need to adjust the levels a little bit to get brights down below 235.
    How about the blacks? Do the blacks and whites have to be within 16-235 for all VHS videos?
    Yes, blacks should be at or above 16. But that doesn't mean not a single pixel can be below 16. Sometimes the black borders and oversharpening halos will go below 16. The same is true at the top -- some minor noise/details may go above 235.

    Originally Posted by digicube View Post
    Can you show me how to SetMTMode properly? I tried using SetMTMode(2,0) but HCenc crashed.
    If I don't use SetMTMode, I get CACHE_GETCHILD_CACHE_MODE error. I'm using Avisynth 2.6 MT, so looks like I have to use SetMTMode.

    Code:
    SetMemoryMax(768)
    SetMTMode(2,0)
    AviSource("D:\Downloads\VOHsample.avi") 
    ColorYUV(gain_y=-20, cont_u=-20, cont_v=-20)
    ConvertToYV12(interlaced=true)
    AssumeBFF()
    TFM()
    TDecimate()
    vInverse()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    Crop(8,0,-8,-8)
    Addborders(8,0,8,8)
    
    distributor()
    I usually SetMtMode(5,X) at the start of the script -- X is the number of threads I want to use, usually 4 (I have a quad core CPU) but sometimes more are needed to maximize throughput. Then SetMtMode(2) after the source filter.

    Code:
    SetMemoryMax(768)
    SetMTMode(5,0)
    AviSource("D:\Downloads\VOHsample.avi") 
    SetMtMode(2) 
    OtherFilters()
    Sometimes you may need to use fewer threads so the process doesn't run out of memory.
    Last edited by jagabo; 10th Oct 2015 at 00:05.
    Quote Quote  
  17. Originally Posted by jagabo View Post
    I usually SetMtMode(5,X) at the start of the script -- X is the number of threads I want to use, usually 4 (I have a quad core CPU) but sometimes more are needed to maximize throughput. Then SetMtMode(2) after the source filter.

    Code:
    SetMemoryMax(768)
    SetMTMode(2,0)
    AviSource("D:\Downloads\VOHsample.avi") 
    SetMtMode(2) 
    OtherFilters()
    Didn't you mean SetMTMode(5,0)?
    Quote Quote  
  18. Yes, SetMtMode(5,X) at the start. I'll fix the post.
    Quote Quote  
  19. And when we state that levels should be from 16 to 235 we mean Y, not RGB. RGB should be 0-255.
    Quote Quote  
  20. Does Y has to be within 16-235 when most TVs nowadays are LCDs?

    Can I just use Levels(0, 1, 255, 0, 255) or ColorYUV(levels="PC->TV") to keep Y levels within 16-235?
    Last edited by digicube; 16th Oct 2015 at 18:36.
    Quote Quote  
  21. DVD, Blu-ray, broadcast TV, streaming video, etc. all use limited range YUV where Y ranges from 16-235 and U/V ranges from 16 to 240. Conversion from RGB to YUV normally includes that range compression, and conversion from YUV to RGB normally includes the corresponding range expansion. Use Histogram() or VideoScope() to check your video and handle it appropriately.
    Quote Quote  



Similar Threads

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