[FFmpeg-devel] [PATCH] lavfi: add audio eval signal source

Stefano Sabatini stefasab at gmail.com
Sat Oct 15 01:37:59 CEST 2011


On date Thursday 2011-10-13 10:04:34 +0200, Nicolas George encoded:
> Le duodi 22 vendémiaire, an CCXX, Stefano Sabatini a écrit :
[...]
> > +    int64_t chlayouts[] = { AV_CH_LAYOUT_MONO, -1 };
> 
> As Michael said, the possibility to generate several channels would be cool.
> OTOH, it could be left to a separate amerge filter: (n channels, p channels)
> -> n+p channels.

Yes I like this idea, and I wanted to implement it but I'm still
thinking what should be the better syntax for it.  Ideally:

expr1:expr2:...:exprN:opts

but then there is no easy way to understand what is an expression and
what not (the options are of the form {key=val}+).

I could suppose that the first time I found ident= then I found the
options string, but this assumption won't be correct if we extend the
expression syntax, for example to make them accept things of the
kind: x=10; 2*x+x^x

(in that case it would be impossible to distinguish a key=val
form from an expression).

Considered alternatives:
expr1\:expr2\:...\:exprN:opts

but this would require a double level of escaping, since the filter
args are fetched with av_get_token(), same for:
expr1,expr2,...,exprN:opts

Maybe:
expr1|expr2|...|exprN:opts

where I use '|' to separate expressions (and I assume the | is never
part of an expression).

Other alternative:
c1=expr1:c2=expr2:...:cN=exprN:opts

but this would be way too verbose and clunky for my taste.

Suggestions are welcome.


More information about the ffmpeg-devel mailing list