[MEncoder-users] mencoder output

Marco brbromo at gmail.com
Mon Mar 6 15:38:06 CET 2006


>  http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-resolution-bitrate-compute

This guide was my starting poing ;-)

My aim is to crop those evil black borders and get the same
proportions, not aspect ratio (i.e. a perfect square in the original
image should be a perfect square in the cropped image, even with a
different aspect ratio w/h).

Calling
- (w,h) the input width and height (e.g. 720x576 PAL)
- (W,H) the input display width and height (e.g. 1024x576 to match a
1.78:1 aspect ratio)
- (w',h') the output width and height
- (W',H') the ouput display width and height

>>Right here mencoder is specifying that the video should be scaled to
>>match the original 1.33:1 aspect ratio. If you
>>don't want that to happen you can either:
No, I don't want to match the original aspect ratio, because the
cropped image would be stretched.

As explained in the guide, my new aspect ratio (square preserving) will be

newAR = (w'/h')/(w/h)*(oldAR)

where oldAR = W/H is the old aspect ratio (e.g. 1.78) and newAR =
W'/H' will be used to choose displaying W' and H'.

> >>- rescale manually with the scale video filter
[...]
> >>There are probably other ways, but I always use the first option so I
> >>don't pay attention to the others.
scale=W':H' would result in a video with resolution (W'xH') higher
then the cropped one (w'xh'), so encoding interpolated pixels

scale=w':h' wuold result in distorted squares, with the same effect of
the -noaspect option (but is the scaling really done?)

> >>- set the aspect manually with the dsize video filter
I think that this is the best idea, with dsize=newAR.
But it seems that mencoder is doing this on his own. Is it true?
Adding dsize=newAR the mencoder output doesn't change.

However I suppose that no scaling is made on the pixel that
mencoder/xvid is going to encode.

What a headache!

Thanks again,
Marco




More information about the MEncoder-users mailing list