Closed remenor closed 10 months ago
I think the problem is with cell size determination. This is not just a problem with audio dvd's, all extractions have this problem: dvd_copy seems to be underreporting the size of each cell. It's just that with video dvd's this problem tends to go unnoticed because the last sector typically contains only bookkeeping information (private stream timing data).
Comparing the output of dvd_copy with vobcopy, it seems the first_sector and last_sector bounds should always be inclusive.
in dvd_cell.c:
- blocks = last_sector - first_sector;
-
- // Include the last cell
- if(last_sector == first_sector)
- blocks++;
+ blocks = last_sector - first_sector + 1;
Thanks for tracking this one down, no idea how it slipped in. Copying files is hard. It wasn't just the last sector of a title that was missing, either, it was from every cell. Changing the number of blocks to be reported isn't enough, it needs to read it when copying it as well, so you can see the change in dvd_copy.c in latest commit there.
Debug option (-z) will print out the # of blocks written at the very end.
Thanks for reporting!
It works perfectly. Thanks to both
Thank you @remenor !
While it is not the original purpose of the program, I am trying to extract LPCM audio without losses, by chapters in a pipe with ffmpeg. In most cases some (few) samples are missing at the end of each chapter. In cases of classical music or live concerts (where audio should be continuous among chapters) some thousandths of a second between chapters are discarded. The same happens if the complete title is extracted: the discarded samples match exactly the discarded samples when individual chapters are extracted. The audio does not coincide with the continuous audio of the full VTS extracted with FFMPEG or with some other program (lplex, dvddecrypter and others, not related to each other, which match exactly with ffmpeg) An example (here chapters 2 and 3 coincide exactly)
dvd_copy+ffmpeg
dvddecrypter (=ffmpeg, etc.)
Sorry for my english