[FFmpeg-devel] [PATCH 2/2] Add sample_aspect_ratio fields to vsrc_buffer arguments. This fixes aspect handling in ffmpeg This is based on a patch by baptiste
Stefano Sabatini
stefano.sabatini-lala
Sat Feb 5 16:27:32 CET 2011
On date Friday 2011-02-04 17:11:41 -0800, Baptiste Coudurier encoded:
> On 02/04/2011 12:33 AM, Stefano Sabatini wrote:
> >[...]
> >
> > }
> >@@ -2825,6 +2835,12 @@ static void opt_frame_pix_fmt(const char *arg)
> >
> > static void opt_frame_aspect_ratio(const char *arg)
> > {
> >+#if CONFIG_AVFILTER
> >+ av_log(NULL, AV_LOG_ERROR,
> >+ "Option 'aspect' is incompatible with filters, "
> >+ "use -vf together with the setdar filter instead\n");
> >+ ffmpeg_exit(1);
> >+#else
>
> Seriously guys, can you please stop this nonsense ?
> -aspect is used with stream copy as well.
New tentative approach, tested with CONFIG_AVFILTER = 1, -aspect N:D
-vf F, -vf F -aspect N:D, stream copy and CONFIG_AVFILTER = 0,
regression test passed.
I tried also with auto-inserting a setdar filter at the end of the
filterchain, but that was more complicated and I preferred to simply
copy the functionality of setdar to ffsink.
The only problematic aspect of this approach is that the interaction
of -vf setdar with -aspect is not very intuitive, as the value of
frame_aspect_ratio always overrides the value set at the end of the
filtergraph (even when -aspect is not specified).
--
FFmpeg = Fierce and Fabulous Mind-dumbing Purposeless Ephemeral Gargoyle
More information about the ffmpeg-devel
mailing list