[MPlayer-users] Transcoding from one aspect ratio to another

Stephen Mollett molletts at yahoo.com
Wed Nov 3 18:00:47 CET 2010


Hi,

On Wed, 3 November, 2010 16:06:56, JD <jd1008 at gmail.com> wrote:
> I have a video file that has an aspect ratio of 2.353 : 1
> I would like to  transcode it to an aspect ratio of 1.6 : 1 (like 1280x800).
> Is this even  possible?

You have two choices - either add black bars top and bottom ("letterboxing") 
using "-vf expand=..." (see the man page or documentation) or crop the left and 
right off with "-vf crop=...". You could also do a bit of both so that you lose 
a little less at the sides and have smaller black bars. Either way, you will 
also need to scale the video appropriately in one or both dimensions using -vf 
scale. I'd probably crop first (so the scaler has less work to do), then scale 
and finally expand (scaling after expanding is generally a bad idea as it will 
blur the edges of the black bars and waste bits).

If the video is already letterboxed (a DVD will most likely be encoded as 
16:9/1.78:1 with black bars to make it 2.35:1), you might want to first crop off 
the existing black bars so that you're just working with the active part of the 
picture. "-vf cropdetect" might help you here.

If you're a bit of a perfectionist (like me), you might want to consider the 
characteristics of the video codec when setting the size of the black bars in 
the final video stream - most codecs work best when the width of the bars (and, 
of course, of the video between them) is a multiple of 16 pixels so you may need 
to trim a few pixels from the picture to get it exactly right even if you're 
only letterboxing it.

Hope this helps,
Stephen

 -- 


I haven't lost my mind - it's backed up on tape somewhere!


More information about the MPlayer-users mailing list