v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Music Converter | CD Ripper | Disc Burner
General discussion / Request help

Moderator: poiko

Post Reply
Tattvadarzin
New User
Posts: 3
Joined: Sun Sep 26, 2021 12:10 pm
Contact:

v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by Tattvadarzin » Sun Sep 26, 2021 1:55 pm

I convert my Audible files (legally) for my personal use on my very old Sandisk Sansa music player.

I use either inAudible or AAXAudioDecoder to give me the unprocessed m4b/m4a file that is the embedded AAC-LC content in the AAX file.

The embedded AAC in the AAX gives an unprocessed output file that has 2 apparently identical channels. I wish to convert this to mono. I wish to reduce the output in size using HE-AAC at a bit rate say 48 to 64 kb/s.

MediaInfo inAudible output file:

ID : 1
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 h 16 min
Bit rate mode : Constant
Bit rate : 62.8 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 22.05 kHz

MediaInfo AAXAudioDecoder output file:
ID : 1
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 h 16 min
Bit rate mode : Constant
Bit rate : 62.8 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 22.05 kHz

Adobe Audition confirms the 2 channels and sample rate.

foobar200:
Sample rate : 22050 Hz
Channels : 2
Bitrate : 63 kbps
Codec : AAC
Codec profile : AAC LC

Problem 1
EZ CD Audio Converter detects this as 62 kbit/s, 44.1 kHz Sample rate, AA-LC Format.

The sample rate is wrong. I have tried various conversion variations. They all give a converted file with a sample rate of 44.1 kHz. I do not get a Fraunhofer IIS decoder rate of 22050 Hz in the appropriate decoder choice drop down. The lowest I see is 32000.

Problem 2
The Fraunhofer IIS decoder for CBR, HE-AAC, Mono, 64 kbit/s, Auto seems to produce a 2 channel VBR file despite selecting a Mono CBR file.

Interestingly MediaInfo says it has 1 channel but Adobe Audition and foobar2000 show it as having 2 channels. The file size is similar to the input file.

MediaInfo:
Audio
ID : 1
Format : AAC LC SBR
Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name : HE-AAC
Format settings : NBC
Codec ID : mp4a-40-5
Duration : 1 h 16 min
Source duration : 1 h 16 min
Bit rate mode : Variable
Bit rate : 64.0 kb/s
Maximum bit rate : 66.3 kb/s
Channel(s) : 1 channel
Channel layout : C
Sampling rate : 44.1 kHz

foobar2000:
Sample rate : 44100 Hz
Channels : 2
Bitrate : 64 kbps
Codec : AAC
Codec profile : AAC SBR
Encoding : lossy

I do not know how to tell whether it is VBR or CBR with the above mentioned tools.

Hypotheses:
The information in the input files is insufficient or incorrect for EZ CD Audio Converter to correctly process the file.
There is a bug in reading the input sample rate.
There is a bug on the production of Mono files.

User avatar
poiko
Site Admin
Site Admin
Posts: 4329
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by poiko » Mon Sep 27, 2021 8:58 am

Tattvadarzin wrote: Sun Sep 26, 2021 1:55 pm Problem 1
EZ CD Audio Converter detects this as 62 kbit/s, 44.1 kHz Sample rate, AA-LC Format.
What sample rate do you see here:

(this is what sample rate is detected and AAC decoder is using) (it's different thing to later up sample to the encoder sample rate, i.e. 44.1 kHz)
Untitled-1.png
Untitled-1.png (20.01 KiB) Viewed 182 times
Tattvadarzin wrote: Sun Sep 26, 2021 1:55 pm I do not get a Fraunhofer IIS decoder rate of 22050 Hz in the appropriate decoder choice drop down. The lowest I see is 32000.
Fraunhofer IIS AAC-LC encoder supports only 32 kHz sample rate with 64 kbit/s.
Tattvadarzin wrote: Sun Sep 26, 2021 1:55 pm Problem 2
The Fraunhofer IIS decoder for CBR, HE-AAC, Mono, 64 kbit/s, Auto seems to produce a 2 channel VBR file despite selecting a Mono CBR file.
AAC encoding is always sort of constrained-VBR even in "CBR" mode the bitrate can vary +/- 3/4 kbit/s. The AAC frames size vary depending of the audio complexicity and coding requirements (for audio quality).
Tattvadarzin wrote: Sun Sep 26, 2021 1:55 pm Interestingly MediaInfo says it has 1 channel but Adobe Audition and foobar2000 show it as having 2 channels. The file size is similar to the input file.
MediaInfo detects correctly. Foobar2000 always detects and plays HE-AAC as Stereo because it cannot explicitly detect the presence of PS (Parametric Stereo). Maybe Adobe Audition is the same. EZ CD Audio Converter's Audio Converter info will display correctly all the Mono/Stereo/5.1/7.1 HE-AAC and HE-AAC+PS (Stereo) files.


Can you send me the file for testing purposes so I can confirm everything is correct on my side ? You can send me the file via DropBox or Google Drive (or direct email) to poiko [:D] kolumbus [:o] fi

Tattvadarzin
New User
Posts: 3
Joined: Sun Sep 26, 2021 12:10 pm
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by Tattvadarzin » Mon Sep 27, 2021 4:42 pm

poiko wrote: Mon Sep 27, 2021 8:58 am
Tattvadarzin wrote: Sun Sep 26, 2021 1:55 pm Problem 1
EZ CD Audio Converter detects this as 62 kbit/s, 44.1 kHz Sample rate, AA-LC Format.
What sample rate do you see here:

Fraunhofer IIS AAC-LC encoder supports only 32 kHz sample rate with 64 kbit/s.

AAC encoding is always sort of constrained-VBR even in "CBR" mode the bitrate can vary +/- 3/4 kbit/s. The AAC frames size vary depending of the audio complexicity and coding requirements (for audio quality).

MediaInfo detects correctly. Foobar2000 always detects and plays HE-AAC as Stereo because it cannot explicitly detect the presence of PS (Parametric Stereo). Maybe Adobe Audition is the same. EZ CD Audio Converter's Audio Converter info will display correctly all the Mono/Stereo/5.1/7.1 HE-AAC and HE-AAC+PS (Stereo) files.


Can you send me the file for testing purposes so I can confirm everything is correct on my side ?
I see 44.1 kHz Sample Rate on selecting the file for conversion.

Yes, I see. Subsequent research on my part shows HE-ACC does indeed not go smaller than 32 kHZ. It is a pity because I would prefer not to upsample but presumably it will not introduce too much distortion.

OK, constrained VBR is a good way to describe it :-)

