Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Burning sound file onto CD

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Burning sound file onto CD

#1 Post by luiznetto »

I run Debian 7.9, kernel 2.6.32-5-686. I have wodim, k3b and brasero installed on my system. I have a file called sound.wav on disk, which I want to burn onto a CD so it can be played on any regular music CD player. Brasero and k3b won't let me do that - I get error messages and the CD does not get written. I used to do it with cdrecord years ago, but as you probably know cdrecord is pretty much out of the game these days; I have wodim installed instead. but I don't know how to do it with wodim. Any suggestions? Thanks in advance.

Code: Select all

luiz@debian-luiz-computer:~$ cat /etc/debian_version
7.9
luiz@debian-luiz-computer:~$ uname -r
2.6.32-5-686

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#2 Post by GarryRicketson »

I get error messages and the CD does not get written.
What do the error messages say ?
Maybe you are missing some "codecs"
https://userbase.kde.org/K3b/Burn_an_Audio_Cd_with_K3b
Lots more info here,
How to burn a .wav sound file to a CD with k3b
How to burn a .wav sound file to a CD with brasero
Another thing that can cause problems, Are you sure the file is really .wav ?
Sometimes they can have the name anysoundmusic.wav , but are not really a wav file, this causes problems, and they need to be converted to a true wav format.
It would help to know what the error messages say.
I have never had any problem burning .wav music files to a CD, using Debian Wheezy 7.8 and k3b,
But have had problems burning anything, ISOs, , music, or just files , using brasero, so I just don't use it.

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#3 Post by luiznetto »

Do you know if there is any test that I can do to find out whether a file is a true wav file?

User avatar
thanatos_incarnate
Posts: 717
Joined: 2012-11-04 20:36

Re: Burning sound file onto CD

#4 Post by thanatos_incarnate »

luiznetto wrote:Do you know if there is any test that I can do to find out whether a file is a true wav file?
Run it with mplayer or mpv in command line and you will get codec information.
vlc also has a special window with codec info. A lot of other players let you do that, too.

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#5 Post by luiznetto »

Last time I tried to install mplayer it caused problems in my system, and mpv apparently is not in the repositories. I do have vlc though. Here is what I get from the codecs window:

Code: Select all

Stream 0
Type: audio
Codec: PCM 516 LE (araw)
Channels: Stereo
Sample rate: 32000 Hz
Bits per sample: 16

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Burning sound file onto CD

#6 Post by stevepusser »

Again, the error messages from k3b could help. Starting k3b from the command line might provide additional troubleshooting messages---and if you record a very short clip of the sound file with VLC and upload it, maybe others could see if the problem can be reproduced.
MX Linux packager and developer

dzz
Posts: 257
Joined: 2007-02-05 20:39
Location: Devon, England

Re: Burning sound file onto CD

#7 Post by dzz »

Never had much luck using any gui for audio cd but this works for me (and is simpler than gui):

Code: Select all

# edit to suit:
DEVICE=/dev/sr0
WORK_DIR=/path/to/my/wav/file(s)

#remove "-dummy" after test

