[MPlayer-dev-eng] Re: Question about lavcopts's aspect= option
Rémi Guyomarch
rguyom at pobox.com
Wed Nov 20 06:41:47 CET 2002
On Tue, Nov 19, 2002 at 07:06:54PM +0100, Gabucino wrote:
> I can't get this sucker to work as it should.
> I wanted to encode my 480x280 MPEG movie (with aspect 1.33 = 640x280) to
Neither 480x280 or 640x280 has a 4:3 aspect ratio.
Aspect ratio = displayed width / displayed height. In your case you
want an aspect ratio of 16/7 or ~2.29.
> MPEG4, using libavcodec's aspect info storing feature, only to found that
> only 4:3, 16:9, and 221:100 (??!!) are supported.
Yes. This short-term patch fix it, although it's not the right way to
do that IMHO :
--- libmpcodecs/ve_lavc.c 14 Nov 2002 22:36:16 -0000 1.39
+++ libmpcodecs/ve_lavc.c 20 Nov 2002 05:37:42 -0000
@@ -297,15 +297,11 @@
lavc_venc_context->aspect_ratio_info = FF_ASPECT_4_3_625;
else if (lavc_param_aspect == (float)(16.0/9.0))
lavc_venc_context->aspect_ratio_info = FF_ASPECT_16_9_625;
- else if (lavc_param_aspect == (float)(221.0/100.0))
+ else
{
lavc_venc_context->aspect_ratio_info = FF_ASPECT_EXTENDED;
- lavc_venc_context->aspected_width = 221;
+ lavc_venc_context->aspected_width = lavc_param_aspect * 100 + 0.5;
lavc_venc_context->aspected_height = 100;
- }
- else
- {
- printf("Unsupported aspect ratio (%f)\n", lavc_param_aspect);
}
mp_dbg(MSGT_MENCODER, MSGL_DBG2, "aspect_ratio_info: %d\n", lavc_venc_context->aspect_ratio_info);
mp_dbg(MSGT_MENCODER, MSGL_DBG2, "par_width: %d\n", lavc_venc_context->aspected_width);
> I'd need 16:12.
>
> Just how can I achieve that?
16:12 == 4:3 :-)
But in fact you need 16:7.
--
Rémi
More information about the MPlayer-dev-eng
mailing list