Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac (Read 10794 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Hello everyone,

I'd like to know how to convert from 24-Bit / 96KHz FLAC to a lossy format in the best (i.e. recommended) way possible. From what i've read I should use a dedicated resampling programm first and then convert to mp3 / aac. Has any of the two any advantages in dealing with hd audio input and which parameters should i use? Do I need to do something about the bit-depth or anything else?

I would appreciate any tip or suggestion.
Chaos

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #1
1. Install foobar2000
2. Install foobar2000 "Free Encoder Pack"
3. Drag files to be converted onto foobar2000 main window
4. Select all, right click, and select "Convert" > "Quick convert" and the target format "MP3 (LAME)" > "Best quality"; post back if you have any other questions about converter settings

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #2
The hydrogenaudio wiki mentions that using lame for resampling is not optimal. Would you still recommend just using lame through foobar for converting hd audio or using mp3 for it in general?

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #3
Some resamplers "measure" better than others but I've never heard any difference/defects between the resampled file and the original  (always above 44.1kHz) no matter what software I was using.

I'm sure you know MP3 is lossy so you're not going to get perfection anyway.    It can sound perfect but the data is altered and if you do hear a compression artifact it's not from resampling.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #4
Some resamplers "measure" better than others but I've never heard any difference/defects between the resampled file and the original  (always above 44.1kHz) no matter what software I was using.

I'm sure you know MP3 is lossy so you're not going to get perfection anyway.    It can sound perfect but the data is altered and if you do hear a compression artifact it's not from resampling.

Yes, I do know that, I just want transparent results ^^ I personally use -V2 for anything that is red book audio (16-Bit / 44,1KHz) and I wasn't sure if inputting higher grade audio into LAME would require different settings for transparency.

 

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #5
If you want transparent results then stick with lossless files. However, lossy encoded files can be transparent to you depending on your own hearing abilities. You mention you use LAME V2, and so if that is transparent for you then use it. Personally, I'd downsample (using sox) the original 24-bit / 96kHz FLACs to 16-bit / 48kHz and keep as archival versions, and then transcode to lossy from there. If your media player handles aac (m4a) then go with that over mp3.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #6
If your lossy encoder can handle 24 bit, then it might be better to resample to 24-bit to avoid adding dithering noise.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #7
If you want transparent results then stick with lossless files. However, lossy encoded files can be transparent to you depending on your own hearing abilities. You mention you use LAME V2, and so if that is transparent for you then use it. Personally, I'd downsample (using sox) the original 24-bit / 96kHz FLACs to 16-bit / 48kHz and keep as archival versions, and then transcode to lossy from there. If your media player handles aac (m4a) then go with that over mp3.

I keep the FLACs anyway on my NAS for future transcoding and stuff. How do I use sox then and which settings (command line arguments) should i use for aac? Anything special or the same recommended settings that are used for red book audio. I mostly need the files for my portable media player which has limited space. I just try to avoid an audible difference and most guides seem to be written for red book audio and I'm really not sure if I can apply the same settings to get the "same" quality so to speak when used on HD audio.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #8
As suggested, maybe the simplest way is to use foobar, add the encoder pack, and then, on the converting settings, ensure that you add any of the resamplers provided in foobar to convert the input to 44Khz ( with LAME, it's better to use 44Khz instead of 48Khz, because that's what it has been most tuned for, even though they should be very similar).
No intermediate files, no command line batch scripts...

And with a bit more work, (to get qaac and the Quicktime libs) you could also have m4a instead of mp3 in that same setup.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #9
As suggested, maybe the simplest way is to use foobar, add the encoder pack, and then, on the converting settings, ensure that you add any of the resamplers provided in foobar to convert the input to 44Khz ( with LAME, it's better to use 44Khz instead of 48Khz, because that's what it has been most tuned for, even though they should be very similar).
No intermediate files, no command line batch scripts...

And with a bit more work, (to get qaac and the Quicktime libs) you could also have m4a instead of mp3 in that same setup.

Okay, thanks for the answer. I will look into that.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #10
Try QAAC. I use it to translate all my high-resolution music into aac without worring resampling.

Since aac support to 96khz it would automatic keep on 96khz or resample to 48khz depands on the bitrate.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #11
Since aac support to 96khz it would automatic keep on 96khz or resample to 48khz depands on the bitrate.
Are you sure?  I just resampled a folder of 24/96 FLAC to m4a using QAAC -tvbr 100 and -c 320.  The resulting files had been resampled to 48000 and, like mp3, do not have a "sample size".

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #12
Hi!, Here is the best way in my setup at least.
First, you need to downsample to the most according to the samplerate and this is the half of the original, IE: 96000/88200 to 48000/44100. I personally use SOX plugin in Foobar2000.
Second, about the resolution in bits, lossy encoders works native in 32bit floating point, that is, you don't need to work here.
Third, i choose somewhat 256bps in opus enc, or qaac, notice that opus by default the sample rate is 48000 so, if you want 44100, the choose is qaac.
tl:dr
foobar2000>sox(downsample 2x)>opus 256 or better

thanks you for this forum, i learnned a lot.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #13
Are you sure?  I just resampled a folder of 24/96 FLAC to m4a using QAAC -tvbr 100 and -c 320.  The resulting files had been resampled to 48000 and, like mp3, do not have a "sample size".
Sorry , Maybe in QAAC 96khz is only for HE-AAC.
You can check out all the output by
Code: [Select]
qaac.exe --format

Totally,
QAAC automatic half the sample rate if needed.
And Most of all it use the Sox resampler(libsoxrate.dll)
So it is the best solution for me.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #14
Are you sure?  I just resampled a folder of 24/96 FLAC to m4a using QAAC -tvbr 100 and -c 320.  The resulting files had been resampled to 48000 and, like mp3, do not have a "sample size".
Sorry , Maybe in QAAC 96khz is only for HE-AAC.
You can check out all the output by
Code: [Select]
qaac.exe --format

Totally,
QAAC automatic half the sample rate if needed.
And Most of all it use the Sox resampler(libsoxrate.dll)
So it is the best solution for me.

Just to clarify. Does QAAC automatically use SoX for resampling or do I need to do that manually before? And if I do that manually before what settings should I set in SoX?

To everbody: Thanks for all your answers, I already learned a lot. I think I will use QAAC with or without resampling beforehand (Depends on the answer to my question above).

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #15
Just to clarify. Does QAAC automatically use SoX for resampling or do I need to do that manually before? And if I do that manually before what settings should I set in SoX?

I only found the most detailed document in Japanese.
Here is a Google translated link
https://translate.google.com/translate?hl=en&sl=ja&tl=en&u=https%3A%2F%2Fkamedo2.hatenablog.jp%2Fentry%2F20130625%2F1372177052

After download QAAC, there is a libsoxr.dll in the same folder with qaac.
QAAC uses sox for the best quality resampling by default.

If you delete libsoxr.dll it would switch to use the Apple native resampler but never do that...

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #16
Just to clarify. Does QAAC automatically use SoX for resampling or do I need to do that manually before? And if I do that manually before what settings should I set in SoX?

I only found the most detailed document in Japanese.
Here is a Google translated link
https://translate.google.com/translate?hl=en&sl=ja&tl=en&u=https%3A%2F%2Fkamedo2.hatenablog.jp%2Fentry%2F20130625%2F1372177052

After download QAAC, there is a libsoxr.dll in the same folder with qaac.
QAAC uses sox for the best quality resampling by default.

If you delete libsoxr.dll it would switch to use the Apple native resampler but never do that...

Oh, thank you very much for that info. It seems that the foobar encoder pack doesn't include it for some reason. I just added the dll to the encoder folder. Hope that fixes that.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #17
It seems that the foobar encoder pack doesn't include it for some reason. I just added the dll to the encoder folder. Hope that fixes that.
Encoder pack is compact and doesn't bundle anything unnecessary. If for some reason you think Apple doesn't handle some sample rate well enough you can use foobar's DSPs to resample. Doing the processing with foobar DSP should also give you performance benefit as the task will be done in another thread.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #18
Personally, I'd downsample (using sox) the original 24-bit / 96kHz FLACs to 16-bit / 48kHz and keep as archival versions, and then transcode to lossy from there.

That's what I do to (but not 48kHz as I keep the usual 44.1 so it's standard Audio CD spec) as I see those 24-bit/96kHz files to be a waste of storage space when the standard 44.1/16-bit is already perfect (and takes up noticeably less storage space to) and one can easily rip to a lossy format at that point from those standard 44.1/16 FLAC files and not have to worry about anything funny happening as the converted files will be at standards we have had for a long time now.
For music I suggest (using Foobar2000)... MP3 (LAME) @ V5 (130kbps). NOTE: using on AGPTEK-U3 as of Mar 18th 2021. I use 'fatsort' (on Linux) so MP3's are listed in proper order on AGPTEK-U3.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #19
as I see those 24-bit/96kHz files to be a waste of storage space

