Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Extract segments from Star Wars Biomes as clips for a screensaver
# Check that infile exists
stat $INFILE >/dev/null 2>&1 || { echo "Expect $INFILE in the current folder. Aborting." >&2; exit 1; }
# Check that ffmpeg exists
command -v ffmpeg >/dev/null 2>&1 || { echo "I require ffmpeg but it's not installed. Aborting." >&2; exit 1; }
ffmpeg -hide_banner -loglevel fatal -ss 00:00:06.000 -to 00:03:01.433 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Hoth" -map_chapters -1 -y Hoth.mp4
ffmpeg -hide_banner -loglevel fatal -ss 00:03:03.633 -to 00:05:53.233 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Tatooine" -map_chapters -1 -y Tatooine.mp4
ffmpeg -hide_banner -loglevel fatal -ss 00:05:55.333 -to 00:09:03.900 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Sorgan" -map_chapters -1 -y Sorgan.mp4
ffmpeg -hide_banner -loglevel fatal -ss 00:09:05.766 -to 00:12:01.000 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Crait" -map_chapters -1 -y Crait.mp4
ffmpeg -hide_banner -loglevel fatal -ss 00:12:03.000 -to 00:15:26.733 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Mustafar" -map_chapters -1 -y Mustafar.mp4
ffmpeg -hide_banner -loglevel fatal -ss 00:15:29.000 -to 00:18:24.566 -i $INFILE -c:v copy -an -sn -map_metadata -1 -metadata title="Ahch-To" -map_chapters -1 -y Ahch-To.mp4
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment