PDA

View Full Version : Using ddrescue for reading corrupted DVDs under Windows ?


Darksoul71
2nd June 2008, 22:51
Hi all,

even if many of us might deal with HD material right now I
still see a lot of people doing DVD backups.

Most modern DVDs are using corrupted sectors beside
the standard CSS. For SAPs those corrupted sectors
do not cause any harm since the SAP simply plays the
correct sectors.

Older ripping tools (e.g. DVD Decrypter, DVD Shrink)
try scan the complete disk and fail for one or the
other title. AFAIK this is caused by those corrupted
sectors (which have bad CRC checksums).

On Windows most of us might use other tools such as
AnyDVD or Fab DVDDecrypter. With newer title the approach
of "corruption" often changes and thus making the most
recent version of the above named tool not working
(at least that is / was my observation).

On Linux you´ll often find ddrescue being named as
solution for copying corrupted DVDs to HDD. Since
the main purpose of ddrescue is to create images
from corrupted HDDs it seems quite obvious why it
matches perfectly our requirements.

How can a Linux tool help us ?
Well, on Windows Linux tools are often able to run
due to Cygwin (http://www.cygwin.com/).

Roughly speaking Cygwin is some sort of abstraction
layer providing a Linux2windows subsystem. Many
Linux tools have been compiled for Windows use by
using the Cygwin.dll

A windows binary of ddrescue can be grabbed here:
http://ftp.uni-kl.de/pub/windows/cygwin/release/ddrescue/

The required cygwin.dll can be grabbed at:
http://www.cygwin.dll

Try to use the most recent dll. Older versions of Cygwin
sometimes have not the required interfaces for ddrescue.

Since we are using Cygwin as "Linux wrapper" we also
have to use the provided devices for accessing the
CD-ROM instead of "E:\".

The CD-ROM / DVD-ROM has usually one of the following devicenames:
/dev/scd0
/dev/scd1
...
or
/dev/sr0
/dev/sr1
...
For my /dev/scd0 worked perfectly. YMMV

A detailed description of the available devices can be found here:
http://www.cygwin.com/cygwin-ug-net/using-specialnames.html

Now on to work:
The command to create an ISO file from a corrupted DVD could look like this:

ddrescue.exe -n -b 2048 /dev/scd0 C:\MyMovie.iso C:\MyMovie.log


The option -n tells ddrescue not to try to split error areas which
makes perfectly sense since our "error areas" were created intentional.

The option -b specifies the block size which is 2048 bytes for CD/DVD

The result (to my understanding) is a bit-wise of the good sectors on the DVD being still encrypted with CSS.

I think the output name and the log file are self-explainatory ;)

Now the gooooood old DVD Decrypter comes into play. DVD Decrypter is already able to fix certain corruptions in the Mastering structure. As the DVD is already on our HDD DVD Decrypter will not fail to read it (as it happens with newer DVDs).

Let´s now simply decrypt the image and output to another ISO for further preparation:

DVDDecrypter.exe /MODE ISOREAD /SRC "C:\MyMovie.iso" /DEST "C:\MyMovie.decrypted.iso" /START /CLOSE

The resulting ISO should now perfectly be usable for DVDShrink and other tools.

Voilà: In theory we should not require any new vesion of AnyDVD or DVD Fabdecrypter in order to make backups of our DVDs. No matter what crappy corruption, eerrr, new copyright protection they might have.

Of course a simple batch file is not really comfortable but there are really tons of scripting solutions out there to automise the process (e.g. Drag and Drop robot, AutoIt, Autohotkey, Python...just to name a few)

Note: I haven´t tested this with a lot of newer titles but it should work for pretty much any "corruption".

Feel free to try out and post your results here in the thread.

Cheers,
D$

Credits: I´ve taken some informations from this Linux guide for Gentoo:
http://gentoo-wiki.com/HOWTO_Backup_a_DVD

