CD Status

What is cdstatus?
cdstatus is a tool for diagnosing cdrom drive, and cd problems. It will query the drive status, and report what the system thinks the status is. Due to problems, systems have been known to disagree with users as to the status of a drive. (The user says "the cd is in there" the drive says "door open". Time to try another cdrom drive (or close the door :-)). After determining the status of the drive, (assuming that the status is ok) the program will query for the type of cd. If you have just tried to burn an audio cd, but what you really did was burn the wav files as data files rather than as audio tracks, this will let you know that the system is interpreting it as a data disc, not an audio one. (Time to re-burn, and be careful with options.)
Those first options are handy, but not the meat of the program. For both audio cd's, and the audio tracks of mixed mode cd's, the program is capable of reading every frame of audio, one frame at a time. There are 75 frames in each second of audio. What this means is that you can isolate exactly where problems lie. Say you know a cd is scratched, but you aren't sure which tracks are affected. Using the --readtest option, you can read every frame of the cd, one at a time. If cdstatus encounters a frame it can't read, it will tell you about it. Note that even if you have retries enabled for failed reads (see the README file), you will still be told if the initial read fails. Many programs will simply retry automatically, and hide the fact that there was a failed read at all. This leaves you thinking that the cd is fine, when it is actually borderline for that frame. This will still read the audio if at all possible on the retries, but let you know that there was a problem.
This program will list the full table of contents, giving all track info for the cd (note: most cd-burning software writes the table of contents before writing the actual data. It is possible to have the table of contents show all the tracks properly, yet not actually have them be present on the disc. This program can help detect such problems.). It will show starting points in minutes and seconds for each track on the cd, and the global frame offset (you probably don't need this, but if you do, it is nice to have). When used with the --readtest option, the program will write the raw audio data that was read for each track to a file called trackXX.raw (where XX is the track number) in the current directory. Please note that this is not a wav file. Some audio programs are capable of playing the raw output (if you specify the info. for "play", the tool that comes with RedHat, you will need to specify a line like:
      # play -c 2 -f s -r 44100 -s w trackXX.raw
This is because the raw output is "headerless" and doesn't tell programs how to play it, so you must tell them manually. BladeEnc does a fine job of encoding .raw output into mp3's. I have not tried with LAME. There are plans to add .wav file output support in a future release.
  • Update: cdstatus 0.92 is now out and includes this capability. Use --waveout as a final option to --readtest for .wav file output.
It would still probably be an option, rather than the default. Because cdstatus is at its core a diagnostic tool, the raw headerless output is what allows for true checking to verify disc integrity. If you were to read track 1 off of a scratched cd, and then off of a good cd (or using a questionable cdrom drive, and a good one), and then compare them (using "cmp" or "diff"), then you would know that an exact match meant that the questionable media/drive was good, and the more variation, the worse it would be. Please see the README file for more info on using options (like retry count and track range selection) with the --readtest option.
Is cdstatus a cd ripper?
Yes and no. That was not the reason for the creation of cdstatus, however it functions just fine as one. In most cases, cdstatus outputs files identical to those produced by cdparanoia (when used with the --output-raw-little-endian option). In tests, cdstatus has generally finished ripping full cd's in much less time thatn cdparanoia, and with far more useful output (i.e. info on specifically what frames are bad, and how many retries it took to read, or whether the read failed for a frame) than the little smilie faces that cdparanoia gives you. For more info on using cdstatus as a cdripper, read the above question, and the README.
  • With the update providing .wav file output, cdstatus really does fall into the "cd ripper" category about as much as the diagnostic one. Updated update: with version 0.94a and the cddb support, this is even more true.
You mentioned cdparanoia. Is cdstatus related to cdparanoia?
Only in some of its capabilites. Both cdparanoia and cdstatus are capable of outputting raw files from the tracks read. Soon, cdstatus will also have the capability to output wav files (as cdparanoia defaults to). No source code or information has been in any way borrowed from or used from cdparanoia or any other tool in the creation of cdstatus. It is an entirely original work by me.
What do I need to use cdstatus?
  1. A semi-recent cdrom drive. This is required due to the way that cdstatus reads the data. Older cdrom drives didn't have the support for reading audio frame-by-frame.
  2. Semi-recent linux. I am not sure exactly what the minimum here is. It shouldn't need to even be in the last half dozen releases. The cdrom interface that this program makes use of relies on a semi-standardized interface that was not available with much older linuxes. This allows me to avoid having to program in individual cd driver support. If you are interested in helping to port to another operating system, please email me at nathanaelhoyle@users.sourceforge.net. I will be happy to help with any serious porting attempts. There are NO plans to port to Windows. If you want to do this, wonderful; however, the interface is so different as to make it an almost complete rewrite.
When I run cdstatus using the --readtest option, I keep getting "operation not supported" errors scrolling down the screen. What is wrong/happening?
You are trying to use an older cdrom drive that does not support the required frame-based reading mode. Most older drives relied on reading via a subchannel method, which is less precise and buggier. The frame-based mode is available with almost all newer drives. I am sorry, but you will probably not be able to use cdstatus with this drive. If you get a single instance of this error (i.e. on reading the current drive volume settings) then the rest of it should work fine. The drive simply didn't support that single feature.
  • Update: as of 0.92, EOPNOTSUPP errors ("operation not supported") during readtest operation are handled cleanly, and the program will stop and exit gracefully rather than scrolling these past.
Do I need to be root to use this?
That depends on your system configuration. On some systems, yes, you will need to be root to access the drive in this way. On many systems, you will be able to perform all functions except for the drive reset as a non-root user. The --reset option resets the drive internals without rebooting your computer, and will need root priviledges in almost all cases. Note that on many versions of linux with automount running a successful --reset will cause the associated autorun program to launch (such as a cd player).
Why doesn't cdstatus support <feature>?
Couple of possible reasons. Most likely is that it is not central to the reason behind the design of the program. Don't expect direct-to-mp3 output, ever. (Note: I'm now contemplating support for handing off the cddb info to an encoder for the id3 tagging. Check the TODO document for a list of planned additions. Finally, if you think you have a relavent feature not listed there that you would like to see, then email me at nathanaelhoyle@users.sourceforge.net, and I will try to respond to you and let you know whether it sounds like something I may include. I will be unlikely to promise a specific date for a new feature.
Is there support/a warranty/any guarantee for cdstatus?
There is absolutely no warranty of any kind, nor any guarantee as to the operation, behavior of, or fitness for any use. There IS minor support in that if you have a problem with it, I will try to help you. Please first read this page carefully, and try basic stuff to get it working. Do not contact me because "I can't get this to work on Windows ...". This is not a Windows application.
What is the license status of cdstatus?
cdstatus is opensource and free for general non-commercial usage, as per the terms of the GNU General Public License. If you want to contact me about either bundling cdstatus in a commercial product, or using it in a corporate environment, please email me at nathanaelhoyle@users.sourceforge.net. I will be very reasonable with pricing structure, but I did not work hard to make a free product for you to make money off of / with.
Who are you?
I am yet another linux geek. I work for a medium-size company as a software developer on an old RISC 6000 system (still using AIX 4.3), but this program is completely unrelated to my employer. It was written in my time, using no ideas from, or based on, any proprietary information available to me through my work at my employer. They posses no rights over the work in any form. I wrote cdstatus to diagnose a problem I was having with a buggy cdrom drive. Sometimes it wouldn't even act that there was a cd in the drive, even when there was. If I opened and then closed it, sometimes it would then work. In attempting to better understand the problem, I wrote the beginnings of this tool. Realizing how much of the work was already done for creating something much larger and better, I expanded it into the tool you have before you now.
I have another question that you didn't answer here!
I guessed as much. Feel free to email me with any other intelligent questions. If they have special merit, they will appear here.
Where can I get cdstatus?
Ahh! An intelligent question. The current version of cdstatus is 0.92 and is available as a gzipped tar file here.

-Nathanael Hoyle
nathanaelhoyle@users.sourceforge.net
Last updated (quickly, and probably not completely current) March 23, 2003

SourceForge Logo