[Ffmpeg-devel] [PATCH] Enhance genre, year and track tag support

Panagiotis Issaris takis.issaris
Mon Sep 11 16:28:46 CEST 2006


Op donderdag 7 september 2006 15:03, schreef Michael Niedermayer:
> [...]
> > Hmm. Sorry, but I don't really get it. qscale is defined in both, and "b" (OptionDef) and 
> > "bit_rate" (AVOption) seem to have the same meaning, don't they?
> yes, some are duplicated as a large part of the AVOptions have been created
> automatically from the structs with grep & sed, the duplicated ones should be
> removed from OptionDef and in some cases the names of the AVOption ones should
> be renamed ...

In trying to do so, I stumbled upon several issues:

* Some AVOptions and OptionDefs used different units. As the OptionDef structure provided
a function for parsing parameters, these options were sometimes scaled in this function:
  2119 static void opt_video_bitrate(const char *arg)
  2120 {
  2121     video_bit_rate = atoi(arg) * 1000;
  2122 }
AVOption sets the values using a generic function and does not provide such a specific
callback hook per option. So, either the commandline usage would change, or code using
the parameter should be modified to do the scaling, or some init function called for all codecs
could do the scaling (which seems the best solution to me).

* Some AVOption names are a lot longer then the corresponding OptionDef names. For example 
the parameter for setting the video bitrate would change from "b" to "bit_rate". I think
this would annoy a lot of users. Are the AVOption parameter names already used? By external
projects like MPlayer or VLC? If not, I could start renaming the AVOption names to the shorter
ffmpeg.c/OptionDef names.

* The AVOption default values differ from the defaults given to the same parameters in the
ffmpeg.c file. I think it would be best to not change the current behavior and so take
the defaults from the ffmpeg.c file, right?

With friendly regards,

More information about the ffmpeg-devel mailing list