On 18.06.2021 13:46, Gyan Doshi wrote:
On 2021-06-18 17:02, Timo Rothenpieler wrote:Yes, ideally, we would associate a function for metadata that allows it to be used flexibly within the expr.On 18.06.2021 06:19, Gyan Doshi wrote:Instead of a specific option for silencedetect, it would be future-proof if it was an option called, say, metadata with a constant for silencedetect to start with. There are multiple per-frame analysis filters like blackframe, blackdetect, freezedetect..etc and it will be easier to just extend 'metadata' with new constantsthan to add a new option for each filter.The only issue I see with that is a loss of flexibility.I does not seem like you can pass parameters to variables in the expression syntax. So there would need to be two new parameters for the select filter itself.The start and the end marker metadata name. But what if a user wanted to combine multiple detection filters?I guess chaining multiple select filters would work, but can be pretty annoying, depending on the usecase.See how drawtext text parameter can accommodate various functions. There's a limited example (last one) at http://www.ffmpeg.org/ffmpeg-filters.html#Examples-62
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.
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".