VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hello All,

    As part of my current project, I ingested a number of VHS/VHS-C tapes on my laptop with VirtualDub using a lossless encoder and a USB capture device. Since I will need to resize the content in the future, I need to deinterlace the files. I used the deinterlace filter in VirtualDub with the options below
    Image
    [Attachment 57744 - Click to enlarge]

    The results were disappointing. There is a striking difference between the colors (?) of the consecutive fields. As a result, the video is not smooth and "shakes" or "jitters" a little. I triple checked that the video is Top Field First before applying the correct filter option.

    See some examples of consecutive fields below. Look at the sky colors on the first pair and the ground on the background on the second.

    Test1 - Field 1
    Image
    [Attachment 57745 - Click to enlarge]


    Test1 - Field 2
    Image
    [Attachment 57746 - Click to enlarge]


    Test2 - Field 1
    Image
    [Attachment 57747 - Click to enlarge]


    Test2 - Field 2
    Image
    [Attachment 57748 - Click to enlarge]


    I uploaded two very short video snippets with the original video and the one after deinterlacing. If you open the deinterlaced video in VirtualDub and step through it you will see the issue. Let me know if you need more samples. I also included below the MediaInfo output for the file from which I extracted the short video attached and pictures in this post.

    As a side note, I DID NOT have this issue with the AVI content that I ingested from miniDV tapes via Firewire.

    Any help is greatly appreciated. I am at a complete loss.

    Regards
    crbd98
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Try the Muksun filter, default settings.
    Quote Quote  
  3. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Probably the capture chain would benefit from some kind of time base corrector to make the image more stable.
    I processed your source in an Avisynth script using QTGMC for the deinterlacing, then encoded in Virtualdub2 using H.264
    Code:
    lwlibavvideosource("C:\Users\davex\Desktop\Test 2 - original.avi")
    converttoyv12(interlaced=true)
    Assumetff()
    qtgmc(edithreads=3)
    stab()
    crop(8,0,-8,-0).spline36resize(640,480)
    Image Attached Files
    Last edited by davexnet; 11th Mar 2021 at 01:42. Reason: fixed the script order
    Quote Quote  
  4. There is something wrong with the U channel of your captures. It flickers brighter/darker from field to field.

    Code:
    LWLibavVideoSource("Test 2 - original.avi") 
    AssumeTFF()
    ConvertToYUY2(interlaced=true)
    Bob(0.0, 1.0)
    StackHorizontal(GreyScale().Subtitle("Y"), UtoY().Subtitle("U"), VtoY().Subtitle("V"))
    top field:
    Image
    [Attachment 57763 - Click to enlarge]


    bottom field:
    Image
    [Attachment 57764 - Click to enlarge]


    I believe this is a problem with your VCR.

    You can address this with a moderate temporal filter on the chroma:

    Code:
    ConvertToYV12(interlaced=true)
    QTGMC()
    TTempSmooth(maxr=1, strength=2, cthresh=20)
    This essentially averages the chroma of successive fields fields together when the differences are small. Video attached.

    Also, why is your source video RGB? You should be capturing analog NTSC video as YUY2 or other YUV 4:2:2 subsampling.
    Image Attached Files
    Quote Quote  
  5. Hello All,

    Thank you for your replies.

    @Alwyn, @devexnet: I will try your suggestions.

    @jagabo: Thank you very much for your analysis. I have some further questions and comments.

    First, as you suggested the issue might have been caused by the VCR, I will use another VCR to perform the capture. Unfortunately, they are exactly the same brand and model. So if the problem is intrinsic to the brand/model, it will repeat itself. I know that I have the same problem in all the content I captured using the VCR. I will try an experiment ingesting a VHS-C directly from the camera vs. from the VCH (with an adapter) and see if the problem shows up.

    Is it possible that this is due to the age of the tape? Or maybe the USB device I am using to capture?

    I will perform some experiments and post the results here.

    Second, regarding the your comment
    "Also, why is your source video RGB? You should be capturing analog NTSC video as YUY2 or other YUV 4:2:2 subsampling."
    I am puzzled myself. Below, I copied the MediaInfo output from the full ingested original capture followed by the one from the snippet I posted. The original shows NTSC, YUV, 4:2:2, while the snippet shows NTSC, RGB. I did not do anything specific to that purpose. In order to create the snippet I posted, I loaded the original in VirtualDub, selected the portion of Video, cropped to that content, and saved the AVI. Did I miss any step.




    Full original
    General
    Complete name : E:\Video\Raw-Capture\VHS-002.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    Format profile : OpenDML
    File size : 57.4 GiB
    Duration : 2 h 6 min
    Overall bit rate : 65.1 Mb/s


    Video
    ID : 0
    Format : YUV
    Codec ID : ULY2
    Codec ID/Info : Ut Video Lossless Codec
    Codec ID/Hint : Ut Video
    Duration : 2 h 6 min
    Bit rate : 63.5 Mb/s
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 3:2
    Frame rate : 29.970 (30000/1001) FPS
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:2
    Compression mode : Lossless
    Bits/(Pixel*Frame) : 6.134
    Stream size : 56.1 GiB (98%)


    Audio
    ID : 1
    Format : PCM
    Format settings : Little / Signed
    Codec ID : 1
    Duration : 2 h 6 min
    Bit rate mode : Constant
    Bit rate : 1 536 kb/s
    Channel(s) : 2 channels
    Sampling rate : 48.0 kHz
    Bit depth : 16 bits
    Stream size : 1.36 GiB (2%)
    Alignment : Aligned on interleaves
    Interleave, duration : 10 ms (0.30 video frame)
    Interleave, preload duration : 10 ms




    Snippet
    General
    Complete name : C:\Test 2 - original.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 55.7 MiB
    Duration : 1 s 869 ms
    Overall bit rate : 250 Mb/s
    Writing library : VirtualDub build 35491/release

    Video
    ID : 0
    Format : RGB
    Codec ID : 0x00000000
    Codec ID/Info : Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
    Duration : 1 s 869 ms
    Bit rate : 249 Mb/s
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 3:2
    Frame rate : 29.970 (30000/1001) FPS
    Standard : NTSC
    Color space : RGB
    Bit depth : 8 bits
    Bits/(Pixel*Frame) : 24.000
    Stream size : 55.4 MiB (99%)

    Audio
    ID : 1
    Format : PCM
    Format settings : Little / Signed
    Codec ID : 1
    Duration : 1 s 869 ms
    Bit rate mode : Constant
    Bit rate : 1 536 kb/s
    Channel(s) : 2 channels
    Sampling rate : 48.0 kHz
    Bit depth : 16 bits
    Stream size : 350 KiB (1%)
    Alignment : Aligned on interleaves
    Interleave, duration : 43 ms (1.30 video frame)
    Interleave, preload duration : 500 ms
    Quote Quote  
  6. The problem is probably the aging electronics in the VCR. A different VCR, even the exact same model, may be better or worse.

    I suspect the reason the video you uploaded was RGB was because you trimmed a sample of your original UT cap with VirtualDub. Next time set Video -> Direct Stream Copy in VirtualDub before saving the sample.
    Quote Quote  
  7. Hello Jagabo,
    I ran some experiments:
    - I used my second VCR to ingest a portion of the tape with the problem but it yielded the same (bad) results.
    - I imported some VHS-C tapes with the VCR and directly from the camera. Both seemed good.
    - I found a VHS tape that had been recorded with a different camera and ingested with the VCR. Good results.

    It looks like all the 20 tapes that were recorded using a specific camera I used to have many years ago show the same problem. I was hoping I could fix it by just using a different VCR but it looks like the issue is in the actual media.

    So, it looks like I will need to apply some filter magic like you did below. Are there equivalent filters in VirtualDub? Otherwise, I will need to invest time to learn AviSynth.

    Thank you
    Crbd98
    Quote Quote  
  8. I only use VirtualDub for viewing the results of my AviSynth scripts. So I haven't kept up with what filters are available for it. But you can look for temporal chroma noise reduction filters for it.

    Here's an updated AviSynth method:

    Code:
    LWLibavVideoSource("Test 2 - original.avi") 
    ConvertToYUY2(interlaced=true) # not needed if source already YUY2 or YV12
    SeparateFields()
    Y = last
    U = UtoY().TTempSmooth(maxr=1, strength=2, lthresh=25)
    V = VtoY().TTempSmooth(maxr=1, strength=2, lthresh=10)
    YtoUV(U, V, Y)
    Weave()
    This works by separating the Y, U, and V channels, applying a strong TTempSmooth to the U channel, a weaker TTempSmooth to the V channel (it has a little flicker too) then recombining the Y, U, and V channels. The interlaced source is still interlaced after this sequence. You can follow this with deinterlacing and/or whatever filtering you need. You can also open that AviSynth script in VirtualDub and perform other filtering there.

    TTempSmooth is a third party AviSynth filter. You'll need to download it and put a copy of ttempsmooth.dll in AviSynth's plugins folder.
    http://avisynth.nl/index.php/TTempSmooth
    Quote Quote  
  9. Hello Jagabo,

    Thank you. I will invest the time in installing and learning AviSynth.

    I have two related and probably very naïve questions:
    1. Is there a specific order in which to apply filters in general? For instance, lets suppose that I want to apply the following filters: chroma correction, noise reduction (smooth and temporal smooth), brightness, deinterlace, and resize. What is the right order?
    2. (this is probably very stupid but I need to ask for my learning benefit) This is related to my previous question. I was playing with the filters in VirtualDub trying to approach the problem I brought up in this thread and noticed that if I apply the following filter sequence:
    Image
    [Attachment 57786 - Click to enlarge]

    The difference in color between fields in the resulting deinterlaced media goes away. I am probably missing something. Maybe I am loosing quality, etc.? I would appreciate if you could provide some insight.

    Thank you
    crbd98
    Quote Quote  



Similar Threads

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