Go Back   Sonos Forums > Digital Music

Reply
 
Thread Tools Display Modes
  #1  
Old Jul 30th, 2007, 10:29 AM
jrosen2 jrosen2 is offline
Member
 
Join Date: Feb 2007
Location: Kirkland, Quebec Canada
Posts: 58
Question how to convert 24 bit flac to 16 bit?

I recently ripped a DVD to FLAC and it sampled at 24 bits. I converted it to wav, but I would like to reconvert to 16 bit flac. I tried using Media Monkey, but it reconverted it back to 24 bit. I could not find an option to 16 bit. How can this be done?
Reply With Quote
  #2  
Old Jul 30th, 2007, 01:42 PM
Majik's Avatar
Majik Majik is offline
Moderator
 
Join Date: Mar 2005
Location: Berkshire, UK
Posts: 6,195
Default

You could probably use flac command line for this.

flac -d file.flac

will decode it, normally to WAV
Then you could use

flac --bps=16 file.wav

to convert it back. Of course you'll lose all the tags doing it this way.

Cheers,

Keith
__________________
Sonos customer (6 x ZP100, 1 x ZP120, 1 x ZP90, 4 x PLAY:5, 2 x PLAY:3, 5 x CR100, 1 x CR200, 2 x SUB, 1 x Playbar)
I am not affiliated with or representative of Sonos in any way. All opinions expressed are my own!
Reply With Quote
  #3  
Old Jul 30th, 2007, 05:44 PM
jrosen2 jrosen2 is offline
Member
 
Join Date: Feb 2007
Location: Kirkland, Quebec Canada
Posts: 58
Default

Didn't work. I used the syntax --bps=16 and they still came out 24 bits. I finally converted the wave to ogg. It seems to me that there should be a choice for flac of 16 or 24 bit encoding. If it is not provided then maybe the problem is only with SONOS in that it won't accept 24 bit flac files?
Reply With Quote
  #4  
Old Oct 3rd, 2008, 11:01 AM
Majik's Avatar
Majik Majik is offline
Moderator
 
Join Date: Mar 2005
Location: Berkshire, UK
Posts: 6,195
Default

