View Full Version : Resizing & Recentering Video
EpheMeroN
25th January 2008, 08:15
Working on the old B&W "Night Tide" DVD. It's 4:3 Letterboxed. Wanted to resize it back to 16:9 while also recentering the video (there's more black on the right than left).
Source Video:
http://img444.imageshack.us/img444/4099/bighi4.th.png (http://img444.imageshack.us/my.php?image=bighi4.png)
Current script:
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\Decomb.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\nnedi.dll")
MPEG2Source("C:\Users\User1\Desktop\VTS_01_1.d2v")
AssumeTFF()
Crop(8,68,32,-68)
Telecide(guide=1)
Decimate(cycle=5)
NNEDI(Field=0, dh=True)
BlackmanResize(680, 464)
AddBorders(20,8,20,8)
Which outputs this in VDub:
http://img135.imageshack.us/img135/5627/60000mw3.th.png (http://img135.imageshack.us/my.php?image=60000mw3.png)
scharfis_brain
25th January 2008, 08:46
Crop(8,68,-32,-68)
you forgot the minus at the third parameter.
positive values for the third and fourth paramter are considered as destination width, while negative values for these are cropping values.
Also I would crop much lesser!
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\Decomb.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\nnedi.dll")
MPEG2Source("C:\Users\User1\Desktop\VTS_01_1.d2v")
greyscale()
crop(4,56,-24,-64)
Telecide(guide=1)
Decimate(cycle=5)
NNEDI(Field=0, dh=True)
BlackmanResize(width, 480)
Addborders(14,0,14,0)
You can do your AR-calculations also with http://www.haku.co.uk/ARCT.html
EpheMeroN
25th January 2008, 11:27
Thanks for pointing that out! I missed that entirely not putting the - in the crop command.
When cropping and resizing for DVD, they have to be mod8 right? That's why I cropped a bit more than I needed to. Or is it mod4, mod16? I get them confused so much. Can't it help to reduce macroblocking as well using proper crop/resize calculations?
foxyshadis
25th January 2008, 15:06
If you mean internally in the avisynth script, it only has to be mod2 during intermediate stages.
scharfis_brain
25th January 2008, 19:13
it only has to be mod2 during intermediate stages.
Be careful! when treating interlaced YV12 it needs to be mod4 in vertical. If it is not, you'll swap the field order!
EpheMeroN
26th January 2008, 03:58
@scharfis_brain: Why did you put greyscale() in your sample script when the video is already black and white?
scharfis_brain
26th January 2008, 05:35
To remove the rainbowing artifacts of the composite video source, I used greyscale().
Just look closely to the three stripes on the arm of the right guy. They are coloured.
Removing these colour artifacts will lower bitrate demand of the encoder and thus raising quality.
EpheMeroN
26th January 2008, 09:59
Ah nice! I've never worked with black & white dvd's before. I'll have to take closer look at them from here on.
Now with my latest script attempt VDub is telling me that there's no function called BlackmanResize? All I did was add the greyscale filter and changed my crop/resize calculations.
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\Decomb.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\nnedi.dll")
MPEG2Source("C:\Users\User1\Desktop\VTS_01_1.d2v")
Greyscale()
AssumeTFF()
Crop(6,60,-26,-68)
Telecide(guide=1)
Decimate(cycle=5)
NNEDI(Field=0, dh=True)
BlackmanResize(688, 472)
AddBorders(16,4,16,4)
scharfis_brain
26th January 2008, 12:36
have you tried other resizers?
buzzqw
26th January 2008, 13:40
balckmanresizere don't came with avisynth 2.58, but it's a separate plugin... try with spline36
BHH
jethro
26th January 2008, 17:21
I have BlackmanResize() with Avisynth 2.58 without any plugin so I think you meant 2.57 version?
EpheMeroN
28th January 2008, 07:29
Well BlackmanResize() has always worked for me on this laptop and I haven't switched AviSynth versions. It just stopped working when I changed this script to crop less. Says I'm using 2.57. When I put Spline36Resize() in the script worked again.
Could an app like MeGUI replace my AviSynth install? That's the ONLY other new video app I've installed in the last two weeks since I set this laptop up.
IanB
28th January 2008, 11:55
There is a free standing pluggin version of Spline64 and Blackman resizers. (Search the developer forum, I think Foxyshadis made it). You need 2.5.8 for them to be native.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.