[FFmpeg-cvslog] ffmpeg: fix aspect ratio setting

Michael Niedermayer michaelni at gmx.at
Thu Apr 7 02:49:58 CEST 2011


On Tue, Apr 05, 2011 at 03:02:08PM -0700, Baptiste Coudurier wrote:
> On 04/05/2011 12:09 PM, Baptiste Coudurier wrote:
> > On 04/05/2011 09:17 AM, Stefano Sabatini wrote:
> >> On date Tuesday 2011-04-05 09:23:10 -0700, Baptiste Coudurier wrote:
> >>> On 04/05/2011 07:48 AM, Stefano Sabatini wrote:
> >>>> ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Mon Apr  4 02:15:34 2011 +0200| [d1eb50bb29caad9745631759265f475177df99b9] | committer: Stefano Sabatini
> >>>>
> >>>> ffmpeg: fix aspect ratio setting
> >>>>
> >>>> This is done by adding a setsar filter at the beginning of the
> >>>> configured filterchain.
> >>>>
> >>>> This implementation is more robust, since does not modify the
> >>>> filterchain description (which was creating potential syntax errors),
> >>>> but directly modifies the filterchain structure.
> >>>>
> >>>> This also changes the ffmpeg -aspect behavior, as following filters in
> >>>> the filterchain can change the DAR/SAR set by the inserted setsar
> >>>> filter.
> >>>
> >>> Please don't change -aspect behavior, there is no reason to.
> >>
> >> It was breaking syntax (e.g.: -aspect A -vf "null[out]").
> >>
> >> Another option could be to add an aspect filter at the end of the
> >> filterchain, thus annulling the effects of the previous filters in the
> >> filterchain.
> >>
> >> That said, I don't see a sane way to make -vf and -aspect convive when
> >> filtering is enabled, that is i'd tend to say to the user to just use
> >> -vf when she wants to change the final aspect (and keep -aspect for
> >> -vcodec copy).
> > 
> > Having 2 options is confusing for the user.
> > 
> > I think the correct solution is to avoid adding filters when -aspect is
> > specified on the commandline, and check frame_aspect_ratio directly.
> > My first patch did this. It's easy to distinguish between -aspect
> > specified or not.
> > 
> > If it was, override the output aspect ratio no matter what (at the end
> > of configure_filters)
> > 
> 
> Patch attached.
> 
> -- 
> Baptiste COUDURIER
> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> FFmpeg maintainer                                  http://www.ffmpeg.org

>  ffmpeg.c |   33 ++++++++++++++-------------------
>  1 file changed, 14 insertions(+), 19 deletions(-)
> d75f07b36b8cfaa58ed7a57891931320db21d5ba  0001-Fix-aspect-cli-option.patch
> From 4ebbb6a5f34dd8d39610a9185eac5f7a925f2141 Mon Sep 17 00:00:00 2001
> From: Baptiste Coudurier <baptiste.coudurier at gmail.com>
> Date: Tue, 5 Apr 2011 13:37:11 -0700
> Subject: [PATCH] Fix -aspect cli option

for the record:
patch ok


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110407/0e3dc0b4/attachment.asc>


More information about the ffmpeg-cvslog mailing list