On one hand it is, but on the other ... nothing I care much about. I just queried my lossless library, and I'd save .2 percent space on my lossless collection by reducing.

I just searched my lossless library, and there is about a happy pi day radio in bitrates for samplerate greater than 48k (most of which 96/24 2ch), to samplerate less than 48001.
But then the hi-rez audio is only .6 percent of my lossless collection (in GB).

I don't think it is worth the risk of user errors, the issues the odd time I have to go back to my download backups and bit-compare, and the effort - for .2 percent.
That's .2 percent on my lossless collection. Which is another factor of pi over -V0. The big storage cost is keeping the fortysomethingkHz .flacs lossless.

[Edit: here I wrote "going lossless", but downconverting hi-rez is not a lossless operation. I keep those in the same stream specification as I do with everything; all lossless downloads are (re)compressed to FLAC -8 except the oddballs which go to WavPack.]

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #20
@Porcus

I guess if someone only has a minimal amount of those 24-bit/96 files then keeping them to be extra safe probably won't hurt. but it seems just switching from 24/96 to 16/44.1 shaves off a pretty good amount of storage space on each album (hundreds of MB off the top of my head (or at least significantly lowers the storage space needed per album)). but I guess if potentially saving some odd GB of storage space does not matter to people then I can easily understand your line of thinking since your on the side of caution since you don't even want to consider the risk of anything happening to the original lossless files and want to ensure they are as good as can be. like you can always count on going back to those 24/96 files as a original source to play around with.

