-   Linux - Desktop (
-   -   dd of a DVD fails unless I first view it with VLC (

Nutria 04-21-2013 09:37 PM

dd of a DVD fails unless I first view it with VLC

When I buy a DVD, I immediately rip it to an ISO, then transcode the movie or episodes because that's faster than having HandBrake read directly from DVD.

The problem is that dd quickly barfs with an IO error when reading protected DVDs except when I first view (even for just a few seconds) the DVD with vlc. Then dd works perfectly. Presumably this has something to do with reading the CSS keys.

So, does anyone know of a CLI tool that will read the CSS keys and place the results in ~/dvdcss ?


ozanbaba 04-22-2013 01:13 AM

how about cvlc? It's CLI to vlc.

Nutria 04-22-2013 01:38 AM


Originally Posted by ozanbaba (Post 4936226)
how about cvlc? It's CLI to vlc.


This is what my ripping script now looks like:


cvlc :start-time=1 --stop-time=4 dvd:///dev/sr0 vlc://quit

BS=$(isoinfo -d -i /dev/sr0 | grep "^Logical block size is:" | awk '{print $5}')
VS=$(isoinfo -d -i /dev/sr0 | grep "^Volume size is:" | awk '{print $4}')
VSID=$(isoinfo -d -i /dev/sr0 | grep "Volume set id: " | awk '{print $4}')
VID=$(isoinfo -d -i /dev/sr0 | grep "^Volume id: " | awk '{print $3}')

if [ -z $1 ]; then
    if [ -z $VSID ] || [ "$VSID" == "UNDEFINED" ] || [ "$VSID" == "NOT_SET" ] || [ $VID == $VSID ] ; then
    OF=$(basename $1 .iso) # just in case I accidentally pasted in a name with .iso

echo $OF
echo $BS
echo $VS

pv /dev/sr0 | dd conv=noerror bs=$BS count=$VS of=$OF.iso

sleep 3
eject /dev/sr0

All times are GMT -5. The time now is 10:24 AM.