[FFmpeg-devel] [RFC] codec options
Michael Niedermayer
michaelni
Mon Dec 3 20:00:36 CET 2007
On Mon, Dec 03, 2007 at 06:21:22PM +0000, Robert Swain wrote:
> Hello,
>
> On Mon, 2007-12-03 at 19:04 +0100, Michael Niedermayer wrote:
> > On Mon, Dec 03, 2007 at 04:50:18PM +0100, Benjamin Larsson wrote:
> > > Hi, currently if you want to know what option a codec uses you need to
> > > look in the source. That makes it hard to know what arguments you can
> > > pass to a certain codec. So how about we list all used options in the
> > > AVCodec struct for all the codecs? That way we can query a codec for
> > > options and graphical tools can build settings screens.
> >
> > iam fine with that, just keep the list compact, id prefer it not to eat
> > up 500k
> > we also have many very similar codecs (mpeg variants) which take a very
> > similar set of options these should be stored efficiently preferably not
> > duplicated for each codec
> > this safes not only memory and disk but also reduces the number of files
> > which would need to be changed if all mpeg codecs get a new option
>
> I was hoping for some automated approach that could be used something
> like this:
>
> ffmpeg -options <codec>/<format>/<whatever>
>
> Outputting only options relevant to that codec/format/whatever.
>
> Internally this would be done by some option query function and some output formatting function. Then when a UI wants to use this functionality, they can use the query function and their own equivalent of the formatting.
>
> As an aside to whoever (me? :)) implements target presets: it would be nice if one could query the settings used in these as well.
the internal storage and the external API are seperate things ...
there are many ways to store it internally
list of 16bit offsets into AVCodecContext
pointers to strings like "bitrate_tolerance", "...
pointers to AVOptions
16bit indexes into the AVOption array
also there could be more then 1 list per AVCodec to reduce duplication
for external presentation to the user all these can be converted into the
same list by looking names up from the AVOptions
to find the value of one in a context is a matter of calling av_get_string()
also supported options and codec specific defaults can be 2 seperate things
depending on implementation ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071203/3b6d86a2/attachment.pgp>
More information about the ffmpeg-devel
mailing list