View Full Version : VHS capture - How to crop interlaced 25fps PAL correctly?
Hello everyone
I've captured an old VHS tape with Virtualdub (768x576 PAL 25fps)
https://s1.postimg.org/y72rzekkv/vhs_rip.jpg
with
AssumeBFF()
Separatefields()
play smooth
I won't apply resize or deinterlace but only crop garbage off the top/bottom of clip
this is my script
LoadPlugin("C:\NoUAC\Editing Video\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6) # to restore vertical line and center
converttoYV12(interlaced=true)
it's correct?
I want to convert it in X264 interlaced
https://s8.postimg.org/4t2aj1z91/X264.png
LemMotlow
22nd May 2017, 19:01
PAL VHS is usually TFF, not BFF. PAL DV is usually BFF. Did you capture to DV? If that capture is interlaced Yv12, you just screwed up chroma by cropping in multiples of 2. The black levels in that image are a bit high, looks kinda washed out.
768x576? What do you intend to do with that oddball frame size? Certainly not DVD or BluRay/AVCHD.
PAL VHS is usually TFF, not BFF. PAL DV is usually BFF. Did you capture to DV?
No, Vhs
but tape is a copy (original clip is in Video8)
In capture, If i select TFF the motion is jerky with both script
AssumeTFF()
separtaeFileds()
AssumeBFF()
separtaeFileds()
If that capture is interlaced Yv12, you just screwed up chroma by cropping in multiples of 2.
So what should i do?
The black levels in that image are a bit high, looks kinda washed out.
Tips on how to improve it?
768x576? What do you intend to do with that oddball frame size? Certainly not DVD or BluRay/AVCHD.
The final video (MKV H264 pal interlaced) would be played on smart TV / multimedia box / PC
Possible settings for my card
https://s7.postimg.org/i8iezmgnv/pinnacle.png
alternative
384x288
360x540 (with TV crop)
384x576
720x540 (with TV crop)
AVI Mjpeg
LemMotlow
23rd May 2017, 14:55
Normally input luma levels are controlled during capture. You can't do much improvement with Pinnacle software, and your video is already lossy encoded so any alteration means re-encoding and a quality loss. With that frame format it looks like smart tv or media player are your only choice anyway. Capping VHS to lossy codecs is the wrong way of doing it if you expected to make any improvements or edits later. I'd say you're stuck with what you have. Re-encoding will only make it worse.
Rues for cropping various formats and colorspaces are in "Crop restrictions" section halfway down this page: http://avisynth.nl/index.php/Crop.
Normally input luma levels are controlled during capture. You can't do much improvement with Pinnacle software, and your video is already lossy encoded so any alteration means re-encoding and a quality loss. With that frame format it looks like smart tv or media player are your only choice anyway. Capping VHS to lossy codecs is the wrong way of doing it if you expected to make any improvements or edits later. I'd say you're stuck with what you have. Re-encoding will only make it worse.
I understand, but encoding in x264 is a forced step
Avi file is large 50GB :scared:
Unfortunately with my card I can not acquire with a lossless codec (like HuffyUV)
Rues for cropping various formats and colorspaces are in "Crop restrictions" section halfway down this page: http://avisynth.nl/index.php/Crop.
All clear
but Avi is YUY2 (mod2 interlaced height) not YV12 (mod4)
I've added ConverttoYV12(interlaced=true) at the end because it is required by X264 conversion
What i want to understand if it is right cut 12 lines and sosbstitute with 12 black
Field-order remains correct?
crop(0, 2, 0, -10)
addborders(0,6,0,6)
If i want to add Convolution3d at the script ,what is the correct way?
this
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
Convolution3D(preset="vhsBQ")
or
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(preset="vhsBQ")
evn=SelectEven.Convolution3D(preset="vhsBQ")
Interleave(evn,odd)
Weave()
Normally input luma levels are controlled during capture. You can't do much improvement with Pinnacle software, and your video is already lossy encoded so any alteration means re-encoding and a quality loss. With that frame format it looks like smart tv or media player are your only choice anyway. Capping VHS to lossy codecs is the wrong way of doing it if you expected to make any improvements or edits later. I'd say you're stuck with what you have. Re-encoding will only make it worse.
I understand, but encoding in x264 is a forced step
Avi file is large 50GB :scared:
Unfortunately with my card I can not acquire with a lossless codec (like HuffyUV)
Rues for cropping various formats and colorspaces are in "Crop restrictions" section halfway down this page: http://avisynth.nl/index.php/Crop.
All clear
but Avi is YUY2 (mod2 interlaced height) not YV12 (mod4)
I've added ConverttoYV12(interlaced=true) at the end because it is required by X264 conversion
What i want to understand if it is right cut 12 lines and sosbstitute with 12 black
Field-order remains correct?
crop(0, 2, 0, -10)
addborders(0,6,0,6)
If i want to add Convolution3d at the script ,what is the correct way?
this
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
Convolution3D(preset="vhsBQ")
or
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(preset="vhsBQ")
evn=SelectEven.Convolution3D(preset="vhsBQ")
Interleave(evn,odd)
Weave()
hello_hello
25th May 2017, 20:10
I accidentally mod2 cropped an interlaced video the other day, and this is what happened when I de-interlaced it for encoding.
https://s11.postimg.org/9bpbd0zyn/deinterlacing_problem.jpg
You can read the bickering regarding de-interlacing in this thread (https://forum.doom9.org/showthread.php?p=1807026#post1807026) if you like, but personally I think the only option is to de-interlace with QTGMC and then encode. I attached some de-interlacing samples to the post I linked to if you care to look. For my video card, hardware de-interlacing is on a par with Yadif(mode=1) and in my particular test, de-interlacing to 50fps with QTGMC reduced the bitrate for the same CRF value by 25%, compared to interlaced encoding.
Personally, and feel free to ignore me as it's personal preference, I tend to go with a theory similar to 1080i vs 720p@ 50 or 60fps, they both have a similar resolution so you can generally resize 1080i to 720p if you de-interlace to 50/60fps when encoding. Likewise, you can generally resize interlaced PAL to 640x480 and not miss any detail. For a low quality capture, I suspect that applies doubly-so. I know for some people it's the work of Satan to resize the height, so that's just me. (if you add the borders back, and I never do myself because I'm not encoding for DVD compliance, the resizing would be 656x480 (ITU Input DAR).
I'm not sure I agree with the levels comment, but I'm using an old, never been calibrated CRT at the moment, so I'm probably wrong. Before changing anything, it might pay to check a sample using your TV to play it. There's no guarantee you're seeing the correct levels in the preview (does MeGUI's preview look the same?).
Having said that, to go from TV Range (16-235) to PC range (0-255) try one of these (they have a different effect on colour so pick the one you prefer).
Levels(16, 1.0, 235, 0, 255)
YLevels(16, 1.0, 235, 0, 255)
PC range to TV range:
Levels(0, 1.0, 255, 16, 235)
YLevels(0, 1.0, 255, 16, 235)
http://avisynth.nl/index.php/Ylevels
StainlessS
26th May 2017, 01:19
Levels(16, 235, 1.0, 0, 255)
YLevels(16, 235, 1.0, 0, 255)
PC range to TV range:
Levels(0, 255, 1.0, 16, 235)
YLevels(0, 255, 1.0, 16, 235)
Perhaps should read this:-
Levels(16, 1.0, 235, 0, 255)
YLevels(16, 1.0, 235, 0, 255)
PC range to TV range:
Levels(0, 1.0, 255, 16, 235)
YLevels(0, 1.0, 255, 16, 235)
hello_hello
26th May 2017, 04:03
Perhaps should read this:-
To be truthful, I type it like that almost every time I use Levels/YLevels because at some stage my brain decided the gamma adjustment should go between the in and out levels and won't let it go no matter how often I have to correct it.
I've fixed my previous post. Cheers.
Normally input luma levels are controlled during capture. You can't do much improvement with Pinnacle software, and your video is already lossy encoded so any alteration means re-encoding and a quality loss. With that frame format it looks like smart tv or media player are your only choice anyway. Capping VHS to lossy codecs is the wrong way of doing it if you expected to make any improvements or edits later. I'd say you're stuck with what you have. Re-encoding will only make it worse.
I understand, but encoding in x264 is a forced step
Avi file is large 50GB :scared:
Unfortunately with my card I can not acquire with a lossless codec (like HuffyUV)
Rues for cropping various formats and colorspaces are in "Crop restrictions" section halfway down this page: http://avisynth.nl/index.php/Crop.
All clear
but Avi is YUY2 (mod2 interlaced height) not YV12 (mod4)
I've added ConverttoYV12(interlaced=true) at the end because it is required by X264 conversion
What i want to understand if it is right cut 12 lines and sosbstitute with 12 black
Field-order remains correct?
crop(0, 2, 0, -10)
addborders(0,6,0,6)
If i want to add Convolution3d at the script ,what is the correct way?
this
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
Convolution3D(preset="vhsBQ")
or
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(preset="vhsBQ")
evn=SelectEven.Convolution3D(preset="vhsBQ")
Interleave(evn,odd)
Weave()
Normally input luma levels are controlled during capture. You can't do much improvement with Pinnacle software, and your video is already lossy encoded so any alteration means re-encoding and a quality loss. With that frame format it looks like smart tv or media player are your only choice anyway. Capping VHS to lossy codecs is the wrong way of doing it if you expected to make any improvements or edits later. I'd say you're stuck with what you have. Re-encoding will only make it worse.
I understand, but encoding in x264 is a forced step
Avi file is large 50GB :scared:
Unfortunately with my card I can not acquire with a lossless codec (like HuffyUV)
Rues for cropping various formats and colorspaces are in "Crop restrictions" section halfway down this page: http://avisynth.nl/index.php/Crop.
All clear
but Avi is YUY2 (mod2 interlaced height) not YV12 (mod4)
I've added ConverttoYV12(interlaced=true) at the end because it is required by X264 conversion
What i want to understand if it is right cut 12 lines and sosbstitute with 12 black
Field-order remains correct?
crop(0, 2, 0, -10)
addborders(0,6,0,6)
If i want to add Convolution3d at the script ,what is the correct way?
this
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
Convolution3D(preset="vhsBQ")
or
LWLibavVideoSource("G:\VHS.avi")
crop(0, 2, 0, -10)
addborders(0,6,0,6)
converttoYV12(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(preset="vhsBQ")
evn=SelectEven.Convolution3D(preset="vhsBQ")
Interleave(evn,odd)
Weave()
Mounir
7th June 2017, 20:58
crop + addborders at the very end is what's best imo
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.