HUB | Up | Download | Search | Feedback | Help
CDio: software for Writing and Reading CDs

Topic | Tree | Data Type

This software is given to you under the terms of the GNU GENERAL PUBLIC LICENSE Version 2, June 1991. See COPYING for details.

The author has given his permission for us to include it on the Developer Toolbox. Feel free to send any questions you may have about this software to HOWEVER, understand that we will simply be forwarding all such correspondence onto the author who, as part of his agreement with us to include this on the Toolbox, makes no guarantee that he will answer them.

In the spirit of the janitor's Vision of Collaboration between you and us we have created and will grow a file, history.html, containing all the correspondence we receive from developers about this software -- in the form of bug fixes, comments, etc -- so that anyone who finds their way to this directory will be able to read what other people have done/written regarding their questions, experiences and ideas.

CDio Version 1.8 - Writing/Reading CDs
Carsten Koch, updated to January, 1999

This directory contains the source code for two programs:

SEE ALSO the showcase file providing an overview flow-chart of the steps to make an SGI efs OR ISO or Audio CD as well as the FAQ list on "CDio Writing/Reading CDs and Recommended CD writers".

WriteCDR is written in a modular fashion, so it should be easy to add support for additional writer models.
At version 1.6, the "mmc" (SCSI-3 MultiMedia Commands) module has been added to WriteCDR. This module should drive any SCSI-3 MMC compliant CD-writer, so adding support for most future CD-writers should just be a matter of adding a table entry to WriteCDR.c and a symbolic name to WriteCDR.h.
Of course I would like to encourage other developers to do that and to submit the resulting code back to the DT so everyone can benefit from it. Please send any and all such code changes to

To create an audio CD with WriteCDR, you need 44100 HZ stereo AIFC files that you can put on it. You can use ReadCD to read them off another CD (you may have to observe copyright issues here) or any other tool that can generate AIFC files. As long as they are 44100 HZ stereo and longer than 4 seconds (the minimum CD audio track length), they are OK.

To create a data CD with WriteCDR, you need a filesystem image file that you can put on it. Again, you can use ReadCD to read that image off another CD (observing any applicable copyright) or any other tool that can generate file system image files. Noteworthy tools besides ReadCD in that category are:

Note that CD writers must write all data to the CD in one piece. If they do not get a continuous data stream, they will wreck the disc and issue an error code that will be displayed as-is and with a translation into english text by WriteCDR. The most common error is a device buffer underrun, which means that there was too much activity on your system to write the CD without a break in the data flow. You can try out the write with the '-c' flag without the risk of wrecking a disc.
Using a slower write speed will increase your chances, but only single user mode is really safe. Also note that the Yamaha CDR 100 and CDR 102 writers can write at 4x speed, but only have 512k of buffer, while the Sony CDU 920S and the Sony 924S can only do 2x speed, but have 1M of buffer, so they will be 4 times less sensitive to short interruptions of the data stream. The Yamaha CDR-400 even has 2M of buffer memory, so this writer should currently be the safest one in a busy system.

Here are a few cookbook-style usage examples.

  1. Copy an audio CD 1:1.

    ReadCD -v -w
    WriteCDR -v -a *.aifc

  2. Copy a data CD 1:1.

    ReadCD -v -w
    WriteCDR -v 01.img

    If you have both a CD-ROM and a CD-writer on the same machine, AND the CD-ROM is faster than the writer, you may want to try piping the ReadCD output directly into WriteCDR. I have not tried this, so I do not know if it will work. If it does, it will save you up to 650 MB of scratch file space.
    The pipeline should look like this

      ReadCD -o -w | WriteCDR -i <size of CD in bytes> -v

  3. Create an ISO CD of /usr/share.

    mkisofs -a -R -o usr_share.iso /usr/share
    WriteCDR -v usr_share.iso

  4. Copy tracks 1-5 of audio CD A and tracks 2, 4, 6, 8 of audio CD B to a new CD.

    mkdir cd1 cd2
    cd cd1
    ReadCD -v -w -t1-5

      (insert second CD)
    cd ../cd2
    ReadCD -v -w -t2,4,6,8
    cd ..
    WriteCDR -v -a cd1/*.aifc cd2/*.aifc

Besides this file, there is little documentation. When in doubt, check the source code.

File contains an overview picture in showcase format, which shows the data flow for WriteCDR.

Both WriteCDR and ReadCD display a very detailed "usage" message when called with a bad parameter. E.g. you can run
ReadCD -junk
WriteCDR -junk
to get an up-to-date listing of this message.

Web Accessible Files of the src/apps/CDio directory:

This is an automatically derived categorization of files of this directory. Only files which can be displayed or heard in some manner are included. Files may be immediately accessed by clicking the corresponding link.




Downloading contents within src/apps/CDio:

Select what you like from the following list to transfer as a single, compressed tar image file to your workstation. Executables/scripts are indicated with a trailing `*' character.

a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire CDio directory.

Copyright © 1995, 1997, 1999, SGI