使用 FFmpeg 报告重复帧

Reporting duplicated frames with FFmpeg

我正在寻找一种方法来报告(不仅仅是检测和删除)FFmpeg 检测到的重复视频帧 - 类似于打印出 blackdetect、cropdetect、silencedetect 等的方法。

例如:

ffmpeg -i input.mp4 -vf blackdetect -an -f null - 2>&1 | grep blackdetect > output.txt

输出类似:

[blackdetect @ 0x7f8032f03680] black_start:5.00501 black_end:7.00701 black_duration:2.002

但据我所知没有 "dupedetect" 过滤器,所以我正在寻找任何 ideas/workarounds 来了解重复帧的位置。

在命令行中尝试 -vp mpdecimate

ffmpeg -i input.mp4 -vf mpdecimate -loglevel debug -an -f null - 2>&1 | grep 'drop_count:\d' > output.txt

输出示例行:

[Parsed_mpdecimate_0 @ 0x7fbbfa210380] lo:0<2653 lo:0<1326 lo:0<1326 drop pts:101101 pts_time:4.21254 drop_count:1