[FFmpeg-devel] [RFC] Getting options from the file name

Nicolas George nicolas.george at normalesup.org
Thu Dec 29 15:26:19 CET 2011


Hi.

(This has come up before, but it was when the options system was just
starting to exist.)

There are a few places in ffmpeg, and even more so in applications linked to
FFmpeg libraries, where the user is expected to specify the URL of an input
file. For example in lavfi:

ffmpeg -f lavfi -i 'amovie=some_file.wav, <filters>' ...

Unfortunately, these places do not usually allow to set options. For
example, I can not write:

amovie=some_file.raw:f=s16le:channels=2:sample_rate=48000

It could be addressed in amovie: parsing options and passing them to
avformat_open_input, but the same work would need to be done in each place
an input file name is required, specially if the interface does not allow it
easily (basic GUI file selector, text file containing filenames).

Let us be realistic: most of the time, it will not be done, and the user
will be stuck.

I would like to avoid that.

My idea would be to use some syntax to encode options directly into the
input URL. For example:

amovie=ffopt\:some_file.raw?f=s16le&channels=2&sample_rate=48000

The code to do that would be rather simple, I have a pretty good idea of how
to do it. But I would like to see whether people approve of the idea, and
see if they have interesting suggestions about the exact syntax.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111229/493e1cb2/attachment.asc>


More information about the ffmpeg-devel mailing list