Updated cdrskin help tests and docs: -audio, obsolete eject_device=

Thomas Schmitt 17 years ago
parent c5674d49a8
commit d438d59fa1
  1. 70
  2. 28
  3. 7

@ -31,7 +31,7 @@ On top of libburn there is implemented cdrskin 0.1.5, a limited cdrecord
compatibility wrapper which allows to use some libburn features from
the command line.
Interested users of cdrecord are invited to participate in the development
of cdrskin. Contact: scdbackup@gmx.net
of cdrskin. Contact: scdbackup@gmx.net or libburn-hackers@pykix.org .
Important :
@ -92,10 +92,6 @@ It will not collide with an installed version of libburn either.
But libpthread must be installed on the system and glibc has to match. (See
below for a way to create a statically linked binary.)
Up to now i discourage to install the emerging libraries and to use them
with other programs. Unless you need my patches, better use vanilla libburn
for that.
@ -140,19 +136,26 @@ Obtain some info about the drive and the inserted media
cdrskin dev=1,1,0 -atip
Thoroughly blank a CD-RW
cdrskin -v dev=1,1,0 blank=all eject_device=/dev/cdrom -eject
cdrskin -v dev=1,1,0 blank=all -eject
Blank CD-RW sufficiently for making it ready for overwrite
cdrskin -v dev=1,1,0 blank=fast eject_device=/dev/cdrom -eject
cdrskin -v dev=1,1,0 blank=fast -eject
Burn image file my_image.iso to CD
cdrskin -v dev=1,1,0 speed=12 fs=8m -sao driveropts=burnfree padsize=300k \
eject_device=/dev/cdrom -eject my_image.iso
-eject my_image.iso
Burn a compressed afio archive to CD on-the-fly
find . | afio -oZ - | cdrskin -v dev=1,1,0 fs=32m speed=8 -sao \
driveropts=burnfree padsize=300k tsize=650m -
Burn 4 audio tracks to CD
ogg123 -d raw -f track01.cd /path/to/track1.ogg
oggdec -R -o track02.cd /path/to/track2.ogg
lame --decode -t -o track03.cd /path/to/track3.mp3
mppdec --raw-le /path/to/track4.mpc track04.cd
cdrskin dev=/dev/hdc blank=fast fs=0 -eject -audio track0[1-4].cd
Usage example with http://scdbackup.sourceforge.net
@ -167,7 +170,7 @@ or a device file address as listed by --devices with an accessible drive :
Set usage of cdrskin with appropriate options rather than cdrecord :
export SCDBACKUP_CDRECORD="cdrskin -v -v tao_to_sao_tsize=650m eject_device=/dev/cdrw"
export SCDBACKUP_CDRECORD="cdrskin -v -v tao_to_sao_tsize=650m"
Run a backup :
@ -181,12 +184,12 @@ Therefore it has to be defaulted to mode SAO which needs to know the track
size in advance. non-cdrecord option tao_to_sao_tsize=650m causes each CD
to get burned up to 650 MB regardless of the payload size.
Command eject does not work with /dev/sgX and there is no easy way to determine
a drive's device file address which is suitable for eject.
So this address has to be supplied by eject_device=... unless your drive is
/dev/sg0 which is guessed as eject_device=/dev/sr0 .
Audio features are incomplete in respect to cdrecord. Well prepaired track
files should get burned flawlessly, thanks to Lorenzo Taylor.
Builtin extraction of raw audio data from filetypes .au and .wav is not
implemented yet. See chapter "Audio CD" for details.
No audio features, no multi session ... Please report your wishes.
No multi session yet ... Please report your wishes.
Inspiration and Standard
@ -272,6 +275,45 @@ dev_translation=+1,0,0+1,1,0
Audio CD
Builtin extraction of raw audio data from filetypes .au and .wav is not
implemented yet. Lorenzo Taylor enabled option -audio in cdrskin (thanks !)
and reports neat results with audio data files which are :
16bit, stereo (or 4-channel if the 4-channel bit is set),
little-endian byte order
He proposes to extract them from usual audio formats by commands like
given above under "Usage examples".
The existence of cdrecord-builtin .wav extraction seems to have
hampered the development of a standalone stripping tool. If you know
a command line that would do the trick, contact me or libburn.pykix.org .
I myself am not into audio. So libburn-hackers@pykix.org might be the
best address for requests and bug reports.
Lorenzo also reports of a frontend tool which he italked into burning
automatically extracted files via cdrskin:
which in its configuration file burn.conf would need something like this
in the executables section:
ogg_decoder_option = -q -d raw -f
mp3_decoder_option = --quiet --decode -t -o
cdrecord = /usr/local/bin/cdrskin #or wherever you copied it
mp3_decoder = /usr/bin/lame
ogg_decoder = /usr/bin/ogg123
And in general section:
external_decoding = yes
The burning command would then be:
burn -A -a file1.ogg file2.mp3 file3.mp3 file4.ogg
This way still has a little flaw caused by cdrskin's misinterpretation
of option -pad which puts silent gaps between tracks rather than to
just fill up the final record of a track. We work on it.
Special compilation variations
You may get a (super fat) statically linked binary by :

