Skip to content

Instantly share code, notes, and snippets.

@salamanders
Last active August 21, 2019 20:37
Show Gist options
  • Save salamanders/2b15ff27ca230f3ae08d703c13e05cd9 to your computer and use it in GitHub Desktop.
Save salamanders/2b15ff27ca230f3ae08d703c13e05cd9 to your computer and use it in GitHub Desktop.
Split a video by scene
brew update && brew upgrade
pip install --upgrade pip
pip install scenedetect[opencv,progress_bar]
mkdir out
# Optionally tune the threshold, using the content_val column
scenedetect -i clip1.mov -o ./out --stats my_video.stats.csv detect-content
# Write the files
scenedetect -i clip1.mov [...-i clip2.mov] -o ./out detect-content split-video --copy
# or for larger chunks: scenedetect -i clip1.mov -o ./out detect-content -m 120 -t 90 split-video --high-quality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment