[Ffmpeg-devel] DAR and SAR FFmpeg option confusion
Robert Swain
robert.swain
Tue Mar 13 01:14:21 CET 2007
Michael Niedermayer wrote:
> On Mon, Mar 12, 2007 at 11:22:00AM -0700, Roman Shaposhnik wrote:
>> On Mon, 2007-03-12 at 15:32 +0000, Robert Swain wrote:
>>>> i'm not sure the one in utils.c should exist (if it is triggered, i'm
>>>> not sure it will lead to a good behavior)...
>>>> to verify this, you can try to use -vaspect option, which should use the
>>>> option in utils.c, and not the one in ffmpeg.c
>>>> there must also be a static in ffmepg.c to handle the aspect ratio,
>>>> which you should not use to set encoder param if you use -vaspect, too...
>>> I'm encoding to x264 and I wrote the code in libavcodec/x264.c to use:
>>>
>>> 192: x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num;
>>> 193: x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den;
>>>
>>> I haven't done any print debugging but looking at the SAR reported by x264,
>>> these values are not affected by -vaspect, grepping for vaspect in the code
>>> returns no results and it isn't documented anywhere yet ffmpeg doesn't report
>>> any unrecognised option error. :/
>> I have the same issue with DV (not being able to use SAR for real) so
>> if you ever figure this out -- there'll be at least two clients for the
>> functionality.
>
> -aspect should set DAR, DAR + width and height -> SAR if this doesnt work
> its a bug
Well yes, you can calculate the necessary DAR to get the SAR you want, but I
think you should be able to set them independently. If you disagree, fair
enough, I'll shut up. :)
Rob
More information about the ffmpeg-devel
mailing list