[FFmpeg-user] Programmatically detecting 'busiest' parts of a video

Rob Hallam ffmpeg at roberthallam.com
Wed Aug 7 19:11:02 EEST 2024


On Wed, 7 Aug 2024 at 10:56, Oliver Fromme <oliver at fromme.com> wrote:
>
> Rob Hallam wrote:
>  > I'd like to programmatically detect the 'busiest' parts of a video- ie
>  > the most visually active areas. I am leaving audio aside for the
>  > purposes of considering this.
>  >
>  > I figured it might be possible by looking at one / more of:
>  > [...]
>  >  - frame differences -- count pixels/blocks which differ, average over
>  > a time segment
>
> I think you should be able ot use the "scdet" filter (scdet = scene
> change detection) for that.  If you set a low threshold, every frame
> is regarded as a scene change when there is sufficient "activity".
>
> The filter produces log messages that include a "score" (0 - 100) for
> each frame.  I guess that score is what you're looking for.
>
> Documentation:
> https://ffmpeg.org//ffmpeg-filters.html#scdet-1

Ooh, this looks like a promising starting point, I'll give it a try.
Thanks Oliver!

Cheers,
Rob


More information about the ffmpeg-user mailing list