How to extract each video scene with FFmpeg I'm trying to detect scenes and save them as individual files with FFmpeg. I found this long command somewhere, but it fails with a good detection. I change the scenecut value, but I don't see any effects.

ffmpeg -y -i test.mp4 -max_muxing_queue_size 1024 -vf yadif -preset:v fast -x264opts scenecut=20 -f segment -segment_format mp4 -segment_format_options movflags=faststart %05d.mp4


Is there a better command than this? There should be a shorter, more efficient command I guess.
Using the encoder's scenecut to detect scenes is not advisable, since its purpose is efficient GOP splitting taking into account other encoding parameters. It is not a "pure" scene detector. Its propensity to mark a "scene change" increases as it gets closer to the the next forced keyframe target (set by keyint).

Consider using https://github.com/Breakthrough/PySceneDetect instead.