VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 32 of 32
  1. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by DoddsieFox View Post
    Utilizing the first script provided, the source footage is interlaced and TFF field order, and that should be the case for the vast majority of content I transfer going forward, but of course I'll always verify.
    Then, after cropping, the first step is to deinterlace the source, and later apply the rest of the filtering.

    Based on the file you shared, an attempt of processing could be:
    Code:
    video_org=AviSource("Christmas 94 Test.avi")
    
    # trimming
    	trim_start=638
    	trim_end=1166
    video_org_trim=video_org.trim(trim_start,trim_end)
    
    # cropping 
    	crop_left=0	# | rimozione esatta delle bande nere sinistra, sopra, destra e del disturbo sotto	
    	crop_top=2	# | 720-(0+2)x480-(2+8)=718x470
    	crop_right=2
    	crop_bottom=8
    video_org_trim_crop=video_org_trim.crop(crop_left,crop_top,-crop_right,-crop_bottom)
    
    ### de-interlacing
    deinterlaced=video_org_trim_crop.AssumeTFF().QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, tr1=2, tr2=1, NoiseTR=2, sharpness=0.1)
    
    return(deinterlaced)
    Originally Posted by DoddsieFox View Post
    could you help explain what I should be watching for or adjusting?
    You should check that you are not crushing the blacks or clipping the whites, i.e. to capture inside the "capturable range" of you card. Because you are using an AIW 9600 the limits are 16-250.
    Your captured sample does not show accumulations at Y=16 nor at Y close to max; the Y levels are always in the range 16-238, so no specific actions is required to change the capture set-up nor the levels in post-processing. Being obsessed you could shrink the levels from 16-238 to 16-235 if a filtering in RGB domain is required later (i.e. color adjustement) or whatever other operation requiring RGB colorspace.

    Click image for larger version

Name:	levels.png
Views:	4
Size:	881.6 KB
ID:	90051

    You can check analitically the levels with this simple script:
    Code:
    video_org=AviSource("Christmas 94 Test.avi")
    
    # cropping 
    	crop_left=0	# | rimozione esatta delle bande nere sinistra, sopra, destra e del disturbo sotto	
    	crop_top=2	# | 720-(0+2)x480-(2+8)=718x470
    	crop_right=2
    	crop_bottom=8
    video_org_crop=video_org.crop(crop_left,crop_top,-crop_right,-crop_bottom)
    
    # convert to YV16 (required for Y statistics)
    video_org_crop_yv16=video_org_crop.ConvertToYV16(interlaced=true)
    
    # analysis
    video_coloryuv=video_org_crop_yv16.\
    WriteFile("levels.txt", "current_frame", """ "  " """,\
    "AverageLuma()", """ "  " """, "YPlaneMin()", """ "  " """, "YPlaneMax()", """ "  " """,\
    "YPlaneMin(threshold=0.4)", """ "  " """, "YPlaneMax(threshold=0.4)", append=false).\
    ColorYUV(analyze=true)
    
    eval("video_coloryuv")
    Originally Posted by DoddsieFox View Post
    This particular sample clip is the one I've been experimenting with due to the complexity of the footage and its importance, stripped of audio for sharing here. I figured with all the darkness and noise, this would be a good case to learn from, of course not all the footage I have will be like this, but it would be good to know how to handle it.
    This clip does not show defects requiring fixes (a part colors and overall look, which is always a question of personal taste), so I would just apply a basic processing with denoise and a ligth sharpening (remember, the less the best):
    Code:
    # as addition to first script, where you have to remove/comment out the command "return(deinterlaced)"
    
    ### convert to YV16
    deinterlaced_yv16=deinterlaced.convertToYV16()
    
    ### denoising
    denoised_yv16=deinterlaced_yv16.TemporalDegrain2(degrainTR=3)
    
    ### convert to YUY2
    denoised=denoised_yv16.convertToYUY2()
    
    ### convert to YV12
    denoised_yv12=denoised.convertToYV12()
    
    ### sharpening
    sharpened_yv12=denoised_yv12.LSFmod(defaults="slow")
    
    ### convert to YUY2 with chroma from YUY2 color space
    sharpened=sharpened_yv12.convertToYUY2().MergeChroma(denoised)
    
    ### add borders
    sharpened_borders=sharpened.addborders((crop_left+crop_right)/2-1,(crop_top+crop_bottom)/2-1,(crop_left+crop_right)/2+1,(crop_top+crop_bottom)/2+1)
    
    return(sharpened_borders)
    Outcomes (unfair comparison, source is interlaced, you can try to compare with other deinterlacing methods outside AviSynth):
    Click image for larger version

Name:	comp.png
Views:	8
Size:	1.79 MB
ID:	90052

    Outcomes with image slider: https://imgsli.com/NDMyMzIx
    Quote Quote  
  2. Member
    Join Date
    Nov 2025
    Location
    United States
    Search PM
    Originally Posted by lollo View Post
    I would just apply a basic processing with denoise and a ligth sharpening (remember, the less the best)
    Very much appreciate the help, this is all looking really good, and that levels analyzing script will definitely help too. The code shared matches up with a lot of the other posts I've found, so definite confidence that this process ought to hold up and do a good job. Does the code for upscaling still hold up, changing the color matrix from Rec.601 to Rec.709, then borders, then nnedi3_rpow2 with Spline36Resize? I figure for sharing with other family members it might help to upscale.

    Another question on the subject, I know the file sizes are large, I don't mind that and I fully intend to keep the source capture file and the Avisynth processed file for each tape. But I'd also like to be able to share the videos with others via local storage that won't have as much storage space, do you have a recommended process for compressing the files that minimizes quality loss? In the past I've used Handbrake, passing through and matching a lot of the technical properties of the file, and mostly just adjusting the constant quality rate, but if there's a better way to go about that I'll definitely try it out.

    Thank you so much again, with all of this in place I'm just about ready to start completing these definitive transfers, and I can feel confident that I've done the process as best of justice as I can do it!
    Quote Quote  



Similar Threads

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