[MPlayer-users] mencoder: ripping a dvd to a 700MB avi questions

Corey Hickey bugfood-ml at fatooh.org
Fri Jul 5 10:47:01 CEST 2002

Dominik Benninger wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> On Freitag, 5. Juli 2002 01.17, Farrell Farahbod wrote:
>>no it doesnt, but i have some that do, and i forgot to ask how to crop
>>out the blackbars that result from dvd manufacturs that are too mean to
>>use anamorphic widescreen...
> use mplayer -voc cropdetect input.avi, but it's written in RTFM.
>              ^^^
Actually, that's mplayer -vop cropdetect input.avi. (typo) :-)

Cropdetect tells the absolute maximum cropping, though, and as such is 
only half the story: it's always best to keep the resolution as a 
multiple of 8 (I've heard 16 is better, but I've never had trouble with 
8). Anyway, this necessitates either scaling a bit differently or 
padding the crop estimates slightly with very small black borders.

For instance, with a fairly typical 2.35:1 widescreen movie with bands 
on top and bottom, the real resolution is 720x480, which is scaled up to 
854x480. cropdetect might recommend crop=720:366:0:54 (with respect to 
the real resolution).

On such movies I usually downscale on the Y axis rather than upscaling 
on the X axis.

720 / 854 = 0.843
366 * 0.843 = 309

(Approximately, of course). So, cropping the X axis to 366 pixels and 
then scaling down to 309 would be the minimum ideal. The nearest 
multiple of 8 above 309 is 312, which means either scaling straight from 
366 to 312 (the aspect ratio is _very slightly_ messed up) or not 
cropping as much so the scaling works out (a bit more math involved). I 
choose the latter.

312 / 0.843 = 370

-which means that if I crop to 370 the scaling will make the X 
resolution a multiple of 8. 366 and 370 differ by 4 pixels, so I leave 
2-pixel bands at the top and bottom. Thus, the scale/crop section looks 
like this: -vop scale=720:312, crop=720:370:0:52


I write down the end result each time I have to do these calculations, 
so now I have sets of values for all the common resoluions - I just have 
to tweak them slightly to compensate for movies that are positioned just 
a little bit differently.

In any case, your preferences may vary, or someone will point out just 
how wrong I'm doing this. :-P ...but you should at least have a basis 
from which to start.


More information about the MPlayer-users mailing list