[FFmpeg-devel] [PATCH] avfilter/select: evaluate silencedetect metadata

Timo Rothenpieler timo at rothenpieler.org
Fri Jun 18 15:38:36 EEST 2021


On 18.06.2021 14:35, Gyan Doshi wrote:
>> The drawtext filter does not use expression evaluation for its text 
>> parameter.
>> It implements its own logic for that, and it's purely text-replace.
>>
>> The expression parser does support functions, but only functions with 
>> one or two numeric arguments.
>> So it'll have to be something like detected(silence) and then silence 
>> is a constant numeric variable that the detected function resolves to 
>> the specific metadata names.
> 
> Yeah, so I guess this patch can go ahead as-is, and I'll look into 
> extending eval with a  metadata(key)   function for a generic facility.

I don't think this can be easily added to the expression parser, since 
it needs to keep track of the internal state.
Various kinds of metadatas work very differently as well.

I'm almost finished changing this patch to a more generic way, where new 
detection filters that follow the principle of silencedetect can be 
added easily.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4494 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210618/1179e8fb/attachment.bin>


More information about the ffmpeg-devel mailing list