CDio: software for Writing and Reading CDs

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


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 DTjanitor@sgi.com. 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. We will create and grow a file containing all the messages we receive from developers about this software so that anyone else who finds their way to this directory will be able to read what other people have written regarding their questions, experiences and ideas.



CDio Writing/Reading CDs
Carsten Koch, August, 1996

This directory contains IRIX 6.2 and IRIX 5.3 versions of 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 types. Of course I would like to encourage other developers to do that and to submit the resulting code back so everyone can benefit from it. Please send any and all such code changes to DTjanitor@sgi.com.


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, 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 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 (i.e. without a user-friendly interpretation) by WriteCDR. On other words: If you get a cryptic error message from WriteCDR, it usually means that there was too much activity on your system to write the CD. 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 can write at 4x speed, but only has 512k of buffer, while the Sony CDU 920 can only do 2x speed, but has 1M of buffer, so it will be 4 times less sensitive to short interruptions of the data stream.



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 ~600 MB of scratch file space.
    The pipeline should look like this




  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

    cd ../cd2
    ReadCD -v -w -t2,4,6,8
    cd ..
    WriteCDR -v -a cd1/*.aifc cd2/*.aifc


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

File overview.sc 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.

I'm including that text here for your convenience:

 
  
  ReadCD [-a] [-b] [-d dev] [-p] [-t list] [-v] [-w]
  
  Option      Meaning
  -a          Process audio tracks.
              If neither -b nor -a are specified, both will be 
              turned on.
  
  -b          Process binary (data, non-audio) tracks.
              If neither -b nor -a are specified, both will be 
              turned on.
  
  -d dev      CD ROM device.
              -d not specified:     Use first available CD ROM 
                                    on controller 0.
              -d U:                 Use CD ROM on SCSI 
                                    controller 0, unit U.
              -d /dev/scsi/scCdUl0: Use CD ROM on SCSI 
                                    controller C, unit U.
  
  -o          write data to stdout (ignored for audio).
  
  -p          Play audio as it is being read.
              -p turns on -a automatically.
  
  -t list     process listed tracks.
              -t not specified:     Process all tracks that 
                                    match -a and -b options.
              -t list:              Process 2-channel audio 
                                    tracks that match the list. 
                                    List may consist of 
                                    comma-separated single 
                                    track numbers and of 
                                    dash-separated start and 
                                    end track numbers.
  
  -v          Level of verbosity.
              -v not specified:     Error information only.
              -v specified once:    Status and Error 
                                    information.
              -v specified twice:   Debug, Status and Error 
                                    information.
  
  -w          Write audio tracks to AIFF-C files.
              Track 'nn' goes to file 'nn.aifc'.
              Write binary tracks to binary files.
              Track 'nn' goes to file 'nn.img'.
  
  
  
  WriteCDR [-a] [-c] [-d dev] [-i size] [-s n] [-v] file...
  
  Option      Meaning
  
  -a          Audio mode.
              -a not specified:     Create a data disc (CD-ROM).
              -a specified:         Create an audio disc (CD-DA).
                                    See file... below.
  
  -c          Check mode.
              -c not specified:     Actually write to the CD-R 
                                    disc.
              -c specified:         Perform pseudo-writes.
                                    Checks the data path, but 
                                    leaves CD-R disc unaltered.
  
  -d dev      CD writer device.
              -d not specified:     Use first available writer 
                                    on controller 0.
              -d U:                 Use CD writer on SCSI 
                                    controller 0, unit U.
              -d /dev/scsi/scCdUl0: Use CD writer on SCSI 
                                    controller C, unit U.
  
  -i size     Process stdin as first image file.
              stdin must contain/supply exactly 'size' bytes of 
              data.
              -i is not supported in audio mode.
  
  -s n        CD Writer speed.
              -s not specified:     Keep current CD writer speed.
              -s 1:                 Single speed.
              -s 2:                 2x speed.
              etc.
  
  -v          Level of verbosity.
              -v not specified:     Error information only.
              -v specified once:    Status and Error 
                                    information.
              -v specified twice:   Debug, Status and Error 
                                    information.
  
  file...     In audio mode, each of these files must contain 
              44100 Hz stereo audio data in AIFF-C format.
              Each file is written to an individual audio track 
              and must therefore comprise at least 4 seconds of 
              audio data.
  
              In data mode, the files are concatenated and 
              written to a single data track. WriteCDR does not 
              interpret the file contents in any way.  The user 
              is responsible for meaningful contents, i.e. a 
              filesystem image.  If '-i' is specified, stdin is 
              read first and must contain the specified number 
              of bytes.
  
  

Files of interest from "utilities/CDio" directory

Documentation


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire CDio directory.