Open disc-kuraudo opened 1 year ago
Putting a second thought to this, updating this to work with libdvdread 6.x might not even be possible as they transitioned to opaque structs, making the library almost unusable. Must be some degenerate C++ influence abstracting everything.
Maybe it's best to keep this working with libdvdread 5.0.3 for now, possibly downloading, building and referencing it specifically to actually build this.
I'll see what I can provide through patch files, pull requests from a forked repo are out of consideration for avoiding trouble...
Thanks for trying to get it to work again. I had went this exercise a couple times of updating the changes to work with later versions of libdvdread and libdvdnav. I did try a few months ago. Perhaps if someone would convince the libdvdnav developers to export a public api for the vm parts, I would try harder.
The other reason why I gave up, is that for some discs, the skipped-unused method was apparently not sufficient. Again, with official support of libdvdnav, I would try again.
Of course I would be glad to accept a pull request...
It is worth noting, that I did find another way to do backups, which is quite a bit simpler, and still fast on everything tried.
This is a fork of a newer tool called 'dvdread' (unrelated to libdvdread).
My change is to skip the whole VOBU on read error.
Btw, I think this 'dvdread' is how 'dvdbackup' should have been written long ago. It reads block by block, and you end up with and iso, not a directory.
I got it as far as building version 5.0.3 dependencies locally and statically linking them (slightly hacky but it works for now): libdvdread_5.0.3_static.patch.txt
Apply and build with
$ patch -p1 < libdvdread_5.0.3_static.patch(.txt)
$ ./autobuild.sh
in the root directory.
For some reason this segfaults though, which is why I added -g
to CFLAGS:
$ gdb -ex start --args dvdbackupx -r u -M -i /dev/sr0 -o sqipue
[...]
libdvdread: Can't open file VTS_07_0.IFO.
libdvdnav: ifoOpenVTSI failed
Program received signal SIGSEGV, Segmentation fault.
create_titleset_range_list (dvd=0x55555558adb0, titleset=1, range_list=0x7fffffdf9ec8) at find-sector.c:289
289 pgn = vts_ptt_srpt->title[ ttn - 1 ].ptt[ c ].pgn;
(gdb) bt
#0 create_titleset_range_list (dvd=0x55555558adb0, titleset=1, range_list=0x7fffffdf9ec8) at find-sector.c:289
#1 0x0000555555559fe5 in DVDCopyBlocks (dvd_file=0x5555555a5fd0, destination=9, offset=0, size=133111, filename=0x7fffffff9ff0 "VTS_01_0.VOB", errorstrat=STRATEGY_SKIP_UNUSED, dvd=0x55555558adb0, title_set=1)
at dvdbackup.c:832
#2 0x000055555555b29b in DVDCopyMenu (dvd=0x55555558adb0, title_set_info=0x5555555885e0, title_set=1, targetdir=0x7fffffffd851 "sqipue", title_name=0x7fffffffc1f0 "Balls Of Steel",
errorstrat=STRATEGY_SKIP_UNUSED) at dvdbackup.c:1176
#3 0x000055555555bb7b in DVDMirrorTitleX (dvd=0x55555558adb0, title_set_info=0x5555555885e0, title_set=1, targetdir=0x7fffffffd851 "sqipue", title_name=0x7fffffffc1f0 "Balls Of Steel",
errorstrat=STRATEGY_SKIP_UNUSED) at dvdbackup.c:1333
#4 0x000055555555ca53 in DVDMirror (_dvd=0x55555558adb0, targetdir=0x7fffffffd851 "sqipue", title_name=0x7fffffffc1f0 "Balls Of Steel", errorstrat=STRATEGY_SKIP_UNUSED) at dvdbackup.c:1618
#5 0x00005555555572ec in main (argc=8, argv=0x7fffffffd358) at main.c:467
VTS_07_0.IFO
exists in this case.
Tried dvdread
as well, sadly it seems to be just as slow as ddrescue
or even slower for me, seems stuck at a VTS_02_1.VOB
for over half an hour going sector by sector, e.g.:
324213 (/VIDEO_TS/VTS_02_1.VOB) decrypt - read error
skiping to vobu at 324213
324214 (/VIDEO_TS/VTS_02_1.VOB) decrypt - read error
skiping to vobu at 324214
324215 (/VIDEO_TS/VTS_02_1.VOB) decrypt - read error
skiping to vobu at 324215
Though, it is exactly what I need/want, creating a 1:1 ISO with the filesystem and metadata intact, which would merge the two steps of creating decss (I call it NSS for No Scrambling System) VOB files and hotswapping them into a backed up 1:1 ISO w/ CSS at their offsets. This would provide a decent way to create a reproducible perfect backup when working for ARccOS cucked discs.
to be clear, you tried the dvdread that I patched?
Definitely, has the
skiping to vobu at X
in the log that you patched in.
Understood. Let me see where I had stopped with getting dvdbackup working again.
After that, perhaps getting find-unused-sectors integrated in dvdread would be best...
The following builds, though no testing was done.
git clone https://github.com/dmahurin/libdvdnav.git -b vm-standalone-6.1.1 cd libdvdnav autoreconf --install make sudo make install cd ..
git clone https://github.com/dmahurin/dvdbackup.git -b debian-skip-unused-6.1 cd dvdbackup dpkg-buildpackage -us -uc -b dpkg-buildpackage -us -uc -b # run again do to un-clean patch
Let me know if it works.
Am not on Debian or any of its forked distributions.
Didn't even notice the debian
directory with patches. Why not just apply and commit these?
The last official dvdbackup release is from 2013, debian, ubuntu, archlinux, fedora, all patch it. I just tried to stay in sync and patch the same way. Though, I suppose you could say that it is not consistent, as the dvdbackupx changes are not a patch ... If you confirm that the changes work, we can either apply all the patches, or move dvdbackupx to a patch ...
Eh, using the patches leaves a mess, got it to compile but it segfaults.
Would be good to just have something that works with specific versions of the dependencies, they just left a huge mess with screwing up the APIs.
Since dvdbackupx
is changing the way it works anyway, may as well break away from how it's done to patch it up with the most recent libdvdread
etc.
In all honesty though, would rather focus on that dvdread
utility generating untouched (sort of, would also make the region patch optional), uncucked ISOs. I wasn't aware of it while I was hacking away at my autobuild.sh
script (generated with my patch) so just posted what I got so far.
Works great with just CSS but as I tested it it seems to go sector by sector for +ARccOS.
Well, if it helps, I created a branch with all the patches already applied. debian-patched-skip-unused-6.1 Though it should work the same. I do not know where the crash you saw came from.
I also re-submitted the request to expose vm in upstream libdvdnav. If accepted, the libdvdvm hackery could be removed.
I agree that dvdread is a better place to start.
That one seems to do, ended up installing your modified libdvdnav
to prefix ${HOME}/local
and referencing it with
export CFLAGS="-I${HOME}/local/include"
export LDFLAGS="-L${HOME}/local/lib"
before configure
.
Think I made a mess in that local prefix with all sorts of (old?) libdvdX
versions that caused segfaults from API changes.
There's issues linking it to libdvdread 6.x because of more breaking changes: https://bugs.launchpad.net/dvdbackup/+bug/1869226
Also got into some hell of autotools warnings that I don't know how to resolve.
Would like to help via pull request, but having a repo of this up is no good in Germany.
This approach seems to be the only good one for Linux, ddrescueing cucked discs seems to take hours for some of them even with tuned settings. Would be really nice to have this.