DVD-Titel auslesen mit VLC und Durchsatzmessung
Sunday, 1 August 2010
vlcvob:
#!/bin/sh # Check prerequirements (assume that 'rm', 'mkfifo' etc are available) echo "Checking prerequirements..." if ! (which mktemp && which pv && which cvlc); then echo "Missing required programs. See output for info." >&2 exit 1 fi source="$1" destination="$2" fifo="$(mktemp)" if [ "x$source" = "x" ] || [ "x$destination" = "x" ]; then echo "Read vob file from DVD using VLC." >&2 echo "Usage: $0 " >&2 echo "Example:" >&2 echo " Store first title from device '/dev/dvd' to 'filename.vob':">&2 echo " $0 dvdsimple:///dev/dvd@1 filename.vob" >&2 exit 1 fi if [ -e "$destination" ]; then echo "File '$destination' already exists. Please remove first." >&2 exit fi # Command from http://www.gentoo-wiki.info/HOWTO_Backup_a_DVD. # Other commands that should work (untested): # CMD="mplayer dvd://$TITLE -dvd-device $DEVICE -dumpstream -dumpfile '$fifo'" # CMD="mplayer dvdnav://$TITLE -nocache -dvd-device $DEVICE -dumpstream -dumpfile '$fifo'" CMD="cvlc '$source' --sout '#standard{access=file,mux=ps,dst=$fifo}' vlc://quit" echo "Creating FIFO file '$fifo'..." rm "$fifo" && mkfifo "$fifo" || exit 1 echo "Starting VLC: $CMD" eval $CMD & vlcpid="$!" # Wait a second or so to let VLC do it's work sleep 5 pv -petrb "$fifo" > "$destination" & pvpid="$!" wait "$vlcpid" kill "$pvpid" rm "$fifo"
Disclaimer:
Selbstverständlich sind dabei die Urheberrechte zu beachten! Für selbsterstellte DVDs ist das unproblematisch. Ein Kopierschutz darf jedoch zumindest in Deutschland nicht umgangen werden.