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

Michael Niedermayer michaelni
Sun Apr 13 16:07:37 CEST 2008


On Sun, Apr 13, 2008 at 03:18:15PM +0200, Nicolas George wrote:
> Le duodi 22 germinal, an CCXVI, Michael Niedermayer a ?crit?:
> > No but I have difficulty imaging a program which uses any libs directly but
> > is not capable to iterate over the tokens of a string.
> > 
> > Code which wants to pass a single string can call ffmpeg, code which
> > wants to use libav* splits that string in tokens (by , " " ; whatever)
> > and passes them to av_set_string().
> > Of course that does need a few bug fixes so it works for the 4 options
> > you complained about similarly would your new 1 string API.
> > 
> > What you want is that we provide a way so that you can pass options to
> > lav* behind all applications and libs, that is as part of a filename.
> > Fix the app!
> 
> I think we are thinking about completely different types of applications.
> 
> The applications I am especially thinking of with this proposal are simple
> command line tools that perform some simple and very specialized task on
> audio or video files, like doing some statistics, extracting some data, etc.
> An example of such an app is ffprobe; I have recently written a tool to plot
> the audio spectrum of a file; I am about to start writing a tool to
> synchronize two files with the same audio.
> 
> There are a lot of similar tools, and probably much more are developed as
> quick hacks and never released to the community.
> 
> These tools take a filename, read the corresponding file, and act on the
> decoded result. They can not call ffmpeg externally, since they often need
> the properties of the file (bitrate, channels, etc.).
> 
>  From the user's point of view, the more formats these tools are able to
> handle, the better, obviously.
> 
> But I think that adding to such tools code to set format parameters is a
> waste of programmer time.

look, there are hundreads of options, there is width/height/samplerate/...
needed before opening raw files
there are idct/bug workarounds needed by the decoder
there is the ignore index flag for the demuxer

You cannot pass all that in the filename beause half of the code is not
even in the lib which knows the filename. And half of it is stream
specific not file specific and there are several streams in a file.

your simple command line tools are simply _broken_. Add the 5 lines of code
you need for AVOptions and fix what is needed in libav* so all the options
you want can be set through AVOptions.

If there is something that can be simplified, discussions and patches are
very welcome.
That is, show us the code you actually need for supporting AVOptions and
suggest ways to reduce it.
If you have not yet used AVOptions then you are not in a position to
suggest replacements or improvments.

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

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- 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/20080413/7a8af814/attachment.pgp>



More information about the ffmpeg-devel mailing list