]>
code.delx.au - transcoding/blob - rip-dvd
3 DVD_DEVICE
="${DVD_DEVICE:-/dev/dvd}"
6 echo "Usage: $0 NAME [num]"
11 # Calculate the name for ripping
13 last
="$(find . -maxdepth 1 -type d -name "${base}*" | sort -n | tail -n 1)"
14 if [ -z "$last" ]; then
16 elif [ -n "$2" ]; then
19 num
="${last##./${base}}"
25 # Sometimes the cached keys are wrong, since it only takes a few seconds to
26 # recrack I prefer to do it each time
29 # Need to use libdvdread/libdvdcss to unlock the drive before copying
30 identify-disc
--dvd-device "$DVD_DEVICE"
35 echo "Will rip to '$next'"
36 for i
in $
(seq 3 -1 1); do
42 # Rip to ISO skipping bad sectors then decrypt to VIDEO_TS directory
44 rm -rf "${next}" "${next}.iso"
45 ddrescue
-n -b 2048 "$DVD_DEVICE" "${next}.iso"
46 dvdbackup
-n "$next" -M -i "${next}.iso" || true
47 identify-disc
--dvd-device "$next"