[MEncoder-users] adding black bars to maintain aspect ratio2

Nico Sabbi nicola_sabbi at fastwebnet.it
Fri Feb 24 23:20:15 CET 2006


Jon Drukman wrote:

> i am trying to figure out how to get mencoder to always output a 4:3 
> image, but with black bars added to preserve the original aspect ratio 
> of the input video file.  is it possible?  i've played around with 
> dsize and dscale using the negative value options but i always get a 
> stretched 4:3 image.  i could be putting in any aspect ratio video but 
> i always want a 4:3 result with added black bars (if necessary).
>
> -jsd-
>
>

with what type of output?
If with avi something like -vf scale=640:-10,expand=640:480 will keep 
A/R and
expand to 640x480 (4/3)
If with mpeg1/2 you have to use the A/R flags in the mpeg video, in this 
case you have
to use some trick:
720x576 @ 4/3 -> 768:576, so

$ mplayer -vf scale=768:-10 film.avi will give you the rescaled y',

$ mencoder -vf scale=720:y',expand=720:576 -lavcopts aspect=4/3:... will 
do what you need





More information about the MEncoder-users mailing list