You are not logged in.

#1 2019-02-17 16:19:45

RankoKohime
Member
Registered: 2014-01-08
Posts: 87
Website

Copying CD-ROMs

I have a large collection of CD-ROMs that I'm attempting to copy to appropriate formats before disc rot fully takes over my collection.  Not that I'll ever use them, but I have to satisfy my data-hoarding lust.  big_smile

Anyway, I've run across a few CDs which don't read correctly, and for weird reasons.  Here is an example of a CD-ROM that came with a book, and while the content is only ~125MB in size, the CD reports 550MB.

--- /dev/sr0
Block device, size 550.8 MiB (577560576 bytes)
CD-ROM, 1 track, CDDB disk ID 02035901
Track 1: Data track, 125.6 MiB (131692544 bytes)
  Apple partition map, 2 entries
  Partition 1: 1 KiB (1024 bytes, 2 sectors from 1)
    Type "Apple_partition_map"
  Partition 2: 45.07 MiB (47256064 bytes, 92297 sectors from 163705)
    Type "Apple_HFS"
    HFS file system
      Volume name "HTML 4 For Dummies, 2e"
      Volume size 45.06 MiB (47249408 bytes, 23071 blocks of 2 KiB)
  ISO9660 file system
    Volume name "HTML4FD2E"
    Application "TOAST ISO 9660 BUILDER COPYRIGHT (C) 1997 ADAPTEC, INC. - HAVE A NICE DAY"
    Data size 79.93 MiB (83816448 bytes, 40926 blocks of 2 KiB)
    Joliet extension, volume name "HTML4FD2E"

When using ddrescue, it stops around 125MB, about where I'd expect it to, and hangs there, generating read errors and increasing the bad-sector count.  I imagine the errors come from reading a blank portion of the disc, but I don't know if cancelling will give me a usable ISO.

I've also run into the reverse situation, which I'm nearly certain will net me an unusable ISO, where the block device is smaller than the CD-ROM track.  A good example of this is the PC version of Grand Theft Auto 2.  (Maybe a copy-protection scheme?  I can't find any information about this particular title having such a scheme, though I know intentional disc format corruption was used for some titles in that era)

Gnome Disk Utility reports this disc by the large 686,921,728 bytes of the track, but trying to make an image using that program results in a 577.6MB image.  (I'm guessing base-10 numbering?)

--- /dev/sr0
Block device, size 550.8 MiB (577560576 bytes)
CD-ROM, 1 track, CDDB disk ID 02117801
Track 1: Data track, 655.1 MiB (686921728 bytes)
  ISO9660 file system
    Volume name "GTA2"
    Data size 654.8 MiB (686614528 bytes, 335261 blocks of 2 KiB)
    Additional Primary Volume Descriptor
    Joliet extension, volume name "GTA2"

-------------------------------

My second question is about multi-track CD-ROMs, typically the kind that have a data track followed by standard Red Book audio tracks.  This comes entirely down to my own ignorance, but I can't seem to find anything that explains why this is the way it is.

cdrdao can read the disc, and all of the tracks successfully, and drop all into a bin, with a toc file.  ddrescue on the other hand, cannot, it merely reads the data track and then proceeds to do as mentioned above: generate read errors.  In my mind, I see a multi-track CD-ROM the same as a heavily-partitioned hard drive, and I'm not able to grok why ddrescue can't simply copy all of the bits from the disc, in the same way it can for a hard drive.

Last edited by RankoKohime (2019-02-17 16:36:12)

Offline

#2 2019-02-17 19:40:44

agrewal
Member
Registered: 2018-11-23
Posts: 20

Re: Copying CD-ROMs

I've had issues with ddrescue for optical discs too. dvdbackup and cdparanoia have worked well for me. I haven't looked into the code, but I assume it's because ddrescure treats the /dev/sr0 like any other block device, i.e., just a bunch of bits. Special purpose tools actually look at the data in order to get better results.

I know it's about audio cds but answers 1.2 and 2.3 on https://xiph.org/paranoia/faq.html give some background on what makes reading from cds more difficult than it appears.


It might be overburning. Cds can fit more data than they officially advertise.

Offline

#3 2019-02-20 22:49:26

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: Copying CD-ROMs

Haven't done that for long time. Let me find an audioCD...

Other methods:

mplayer cdda://
...
Playing cdda://.
Found audio CD with 9 tracks.
rawaudio file format detected.
mplayer cdda://[1-9] -ao pcm:file=file1.wav
...
Playing cdda://[1-9].
Found audio CD with 9 tracks.
rawaudio file format detected.

Track 1
=====================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
=====================================================================
[AO PCM] File: file1.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format s16le
...
AO: [pcm] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 448.8 (07:28.7) of 4054.7 ( 1:07:34.6) 12.5% 

Track 2
A: 872.7 (14:32.6) of 4054.7 ( 1:07:34.6) 11.5% 

Track 3
A:1183.7 (19:43.6) of 4054.7 ( 1:07:34.6) 11.0% 
...
ffprobe file1.wav
Input #0, wav, from 'file1.wav':
  Duration: 00:19:44.03, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

And this, looks like ffmpeg is not compiled with libcdio though.

ffmpeg -f libcdio -i /dev/sr0 file2.wav

Offline

Board footer

Powered by FluxBB