8

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?

Asanka sanjaya
  • 1,461
  • 3
  • 17
  • 35

1 Answers1

16

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

aergistal
  • 29,947
  • 5
  • 70
  • 92
  • 5
    I was surprised that nobody linked to documentation, so here it is: http://www.ffmpeg.org/ffmpeg-filters.html#select_002c-aselect – Ryan Apr 20 '16 at 19:13
  • any reason why it wouldn't work? I'm using 0.0003 and getting frames just fine on one machine, but on another I don't get any frames even with 0.0001 despite plenty of changes in the scene. – Michael May 12 '22 at 19:24