[FFmpeg-devel] RFC: setting format parameters from the URL

Michael Niedermayer michaelni
Tue Apr 8 03:00:08 CEST 2008


On Mon, Apr 07, 2008 at 09:17:40PM +0200, Nicolas George wrote:
> Le nonidi 19 germinal, an CCXVI, Michael Niedermayer a ?crit?:
> > We have AVOption, an appliation should support that. If it does all
> > parameters are automatically supported.
> 
> I am not sure it is enough.
> 
> First, as far as I can see, it is not possible to use AVOption to set the
> input format (as with the -f option to ffmpeg). In fact, I was unable to use
> it for anything.
> 

> Furthermore, a quick search on Google Code Search seems to indicate that
> ffmpeg is the only application supporting AVOption. Which I find not really
> surprising, since AVOption seems undocumented, 

Patches documenting it are welcome, patches reimplementing the functionality
are not.


> and the part that uses it in
> ffmpeg is quite complicated.

That is because ffmpeg has the various AV* structures deeply intermingled into
its code. These are not related to AVOptions at all, your string would need
all that mess and more as well.
Anyway i suggest you RTFS about AVOption before you argue in favor
or against it.


> 
> Maybe I was not clear enough about what I would like to have. Currently, if
> I want ffmpeg to read from a raw PCM file or grab from a webcam, I have to
> write something like this:
> 
> ffmpeg -f s16le -ar 48000 -c 1 input.raw ...
> ffmpeg -f video4linux -s 640x480 -r 14 /dev/video0
> 
> ffmpeg has code to parse the options and map them to the relevant structure
> members or function parameters. I do not think this can be done with
> AVOption.

ohh yes it could, please RTFS

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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/20080408/ac4aa4f5/attachment.pgp>



More information about the ffmpeg-devel mailing list