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

This commit is contained in:
Thomas Schmitt 2006-09-01 08:49:31 +00:00
parent 10b1ade7a2
commit 749be2350b
3 changed files with 86 additions and 19 deletions

View File

@ -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 compatibility wrapper which allows to use some libburn features from
the command line. the command line.
Interested users of cdrecord are invited to participate in the development 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 : 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 But libpthread must be installed on the system and glibc has to match. (See
below for a way to create a statically linked binary.) 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.
Usage Usage
@ -140,19 +136,26 @@ Obtain some info about the drive and the inserted media
cdrskin dev=1,1,0 -atip cdrskin dev=1,1,0 -atip
Thoroughly blank a CD-RW 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 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 Burn image file my_image.iso to CD
cdrskin -v dev=1,1,0 speed=12 fs=8m -sao driveropts=burnfree padsize=300k \ 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 Burn a compressed afio archive to CD on-the-fly
find . | afio -oZ - | cdrskin -v dev=1,1,0 fs=32m speed=8 -sao \ find . | afio -oZ - | cdrskin -v dev=1,1,0 fs=32m speed=8 -sao \
driveropts=burnfree padsize=300k tsize=650m - 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 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 : 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 : 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 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. 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 Audio features are incomplete in respect to cdrecord. Well prepaired track
a drive's device file address which is suitable for eject. files should get burned flawlessly, thanks to Lorenzo Taylor.
So this address has to be supplied by eject_device=... unless your drive is Builtin extraction of raw audio data from filetypes .au and .wav is not
/dev/sg0 which is guessed as eject_device=/dev/sr0 . 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 Inspiration and Standard
@ -272,6 +275,45 @@ dev_translation=+1,0,0+1,1,0
fs=16m fs=16m
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 :
headerless
44100Hz
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:
http://www.bigpaul.org/burn/
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 Special compilation variations
You may get a (super fat) statically linked binary by : You may get a (super fat) statically linked binary by :

View File

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

View File

@ -111,7 +111,8 @@ wishes as well as on the development of libburn.</DT>
<UL> <UL>
<DT></DT> <DT></DT>
<LI> <LI>
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.)
</LI> </LI>
<LI> <LI>
Burns only a single closed session. No -multi option 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. rw-permissions and retry the bus scan as non-superuser.
<LI> <LI>
Burners other than /dev/sg0 and /dev/hdX (i.e. without ide-scsi) need a user 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.)
</LI> </LI>
</UL> </UL>
</P> </P>