beandog / bluray_info

Linux/BSD Blu-ray utilities - bluray_info, bluray_copy, bluray_player
GNU General Public License v2.0
40 stars 2 forks source link

Possibility to skip read errors? #12

Open daitj opened 1 year ago

daitj commented 1 year ago

I have few bluray that are scratched, some of them were recovered by ddrescue but some have been only around 98-99% recovered.

I can play these ISO in mpv/VLC fine as the players are able to skip the read errors. But I would like to convert these bluray into smaller H265 MKVs.

Would it be possible to add somekind of parameter which would skip the read errors and continue with next good block?

beandog commented 1 year ago

@daitj thanks for the report. A couple of things ...

I don't have any discs that are in bad condition, never had to do a rescue on them. Are yours just scratched or is there problems just ripping them? It's going to be hard for me to duplicate a broken Blu-ray disc setup, so I'll work on creating a fake one with errors in it and see what I can do.

Right now all bluray_copy does is check for AACS errors, but looking at my code, it doesn't look like it writes anything to the output file, which it should, instead it just jumps to the next one. I need to fix that as well.

You can also use ffmpeg to access the disc / backup directly and encoded that way ... I don't know how ffmpeg would act around read errors though, but it's worth a try. Something like this should work:

$ ffmpeg -playlist 800 -i bluray:/dev/sr0 -vcodec libx265 -acodec copy movie.mkv

Finally, what arguments are you using when using ddrescue? I'm really curious, thanks.

daitj commented 1 year ago

Thanks for detailed response.

Does ffmpeg support decrypting AACS ? I guess it doesn't, at least I couldn't find anything while searching. Last time I was doing this it required decrypted m2ts file.

Here are some examples on how I was using the ddrescure, I buy discs from thrift store, sometimes I get discs that are bit scratched. I am using libredrive firmware on my optical drive.

ddrescue -r1 -n -a 10M -b2048 /dev/sr0 /mnt/media/bluray/disc.iso rescue.log
ddrescue -r1 -n -a 1M -b2048 /dev/sr0 /mnt/media/bluray/disc.iso rescue.log
ddrescue -r1 -d -a 1M -b2048 /dev/sr0 /mnt/media/bluray/disc.iso rescue.log
ddrescue -R -M -b2048 /dev/sr0 /mnt/media/bluray/disc.iso rescue.log

Basically I try to copy good parts first as fast as possible and then try to get bad parts by retrying many times. You can check more from ddresue manual about the options.

beandog commented 1 year ago

It's libbluray that's calling libaacs so ffmpeg be fine, as long as you have that configured (KEYDB.cfg).

Thanks for the ddrescue info, I've never tried it on a Blu-ray. I do have to do it on some "broken" DVDs though where they have 99 tracks.

beandog commented 7 months ago

@daitj I still need to fix this, I don't suppose you have a broken one I can buy off of you? I don't have any that are busted.