VideoHelp Forum
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. Hi,

    I have been capturing some old VHS stuff for few months and trying now to get something nice out of it.

    I used VirtualDub with following filter sequence :
    - Denoise with Neatvideo (in interlaced mode : denoising is done on the each of the half fields)
    - Desinterlace with DesinterlaceMAP
    - Cropping to get rid of the garbage at the top and bottom and Nulltransform to go back to 4:3 aspect ratio.

    I have been relatively happy with this sequence, but a few days ago, I played a little bit with Avisynth and the QTGMC script ( http://avisynth.org/mediawiki/QTGMC ). I was very impressed by the quality of the desinterlaced video.
    I personally would use the denoising before everyting else, so basically Neatvideo in interlaced mode then QTGMC. But as far as I read, the desinterlacing process can bring some noise so maybe it’s better to denoise after desinterlace (so using Neatvideo in progressive mode).



    What is some smartest way to go in your opinion ?


    Thanks a lot for any advice.
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Welcome.

    The proper term is "deinterlace", not desinterlace. But I do understand your spelling from the French version, "désentrelacement".

    First, let me clarify something. By using NeatVideo first and QTGMC afterward, you have to convert from YUV to RGB, then convert again from RGB to YUV. There are proper and improper ways of making those conversions. I would not be able to say how you made the conversions. If one intends to perform processing with a YUV source in YUV and in RGB, it is best to perform all YUV processing first, rather than convert back and forth. Sometimes, however, and for various reasons, the two conversions might be necessary. It depends on the specific video.

    I don't know why you are deinterlacing. It isn't always necessary. But if a video must be deinterlaced, I would recommend using QTGMC first. In many cases, QTGMC can clean noise and other defects to the point where further work with more noise filters is not necessary. But this, too, depends on the source. The character of denoising with QTGMC and with NeatVideo is not exactly the same; each of the filters addresses noise in a different manner, and each addresses different kinds of noise. Again, the filtering depends on the source. Very badly damaged video often requires multiple stages of filtering, and different filter types. Many users tend to use more filtering power than is necessary.

    I have used deinterlaceMAP some time ago. I did not like the results. QTGMC is newer technology and would be superior.
    Last edited by sanlyn; 19th Mar 2014 at 11:31.
    Quote Quote  
  3. QTGMC also has an explicit optional noise reduction option. For example:

    Code:
     QTGMC(EZDenoise=2.0)
    It's not as flexible as Neat Video but you might find it good enough.
    Quote Quote  
  4. sanlyn, jagabo,

    First of all, many thanks for your answers.
    Sanlyn, you are right: I accidentally included the latin ‘s’ between two vowels in my English translation. Indeed, the right term is deinterlace.

    I did not consider the double conversion that the usage of a VirtualDub plugin would require (as far as I recall, the VB plugins are working in RGB mode). I had to convert to RGB32 before using Neatvideo and this is done, according to the NV documentation by calling ConvertToRGB32().
    I think that I will take some time to consider the (various) options of QTGMC.
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    No problem with the spelling. You should see what some European readers tell me about the difficulties in translating from typically bad English grammar!


    I find that QTGMC default settings work well most of the time. But there are always those special video "problems" that are challenging for even the best filters. At least the QTGMC html file and the NeatVideo manual give users plenty to think about. Most users never look at them.

    You are converting properly. If your source is YUV you will likely find visibly cleaner results by working in the original colorspace first before converting, if conversion is necessary.

    You might be interested in a recent thread that compares several Avisynth noise filters with QTGMC, with some sample videos:
    https://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2...=1#post2259819
    Last edited by sanlyn; 19th Mar 2014 at 11:32.
    Quote Quote  
  6. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Assuming the video really is interlaced and the signal is not completely swamped by noise, deinterlacing well then denoising well is better than denoising then deinterlacing. Denoising (spatial and/or temporal) works best on full progressive frames; doing it on separated fields is just a hack (albeit a very widely used one).

    I've never felt the need to use NeatVideo with VHS sources (except certain home movies). It works best with noise which has some kind of pattern or fingerprint, and VHS noise doesn't. NeatVideo's temporal noise reduction is rubbish. Used gently, it's spatial noise reduction is useful, but you can do well enough with spatial+temporal NR in AVIsynth. Whatever you use, leave a little high frequency noise in to avoid the result looking like plastic.


    Cheers,
    David.
    Quote Quote  
  7. I did some tests during this afternoon : here are some illustations.

    The first one is the original captured frame. I took an exemple where the muppet move a lot inducing some interlacing artefacts. I tested many deinterlacer, QTGMC was the one with which I was the most happy.

    The second picture is the output of QTGMC. You can see some noisy color (pink, yellow alternating) artefacts on the background in the upper left corner (over ernie's head). I tried the EZNoise directive, but it didn't brought anything.

    On the third picture, Neatvideo managed get ride of that noise, I juste reduced the strengh of the noise reduction not to let the video look like plastic (was a bit strong with autoset).
    Image Attached Thumbnails Click image for larger version

Name:	original.PNG
Views:	726
Size:	988.6 KB
ID:	19831  

    Click image for larger version

Name:	qtgmc.PNG
Views:	759
Size:	961.1 KB
ID:	19832  

    Click image for larger version

Name:	neatvideo.PNG
Views:	654
Size:	710.0 KB
ID:	19833  

    Quote Quote  
  8. Could you upload a short sample of the source video? Without reencoding it. It seems likely to me that an American TV show converted to PAL could use some other filtering.
    Last edited by jagabo; 30th Aug 2013 at 17:33.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Could you upload a short sample of the source video? Without reencoding it. It seems likely to me that an American TV show converted to PAL could use some other filtering.
    It's the "Sesamstrasse" (my son really like this show) a derivative from the US "Sesame Street". These records have been aired in Germany and recorded in the mid of the 90ies on a standard VHS deck.
    The first aired shows were the US versions dubbed in german but since the 80ies they were studio recorded in Germany.

    Here attached is a 5 seconds sample of the captured video. It is compressed with Lagarith (loseless codec).
    Image Attached Files
    Quote Quote  
  10. Ah, so it's native PAL video, not converted from NTSC.

    You can eliminate those dot crawl artifacts with a sequence like:

    Code:
    BilinearResize(width/2, height)
    Sharpen(0.3,0.0) # adjust to your liking
    Spline64Resize(width*2,height)
    And given the low horizontal resolution of VHS you don't really lose much sharpness. You may also be able to speed up your processing by performing much of it while the video is half width, then sizing back up at the end.
    Last edited by jagabo; 31st Aug 2013 at 10:22.
    Quote Quote  
  11. Hi,

    So I changed my capture card for an ATI X800GT AIW.
    Attached to this message, there's a raw extract of 3 seconds of the footage (PAL broadcast recording) that I captured with VirtualVCR in the native resolution of my card 704x576. The video are HuffYUV encoded (extract_raw.avi)

    As you can see, the video is relatively noisy and there are those pink/yellow artefacts (visible on still pictures).
    I tried a few filters :
    - TemporalSmoother gives some interesting results but notable ghosting to get ride of the noise
    - RemoveGrain (tried modes 13 to 17) but without interesting results
    - Neatvideo : in my opinion gives a nice result, I attached a filtered extract (extract_nv.avi)

    Which other filter would come to your mind which could possibly do as good or better than NV ?

    Thanks a lot,
    Image Attached Files
    Quote Quote  
  12. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Lumbermatt View Post
    Attached to this message, there's a raw extract of 3 seconds of the footage (PAL broadcast recording) that I captured with VirtualVCR in the native resolution of my card 704x576.
    704x576 is not the native resolution of your video card. It's the encoded frame size of your source video.

    Originally Posted by Lumbermatt View Post
    As you can see, the video is relatively noisy and there are those pink/yellow artefacts (visible on still pictures).
    I tried a few filters :
    - TemporalSmoother gives some interesting results but notable ghosting to get ride of the noise
    - RemoveGrain (tried modes 13 to 17) but without interesting results
    - Neatvideo : in my opinion gives a nice result, I attached a filtered extract (extract_nv.avi)
    The filtered video has more noise than the original. There is bad flutter and luma breakup and some rainbows across the top half of the source. It took a great deal of filtering to smooth the noise. NeatVideo is not very effective against rainbows. The source clip you posted has oversaturated red and over sharpening effects.

    Originally Posted by Lumbermatt View Post
    Which other filter would come to your mind which could possibly do as good or better than NV ?
    In addition to NeatVideo (at very low power to prevent more softening) I used VirtualDub's DeFlicker.vdf and ColorMill. In Avisynth I used QTGMC at "medium", then TemporalSoften + SmoothUV + FluxSmoothT across the top half to smooth the luma flashing and horizontal rainbows; plus MVDegrain2, aWarpSharp, FixChromaBleeding2, ChromaShift, Cnr2, an nnedi2+SangNom routine to smooth some crosshatching, aliasing, and broken edges; and GradFun2DBMod and AddGrainC to relieve some of the banding and block noise in the background walls. I could not repair all of the chroma bleed, which is rather severe and is responsible for some of the "soft" appearance of the video.
    Last edited by sanlyn; 19th Mar 2014 at 11:32.
    Quote Quote  
  13. Sanlyn did a good job with the other noise so I thought I'd just address the dot crawl herringbone noise as discussed earlier:

    Code:
    AviSource("extract_raw.avi") 
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    
    BilinearResize(width/2, height) # greatly reduced herringbone
    QTGMC() # bob deinterlace
    Sharpen(0.3,0.0) # sharpen vertical edges
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width*2, fheight=height) # restore width
    Sharpen(0.3,0.0) # sharpen vertical edges again
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Yep, I knew I'd seen jagabo's or a similar anti-hash routine somewhere. Spent an hour looking for it. Thanks for posting. This time, I'll keep a copy of it in a safe place.
    Last edited by sanlyn; 19th Mar 2014 at 11:32.
    Quote Quote  
  15. It's easy to remember. Them main functional item is the BilinearResize() to half width. That works with VHS sources because they barely have half the resolution across the width anyway. That is, you don't loose much detail by reducing the frame to half width. The rest is just scaling back up to full width with a little sharpening. If you don't want to use QTMGC() just use one of the simple resizers instead of nnedi3:

    Code:
    (interlaced source)
    BilinearResize(width/2, height) # greatly reduces herringbone
    Sharpen(0.3,0.0) # sharpen vertical edges, use as much or as little as you think appropriate
    Spline36Resize(width*2,height) # back to full width
    Sharpen(0.3,0.0) # a little more sharpening
    Quote Quote  
  16. I'm really really impressed sanlyn, the output looks really great... it's incredible ! I have a lot to learn.
    I downloaded and sorted and all the filters you mentioned and tried them out to see how they act on the video stream.

    - TemporalSoften (noise reduction)
    - SmoothUV (Rainbow removal)
    - FluxSmoothT (Temporal Smoother)

    - MVDegrain2 (grain remover)
    - aWarpSharp (sharpener)
    - FixChromaBleeding2 (chroma bleed reducer)
    - ChromaShift (Chroma shift reducer)
    - Cnr2 (Chroma Noise Reducer)
    - GradFun2DBMod (debanding)
    - AddGrainC (grain noise addition)

    I have some difficult to recognize those defects (I'm not an expert) so I'll have to look at some examples, I'm searching right know)
    Few questions :
    - How do you select the top part of the frame in the script ?
    - Why add some noise with AddGrainC ?

    I tested MVDegrain2, works great reducing noise on the picture.
    jagabo, I remember your script for reducing herringbone noise. I used it with great success my ezCap USB key which was prone to heavy herringbone noise.
    Last edited by Lumbermatt; 22nd Nov 2013 at 08:32.
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Lumbermatt View Post
    I have some difficult to recognize those defects (I'm not an expert) so I'll have to look at some examples, I'm searching right know)
    You'll become accustomed to recognizing problems -- and will soon be wringing your hands in frustration. No cleanup is perfect. Filtering is destructive in some form or other. Often you compromise: try to clean the worst of it, and live with the rest. Over filtering and oversharpening are real temptations. It's best to do only what you can and not attempt the impossible.

    The two images below are from approximately the same two frames (I never could get them to match exactly!). Both are 2X magnification. The original raw.avi (top image), mkv version 5 below it. The top image shows the horizontal stripes, lines, and noise that came first in my script, before any other work. It was quite stubborn. I ran processing in 3 separate steps, tweaking the results of each; the third step (VirtualDub) finally cleaned most of it. The top image shows chroma rainbows and other discoloration, plus crosshatch, herring bone, dot crawl, chroma bleeding and smearing. I didn't apply specific anti-alias plugins (there comes a point where enough is enough with filtering). Aliasing appeared in odd areas and was inconsistent.
    Image
    [Attachment 21380 - Click to enlarge]

    Image
    [Attachment 21381 - Click to enlarge]


    Originally Posted by Lumbermatt View Post
    Few questions :
    - How do you select the top part of the frame in the script ?
    - Why add some noise with AddGrainC ?
    You can filter an image by making a copy of the clip in Avisynth, applying filters, then cropping off the part of the filtered image you want to keep. In this case I first applied cleaners and then then cropped all but the top 32 pixels of the resulting clip, and overlayed the filtered part onto the original image (there are other ways that this can be done). Usually you don't crop first, for the simple reason that temporal filters need data and space to work with:
    Code:
    a=last      # --- save a copy of the original, and call it "a"
    a           # --- set the focus of the processing on the "a" copy. 
    TemporalSoften(4,4,8,15,2)
    FluxSmoothT()
    crop(0,0,0,-544,true)  # --- Crop away all except the top 32 pixels of the filtered clip.
    b=last                 # --- Give a name to the filtered version -- call it "b"
    overlay(a,b)           # --- Overlay original "a" with the filtered "b"
    Note: This doesn't always work. Often one has to modify the color or brightness of the overlayed portion. Occasionally, it will simply look strange.

    Grain is often added to replace some of the original grain and to simulate what many viewers interpret as "detail". In fact with motion picture film and VHS tape, most of the fine detail is in the media grain itself. A fine-grain effect also helps to mask banding and clumpy-edged blocks, or to prevent the results from looking denuded. AddGrainC is used as part of the cleanup in many advanced plugins, including QTGMC.

    I'm still playing with your avi sample. Will return later today after I repair a client's PC and clean up my very untidy script to post here, so others can get some ideas (and throw rocks at me). The attached mkv Version 5 used jagabo's routine, which replaced the original anti-aliasing routine in my first script. One round of resizing for herring bone and another resizing for anti-alias was a little too much. It's a matter of choosing between attempting "perfection" and retaining more detail.
    Last edited by sanlyn; 19th Mar 2014 at 11:33.
    Quote Quote  
  18. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    It really just depends on the noise threshold.
    That determines what' done first.
    More often that not, you denoise, deinterlace, and denoise again (with different filters).
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The attached text file contains the text of the steps and scripts I used. You're welcome to steal these ideas (how do you think I got them?). The text file has notes on the VirtualDub filters and copies of a few Avisynth functions that are sometimes difficult to locate, with a few notes on their use or original source.

    In this script I modified jagabo's resize routine by replacing BicubicResize with Spline16Resize. BicubicResize usually works for me, but in this case it softened details to the point where they began to smear with later filtering. I actually experimented with many downsamplers (I even tried one that is a plugin for After Effects Pro). Spline16Resize seemed to offer the most workable compromise, but feel free to try any of a dozen Avisynth resizers. Resizers that sharpen or over sharpen (such as Lanczos or Spline64Resize) retain too many artifacts, will generate new ones, and would defeat the purpose of the current routine.

    The .zip file contains the noise profiles for NeatVideo, copies of ColorMill, ColorTools, and DeFlicker, and the VirtualDub .vcf file of VDub filter and compression settings for processing the two mkv's I posted. You can load the filters into VirtualDub with their settings configured by using "File..." -> "Load processing settings...", then navigate to the location of the .vcf file.

    NOTE #1:
    Loading a .vcf will overwrite and remove all filters you have previously loaded. NOTE #2: A .vcf file is a simple text file. You can open a .vcf in Notepad and read its contents. NOTE #3: The included .vcf does not load the NeatVideo plugin. The reason for this is that the NV filter will look for its .dnp and .nfp profiles in the same location where they were previously stored on my hard drives. Obviously your system will be different, so the .vcf would display an error message. I keep .dnp and .nfp profiles in the folder that contains the source video. You may copy the profiles into any desired location, then load the NeatVideo plugin and use its dialog windows to find and load the .dnp and .nfp profiles. If you subsequently save a .vcf, your filter settings and the NeatVideo profile locations will be saved with your .vcf file. In additon to the very moderate NeatVideo filter settings, I also set its temporal filter to a value of 1, at 20% priority. The VirtualDub filters were loaded in this order:

    DeFlicker
    NeatVideo
    ColorMill
    ColorTools (disabled, but correctly configured)

    Usually, however, I use NeatVideo by itself in a separate run.

    The deen v2 Avisytnh plugin is also attached. Required by HQdering.avs
    Last edited by sanlyn; 19th Mar 2014 at 11:33.
    Quote Quote  
  20. sanlyn,

    I'm only back now (had a huge amount of work to do before I even could start my computer again). First I'd like to thanks so much for your script. It's working really really nice and gives amazing results.
    I split the script in some blocks to really see what each function does and built some kind "toolbox" out of each block. I prefer to take some time to really understand what is being done in each function instead of apply the script "out of the box".
    I could successfully reuse some of the script parts on other video which were really in bad shape.
    I'll continue to experiment on this way. Thanks again !
    Quote Quote  
  21. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Glad to see it's working. One way to see what each line of code or group of lines is doing is to insert a "return last" statement after a line. That command will stop the processing and return the last processing step that was just performed. Or you can put a "#" comment mark at the start of a line to disable it.
    Last edited by sanlyn; 19th Mar 2014 at 11:33.
    Quote Quote  



Similar Threads

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