cdrdao utility script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cdrdao utility script
# 1  
Old 04-24-2004
cdrdao utility script

friends, i love ya...

i wrote a script to automate using cdrdao to burn an audio cd from mp3 files, using the great tutorial at http://tldp.org/HOWTO/MP3-CD-Burning/index.html (check out the site, i believe that it's very well-written). i messed around with it and got to a place where i felt comfortable with cdrdao and cdrecord (i also wrote a similar script using cdrecord), and wrote the script based on what was effective using a command line. however, i'm finding that the command line argument isn't working in my script. check out my script:::::

############################

#! /bin/bash
# THIS IS MY CD BURNER. STARTED 4.17.2004...
# -SPENCER


echo "Copying files to temp directory!!!!!!!!!!??????!!!!?!?!!!???"

for i in *.mp3; do cp "$i" /home/snwright/Desktop/temp/`echo $i | tr ' ' '_'`; done

cd /home/snwright/Desktop/temp

echo Now\ working\ in\ `pwd`

echo "Beginning mp3>>wav decoding!!!!??????!!!!"

for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done

echo "Now deleting mp3 files!!!!?????!!!!?!???"

rm -f *.mp3

#echo "Now beginning normalize!!!!!!!!!!!!?!?!???????!!!!!"

#normalize -m *.wav

echo "Now writing TOC!!!!!!!!????!!!!!!!!!!!!!!??"

tocmaker *.wav

echo "Check out what we're workin with!!!!????????????"

ls cd*

echo "Writing!!!!!!!!!!"

cdrdao write --device 0,0,0 --driver generic-mmc cd.toc

########################

the last command there is the significant one. when i run the script, i get the following printout from cdrdao:

Cdrdao version 1.1.8 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

ERROR: Cannot open SCSI device '/dev/cdrecorder':
Supported SCSI transports for this platform:

Transport name: sg
Transport descr.: Generic transport independent SCSI
Transp. layer ind.:
Target specifier: bus,target,lun
Target example: 1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported

Transport name: pg
Transport descr.: SCSI transport for ATAPI over Parallel Port
Transp. layer ind.:
Target specifier: bus,target,lun
Target example: 1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported

Transport name: ATA
Transport descr.: ATA Packet specific SCSI transport
Transp. layer ind.: ATAPI:
Target specifier: bus,target,lun
Target example: ATAPI:1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported

Transport name: ATA
Transport descr.: ATA Packet specific SCSI transport using sg interface
Transp. layer ind.: ATA:
Target specifier: bus,target,lun
Target example: 1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported
ERROR: Please use option '--device [path:]bus,id,lun', e.g. --device 0,6,0 or --device ATAPI:0,0,0
ERROR: Cannot setup device /dev/cdrecorder.

however, when the same command is entered from the command line (using bash, still) i get the desired result:

[root@localhost temp]# !cdrdao
cdrdao write --device 0,0,0 --driver generic-mmc-raw cd.toc
Cdrdao version 1.1.8 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

0,0,0: 24X10X40 CD-RW Rev: 2.00
Using driver: Generic SCSI-3/MMC (raw writing) - Version 2.0 (options 0x0000)

Starting write at speed 24...
Pausing 10 seconds - hit CTRL-C to abort.
Process can be aborted with QUIT signal (usually CTRL-\).
Enabling JustLink.
Enabling JustSpeed.
Enabling JustLink.
Enabling JustSpeed.
Using 96 byte raw P-W sub-channel data mode.
Executing power calibration...
Power calibration successful.
Writing lead-in and gap...
Writing track 01 (mode AUDIO/AUDIO )...
Wrote 1 of 732 MB (Buffers 100% 97%).

etc. why is this? i'm using the same shell, and i'm using the same command. both are executed as root... what gives?

thanks kids,
spencer
# 2  
Old 04-24-2004
i have never made a cd from linux but my guess would be device permissions.
# 3  
Old 04-26-2004
ha. answered my own question. i checked out the printout for `which mydaoburner`, and it pointed to /home/snwright/bin/mydaoburner, which i thought i had made into a link to the file which i had been troubleshooting on - the one i posted above. it wasn't, and i fixed it.
if anyone needs a command-line script that'll decode mp3s to wave and then burn them in disc-at-once, the script i wrote might serve as a guideline.
good luck, all.
spencer
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to automation utility app

Hi All, Am trying to write a shell script to automate one of the product utility but am struck with how to send/key in the inputs and most importantly it requires to press "Enter" key every time after giving the input. Not sure how to take control of utility from script and key in... (1 Reply)
Discussion started by: Optimus81
1 Replies

2. Homework & Coursework Questions

script similar to rm utility

1. The problem statement, all variables and given/known data: saferm is a replacement for the rm utility. Rather than removing files, it move files in a sub directoy called".saferm" in the user's home directory. If "~/.saferm" doesn't exist, it is automatically created. The -l options lists the ... (3 Replies)
Discussion started by: Joey12
3 Replies

3. Shell Programming and Scripting

Using sendmail utility in K Shell script

Hi, I am new to shell scripting and thus any help will be highly appreciated. I need to write a K shell script where in the email sending feature should be handled by sendmail utility and I have come up with the following : #!/usr/bin/ksh echo "This is a test mailest mail" | /usr/lib/sendmail... (4 Replies)
Discussion started by: sdiptanil
4 Replies

4. Shell Programming and Scripting

I need help to run this utility from a shell script

I need some help to run this executable from within a shell script. The Script is run the following way at the command prompt. $rateupd Main Menu --Standard Output ----------- --Standard Output 1. - Update Rate --Standard Output 2. - Exit. --Standard Output Enter Selection: 1 --User... (5 Replies)
Discussion started by: rajeeb_d
5 Replies

5. Shell Programming and Scripting

script not working...select utility

#!/usr/bin/bash name="$@" myname=malay #echo $myname select firstname in $name; do if ;then echo $firstname else break fi done invoking with:- ./script.sh one two three four five six seven eight nine malay (6 Replies)
Discussion started by: mobydick
6 Replies

6. Shell Programming and Scripting

Writing a Utility Script

Hi All ,, I have couple of shell scripts .. I am trying to build a Utility script which would call each script example :: ======== 1) uni.sh 2) uni2.sh 3)uni3.sh when i run the Util script it will come as a menu ,, once i press 1 it will call the first shell script and runs it ..... (10 Replies)
Discussion started by: raghav1982
10 Replies

7. Shell Programming and Scripting

Help on how to call a utility from script

Hi, I am new to shell scripting (sh) I need a script which will call a utility & once u call it.It will ask for inputs on the screen.These inputs it needs to get or read from a txt file. for e.g #! /bin/sh while read line do echo $line done txt file will have test 01/01/2008 ... (3 Replies)
Discussion started by: innocent
3 Replies

8. UNIX for Dummies Questions & Answers

Need help on SCRIPT(1M) utility

Hi All, I need to do a lot of manual entries at shell prompt. So to collect the logs(each command fired in that session, i use "SCRIPT(1) : make typescript of terminal session" this is kool,but the problem here is that it saves the linefeed, and backspaces along with the commands in the log... (1 Reply)
Discussion started by: amit4g
1 Replies

9. Shell Programming and Scripting

sort utility in script ?

Hi friends, I want to use sort command in script. I used the following syntax in my scipt, sort -t '|' +3 tempcdrext4.cdr > temp.mocdr It give me a error " Input file specified two times." but this command work fine in the prompt without any problem. Can sombody please tell me who... (2 Replies)
Discussion started by: maheshsri
2 Replies
Login or Register to Ask a Question