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: Converting 24-Bit/96 Khz flac to AAC using QAAC (Read 1877 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting 24-Bit/96 Khz flac to AAC using QAAC

I've been converting 24 bit/96 Khz flac files directly to AAC at a bitrate of 160 Kbit/sec (q82), I am using foobar2000 for converting. So the output file results in  48 Khz, I'm fine with that sample rate.
Method 1: Default
Foobar2000 command line: --ignorelength -s --no-optimize -V 82 -o %d -  (gives 48 khz output)
Method 2: Custom
command line for this for changing --rate and  resampling
--ignorelength -s --no-optimize -V 82 --rate 48000 --native-resampler -o %d -

By comparing both AAC files in Foobar2000's "Bit-Compare tracks" utility it says "Differences found in compared tracks"

So, my question, is QAAC just changing the --rate in Method 1 and not using --native-resampler. Is this good to change only the --rate and not resample? Are there any disadvantage to this?
or
Should I go with Method 2?

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #1
Instead of using custom qaac command parameters to resample
using foobar2000's default apple qaac converter and
using the DSP plugin to resample during conversion
is a more flexible and reliable approach.

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #2
qaac picks Apple CoreAudio's native resampler only when libsoxr is unavailable or --native-resampler is explicitly specified.

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #3
If qaac picks native resampler by default according to my Method 1 so why is it not identical to my Method 2. Both gives output of 48 khz with or without specifying --rate and --native-resampler.
They both should be identical if the native resampler is being used.

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #4
If qaac picks native resampler by default according to my Method 1
I didn't say that. When libsoxr is available, it IS the default.
You can see if it's available to qaac by running "qaac --check" from command prompt.
Sorry if I didn't make myself clear enough. English is not my native language.



Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #6
If you want to keep 96khz,
you can consider using other aac encoders,
such as fdkaac.
When qaac is encoded as aac,
it will resample the high frequency of 96khz to 48khz by default,
or other frequencies you set.


Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #8
BTW all these things are written here: https://github.com/nu774/qaac/wiki/Sample-rate-conversion
I'm wondering if 96k is supported by Apple AAC? I don't manage to create sample rates >48.

Stupid test:
- Source file is a 24/96k flac (also tried 192)

Qaac command line in fb2k:
Code: [Select]
--ignorelength -s --no-optimize --rate=keep -V 91 -o %d -

It comes out as 48khz AAC file. If Sox resamples source to 44.1, target comes out as 44.1.

I'm struggling to find specs. My guess now is, Apple lossy is <=48 kHz, only Apple lossless can be >48kHz? Don't get me wrong, that's fine, just want to be sure, there isn't something wrong.

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #9
Run the following in the command prompt:
Code: [Select]
qaac --format
This will show available AAC formats by encoder.

Since the spec can change due to version up of the encoder implementation and there's no static limitation on the qaac side, I don't say something like "yes, CoreAudio only supports up to 48kHz for AAC LC".

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #10
Run the following in the command prompt:
Code: [Select]
qaac --format
This will show available AAC formats by encoder.
Ah thx I see. LC up to 48 and HE up to 96k. CoreAudioToolbox 7.10.5.0 that is.

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #11
Trying to convert wav file 24-Bit/96 Khz to ALAC by using this command but sample rate stays the same. Am i doing something wrong here?
refalac64 --raw-rate 44100 --native-resampler=bats,127 input.wav

Re: Converting 24-Bit/96 Khz flac to AAC using QAAC

Reply #12
Yes you are. The '--raw-rate' parameter is used to tell the encoder what sampling rate is used in RAW PCM input file. It has nothing to do with resampling. RAW PCM data is raw data without any container, so its specs would be unknown unless specifically told. WAV is not RAW format, WAV header tells exactly what kind of data it contains.
The '--native-resampler' parameter doesn't exist in refalac. It is a parameter for Apple's CoreAudio library.

I hope you know what you are doing when resamping stuff before encoding with lossless encoder.