|Display the track index (table of contents) of the CD and exit. No audio data is read. If you use -iq, the index is printed in a more compact format which is suitable for parsing by shell scripts etc. Note that the index is written to stderr.|
|Quiet operation, i.e. no informational output except for error messages.|
|Verbose operation. Display additional information while reading audio data (how many percent done, and how long the remaining data will approximately take to read). Specify -vv to make it even more verbose.|
|Print a short help text and exit.|
|Print version information and exit.|
|Reset the CD-ROM drive (set default sector size and density) and exit. This is sometimes useful if you interrupt tosha by pressing Ctrl-C or by killing it, which might leave the CD-ROM drive in a state of being unable to mount regular data CD-ROMs. In such a case, just running tosha -r should help.|
|-d dev, --device dev|
|Specify the CD-ROM device to use. The default is /dev/cd0c. If you have two drives and you want to read from the second one, use /dev/cd1c. If you want to read from a CD writer, use /dev/rworm0.ctl.|
|-f fmt, --format fmt|
|Specify the output audio format. The default is pcm. Currently supported formats: pcm or raw (headerless little-endian), mcp or war (headerless big-endian), aiff (IFF audio format, used on the Amiga and by certain semi-professional software), wav (RIFF/WAV format commonly used by Microsoft products), au (AU format used by Sun workstations). The audio data is always stored in 16bit stereo 44.1kHz. If you need a different format, you can use sox(1) to convert it.|
|The -f option is ignored when reading VideoCD tracks.|
|-t tracklist, --track tracklist|
|Specify which track(s) to read. This can be a single track number, a range (from-to), multiple track numbers separated by commas, or a combination thereof. Tracks which dont exist on the CD are ignored. The default is to read all tracks in sequence (1-100).|
|-s sector, --start sector|
|Specify the start sector. You must also use the -e option to specify the end sector. The -t option is ignored when sector addresses are used. Only one output file is created.|
|-e sector, --end sector|
|Specify the end sector (inclusive). See the -s option above.|
|-o outfile, --output outfile|
|Specify the output file name, which is used to store the audio data. If the name is a single dash -, audio data is written to the standard output. If the name contains the character sequence %s, it is substituted by an extension appropriate for the file file format (for example, if the output is in WAV format, %s will be replaced by wav).|
|If the name contains a percent sign % (not followed by an s), it is interpreted as a formatting sequence for an integer value (according to sprintf(3)) which will be substituted by the current track number, so that every track will be written to its own file. Example:|
|creates the files track1.raw, track2.raw, and track3.raw.|
|If the name does not contain a percent sign, all tracks are written into the same output file, one after another.|
|-k rate, --kbps rate|
|Specify the desired mp3 bitrate (in kbits/s) for MPEG audio encoding (the default is 128 kbits/s). This is not essential for tosha to operate correctly, but it helps in estimating the file size if youre going to MPEG encode the audio data. If youre not planning to MPEG encode it, this number is meaningless. Its also meaningless for VideoCD tracks.|
|-b sectors, --buffer sectors|
|WARNING: This is a wizard option -- do not use it unless you know exactly what youre doing. This option specifies the size of the read buffer (in CD DA sectors), and thus it specifies the number of sectors that can be read at once (with a single drive access). The default is 10, which should work reasonably well with most drives. The maximum is 26 (my drive doesnt support more, probably because no more than 26 sectors with subchannel data fit into 64 Kb of memory).|
In order to be able to access the CD-ROM drive with tosha, make sure that you have sufficient permission to access the appropriate device entries in the /dev directory (you need read and write access to the device). For the classic SCSI system, this is usually /dev/cd0c. For the new CAM SCSI system (FreeBSD 3.0), you need access to the pass and xpt devices (please refer to the manual pages pass(4) and xpt(4)).
The easiest way, of course, is to run tosha as root, thus not having to worry about permissions. However, this is not recommended.
A much cleaner approach would be to create a group for the users who are allowed to access the CD-ROM drive (or use an existing group such as operator). Add those users to that group by editing the /etc/group file (note that modifications to that file will take effect the next time you log in), see the manual page group(5). Use chgrp(1) to give the appropriate devices to that group, then use chmod(1) to give read/write permission to that group. For example:
chgrp operator /dev/cd0c
chmod g+rw /dev/cd0c
The first track on VideoCDs usually contains a small ISO filesystem, containing information for CD-i players etc. The actual video tracks (one or more) start at track 2.
tosha detects if the track is an audio track or a VideoCD data track, and it automatically uses the appropriate access method for the drive. However, do not try to read normal CD-ROM data tracks with tosha. Doing so might result in SCSI errors.
The VideoCD data (as read by tosha) is basically an MPEG system stream with additional information (sync, timecode etc.). In order to play it on the screen, youll need an MPEG player that is aware of this format (a plain MPEG player wont work). For example, you can use mpegtv (see http://www.mpegtv.com/).
Not all SCSI drives work with tosha, and only some are really tested and proven to work. See the WWW page (section AUTHOR) for a list of drives which are know to work (or not to work).
The name tosha has historical reasons: The very first version only worked with the authors Toshiba drive.
There is currently no jitter correction performed. Frankly, I think that it shouldnt be necessary with most modern CD-ROM drives, so I didnt bother to implement it. Besides, I dont have drives to test it with -- all of my drives work perfectly well without jitter correction.
Copyright (C) 1997-1999 Oliver Fromme <email@example.com>
All rights reserved. For more information, please refer to the file LICENCE which is included with the source distribution.
|-->||TOSHA (1)||01 Jan 1999|