[FFmpeg-devel] [PATCH] move set_context_opts call for video encoders to fix ... (was: Re: strict experimental)

Janne Grunau janne-ffmpeg
Sat Sep 25 12:17:07 CEST 2010


On Sat, Sep 25, 2010 at 04:32:36AM +0200, Michael Niedermayer wrote:
> On Fri, Sep 24, 2010 at 02:10:40PM +0200, Janne Grunau wrote:
> > On Fri, Sep 24, 2010 at 12:21:19PM +0200, Carl Eugen Hoyos wrote:
> > > Hi!
> > > 
> > > Wei?t Du, warum strict experimental f?r Video nicht funktioniert?
> > > Folgender Patch ist sinnvoll, da rv20 nicht korrekt encoded, aber mit dem 
> > > Patch schaffe ich es einfach nicht mehr, rv20 zu verwenden. egal welche 
> > > Optionen ich auf der Kommandozeile angebe:
> > > 
> > > Index: libavcodec/rv20enc.c
> > > ===================================================================
> > > --- libavcodec/rv20enc.c        (revision 25162)
> > > +++ libavcodec/rv20enc.c        (working copy)
> > > @@ -65,6 +65,7 @@
> > >       MPV_encode_init,
> > >       MPV_encode_picture,
> > >       MPV_encode_end,
> > > +    .capabilities = CODEC_CAP_EXPERIMENTAL,
> > >       .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
> > >       .long_name= NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
> > >   };
> > > 
> > > Hast Du eine Idee?
> > 
> > yes, strict_std_complience is only set after the find_codec_id_or_die
> > call for video encoders. see attached patch for a possible fix.
> > 
> > Janne
> 
> >  ffmpeg.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 4e6c7aa083bcaa3a70f16436b9b2084781af4bcc  video_enc_earlier_set_context_opts.diff
> > commit 7240aadf429855433e641843b85198cfd5981a95
> > Author: Janne Grunau <janne at grunau.be>
> > Date:   Fri Sep 24 14:01:37 2010 +0200
> > 
> >     set video codec context options earlier to allow use of experimental video encoders
> 
> ok but this patch has some potential to conflict with future per codec
> options and defaults

an alternative would be using avcodec_opts[AVMEDIA_TYPE_*]->strict_std_compliance
directly. I've moved the set_context_opts call since it is that way for
subtitle and audio codecs.

Janne



More information about the ffmpeg-devel mailing list