Basic ffmpeg scene detection:
ffmpeg -i input.flv -filter:v "select='gt(scene,0.4)',showinfo" -f null -
scene (video only) value between 0 and 1 to indicate a new scene; a low value reflects a low probability for the current frame to introduce a new scene, while a higher value means the current frame is more likely to be one (see the example below) https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect
Set the scene change detection threshold as a percentage of maximum change on the luma plane. Good values are in the [8.0, 14.0] range. Scene change detection is only relevant in case combmatch=sc. The range for scthresh is [0.0, 100.0].