View Full Version : Problem with De-Interlacing
papcom
30th September 2015, 10:16
I try to de-interlace PAL-SD-VHS Video (tff) but the result never seems de-interlaced. I use the following script, which I adapted (originally by @poisondeathray, found in another Forum)
qtinput("E:\video_VHS_test.mov", color=2, audio=0)
AssumeTFF()
Crop(16,4,-12,-12) # Crops xx pixels L,T,R,B
ConvertToYV12(interlaced=true)
interp=nnedi3(field=3) #double rate, starts with top
yadifmod(order=1, field=-1, mode=1, edeint=interp) #1=TFF,field set to order,double rate
Spline36Resize(720,576)
DoubleWeave().SelectEvery(4,1)
The result looks almost the same as the original, with all the interlaced lines. What is wrong?
vivan
30th September 2015, 10:58
You're deinterlacing video and then re-interlacing it (with the last line of your code).
papcom
30th September 2015, 15:43
@vivan - You're right ...my fault, I oversaw this. Thank You.
TheSkiller
30th September 2015, 16:34
Why do you crop and then resize back to 720x576? You are distorting the aspect ratio (albeit slightly), moving the picture down a bit (so what was once aimed to be the middle of the frame is now lower) and blur the video by first using a fast deinterlacer and then resizing – this forever "merges" the interpolated lines from the deinterlacer with the original ones (loss of sharpness).
Dirty borders can be blanked with Letterbox(t,b,l,r) or filled with FillMargins (YV12 only) or BorderControl (YV12 and YUY2). No resizing required.
Music Fan
30th September 2015, 20:45
Or with addborders(14,8,14,8).
And are you sure your video isn't in YV12 yet ?
StainlessS
1st October 2015, 15:20
And are you sure your video isn't in YV12 yet ?
If it is already YV12, then ConvertToYV12 is a NOP (ie dont matter, EDIT: dont do anything).
(Call to link in filter, just returns original clip instead of calling Constructor and returning new YV12 clip)
papcom
4th October 2015, 10:31
Why do you crop and then resize back to 720x576?....
Dirty borders can be blanked with Letterbox(t,b,l,r) or filled with FillMargins (YV12 only) or BorderControl (YV12 and YUY2). No resizing required.
i MUST delete the distorion and garbage of the border (especially the headswitching and the blanking). I do not want any black border mask !!!
Question: how can I find out whether my original Video is YV12?
Reel.Deel
4th October 2015, 10:55
Question: how can I find out whether my original Video is YV12?
MediaInfo (http://www.videohelp.com/software/MediaInfo)
TheSkiller
4th October 2015, 11:35
i MUST delete the distorion and garbage of the border (especially the headswitching and the blanking). I do not want any black border mask !!!OK, but why resize? Just crop and encode.
StainlessS
4th October 2015, 12:57
Question: how can I find out whether my original Video is YV12?
As Reel.Deel said or
return qtinput("E:\video_VHS_test.mov", color=2, audio=0).Info
to see what Avisynth thinks it is.
Music Fan
4th October 2015, 16:48
Or simply add info() at the end of the script.
But do it before adding other functions, thus you will have only 2 lines ;
qtinput("E:\video_VHS_test.mov", color=2, audio=0)
info()
Then remove info() (or add # in front to disable it) and add functions.
Sharc
4th October 2015, 17:39
OK, but why resize? Just crop and encode.
He probably wants to maintain a DVD compliant resolution (720x576). But then there is no way to avoid borders if the picture should remain undistorted. Just guessing .....
foxyshadis
4th October 2015, 21:11
Note that VHS is natively much closer to Y411 than YV12, and horizontal resolution isn't more than 320x or 352x. (In reality, it's more Y811.) When capturing, use YUY2 or Y411 to avoid a chroma resample before deinterlacing if possible. If it's DV, it's automatically Y411. If you already captured into YV12 or direct to DVD (which will happen if you captured into MPEG2), it'd be worth re-capturing into DV instead if you want the best quality.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.