PDA

View Full Version : Widescreen 2.35: Cropping then AddBorders script?


sandchar99
18th March 2002, 18:52
On a "widescreen" DVD (Disney - Region 1 - NTSC) where the actual aspect ratio is 4:3 and the black borders on top and bottom are part of the actual video stream to give it a 2.35:1 appearence, a lot of bitrate is wasted on those black borders.

Can anyone help with an AVS script that has a cropping command followed by the resize command followed by AddBorders command to allocate more bitrate to the film and not those black borders?

Or does that not make any difference? That is, when adding borders, for example to a 16:9, that just becomes wasted video bitrate again?

sandchar99
19th March 2002, 00:08
There's a pretty good discussion in the AVISynth forum entitled "Resizing 2.35 films to 16:9" with this solution:

# SVCD NTSC
Crop(90,0,540,480).BicubicResize(480,480)
# or a bit faster, because less pixels have to resize
Crop(90,60,540,360).BicubicResize(480,360).AddBorders(0,60,0,60)

But I think this is when the source is 2.35:1 and not 4:3 (widescreen, with the bars already part of the video stream). So the script would not be the same.

PS
@moderators: Please fell free to move this post to the AVISynth forum if there are no responses.

I'd like to post there as well but do not want to "cross-post".

Kedirekin
19th March 2002, 04:01
Actually, the post you're reading in the AviSynth forum is, I think, about turning anamorphic 16:9 DVD encodes into 4:3 using a 'sort-of' pan and scan approach (with no panning or scanning of course).

What you described in your original post is even easier, and I do it myself all the time (mostly to speed up encoding than to save bitrate).

The first step is to find out how much to crop from top and bottom. I open the d2v file in TMpg and use the clip filter to figure this out.

After that, you just add a Crop command before resize, change the vertical setting in resize, and add an AddBorders command after resize. Say for example the top border is 58 and the bottom is 60, your script (assuming NTSC) would end up looking something like

Crop(0,58,720,362)
BilinearResize(480,362)
AddBorders(0,58,0,60)

sandchar99
19th March 2002, 17:56
That's the way to do it. There's a program FitCD that creates AVS script but it is way overly complicated for this easy a problem.

Opening the project file with TMPGEnc and using the crop fram feature is THE way to go!!! It is a simple tool.

So....the results I got where a 2.35:1 is pasted on a 4:3 frame is about 100 and 102 pixels compose the top and bottom bars respectively.

The resulting AVS script looked like:

.....etc.
Crop(0,100,720,278)
SimpleResize(480,278)
AddBorders(0,100,0,102)
.....etc.

Understandably, the encoding rate went up from ~0.8 RT to ~1.1 RT (I am also using TemporalSmoother) because I am not encoding the black bars.

The resulting MPG did not look significantly better when being previewed with WinDVD then the original one. But an increase in speed is always appreciated.

So, I recommend that people preview their movies using a software DVD player, which many do anyway as means to authenticate the DVD, to see if their DVD is anamorphic or not. As is the case with Disney, a lot of times, their DVDs are 4:3 with the balck bars part of the video stream natively. Encoding times will become more rapid if users first crop (using TMPGEnc to see how much to crop) and then add borders later.

Kedirekin
20th March 2002, 03:15
One word of caution - always make sure your crop settings are a multiple of two. If the top crop figure is an odd number, it'll reverse the field order on an interlaced encode.

Also, you might want to make sure the remaining resolution after crop is a multiple of four, especially if you're using anything more than just resize. I believe some AviSynth filters require a resolution that is a multiple of four.