[FFmpeg-devel] RFC: setting format parameters from the URL
Nicolas George
nicolas.george
Mon Apr 7 21:17:40 CEST 2008
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, and the part that uses it in
ffmpeg is quite complicated.
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.
What I would like is to have a similar code available to any application,
parsing from a single string. For example, if frobnicate is a command that
does something with the audio/video file given as argv[1], I would like to
be able to write (the syntax is only an example and needs to be refined):
frobnicate ffmpeg://s16le/ar=48000,c=1/input.raw
frobnicate ffmpeg://video4linux/s=640x480,r=14//dev/video0
just as I could write "frobnicate input.wav" or "frobnicate input.avi".
(As a side note, the reason I think it is important to have all in a single
string is that most programmers are lazy: if passing options is not strictly
necessary to have something working, then a lot of applications will just
not implement it, and the user will suffer.)
Regards,
--
Nicolas George
-------------- 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/20080407/7615337d/attachment.pgp>
More information about the ffmpeg-devel
mailing list