also... sure, I get that technically converting 24/96 to 16/44.1 is not a lossless operation. but, if I understand it correctly, the sound quality is still higher than what would matter to any human after the 24/96 to 16/44.1 conversion. hence, it's basically a lossless operation to our ears and one can treat the 16/44.1 converted files as a source they can always go back to in order to convert from lossless to lossy files. pretty much just like they had the original Audio CD that was 16/44.1 straight up.

so in my mind I would rather just convert to 16/44.1 and dump the hi-rez (24/96) audio files due not only to storage space savings, of which there is a worthwhile amount (IMO), but with a standard 16/44.1 setup it's nice and easy to convert to your typical lossy file since the 16/44.1 is standard Audio CD which we have had for a long time now and simply won't get outdated which is another reason I do it. because if it was something that would matter down the road, it might be worth keeping the 24/96 files. but since we can't hear the difference, I definitely opt for the storage space savings and makes things easier converting to lossy files to.

I also use FLAC 8 (but going with the default of FLAC 5 in Foobar2000 can't be a bad choice either). I tend to be of the mindset that I would rather save a little storage space and sacrifice the slight conversion speed drop. but it seems when it comes to say FLAC 5 (seems to be default in Foobar2000) vs FLAC 8 (highest compression for FLAC) that we are talking minimal, if not negligible differences, in the big picture as a person can't really make a bad choice with either one as the difference is simply not large enough either way (be it for saving a slight amount of storage space or slightly increasing conversion speed to lossy) for one choice to be clearly superior to the other. but I get that some people in favor of FLAC 5 over FLAC 8 might argue that in the long term, especially if you convert your lossless files to lossy here and there, that the slight sacrifice in storage space might be worth it to save a little extra time. but all-in-all, it's likely negligible either way especially with any decent CPU over say the last decade or so. hell, I can imagine with some of the more recent CPU's (with quite a few cores/threads (I am still on a CPU that was released in 2012 (i.e. i5-3550(4core/4thread)) although I only had that CPU since last year as I got it used for $20 which was a solid upgrade over my i3-2120 (2 core/4 thread) that I was using) that it probably takes more time just starting the conversion and putting FLAC files into the proper folders etc then it does for the actual conversion time itself which is quick unless someone has a boatload of FLAC's to make, and even then, it's not going to be anything too time consuming based strictly on CPU processing time with any half-way decent CPU as, like I was saying, will fly through the conversion quickly enough.

but speaking of a boatload of FLAC's... I have been somewhat tweaking some of my FLAC collection so that instead of keeping full albums, I just keep the songs that stand out for me as this helps raise the general quality of my collection on average. still, I tend to keep the full albums in FLAC for at least for the bulk of what I got but sort of make a custom list in Foobar2000 to remove the songs I don't care about all that much as this way when I convert to lossy, the lossy files I use take up that much less space and I can spend more time just listening to songs that stand out for me etc, sort of trimming-the-fat. this helps keep my FLAC collection at a bit more reasonable/efficient size. I especially 'trimmed-the-fat' on some music I used to listen to years ago (that I keep around for old-times sake etc) that won't grow in size anymore and I went through it a while back to remove the junk to separate the gems from stuff I pretty much won't listen to anymore which cut back on how many GB's the FLAC need quite a bit.

ill stop babbling now ;)
For music I suggest (using Foobar2000)... MP3 (LAME) @ V5 (130kbps). NOTE: using on AGPTEK-U3 as of Mar 18th 2021. I use 'fatsort' (on Linux) so MP3's are listed in proper order on AGPTEK-U3.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #21
so in my mind I would rather just convert to 16/44.1 and dump the hi-rez (24/96) audio files due not only to storage space savings, of which there is a worthwhile amount (IMO), but with a standard 16/44.1 setup it's nice and easy to convert to your typical lossy file since the 16/44.1 is standard Audio CD which we have had for a long time now and simply won't get outdated which is another reason I do it. because if it was something that would matter down the road, it might be worth keeping the 24/96 files. but since we can't hear the difference, I definitely opt for the storage space savings and makes things easier converting to lossy files to.

Agreed with this, because when doing phase inversion in Audacity between the original (24/96) and the conversion (16/44.1) I didn’t hear any audible difference until I cranked up the decibel level.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #22
because when doing phase inversion in Audacity between the original (24/96) and the conversion (16/44.1) I didn’t hear any audible difference until I cranked up the decibel level.
Listening to the signal difference is a bad method; it is even mentioned in the terms of service as an unacceptable method for assessing differences.
Not that it is such a bad method in this case: you have a mosquito that is so far away that you cannot hear it in silence, and then you conclude that you cannot hear it when you are playing music at full volume, that isn't the worst inference.

Also TOS#8 is stupidly formulated.

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #23
Listening to the signal difference is a bad method; it is even mentioned in the terms of service as an unacceptable method for assessing differences.
Not that it is such a bad method in this case: you have a mosquito that is so far away that you cannot hear it in silence, and then you conclude that you cannot hear it when you are playing music at full volume, that isn't the worst inference.

Also TOS#8 is stupidly formulated.

True, I forgot about that, apologies. Though I personally can’t ever hear a difference even between lossy & lossless formats on my own no matter which systems I use, not to mention hi-res material. Was this difference more clear in older days with less developed encoders or something?

Re: Best way to convert HD audio (24-Bit / 96 KHz) into mp3 /aac

Reply #24
Now that you mentioned Audacity.
If you use Audacity to reduce bit depth (32, 24 -> 16) make sure to change default
Shaped dithering to something else. Shaped dithering is terrible for me.
I can hear the noise it creates very easily on normal volume.
gold plated toslink fan