Skip to content

Instantly share code, notes, and snippets.

@nealey
Created April 20, 2019 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nealey/e05171d23cbc41d962c68702f013a937 to your computer and use it in GitHub Desktop.
Save nealey/e05171d23cbc41d962c68702f013a937 to your computer and use it in GitHub Desktop.
Rip (transcode) DVD chapters into individual mp4 files
#! /bin/sh
# If you have more than 50 chapters, you'll need to bump this value up.
# It doesn't hurt anything to have the number too high, though.
for i in $(seq -w 1 50); do
echo "== Chapter $i"
HandBrakeCLI \
--input /mnt/chromeos/removable/No\ Label/ \
--crop 0,0,0,0 \
--chapters $i \
--preset Normal \
--output $i.mp4 \
2>/dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment