Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey guys, I'm trying to learn how to use cdrecord instead of K3B, but I'm coming up with some problems.
I enter this:
$ cdrecord -dev=1,1,0 -audio -speed=4 "test 1.mp3"
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '1,1,0'
scsibus: 1 target: 1 lun: 0
cdrecord: Permission denied. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
So I figured because of the "Permission denied" I would have to use root, that solved the "Permission denied" problem though I still get the bottom error:
# cdrecord -dev=1,1,0 -audio -speed=4 "test 1.mp3"
scsidev: '1,1,0'
scsibus: 1 target: 1 lun: 0
cdrecord: Success. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
It says to use "cdrecord -scanbus" to find usable drives, but I already did that to get the drive in the first place.
I tried it on my DVD burner 1,0,0 and my CD burner 1,1,0. Both give me the above errors.
Perhaps this quote from the cdrecod manual pag might be applicable:
Quote:
To access SCSI devices via alternate transport layers, you need to
prepend the SCSI device name by a transport layer indicator. The
transport layer indicator may be something like USCSI: or ATAPI:. To
get a list of supported transport layers for your platform, use dev=
HELP:
In any case, you probably need the SCSI file, but I'm supprised that you don't have them "automatically."
The cdrecord dev part looks like this now.... dev=ATA:1,1,0 but there is another problem. For -audio , you need to convert it to wav or cdr first and I hope you aren't going to just put one song on the cdrom like your example shows.
Here is an example using lame to convert the mp3 files to wav for i in *.mp3; do lame --decode "$i" `basename $i .mp3`.wav; done
then you would record the wav files like this .... cdrecord -v dev=ATA:1,1,0 -audio -pad *.wav
or you could make it quick and use this script which does the converting and recording in one step. You will need mpg123 installed for this one.
Code:
#!/bin/bash
#decode directly to cdrom
cd /home/images
for i in *.mp3
do
mpg123 --cdr - "$i" | cdrecord -audio -pad -nofix -
done
cdrecord -fix -eject
Alright since you have to do a little conversions for audio I'm scrapping that and just doing the data for now. I don't want to convert not knowing that I'm doing it right. That would mean if the CD doesn't work it could be bad cdrecord command or bad convert.
Alright so this is what I tried:
cdrecord -tao -dev=ATA:1,1,0 -speed=4 -data *.mp3
So everything went fine, it burnt. Problem is it wont mount; it tells me it can't find out the filesystem. I tried looking in the "cdrecord -help" page, but didn't find anything on filesystem. Any idea's on where I went wrong?
For your own use, in kernel 2.6.x, you can not use ide-scsi adapter for your cdrom. Go to your kernel source code directory. Run make xconfig. Enable ide cdrom support and compile ide-scsi as a module. Then recompile and install your kernel and that is it.
homey: Thanks for that information. So much work needed before using cdrecord :P
I got my first successful CD burnt using cdrecord . I used mkisofs for the ISO and burnt it using cdrecord. Everything went smooth . Next mission is for the audio CD :P.
megadeth: In case of an emergency. If something goes wrong I can easily backup what I need instead of having to spend time to learn it in a stressful situation. Also learning to do things in the CLI helps you be able to go to any system and be able to operate it.
Lleb_KCir: Just saw your post after I posted. Thanks for that information, I forgot about piping commands together. I rarely use it . I'll keep that in mind as it is a time saver . No more need to make the ISO and wait for it to complete and then burn it .
Quote:
Originally posted by homey
for i in *.mp3; do lame --decode "$i" `basename $i .mp3`.wav; done
When I do this it tells me "basename: too many arguments". It goes through all the .mp3's telling me this, but looks like it converts. I then check and it has done nothing.
I can convert fine one at a time, though that can get tedious. Any idea's?
When I do this it tells me "basename: too many arguments". It goes through all the .mp3's telling me this, but looks like it converts. I then check and it has done nothing.
I just tried it on a small batch of mp3 files which have spaces and what-not in the name. That gave the same problem you ran into.
Then I replaced the spaces with a dash ( - ) and the operation completed without errors.
I can't remember off hand how to do it without getting rid of the spaces.
Hopefully, you are experimenting on a made-for-practice directory!
If you want to rename the files ( in the practice dir ) try this script.
Originally posted by CrEsPo When I do this it tells me "basename: too many arguments". It goes through all the .mp3's telling me this, but looks like it converts. I then check and it has done nothing.
if your filenames have spaces in them, 'for' won't actually escape them when passing them on to basename. This results in basename seeing each word in the filename as a seperate argument.
To work around this try the following:
Code:
for i in *.mp3; do lame --decode "$i" `basename "$i" .mp3`.wav; done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.