[Ffmpeg-devel] DAR and SAR FFmpeg option confusion

Benoit Fouet benoit.fouet
Mon Mar 12 08:48:57 CET 2007


Hi,

Robert Swain wrote:
> Hey,
>
> ffmpeg.c:
> 3578:    { "aspect", HAS_ARG | OPT_VIDEO,
> {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or
> 1.3333, 1.7777)", "aspect" },
>
> libavcodec/utils.c:
> 579:{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio),
> FF_OPT_TYPE_RATIONAL, DEFAULT, 0, 10, V|E},
>
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 tried two command lines with -aspect just after -i and another just
> before the output file and they exhibited the same behaviour so I
> assume the position on the command line doesn't affect the meaning. I
> think -aspect is being used for the frame aspect ratio only.
it is the case indeed

> I would make a patch but I don't know how to solve this issue.
what issue do you think of ?

> I would like to be able to set the sample aspect ratio somehow. I'll
> do the monkey work if someone explains what needs changing. :)
Ben





More information about the ffmpeg-devel mailing list