Log in

View Full Version : Resizing video via AviSynth/CCE, video small


ObeewanVOB
26th October 2004, 01:58
OK, so after alot of procrastination I took the plunge and started using the CCE/Avisynth combo for processing regular video and I'm glad I did. It is so much faster then the old VirtualDub then TMPGEnc method I used to use. I've only used CCE for backing up DVDs so far.
This week I'm doing a friend a favor of transferring a VHS to DVD. I captured at 640X480 and when I re-encoded it the aspect ratio seemed a little off. The tape is a slide show presentation and after encoding it some of the pictures seem to extend and distort all the way to the top and bottom or the sides of the screen.
I though all I had to do was re-size to 352X240 but the resulting video is smaller by the same fraction.
I don't really understand what is happening here. For example if I use TMPGEnc to resize to 352X240 the picture still fills the screen but with CCE/Avisynth the picture gets shrunk.
I'm using the BilinearResize(352, 240). I've through about maybe using AddBorders and leaving the aspect ratio the same but from what I've read it seems that adding a border will only shift the picture the same amount of border lines that I add to the picture. Do you think maybe I should use the BilinearResize to rezide it somewhat and then add the same amount of border lines with AddBorder. I'm just worried that while my player will play a coffee can lid my friends' player may not like a non-standard resolution.

Matthew
26th October 2004, 05:17
Off the top of my head, having DVD compliant checked results in CCE resizing the video to 720 x 480/576. It may do this by adding fatass black borders.

Also this is MPEG-1 right? TMPGEnc is definately a better choice for MPEG-1, quality-wise.

ObeewanVOB
26th October 2004, 10:41
Yep, saw those fatass borders on my first output. I'm trying to make MPEG2 but was trying a lower resolution to get the picture to fit better. I dont' get it. The tape and the capture looked good. I capped at 640X480 and did not change the resolution except using CropBottom to remove the distortion at the bottom of the screen and then used BilinearResize to keep it at 640X480. The new picture now looks fine on PC but distorted at the top and bottom as well as the sides for the pictures that extend that far. I might have to go MPEG1 with TMPGEnc, I remember now that it has the setting to control the aspect ratio for the output. Is there any way to do this in the AviSynth script or to resize the picture so it won't distort?

ObeewanVOB
26th October 2004, 10:49
Sorry, thanks for the tip Matthew. It didn't answer my question directly but it pointed my dumb ass in the right direction:p

Matthew
26th October 2004, 11:25
Well if you are using MPEG-2 then what you want is half-D1, which is 352 x 480 :) You shouldn't need to fiddle with aspect ratio, add borders etc.

Also, come to think of it the distortion may be related to interlacing. You can deinterlace with avisynth, but you need to load a plugin (e.g. decomb.dll) and write the appropriate command.

However I'm not into capturing so any advice I give in that realm (first paragrapgh excluded) is rather hit and miss :/

hendrix
26th October 2004, 14:55
is there any reason why capping at 640x480? since your capping a VHS just capture it at 720x480 then resize it to half D-1 (352x480) via avisynth with this script

LanczosResize(320,448,0,0,720,480)
AddBorders(16,16,16,16)

it shrinks the video to compensate for the overscan you see more video since most TVs cut off 10% - or if you dont want to compensate for overscan just use

LanczosResize(352,480,0,0,720,480)

LanczosResize tend to have sharper video - it's all about preference...trust your eyes

if your VHS is a movie (film source) then you can try IVTC and encode your mpeg2 as 24p - i use this script to ITVC

LoadPlugin("source to\decomb.dll")
Telecide(Guide=1,Post=False)
Decimate(Cycle=5)

this is a simple script and hasn't done me wrong yet - you have add 3:2 pulldown flags in later - of course their may better IVTC scripts around (im not too avisynth savvy) but this scripts looks good enough for me - i hope this helps...and please let me know if there's a better script for performing IVTC

ObeewanVOB
27th October 2004, 03:35
Thanks for the replies hendrix, matthews. I'm capping at 640X480 because any higher than that and my system starts dropping frames like crazy. Using an old ATI 128 Rage Pro but will be upgrading soon enough, I hope.:rolleyes:
I didn't really think about it being a deinterlacing problem but I'll put it though the ringer to see what happens. I was thinking about using Lanczos but didn't think it applied to my problem. Will give it a try and see what happens. Thanks guys.