Method to recover from SCSI read error/damaged bluray media

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
Message
Author
tmgoblin
Posts: 1
Joined: Fri Apr 10, 2015 9:31 pm

Method to recover from SCSI read error/damaged bluray media

#1 Post by tmgoblin » Sun Apr 12, 2015 5:44 am

After struggling with several bluray discs that could not be successfully backed up or converted to mkv's due to read errors from the medium, I found the following fairly simple strategy to work on a linux workstation.

The forum has numerous threads due to this error (1020 matches for "SCSI error" as of 4/11/12, many due to read error), so i figure better to start a new thread than try to respond to many of those individually. When there are unrecoverable errors in a read operation, MakeMKV will either abort the current title if converting, or abort the entire operation if backing up a disc. Several threads have addressed unsuccessfully recovering from a read error instead of aborting, without a clear solution or workaround other than increasing the retry count under the IO preference panel.

1. Use MakeMKV to make an encrypted backup of the disc. (Do NOT check "Decrypt Video files" on the backup window)

2. Presuming the backup is able to get all the accessory files but fails on the video m2ts files, mount the disc and use ddrescue (installed from your repository or https://www.gnu.org/software/ddrescue/) to copy the problematic files from the disc to the backup directory. This will produce a m2ts file with all the readable portions of the original (encrypted), and with gaps for the unreadable portions. Let ddrescue run until it gets to the scraping phase and your are ready to move on. At that point you are probably at the point of diminished returns (letting mine run overnight on a 27421MB file from a bad disc with 27362MB recovered/59MB error was able to recover only 10MB additional in 10 hrs.)

3. Open the backup directory with MakeMKV. The backup directory structure is (seemingly) identical to the original disc directory expect for the inclusion of the "discatt.dat" file in the root directory of the backup, which presumable provides MakeMKV with the needed hardware information to decrypt.

NOTE: the titles may not be in the same order as originally presented when opening the disc with MakeMKV.

4. Start the streaming server in MakeMKV. Alternatively trying to convert to mkv from within MakeMKV may work, but for me it seemed to struggle once it got to the bad spots and was "trying workaround".

5. Either download the m2ts file directly or use ffmpeg to convert the stream, optional include options to help deal with the damaged m2ts file ( " -max_interleave_delta 0" and/or "-fflags +genpts" seem to help).

Example from the command line, after making the incomplete failed backup:

Code: Select all

/mnt /dev/sr0 /mnt/sr0

ddrescue /mnt/sr0/BDMV/STREAM/00602.m2ts  /[i]<backupdir>[/i]/BDMV/STREAM/00602.m2ts, /[i]<backupdir>[/i]/BDMV/STREAM/00602.log

(Open “discatt.bat” in the root of the backup directory with MakeMKV, identify titles of interest, start streaming server)

ffmpeg -fflags +genpts -max_interleave_delta 0 -probesize 300M -analyzeduration 300M  -i http://127.0.0.1:51000/stream/title0.ts  -c:v libx264 -x264-params crf=23  -c:a copy   -c:s copy title0.mkv


mattmkv
Posts: 9
Joined: Sun Dec 13, 2015 8:52 pm

Re: Method to recover from SCSI read error/damaged bluray me

#2 Post by mattmkv » Sun Dec 13, 2015 9:10 pm

Hi,

I got some experience with gddrescue/ddrescue and I would like to know: Is it possible to backup a complete blu-ray disc? Is every error of ddrescue a real read error of the disc or just copy protection?

Post Reply