[FFmpeg-devel] [RFC] lavfi: metadata injection

Stefano Sabatini stefasab at gmail.com
Thu Oct 11 11:27:38 CEST 2012

On date Wednesday 2012-10-10 00:55:09 +0200, Clément Bœsch encoded:
> Hey.
> So here is an attempt to introduce some communication between filters, and
> allow the users to exploit the results of analysis filters.
>   [PATCH 1/4] lavfi: add metadata to buffer ref.
>   This patch is based on https://github.com/kuehnelth/libav/commit/b8e9baf7
>   I added more dict copy & stuff. Hopefully it is correct, but the code is a
>   bit convoluted so I'm still unsure if I'm missing or no a corner case.
>   [PATCH 2/4] lavd: make lavfi device export the metadata up to the
>   This one is a proposition of raising information from a lavfi input device up
>   to AVFrame. It abuses the priv field, but it looks like the simpler way to
>   me. I had a solution making use of side_data, but it was really too much
>   code. priv seems mostly unused, and we can move to some other system if
>   necessary in the future.
>   [PATCH 3/4] lavfi/silencedetect: export silence info to metadata.
>   First application of the feature. Still lacking documentation, but I'm
>   waiting for more filters to use it. We should decide on the convention to
>   follow for the prefix. I selected "lavfi", it can be discussed to whatever
>   color you prefer.
>   Example of usage:
>     % ./ffprobe -v 0 -f lavfi -i amovie=silence.mp3,silencedetect -show_frames -of flat|grep lavfi_silence

>     frames.frame.207.tags.lavfi_silence_start="3.40735"
>     frames.frame.259.tags.lavfi_silence_end="3.40735"

end == start??
FFmpeg = Fundamentalist and Fantastic Magnificient Patchable EntanGlement

More information about the ffmpeg-devel mailing list