I am really surprised that these applications show HE-AAC mono files as 2 channels. I even tried Audacity and it shows 2 channels. I suspect what the the editors are doing is converting to WAV internally and getting it wrong. Similarly foobar2000 is getting it wrong although that is not quite so bad. It is very confusing as "what you see is not what you get". I hope you forgive my assumption that physically seeing 2 channels meant I was seeing stereo!

I uploaded the files (I thought) but I will send a Google Drive link to the input file.

Thank you for the help.

User avatar
poiko
Site Admin
Site Admin
Posts: 4329
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by poiko » Tue Sep 28, 2021 1:31 pm

Thank you for sending me the file.

Correct. The file you sent me is indeed 22050 Hz.

EZ CD Audio Converted 9.5.1 detects and decodes all AAC-LC files that have 24000 Hz or lower sample rate with 2 x sample rate for compatibility with possible implicit signaling of HE-AAC (SBR) as recommended by MPEG-4 Part 3 (MPEG-4 ISO/IEC 14496-3) standard.

However, I was able to improve the AAC-LC file detection and AAC decoder so that it will now show correct sample rate for AAC-LC files with 24000 Hz or lower sample rate and also decodes them with the correct sample rate (not 2 x sample rate). And still retain backward compatibility with possible implicit HE-AAC (SBR) signaling. :D :shock:

Find the patch attached (will be included in the next full update)

Tattvadarzin
New User
Posts: 3
Joined: Sun Sep 26, 2021 12:10 pm
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by Tattvadarzin » Tue Sep 28, 2021 11:27 pm

Yes the sample rate is detected fine now - thanks.

A small question: When I use Auto for the sample rate on output, EZ CD Audio Converter picks 44.1 KHz. Is there an audiophile reason for this? I would have thought that 32 kHz would have been a more natural choice perhaps giving less distortion.

User avatar
poiko
Site Admin
Site Admin
Posts: 4329
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by poiko » Wed Sep 29, 2021 9:40 am

Tattvadarzin wrote: Tue Sep 28, 2021 11:27 pm Yes the sample rate is detected fine now - thanks.

A small question: When I use Auto for the sample rate on output, EZ CD Audio Converter picks 44.1 KHz. Is there an audiophile reason for this? I would have thought that 32 kHz would have been a more natural choice perhaps giving less distortion.
32 kHz sounds correct. I will check the 'Auto' sample rate selection. What output format this was ? ("AAC | Fraunhofer IIS" ?)

User avatar
poiko
Site Admin
Site Admin
Posts: 4329
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: v9.5.1 Not detecting 22050 Sample Rate, not producing mono

Post by poiko » Wed Sep 29, 2021 11:13 am

poiko wrote: Wed Sep 29, 2021 9:40 am
Tattvadarzin wrote: Tue Sep 28, 2021 11:27 pm Yes the sample rate is detected fine now - thanks.

A small question: When I use Auto for the sample rate on output, EZ CD Audio Converter picks 44.1 KHz. Is there an audiophile reason for this? I would have thought that 32 kHz would have been a more natural choice perhaps giving less distortion.
32 kHz sounds correct. I will check the 'Auto' sample rate selection. What output format this was ? ("AAC | Fraunhofer IIS" ?)
Encoder's auto-sample rate selection is correct and it selected 32.000 kHz for 22.050 kHz input file.

The AAC decoder I sent you earlier had a problem (it still had my static debug variable that made it to work only once for the first converted file) :shock:

Here's the correct patch. Please let me know if it's ok / not ok :D
AAC decoder patch 2.zip
(1.76 MiB) Downloaded 14 times

Post Reply