Search code examples
ffmpegffprobe

FFMPEG - what is the meaning of gt(scene\,0.3)


I'm using this command in order to detect the shot boundaries in FFMPEG.

ffprobe -show_frames -of compact=p=0 -f lavfi "movie=test.mp4,select=gt(scene\,0.3)"

By changing the 0.3 value I can get different results. As far as I know this 0.3 value should be the difference of consecutive frames. But I don't understand what difference that is. Is it some thing related to the dominant color? Can some one clarify a bit?


Solution

  • The filter command select=gt(scene,0.3) selects the frames whose scene detection score is greater then 0.3:

    select: the frame selection filter

    gt: greater than (>)

    scene: the scene change detection score, values in [0-1]

    The method used is called Sum of absolute differences. The relevant code can be found in libavfilter/f_select.c and libavutil/pixelutils.c