|What is cdstatus?
cdstatus is a tool for diagnosing cdrom drive and cd problems, and
for performing digital data (music audio) extraction. 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).
Among other things, cdstatus will list the following:
- disc (cd) type from: audio, data mode 1, data mode 2, XA mode 1,
XA mode 2, and mixed mode (audio + data). 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.)
- 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. cdstatus can help detect such problems.).
- 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 good to have).
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
cdstatus, you can read every frame of the cd, one frame 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.
cdstatus offers the following ripping features:
- Ripping any given number of sectors (data chunks) in a single read
operation: although reading one frame at a time (the default) is
still fast the way cdstatus does it, I have added a --readchunk
X option which allows you to specify a number of frames to
read at once. This gives up some of the fine-grained error detection
in favor of higher speed extraction. Don't go nuts with this, 75
is probably about the most that makes sense. Values over 75 may
cause problems with certain drive models. I usually use 16 with
- cddb lookup capabilities (see below)
- Different output formats:
- with --encoder null:
With the 'null' encoder, cdstatus will simply through away the
read audio frames (as though writing them to /dev/null). This
isn't expected to be useful to most users. It's for testing
- with --encoder raw:
The raw audio data that was read for each track is saved 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. This format is very useful for testing. 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.
- with --encoder wave:
(or unspecified since this is now the default) but not the --cddb option
The files created will be in the form trackXX.wav. These are
your every day, reverse intel field format, pulse code modulated,
two-channel 16-bit signed audio files, that we love to call wav
files. (Yeah, the wave file format spec is a pain.) They should
be playable by just about anything you can imagine. Note that
the wav format allows programs to "sub-chunk" the data differently,
meaning that two perfectly extracted wav files of the same track
are not neccessarily identical from different programs, whereas
the raw output format would be.
- with --cddb:
cdstatus now (as of version 0.94a) has the capability to lookup
album and track information of audio cds via remote cddb (cd
database). With an active internet connection, use of --cddb will
automatically retrieve and populate this information. To complement
this, I implemented a system to allow the user to specify how
to convert this information to a filename, including the support
for on-the-fly directory creation for artist and album directories.
This is the --format option, documented
in the readme file. Please note that cdstatus will convert
all spaces to underscores (_) in the names, and remove any
non-alphanumeric characters from them (unless --nomangle is
used). This is to protect against trying to create files with
names that the filesystem can't handle. Right now the --cddb capabilities
are functional, but fairly rigid. There is no option to change
the lookup server (except in the source code) etc. These will
be added in the future. As per the cddb protocol guidelines,
in cases where more than one exact or inexact match is found
for a cd, a list is presented and the user is given the option
to select a match numerically. These files will of course be
normal wav files, but the automatic naming helps identify them
- with --encoder lame:
cdstatus will launch an instance of lame and pass the audio
to it across a pipe. cdstatus can pass all the info from the cddb
lookup to lame for ID3 tagging purposes, and encode on-the-fly with
no intermediate files. Use --encopts "opts to lame here" to send
custom encoding options to lame.
- with --encoder oggenc:
cdstatus will launch oggenc and hand the audio off to it, like with
the lame encoder option, just for ogg vorbis
- with --encoder toolame:
cdstatus will hand the audio to the toolame encoder. same as for
lame and oggenc
- cdstatus can perform multiple re-reads of every sector (even
when the first sector was read successfully) somewhat like the
way Exact Audio Copy works for Windows; this helps ensure that
your rips are accurate.
- Nota bene: cdstatus can output directly to several different encoders
if they are installed. Support for lame, oggenc, and toolame currently
exists. All track name and info from the cddb lookup gets handed
off appropriately to these so that they are tagged appropriately.
Please note that cdstatus does not come with any encoders, and it
is the responsiblity of the user to install any encoders which they
wish to make use of. The author of cdstatus takes no responsiblity
for determining whether or not it is appropriate for the user to
make use of any particular file format in their given locale, or
whether patent restrictions (such as those on MP3 formats) may
apply in their region or country. If in doubt of your legal rights
to extract digital audio from a cd to any given format, please
rely on competent legal counsel familiar with the law in your
- Configurable number of retries
- On-the-fly directory creation for both a base output directory
and directories specified by the --format spec
- specification of input drive, if other than /dev/cdrom
- --silent operation mode to emit no output
(under most circumstances) except the files.
|What do I need to use cdstatus?
- 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
- 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 linux versions. 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 at users dot sourceforge dot 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.
If you wish to incorporate any portion of cdstatus code in another
work please notify me via email. I have no objections at all to use
of its codebase in any non-commercial product, but will have to discuss
other applications, and will at any rate be interested in its use.
- Do I need to be root to use cdstatus?
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>?
There are a couple of possible reasons. Most likely is that it is
not central to the reason behind the design of the program. 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 at users
dot sourceforge dot 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
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?
This program is the intellectual property of Nathanael Hoyle. You
are granted non-exclusive rights to modify and redistribute this utility
as per the terms of the General Public License (GPL). If you are interested
in bundling this software in any distribution, whether archival (i.e.
CD) or downloadable, I would prefer to be contacted and informed, via
email, although this is not a license requirement. Alternate License:
If you wish to obtain license to use cdstatus in a derivative work
which is to become closed-source, you may contact me to discuss terms.
I make no guarantee that I will grant the right to do so, and I would
almost certainly charge for this right, although the cost would be
very reasonable. If you make any additions, modifications, or front-ends,
port it, etc. please contact me, and provide a copy of the new work.
I can be reached at nathanaelhoyle at users dot sourceforge dot net
I am just another linux/unix geek. I do work in a full-time capacity
as a unix systems engineer, but this program was written in my time, using
no ideas from, or based on, any proprietary information
available to me through my work at my employer (and indeed first written while at
at different 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
as though 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 forerunner of the tool
you have before you now. I have continued to expand and make additions
to it over the last couple of years since the first release in July
- I have another question that you didn't answer
I guessed as much. The cdstatus user forums are the main way to get support on cdstatus, and the best place to discuss everything related to it. Come ask a question, read what people are doing with cdstatus or just hang out.
- Where can I get cdstatus?
The current version of cdstatus is 0.97.03 and
is available as a gzipped tar file here.
The tar includes source code and a pre-built executable. For the adventurous, feel
free to grab the latest sources out of Mercurial (see the project page for details) I tend
to make lots of commits prior to issuing a new full release, so sometimes you'll get
extra goodies from the Mercurial version.