LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-09-2011, 04:31 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
How to convert 24-bit audio files to 16-bit .wav and be able to create audio CD.


Hi: I used the flac command to convert some 24-bit flac files to wav. Then I used cdrecord to burn the CD. But cdrecord said "Incorrect audio coding". Then I tried to use k3b to burn the wav files. He reject them. And he also rejected the flac files! However Nero has no problem with these flac files. Is this possible? Notice that k3b has no problem with 16-bit flac files.
 
Old 10-10-2011, 03:19 AM   #2
EmaRsk
Member
 
Registered: Mar 2006
Distribution: Mint, WSL Ubuntu
Posts: 134

Rep: Reputation: 32
You can use
Code:
sox your-24bit-file.flac -b16 your-16bit-file.wav
or, to convert a bunch of files:
Code:
for i in *.flac; do
  sox $i -b16 ${i%flac}wav;
done
 
Old 10-10-2011, 03:37 AM   #3
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Audacity can convert from 24bit to 16bit flac...and AFAIK k3b should automatically convert 24bit to 16bit if you have selected 'CD audio'. Maybe I'm making a mistake, I'll need to test it and that requires digging up the few 24bit flac files I have.

BTW, you can also convert from 24bit to 16bit flac files with some linux media players. Deadbeef has the option to do that, not that I've tried converting with deadbeef yet.
 
Old 10-10-2011, 01:18 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks cascade9. And thank you very much, EmaRsk, for your code. I will use flac first to convert to WAV and then sox to convert from 24 to 16 bits, because the flac command tests the file integrity.

I was looking at the WAV files output by flac with hexdump, and found a pattern. The audio signal is grouped in groups of six bytes, which was to be expected if the sample size was 24 bits:
Code:
-00131b     001329
-00147f     001552
-00148a     001446
-0017b7     0017cf
-001686     001868
So, the files output by the flac command when decoding 24-bit are 24-bit wav files. I did not even know that they existed.
 
Old 10-10-2011, 02:22 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
24-bit wav files. I did not even know that they existed.
3 years ago, stf92 http://www.linuxquestions.org/questi...io-cds-826505/
"" dvda-author -o DVD -g *.wav -X 'working directory' ""
That was 24-bit .wav files ..... e.g. exported from Audacity.
 
Old 10-10-2011, 02:43 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 10-11-2011, 04:28 AM   #7
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Quote:
Originally Posted by stf92 View Post
So, the files output by the flac command when decoding 24-bit are 24-bit wav files. I did not even know that they existed.
Wav is more of a 'container' format than most people realise. Mist people think that 'wav = CD-DA' (CD- digital audio) but its not the case, you can have wav files with higher than standard CD-DA sample rates (16bit/44.1KHz) and more than 2 channel sound. You can also have wav files with lower than the CD-DA standard sample rates, bit depth, etc., and even 'compressed' wav files.
 
Old 10-11-2011, 06:41 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I think sox will convert to cdda if you use it as a prefix, so:

Code:
sox your-24bit-file.flac -b16 your-16bit-file.cdda
 
Old 10-12-2011, 12:21 PM   #9
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
But does it test the file integrity?
 
Old 10-12-2011, 12:32 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
What do you mean ?

If you are converting from a lossless format to a lossless format, no quality is lost.
 
Old 05-15-2012, 04:27 AM   #11
Wsettle
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Talking

Converting FLAC to 16/24 bit WAV is not so difficult and hard. Just type how to convert FLAC to WAV on Mac and Windows in Google to find the guide or way you prefer to.
 
Old 05-15-2012, 04:43 AM   #12
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Rep: Reputation: 47
Quote:
Originally Posted by H_TeXMeX_H View Post
What do you mean ?

If you are converting from a lossless format to a lossless format, no quality is lost.
he is modifying resolution, so some quality will be lost in any case.
 
Old 06-28-2012, 05:03 AM   #13
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by H_TeXMeX_H View Post
What do you mean ?

If you are converting from a lossless format to a lossless format, no quality is lost.
The FLAC file may have been corrupted. Too much time stored in a low quality medium, errors arising during the transmission if ddownloaded from the web, et cetera. But a FLAC file has error detection code built into it. And the flac command makes use of this code to check for file integrity.
 
Old 06-29-2012, 01:21 AM   #14
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Rep: Reputation: 47
I forgot that if he were to convert from, say, 8-bit to 16-bit lossless, (or to 32-bit) quality shouldn't be lost.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio Recording Problem, SBx00 Azalia (Intel HDA), Ubuntu 10.04, 32 bit, 64 bit. MIJ-VI Ubuntu 2 05-20-2010 12:24 PM
10.3 32 Bit Realtek HD Audio Fixed - but will 64 bit version work 1kyle SUSE / openSUSE 1 06-26-2008 05:36 PM
Integrated 16-bit Sound Blaster Pro compatible audio 24-bit DAC jelgavchik Linux - Laptop and Netbook 2 11-16-2006 09:20 PM
Integrated 16-bit Sound Blaster Pro compatible audio 24-bit DAC jelgavchik Linux - Hardware 1 11-16-2006 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration