[FFmpeg-devel] [PATCH v1] avfilter/vf_freezedetect: add metadata lavfi.freezedetect.mafd

Marton Balint cus at passwd.hu
Wed Oct 23 15:32:54 EEST 2019



On Wed, 23 Oct 2019, Limin Wang wrote:

>
>
> ping, it's another approach to discard frozen frame, please comments.
>
>
> On Thu, Oct 10, 2019 at 11:48:40AM +0800, lance.lmwang at gmail.com wrote:
>> From: Limin Wang <lance.lmwang at gmail.com>
>> 
>> As suggested by Paul to support frozen frames discard, please refer to:
>> https://patchwork.ffmpeg.org/patch/15423/
>> 
>> You can tested with below commands:
>> 
>> ./ffmpeg  -f lavfi -i "smptebars=duration=5:size=1280x720:rate=30,freezedetect,metadata=mode=select:key=lavfi.freezedetect.mafd:value=0.01:function=greater"  -f null -
>> frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=2.14x
>> 
>> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
>> ---
>>  doc/filters.texi              | 9 +++++++++
>>  libavfilter/vf_freezedetect.c | 7 +++++++
>>  2 files changed, 16 insertions(+)
>> 
>> diff --git a/doc/filters.texi b/doc/filters.texi
>> index 55a8ebae56..cfc10c8479 100644
>> --- a/doc/filters.texi
>> +++ b/doc/filters.texi
>> @@ -10800,6 +10800,15 @@ timestamp of the first frame of the freeze. The
>>  @code{lavfi.freezedetect.freeze_end} metadata keys are set on the first frame
>>  after the freeze.
>> 
>> +The @code{lavfi.freezedetect.mafd} metadata key is set for all frames except the
>> +first reference frame. You can use it to drop frozen frames by metadata select
>> +mode. Note that in this way the first few frozen frames(the detection interval)
>> +are dropped also. An example is as follows:
>> + at example
>> +freezedetect,metadata=mode=select:key=lavfi.freezedetect.mafd:value=0.001:function=greater
>> + at end example

No, this is not what this is. This way you drop in the detection interval 
even if no freeze is detected. So this approach is only slightly 
different to selecting a very small (less than a frame) detection interval.

So I don't see the point of this patch.

Regards,
Marton


More information about the ffmpeg-devel mailing list