PySceneDetect is a tool for detecting shot changes in videos (example), and can automatically split the video into separate clips.
# Create an alias
$ alias scenedetect='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data -w /data vimagick/scenedetect'
# Download sample video
$ wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4
# Perform video splitting
$ scenedetect -i BigBuckBunny_320x180.mp4 split-video