@ -39,7 +39,7 @@ See option blank= for an example.
About compliance with *strong urge* of API towards burn_drive_scan_and_grab()
For a more comprehensive example of the advised way to behave with libburn
see test/burniso.c test/blank.c test/devices.c .
see test/libburner.c .
cdrskin was the initiator of the whitelist functionality within libburn.
Now it has problems to obviously comply with the new API best practice
@ -163,9 +163,15 @@ or
#define Cdrskin_libburn_does_ejecT 1
#define Cdrskin_libburn_has_drive_get_adR 1
/* >>> upcoming
#define Cdrskin_progress_track_does_worK 1
#ifdef Cdrskin_new_api_tesT
/* nothing under test caveat, currently */
/* switches from old behavior with aquiring drives to new behavior */
/* (put parasite macros under test caveat here) */
@ -205,7 +211,9 @@ or
/** Work around the fact that burn_drive_get_status() always reports to do
track 0 */
#ifndef Cdrskin_progress_track_does_worK
#define Cdrskin_progress_track_brokeN 1
/** Work around the fact that a drive interrupted at burn_drive_grab() never
leaves status BURN_DRIVE_GRABBING */
@ -1310,7 +1318,7 @@ return:
2 end program run (--help)
int i,ret;
int i,ret,bragg_with_audio= 0;
char *value_pt;
#ifndef Cdrskin_extra_leaN
@ -1365,6 +1373,9 @@ return:
{ret= 2; goto final_checks;}
} else if(strcmp(argv[i],"--bragg_with_audio")==0) {
bragg_with_audio= 1;
} else if(strcmp(argv[i],"--demand_a_drive")==0) {
o->scan_demands_drive= 1;
@ -1490,6 +1501,8 @@ set_dev:;
printf(" --allow_setuid disable setuid blocker (very insecure !)\n");
" --any_track allow source_addresses to match '^-.' or '='\n");
" --bragg_with_audio list -audio as supported option with -help\n");
printf(" --demand_a_drive exit !=0 on bus scans with empty result\n");
printf(" --devices list accessible devices (tells /dev/...)\n");
@ -1501,8 +1514,10 @@ set_dev:;
printf(" (might be stalled by a busy hard disk)\n");
printf(" --drive_not_exclusive do not ask kernel to prevent opening\n");
printf(" busy drives. Effect is kernel dependend.\n");
#ifdef Cdrskin_burn_drive_eject_brokeN
" eject_device=<path> set the device address for command eject\n");
printf(" --fifo_disable disable fifo despite any fs=...\n");
printf(" --fifo_per_track use a separate fifo for each track\n");
@ -1586,12 +1601,16 @@ see_cdrskin_eng_html:;
fprintf(stderr,"\t-sao\t\tWrite disk in SAO mode.\n");
fprintf(stderr,"\ttsize=#\t\tannounces exact size of source data\n");
fprintf(stderr,"\tpadsize=#\tAmount of padding\n");
fprintf(stderr,"\t-audio\t\tSubsequent tracks are CD-DA audio tracks\n");
"\t-data\t\tSubsequent tracks are CD-ROM data mode 1 (default)\n");
fprintf(stderr,"\t-nopad\t\tDo not pad (default)\n");
fprintf(stderr,"\t-help\t\tprint this text to stderr and exit\n");
"Option -audio is enabled but does no special .au or .wav processing.\n");
"By default any argument that does not match grep '^-.' or '=' is used\n");
"as track source address. Address \"-\" means stdin. In this case\n");
@ -2993,6 +3012,9 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
skin->supposed_track_idx= p->track;
#else /* Cdrskin_progress_track_brokeN */
/* >>> upcomming
skin->supposed_track_idx= p->track;
#endif /* ! Cdrskin_progress_track_brokeN */

@ -111,7 +111,8 @@ wishes as well as on the development of libburn.</DT>
No audio features yet.
No audio features yet. (Note: Option -audio is enabled in cdrskin-0.1.5 as
offered below, but no beheading of .au or .wav files takes place yet.)
Burns only a single closed session. No -multi option yet.
@ -134,7 +135,9 @@ ill peers. Alternatively one can guess the address of the ill device, remove
rw-permissions and retry the bus scan as non-superuser.
Burners other than /dev/sg0 and /dev/hdX (i.e. without ide-scsi) need a user
supplied device address for eject.
supplied device address for program eject.
(Note: -eject is now working in libburn-0.2.1 SVN and the workaround described
here is obsolete with cdrskin-0.1.5 as offered below.)