dat720
2nd June 2008, 23:37
Nice work there, love the lateral thinking, linux tools ported to windows often rock... *points to mplayer/mencoder* i also use wget grep sed tr and a heap of other *nix utils in windows to make life easier (i also have a linux pc, but leave the video encoding to a windows machine.... someone needs to port eac3to already :) that is pretty much the last thing stopping me from switching to linux for good i know it works in wine but i hate wine)

setarip_old
2nd June 2008, 23:37
Hi!

I'm guessing that this method will fail with any DVDs that contain "XProtect" copy protection - which includes an intentionally fouled up filesystem containing phony duplicate .VOBs and massive fake .IFOs and mismatched .BUPs.

Additionally (although this is a bit beyond my knowledge), some copy protection schemes include what are known as "protected" sectors, which this method may also not be able to properly address.

Note: I haven´t tested this with a lot of newer titles but it should work for pretty much any "corruption".You might want to obtain some of the current copy protected DVDs (Read some of the threads in the "Decrypting" and "Newbies" sub-forums here, for information on such Titles) to determine if this method is truly a viable "new solution"...

dirio49
3rd June 2008, 04:25
well not really,
because ddrescue does not care about the filesystem at all.
it does a bit by bit copy

setarip_old
3rd June 2008, 04:57
The description of the program sounds very much like that of "ISOPuzzle" which, as far as I know is not capable of dealing protection schemes that incorporate "protected sectors" and/or a "dummied up" filesystem.

I guess we'll know better when "Darksoul71" or someone else tries to use the described software with DVDs containing XProtect, ARccOS, RipGuard, etc. protection methodologies...

BTW - Virtually any "New Line Cinema" DVD released in the last 6 months contains "XProtect" copy protection.

mc2man
3rd June 2008, 05:42
From the linux side, while any of the dd commands will rip any structure protected title, it's actually ill suited and not very practical due to the fact it reads thru each error 1 at a time. The easier protections with relatively low numbers of unreadable sectors can be dealt with quicker and more direct means. (examples would be disney, miramax/paramount of last 6 months or so). With the more difficult titles (new line, lionsgate, sony) the time required is unreasonable. Personally I use vobcopy modified for 1 read attempt and set to skip in blocks of 16 sectors (2 sec's per block) and even then the cutoff is 5000 or so unreadable sectors total per title before going to ripit or DVDFab ....
Whether this translates to using ddrescue in windows I'm not sure though I can't see it's being much different

Darksoul71
3rd June 2008, 20:38
@setarip_old:
To my knowledge ddrescue treats the DVD-ROM as block device and doesn´t care about any logic structure such as "fake filesystems".
The major problem of all DVDs I came across was simply the fact that it wasn´t possible to create a physical image of them. Thus
ddrescue looked like a perfect solution.

It is of course questionable if DVDDecrypter (or another decrypting tool of your choice) is able to handle the filesystem within the ISO.

I´ll try this method as soon as I get my hands on a newer DVD. New Line Cinema will be the publisher I look for ;)

@mc2man:
Might be possible that the usage of ddrescue is somewhat slow but I rarely rip 10 DVDs at one day. To me it doesn´t matter if the process takes a while for each DVD as long as it doesn´t require any further user interaction and I have a working ISO on my HDD for further processing.

If the method works I would like to write a simple Delphi GUI for this to make the process easier.

setarip_old
3rd June 2008, 21:12
@Darksoul71

It will be interesting to hear of your results, when you experiment with a New Line Cinema DVD.

Just a bit of clarification - the deviously modified file entries are not the only protection used on "XProtect" DVDs - just the most apparent...

BTW - The latest "New Line" release, "SemiPro" does NOT appear to have the typical blatant "XProtect" filesystem copy protection...

mc2man
4th June 2008, 08:03
Might be possible that the usage of ddrescue is somewhat slow but I rarely rip 10 DVDs at one day
If you were working on something simple like for instance ratatouille then no big deal, there are about 1000 unreadable sectors fairly evenly spread out over 9 or 10 of the vts's. Might add 30 mins. or so to the rip and the 'structure damage' is easily fixed prior to further processing. (@16/block adds 2-3 mins)
Looking back at the last ARccOS I bought, well here's a clipped output of just VTS_01_1.VOB, VTS_01_5.VOB has slightly more.

