VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    There is a lot of great information spread throughout the restoration and conversion threads on software filters. Generally this is confined to avisynth and virtualdub filters, but also extends to filters built into editors and encoders. The problem is finding it all. We have a sticky in this forum dedicated to hardware filters, and I think we should also have one for software filters, and in particular handy avisynth scripts and snippets. I am hoping other will contribute to this post to make it a one stop reference point for avisynth work. Post a script, post a snippet, post a link to other work, such as John's (fulcilives) convolution 3D guide -> https://forum.videohelp.com/viewtopic.php?t=225951

    I'd like to start the ball rolling with this little script.

    Recently I have had the time to delve more deeply into avisynth, and am constantly amazed by it's flexibility and power. At the same time, I am often frustrated by it's lack of interface, as I am a visual person. When working in Vegas, I always use the split screen preview, so I can compare the original to the changed version of a clip. This simple script allows me to preview in the same manner in virtualdub.

    # Simple script to do side by side comparison of two clips
    # Handy when doing restoration work to see a quick comparison
    # of the original clip and the restoration work
    #
    # Recommend that the original clip be loaded via a small
    # script that also contains matching trim and colourspace conversion
    # to ensure a match up. Colourspace conversion has been deliberately omitted
    # from this script to reduce needless conversions
    #
    # This version is designed for DV based restoration work
    # and will work for anything with a 720 width.

    # Load clips/scripts

    Orig_Clip=AviSource("original.avs").KillAudio
    Rest_Clip=AviSource("restoration.avs").KillAudio

    # Crop clips for comparison. Clips are cropped to create
    # a single complete frame

    Orig_Clip_Crop=Crop(Orig_Clip,0,0,360,0)
    Rest_Clip_Crop=Crop(Rest_Clip,360,0,0,0)

    # Stack the two halves together to finish up

    StackHorizontal(Orig_Clip_Crop,Rest_Clip_Crop)
    It can perhaps be refined further, but for the moment it suits what I do.

    Hopefully others will share their experience and make this an avisynth reference library for all members.
    Read my blog here.
    Quote Quote  
  2. Hey-

    Nice idea. Here's a collection of scripts that jimmalenko turned me onto once:

    https://www.videohelp.com/forum/userguides/99389.php#start

    There's a "Crop And Split Screen" script in there that's fairly similar to yours.

    Here's a bunch of nice scripts at the AviSynth site:

    http://www.avisynth.org/ShareFunctions

    Sorry that I don't have anything original to contribute. I steal all my stuff from others.
    Quote Quote  
  3. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Here's one I use (which is an adaptation of FulciLives' script) for all my TV and VHS caps, which are Canopus-compatible Type 2 DV-AVI (CDVC) from an ADVC-100:

    Code:
    # Load plugins
    LoadPlugin("Convolution3d.dll")
    #
    # Load source
    avisource("Ep01.avi")
    #
    # Optional trim() commands 
    #Trim(0,31500)
    #
    # Crop junk from edges
    crop(16,16,-16,-16) 
    #
    # Apply Convolution3D
    SeparateFields() 
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64, 10, 0) 
    evn=SelectEven.Convolution3D (0, 32, 128, 16, 64, 10, 0)
    Interleave(evn,odd) 
    Weave()
    #
    # Pad back to Full D1
    AddBorders(16,16,16,16)
    #
    # Optional resize to Half D1
    #LanczosResize(352,576) 
    #
    # For TMPGEnc
    converttorgb(interlaced=true)
    If in doubt, Google it.
    Quote Quote  
  4. Member
    Join Date
    Oct 2005
    Location
    Australia
    Search Comp PM
    Hi, I tend to use the jdl function for separating the fields. I don't pretend to understand the chemistry behind it, but I read at doom9 & afterdawn that it does the job better than "Separate Fields/Weave", which tends to soften. I think "Tdeint" is the best method, but it will run your script very slow.

    eg

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Convolution3D.dll")
    Import("C:\Program Files\Avisynth 2.5\plugins\jdl-util.avsi")
    Import("C:\Program Files\AviSynth 2.5\plugins\jdl-interlace.avsi")
    AviSource("C:\~\capture.avi")
    JDL_UnfoldFieldsVertical(true)
    DRemoveGrain(mode=2).Convolution3D(preset="animeLQ ")
    Lanczos4Resize(352,576)
    ConvertToYUY2().Limiter()
    JDL_FoldFieldsVertical(true)
    I do agree though, Convolution3D is very good & fast.

    But now I'm looking at the Neatvideo plug-in, which can be incorporated into your avisynth script also.

    I think, those VHS captures that need more than a good DVD recorder & proc-amp box, well, perhaps they deserve the extra time to process & encode. Go the full hog, as they say...
    Quote Quote  
  5. Member
    Join Date
    Oct 2005
    Location
    Australia
    Search Comp PM
    I was fooling around with an old NTSC movie I dubbed onto DVD via my Pioneer 530. I made a .d2v file with DGIndex & loaded it into Avisynth with this script:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\warpsharp.dll")
    Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi")

    MPEG2Source("C:\Documents and Settings\~\GREENSLIME.d2v")

    Telecide(order=1,guide=1)
    Decimate()

    DeGrainMedian(limitY=5,limitUV=10,mode=2)
    FFT3dFilter(sigma=1.5,bt=4,sharpen=1.0)

    LimitedSharpenFaster()
    I used Quenc to reencode, thus keeping it all purely in the YV12 colour-space. It took ages, but there's a noticeable improvement in picture quality.


    Before Avisynth:

    After Avisynth:
    Quote Quote  
  6. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Good stuff. Keep 'em coming.

    Here is a snippet I posted over here -> https://forum.videohelp.com/viewtopic.php?p=1504323#1504323

    It takes a D1 res avi shot in 16:9 anamorphic, and crops it for 4:3 fullscreen centre encoding.

    NTSC code

    #NTSC 16:9 to 4:3 crop and resize
    #Load avi file
    AviSource("path to your file here")

    #Resize down from 16:9 to 4:3 letterbox (without bars)
    BicubicResize(720,360)

    #Crop off left and right sides to get 4:3 AR
    Crop(88,0,528,360)

    #Resize back up to full frame
    Lanczos4Resize(720,480)
    And the PAL version

    # PAL 16:9 to 4:3 crop and resize
    AviSource("path to source")
    BicubicResize(720,432)
    Crop(88,0,528,432)
    Lanczos4Resize(720,576)
    Read my blog here.
    Quote Quote  
  7. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Why do you not script an overscan cover-up too? That noisy overscan sucks up your bitrate. Knock off at least 8 pixels on each side with black. MASK it, don't crop it.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  8. Member
    Join Date
    Oct 2005
    Location
    Australia
    Search Comp PM
    Yep, I would of course add a "Crop" & "AddBorders" to my script. But I'm just concentrating on denoise/sharpening right now - just fooling around, like I said. It's difficult to balance high quality with speed - perhaps impossible.

    The LimitedSharpen functions are pretty awesome, though. I've yet to find time to test out other things like "Soothe", "SeeSaw", "iip" etc...

    So much to get your head around!

    I have read that the old Separate Fields/(denoiser)/Interleave/Weave way of processing interlaced video can cause vertical jitter or blurring? Something like LeakKernelDeint, or TDeint (much slower), is sharper & recommended?
    Quote Quote  



Similar Threads

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