Ressurrecting this old thread, it should be possible to use SoX for this ( http://sox.sourceforge.net/ ).

Something like the following should work:
Code:
sox -S original.flac -2  new.flac
If you also need to downsample you can also do this. To downsample to 48k, for example, you do:
Code:
sox -S original.flac -r 48000 -2  new.flac
Cheers,

Keith
__________________
Sonos customer (6 x ZP100, 1 x ZP120, 1 x ZP90, 4 x PLAY:5, 2 x PLAY:3, 5 x CR100, 1 x CR200, 2 x SUB, 1 x Playbar)
I am not affiliated with or representative of Sonos in any way. All opinions expressed are my own!

Last edited by Majik; Oct 3rd, 2008 at 11:13 AM.
Reply With Quote
  #5  
Old Dec 12th, 2008, 06:02 PM
ruiseixas ruiseixas is offline
Member
 
Join Date: Dec 2008
Posts: 1
Default How to resample multiple Flac files at once!!!

Hi, I know how to resample multiple flac files at once. I think that It's not hard to do the same to converting to from 24 16 bits.

Here I have some code:

Code:
# Decode to WAV files
flac -d *.flac

# Create destination folder
mkdir resampled

mv *.wav resampled
cd resampled

# Rename to remove all strange chars
rename 's/ /_/g' *.wav

# In this case we use find to execute sox for each file, Here you can edit the sox options!
find . -name "*.wav" -exec sh -c 'sox -S $0 -r 48000 $0.wav && cat $0.wav > $0 && rm $0.wav' {} \;

# Rename to the original names
rename 's/_/ /g' *.wav

# Make the flacs and remove the waves
flac *.wav
rm *.wav

cd ..
Regards
Reply With Quote
  #6  
Old Oct 31st, 2010, 02:21 PM
mediaczar mediaczar is offline
Member
 
Join Date: Oct 2010
Location: London
Posts: 1
Default

Quote:
Originally Posted by Majik View Post
Ressurrecting this old thread, it should be possible to use SoX for this ( http://sox.sourceforge.net/ ).

Something like the following should work:
Code:
sox -S original.flac -2  new.flac
If you also need to downsample you can also do this. To downsample to 48k, for example, you do:
Code:
sox -S original.flac -r 48000 -2  new.flac
Cheers,

Keith
I had this problem, and was pointed to this thread. Many thanks -- almost all the information I needed.

Assuming that others are coming here with the same needs (if you've got The Beatles 24-bit flacs -- how nice to meet you!) and are on a Mac (rather than a Linux box) then here's the code you'll need to batch process using SoX

Code:
#!/bin/bash
mkdir resampled # make a subdirectory to put our files in

for file in *.flac
	do
		newfile=`echo "$file" | sed "s/ /_/g"`
		mv "$file" "$newfile" # get rid of filename spaces to avoid errors
		sox -S $newfile -r 44100 -b 16 "resampled/$newfile" # resample
		mv "$newfile" "$file" # put stuff back the way we found it
	done
Reply With Quote
  #7  
Old Nov 1st, 2010, 03:10 AM
Majik's Avatar
Majik Majik is offline
Moderator
 
Join Date: Mar 2005
Location: Berkshire, UK
Posts: 6,195
Default

Quote:
Originally Posted by ianmacd View Post

(Lots of wise words snipped)

I've used the above code myself a few times to downsample live recordings so that they could be burned to CD.
Nothing beats experience. Hopefully this will be useful to someone.

I think it also demonstrates the power of the Unix/Linux shell that you can do this all in a single line.

I realise it looks like gobbledegook to many, but there really isn't an equivalent way of doing this in a GUI which doesn't involve lots and lots of clicking, and even if you don't fully understand what it all means, it's easy to cut/paste this into a command line.

Cheers,

Keith
__________________
Sonos customer (6 x ZP100, 1 x ZP120, 1 x ZP90, 4 x PLAY:5, 2 x PLAY:3, 5 x CR100, 1 x CR200, 2 x SUB, 1 x Playbar)
I am not affiliated with or representative of Sonos in any way. All opinions expressed are my own!
Reply With Quote
  #8  
Old Jul 21st, 2011, 10:28 AM
jimdandy jimdandy is offline
Member
 
Join Date: May 2005
Location: Carlsbad, CA
Posts: 16
Default Converting 24-bit to 16-bit

New to hi-res stuff so thought this might help other newbies out there.

Bought Eagles Hotel California 24/192 on HDTracks.com. Naiively thought that my SONOS and Apple devices would play it happily. Tilt...

So after a day of investigation, settled on the following solution:

1) purchased dBpoweramp family pack (R14). Free version doesn't use multi-core processors on your PC so runs slower, also a bunch of other limitations
2) Ran the dBpoweramp Conversion Tool. Settings:
- Apple Lossless (ALAC)
- Under "DSP Effects/Actions" at the bottom of the dBpoweramp menu, choose "Add" and select "Bit Rate"
- Choose "Fixed Bit Depth" of 16 bits
- Under "Apply Dither" choose Triangular (allegedly slightly better than rectangular in terms of sonic performance)

As an example, the song "Hotel California" was converted from a 252 MB FLAC file to a 111 MB ALAC file. File now plays happily across the SONOS gear and of course on any of my Apple gear.

Also note that one other option I tried was same as above but converting to 16-bit / 44.1 KHz AIFF instead of ALAC. (SONOS S5 would not play at any higher sampling rate). This worked fine but the file was only 67 MB. Compared to the 111 MB ALAC, I'm (wildly) assuming the bigger ALAC file is higher quality (higher overall sampling rate at same 16-bit depth).

Lastly, I know there are other threads lamenting the lack of 24-bit support on SONOS, guess I'm disappointed too. Although in truth I don't really know why I care yet since I haven't done my own A/B comparison of 16-bit vs. 24-bit. I did read the excellent 2007 report comparing the two, with literally years of blind testing to back up the results. Answer was that there was no discernable difference, but that assumed a CD recording that was identical (in terms of recording equipment, setup, mixing, etc) to a higher bit rate recording. The reality, as noted by the authors, is that these high bit rate recordings are often done by purists under pristine recording conditions, vs. mass-market CD recordings which (as we all know) vary wildly in their original recording quality. So sometimes people end up comparing apples with oranges, since the source material itself might be the root cause of the different sound. Anyway a fascinating topic, just starting to dive in more deeply. Initial conclusion is same as one other author I found - better to have a recording that's nearly perfectly accurate and quiet well outside our hearing range, e.g., more "margin" in the recording. Other than the increased file size (and playback PITA issues), there's no real downside. Over time, the playback issues will be improved upon.
Reply With Quote
  #9  
Old Jul 21st, 2011, 07:39 PM
jimdandy jimdandy is offline
Member
 
Join Date: May 2005
Location: Carlsbad, CA
Posts: 16
Default re: converting 24 bit FLAC to 16 bit

Actually I was mistaken in my previous post. The Apple Lossless conversion did not play properly on the SONOS. In fact it didn't play at all. I was fooled by another similarly named file with a different conversion (AIFF). Crap.

So SONOS doesn't recommend AIFF due to metadata not transferring properly... ALAC doesn't work at 16-bits so what's the point of going any lower in bit depth... AAC I guess will work, but at what, 320kbps I guess... This entire process is very frustrating. :-(
Reply With Quote
  #10  
Old Jul 21st, 2011, 11:49 PM
ratty ratty is offline
Moderator
 
Join Date: Mar 2008
Location: Scotland
Posts: 14,124
Default

ALAC does work, but something looks wrong with your conversion. Simple factoring suggests that a 252 MB 24/192 FLAC file ought to be more like 40 MB at 16/44.1 rather than a 111 MB file.

You did a bit depth conversion in dBpoweramp. Did the sample rate convert too?
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -8. The time now is 11:53 AM.