Digitising CDs (a.k.a. using your phone as an image scanner)

17 JNRowe 8 7/28/2025, 4:47:46 AM hadess.net ↗

Comments (8)

dvh · 2h ago
I recently used ffmpeg to undo perspective from the image you just provide 4 corners coordinates and it produced straightened image:

    ffmpeg -i input.jpg -vf "perspective=x0=784:y0=396:x1=2396:y1=397:x2=684:y2=2479:x3=2610:y3=2467" output.jpg
voidUpdate · 2h ago
Is there anything FFMPEG cant do?
sandbach · 2h ago
I thought this was going to be about recovering data from a CD from just a photo of the shiny side. Could that be possible?
makeitdouble · 1h ago
CD data pitch would be 700nm, and it seems that camera sensors have a pixel pitch at the same order of magnitude.

Ignoring the lens resolution you'd need for a near 1 to 1 rendering at that size, any hand movement or misalignment would also be catastrophic.

That sounds like a crazy dream until we get to sensor in the peta pixel range ?

https://www.researchgate.net/figure/CD-DVD-Blu-ray-disc-data...

https://letmaik.github.io/pixelpitch/

schoen · 2h ago
I don't think so.

The total data on a CD-ROM including the error correcting redundancy exceeds 800 MB, or 6.4 Gb.

If you could imagine getting 1 bit from the optical disc per pixel (which is way too optimistic physically), you would need a 6 gigapixel camera focused super-precisely at the disc surface.

Looking at the problem from a different angle, Wikipedia says the features that store the data on the disc surface are about 800 nm (or about a micrometer) long. So to photograph them, you'd want to have pixels ideally smaller than a micrometer on each side. It's easy to check that an ordinary camera isn't achieving that kind of resolution without adding on external magnifying equipment.

jackweirdy · 2h ago
Does it have to be one photo? If you reproduced a spinning drive but with the camera positioned to see half of the spinning disc, I wonder if it could capture the "stream" of pixels in one arc of the spinning disc
schoen · 1h ago
You would still need some significant magnification. And there might also be a measurement latency issue if the disc is in motion (the camera CCD might not be fast enough to capture the image before it rotates away).

The optics of a CD-ROM drive are optimized for something pretty different than the optics of a camera. But if you made enough tweaks and adaptations, sure, the data is ultimately there and can be captured by a different kind of sensor than the one it was designed for. It would be a cool project.

I'm mostly just pointing out that adapting your camera to successfully capture billions of sub-micrometer features isn't that trivial.

easyThrowaway · 53m ago
I can't find the link, but there was a Stackoverflow question about ripping a cdrom by using a flatbed scanner, the conclusion was that the scanner would've required 2-3X the DPI currently available on a commercial device to correctly parse the gaps, given that a cdrom laser size is roughly 800nm.

On the other hand I'm still puzzled why there are no homebrew projects for a dumb dumping device that simply reads all the data on a cdrom, error correction, subchannels completely raw. There are a lot of CDs with a very weird data structure (Console Games, Early Copy Protected pc games, AKAI sample discs, some Hybrid Macintosh discs, in other words anything not using the iso9660 standard) which are at risk of Disc Rot[1], and simply storing them as Iso or Bin/Cue files (including proprietary variants like Alcohol 120%/Daemon Tools mdf files) is basically useless both for archival and real world usage purposes.

[1]https://en.wikipedia.org/wiki/Disc_rot