[Info] Name of the dvd: STRANGER_THAN_FICTION
[Info] There are 99 titles on this DVD.
[Info] There are 2277 chapters on the dvd.
......................................
Writing to /media/lose/STRANGER_THAN_FICTION/VIDEO_TS/VTS_01_0.VOB
514MB of 514MB written ( 100.0% )
[Info]
Writing to /media/lose/STRANGER_THAN_FICTION/VIDEO_TS/VTS_01_1.VOB
[Warn] Had to skip 0 blocks! [Warn] Had to skip 1 blocks! [Warn] Had to skip 2 blocks! [Warn] Had to skip 3 blocks! ........
Warn] Had to skip 560 blocks! [Warn] Had to skip 561 blocks! [Warn] Had to skip 562 blocks! 1024MB of 1024MB written ( 100.0% )
keeping in mind each block represents 16 sectors, to read past each sector one error at a time well do the math (maybe 2 secs/error)
As far as x-protect I've done one for the heck of it, took over 4 hrs. (@ 16/sectors per ) and the protection was almost impossible to set right. Movie only or burn the whole mess as is to dvd9.
Overall though it is very interesting to copy these s.p. titles with the protections intact, some are fairly creative (ARccOS in particular )

setarip_old
4th June 2008, 08:46
@Darksoul71

Gee, if what you're talking about is creating a copy INCLUDING the copy protection, with the possible exception of DVDs with "XProtect", this can already be readily accomplished, quite rapidly, using the "RipIt4Me" package. Read the following post of mine, which coincidentally refers to the "Stranger Than Fiction" DVD described by "mc2man":

http://forum.doom9.org/showpost.php?p=964482&postcount=1

mc2man
4th June 2008, 11:05
Gee, if what you're talking about is creating a copy INCLUDING the copy protection wouldn't presume to speak for anyone but with a dd you get almost everything, sp. css, phyical errors, ect. whether that's the intent or not.

Darksoul71
4th June 2008, 17:32
@setarip_old:

I can not say it more clearly than in my first post:

The result (to my understanding) is a bit-wise of the good sectors on the DVD being still encrypted with CSS.


This was my (ignorrant ?) idea:
Having an image of the encrypted DVD without the corrupted sectors that usually cause tools such as
DVDDecrypter or DVDShrink from parsing the DVD correctly. May be my understanding of the way the
modern variants of copy protection work are too limited but in general I would like to get away from
using DVD Fab Decrypter and the need to update this tool every now and then.

@mc2man:
wouldn't presume to speak for anyone but with a dd you get almost everything, sp. css,
phyical errors, ect. whether that's the intent or not.
Hm, this one I´m not quite shure about but you might be correct. As I said I have currently no
new DVD available with such kind of copy protection. I am legend worked fine together with
DVDShrink.

setarip_old
27th June 2008, 09:46
@Darksoul71

Hi again!

Wondering how your project has been progressing...

Darksoul71
30th June 2008, 00:07
@setarip_old:
Real life keeps me busy. Sorry to say but I currently have neither time to grab a "suspicious" DVD from local DVD rental nor to buy an original in my local store to verify my idea.

I´ll keep you posted as my time allows...promised... :)

setarip_old
30th June 2008, 01:37
I look forward to your findings, when you do have the time ;>}

setarip_old
11th October 2008, 20:17
Anything new on this project?

Darksoul71
11th October 2008, 22:58
Yes, but no good one...
Unfortunately I did this at work and had the DVD available only a day for testing (was from a friend of mine):
ddrescue was unable to "rip" the DVD at a sufficent time under Debian. dd crashed completely.
Under Windows using a new version of AnyDVD worked fast and like a charm.

To me this looks as if my intial idea was crap. Somewhat good in theory but doesn´t work in real live.

Cheers,
D$

setarip_old
11th October 2008, 23:56
Sorry to hear that.

Unfortunately, I sort of expected it, based on the continuing changes needed for most of the "pro" ripping programs.