How to determine the physical location of data on a disc?

Does anybody know of a way to find out where, physically on a CD or DVD a given piece of data would be located?

I am trying to watch a DVD at the moment, and am about half-way through, but it keeps dying at a specific spot in the film, presumably because of a scratch. I have a repair kit, but I don’t know where to focus my repair because there are several scuffs and scratches on the disc and I have no way of knowing which one is causing the issue.

Obviously, cleaning all of them is inadvisable because not only does it waste the consumable materials in the kit, but not all of them are a problem, and by working them, some may become unreadable. Moreover, just because I am half-way through the movie does not mean that it would be half-way from the hub to the edge for several reasons:

  • Discs have more data towards the outer edge than the inner edge (circles are more mathematically complicated than rectangles)
  • The disc is not completely filled up (and even if it were, the movie itself would be be using it all, there are extras and such)
  • Because in this particular case it is a commercial DVD, it is also dual-layer which further complicates manual determination

As such, I am trying to find a program that can let me identify a file (or part thereof), cluster, etc. and show me a picture of where on the CD/DVD it would be located. That way, I can look at the disc and fix any scratches that correspond to that distance from the hub.

For example, the image below might indicate where on a disc a couple of files or range of clusters would be located, so by looking for anomalies in those areas (rotating as necessary), the correct one can be identified.

I’m sure it can be done since at least one form of copy protection (DPM) uses it and DVD-lab Pro includes a “DVD Topology” feature to do this.

enter image description here


Solution 1:

This doesn't want to be an answer to your full question, but a series of answers to minor questions from which to construct the final answer, if there is.

Supposing your "repair kit" really works and makes bad sectors readable again... (so supposing you're not wasting your time)

You said the movie stops in "the middle" but obviously you don't know where that middle is on disk surface. You could try to use dd command for Linux with option conv=noerror to create an image of the disk. If you get a read error you can have a more precise idea of what sector is affected by damage, because dd will warn you on standard output about the error.

Also, keep in mind that in this phase (creating a disc image) you might even get the full image on your hard disk because your computer's drive (supposing you watch movies on set top box) might, and I say might perform better (or often worse) than the drive you used to watch the movie with. In this case I suggest you to say goodbye to fixing the disc, crack CSS and burn it on a blank media, you can rightfully do it because you own the original and you're making a personal backup.

If you get a read error then you may want to investigate further. What I can tell you is that Linux sees device as linear block devices (from 0 to approx. 9GB) and around 4.5GB there is the dual layer transition. DVDs are always burned from inner to outer tracks, and from my experience the same applies to the second layer, so if you can find the number of the damaged sector(s) you can get a bare idea on which damaged track it could be closer to.

I would investigate the UDF addressing format to find hints about mapping sectors to tracks. Hard disks conventionally use CHS addressing (cylinder, head, sector) but I believe DVDs are different.

Sorry if I don't answer your question but it's really challenging.