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.
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:
- ReadCD -- a program that can read audio and data tracks off a CD and optionally write them to files and/or play the audio tracks via the audio hardware.
Audio tracks are written to AIFC files, data tracks are written to binary image files, so files created by ReadCD can be used directly by WriteCDR.Audio reading has been tested with the Sony CDU 76S CD-ROM, the Sony CDU 920S, the Sony CDU 924S, the Sony CDU 926S and the Yamaha CDR 100 CD-writers.
Binary reading should work with any CD-ROM and with any CD-writer that can be used as a CD-ROM.
- WriteCDR -- a writer driver that can create a single session, single track data CD-R from file system image files.
It can also create a single session, mutiple track audio CD-R from AIFC files.CDs can be "written" in "check" mode to test the data path, meaning that the write laser is not actually turned on.
The CD writers WriteCDR has been tested with are the Sony CDU 920S, the Sony CDU 924S, the Sony CDU 926S, the Sony CDU 948S, the Yamaha CDR 100, the Yamaha CDR 102, the Yamaha CDR 400, and the Yamaha CRW4260.
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 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 (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:
- make_efs
a shell script that creates an SGI EFS filesystem image using mkfs.
This script has been in the SGI developer toolbox (directory toolbox/utilities/CDmastering) for a long time. In order to create an EFS filesystem format CD, you need make_efs and all the associated tools from the CDmastering section.
- mkisofs
a program that creates an ISO 9660 standard CD filesystem image with optional RockRidge data. Source for mkisofs is available from ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/ / mkisofs-1.11.3.tar.gz and many mirror sites. Use the archie tool to find a site near you.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.
Besides this file, there is little documentation. When in doubt, check the source code.
- Copy an audio CD 1:1.
ReadCD -v -w
WriteCDR -v -a *.aifc
- Copy a data CD 1:1.
ReadCD -v -w
WriteCDR -v 01.imgIf 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 thisReadCD -o -w | WriteCDR -i <size of CD in bytes> -v
- Create an ISO CD of /usr/share.
mkisofs -a -R -o usr_share.iso /usr/share
WriteCDR -v usr_share.iso
- 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
File overview.sc.gz 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.
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.
Source
Documentation
Reference
OR, ...