wodim -v -dummy -eject -pad speed=12 dev=$DEVICE -dao -swab $WORK_DIR/*.wav| tee wodim_log
Anything wrong.should show in terminal window and saved to wodim_log.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#8 Post by GarryRicketson »

dzz wrote:Never had much luck using any gui for audio cd but this works for me (and is simpler than gui):

Code: Select all

# edit to suit:
DEVICE=/dev/sr0
WORK_DIR=/path/to/my/wav/file(s)

#remove "-dummy" after test

wodim -v -dummy -eject -pad speed=12 dev=$DEVICE -dao -swab $WORK_DIR/*.wav| tee wodim_log
Anything wrong.should show in terminal window and saved to wodim_log.
+ 100,
That is nice, I like that, just learned something new, so Thanks,..
also I find that I can get more info on "wodim" here:

Code: Select all

$ info wodim
  
I hope this is much help or use to the OP as it is for me.

User avatar
sunrat
Administrator
Administrator
Posts: 6479
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: Burning sound file onto CD

#9 Post by sunrat »

luiznetto wrote:Last time I tried to install mplayer it caused problems in my system, and mpv apparently is not in the repositories. I do have vlc though. Here is what I get from the codecs window:

Code: Select all

Stream 0
Type: audio
Codec: PCM 516 LE (araw)
Channels: Stereo
Sample rate: 32000 Hz
Bits per sample: 16
The file is 32000 Hz whereas CD is 44100 Hz. I'm not sure if that's the problem, I would have thought K3b might handle the conversion.
You could try converting it to 44100 Hz using sox or Audacity.
Also make sure it's not too large to fit on a CD.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#10 Post by luiznetto »

I followed dzz and GarryRicketson's suggestion, and here's what I got:

Code: Select all

luiz@debian-luiz-computer:~/tom$ wodim -v -dummy -eject speed=12 dev=/dev/sr0 -dao -swab Toms_last_message.wav| tee wodim_log
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
TOC Type: 0 = CD-DA
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'TSSTcorp'
Identification : 'CDW/DVD TS-L462D'
Revision       : 'AC02'
Device seems to be: Generic mmc2 DVD-ROM.
Current: 0x0009 (CD-R)
Profile: 0x000A (CD-RW) 
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM) 
Profile: 0x0010 (DVD-ROM) 
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1362944 = 1331 KB
FIFO size      : 12582912 = 12288 KB
wodim: Inappropriate audio coding in 'Toms_last_message.wav'.
luiz@debian-luiz-computer:~/tom$ cat wodim_log
TOC Type: 0 = CD-DA
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'TSSTcorp'
Identification : 'CDW/DVD TS-L462D'
Revision       : 'AC02'
Device seems to be: Generic mmc2 DVD-ROM.
Current: 0x0009 (CD-R)
Profile: 0x000A (CD-RW) 
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM) 
Profile: 0x0010 (DVD-ROM) 
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1362944 = 1331 KB
FIFO size      : 12582912 = 12288 KB

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#11 Post by GarryRicketson »

wodim: Inappropriate audio coding in 'Toms_last_message.wav
I don't know very much about it, but to me this indicates there is something not right with the "coding" of .wav file,...corrupted or something,
That also would be why it did not work on the others as well. I don't know how you would fix it, sorry

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#12 Post by luiznetto »

Do you know a good command line program to convert .mp3 to .wav? The file in question was converted using audacity, I guess, and it might have been corrupted in the process, even though it plays OK when I use an audio playing program.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#13 Post by GarryRicketson »

I don't , really,.. I don't do much with audio files myself,
http://www.cyberciti.biz/faq/convert-mp ... -in-linux/
This comes up in a search, (above)
And this, (not trying to be smart, but there seem to be a lot listed) , you would just need to look at each one, and see if some work, I don't know what to recommend, or maybe someone else , later on will .
good command line program to convert .mp3 to .wav for linux
Your question
Do you know a good command line program to convert .mp3 to .wav?
Is worded very well, it worked well in the search, I just added "for linux" to avoid getting "windows" programs.
It does seem odd, that the file plays, at all, if it was "corrupted", I would think it would not play.
One last thought, is there some reason it has to be "burned" to a CD, my kid uses USB sticks, for all his music files, and just copies them to the USB stick.
Also, if it will play, What if you play it , and also record it, then save the new recorded copy to what ever file format you want, ?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#14 Post by GarryRicketson »

Maybe some luck here:
I still was looking at some of the search results, and stumbled on to this:
http://www.everydaylinuxuser.com/2014/0 ... o-mp3.html
The author mentions this "Gnac" , pay attention though, in the article, it is using "linux mint", so do not try to install or download from the "Linux Mint" repo, I also checked, and it is also in the Debian Wheezy repos, and since it is part of Gnome, it probably is in the Jessie repos as well.
Gnac is an easy to use audio conversion program for the GNOME desktop.
It is designed to be powerful but simple! It provides easy audio files
conversion between all GStreamer supported audio formats.
All though "Gnac" is not "command line" if it does the job, that should not matter.
Based on what the author wrote, sounds pretty good.
The only thing though, if the file is corrupted it might not convert correctly either. But if it still plays, that would be the last resort, record it and then you would have a new recording, that should be good.
Looks like it is also in the Jessie Repos:
https://packages.debian.org/jessie/sound/
Last edited by GarryRicketson on 2015-10-29 00:38, edited 2 times in total.

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#15 Post by luiznetto »

The reason I want to have that file on a CD is that it is a very important file to me, and I want to back it up on as many different types of media as possible. I want to be able to play it on a regular CD player even when a computer is not available. I feel there is an intrinsic vulnerability in all kinds of digital files, in the sense that they can be easily erased, corrupted or destroyed. Well, nothing lasts forever, but a CD is a solid medium that can be played for many years.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Burning sound file onto CD

#16 Post by GarryRicketson »

Re: Burning sound file onto CD
Postby luiznetto » 2015-10-28 18:16

The reason I want to have that file on a CD is that it is a very important file to me, and I want to back it up on as many different types of media as possible. I want to be able to play it on a regular CD player even when a computer is not available. I feel there is an intrinsic vulnerability in all kinds of digital files, in the sense that they can be easily erased, corrupted or destroyed. Well, nothing lasts forever, but a CD is a solid medium that can be played for many years.

Ok, well, any way, I know you also said "command line", but the Gnac , I mention on the previous page, sounds pretty good, even if is a GUI , heck, if it does the job, it does not matter. Might be worth a try.

User avatar
sunrat
Administrator
Administrator
Posts: 6479
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: Burning sound file onto CD

#17 Post by sunrat »

A CLI program that is hard to beat:
Welcome to the home of SoX, the Swiss Army knife of sound processing programs.
http://sox.sourceforge.net/

And to repeat my previous answer, the .wav file needs to be 16 bit 44.1kHz for an audio CD.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#18 Post by luiznetto »

I changed the file from 32000 Hz to 44100 Hz and tried to burn with wodim again. Now I get different error messages. Does anyone know what they mean?

Code: Select all

luiz@debian-luiz-computer:~/tom$ wodim -v -dummy -eject speed=12 dev=/dev/sr0 -dao -swab Toms_last_message.wav| tee wodim_log
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
TOC Type: 0 = CD-DA
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'TSSTcorp'
Identification : 'CDW/DVD TS-L462D'
Revision       : 'AC02'
Device seems to be: Generic mmc2 DVD-ROM.
Current: 0x0009 (CD-R)
Profile: 0x000A (CD-RW) 
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM) 
Profile: 0x0010 (DVD-ROM) 
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1362944 = 1331 KB
FIFO size      : 12582912 = 12288 KB
wodim: Bad audio track size 6897664 for track 01.
wodim: Audio tracks must be at least 705600 bytes and a multiple of 2352.
wodim: See -pad option.
luiz@debian-luiz-computer:~/tom$ file Toms_last_message.wav
Toms_last_message.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#19 Post by luiznetto »

I tried to burn with k3b again and got the message:

Code: Select all

OPC failed. Probably the writer doesn't like the medium.
Strange is, I've used the same writer to burn data CDs, and even to copy audio CDs with cdrdao, and it worked.

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Burning sound file onto CD

#20 Post by luiznetto »

After a lot of research, I finally fourn out what commad works for me to write a .wav file to optical disk using wodim:

Code: Select all

$ wodim -v gracetime=15 dev=/dev/sr0 speed=10 -sao driveropts=burnfree -useinfo -audio -pad music.wav
or

Code: Select all

$ wodim -v gracetime=15 dev=/dev/sr0 speed=10 -sao -audio -pad -eject music.wav
Both work equally well.

If I just want to make a copy of and audio CD, a single command will do:

Code: Select all

$ cdrdao copy
but the same will not work for a data CD.

I completely removed Brasero from my system. It doesn't work for me. k3b, on the other hand, which uses wodim as the behind-the-curtain command line program along with genisoimage, is quite good. I usually prefer to write CDs on the command line, because is consumes less system resources and reduces the probability of something going wrong. k3b lets you see what's happening behind the curtain, and I like that.

I think we can mark this thread as solved.

Post Reply