HydrogenAudio

Lossy Audio Compression => AAC => AAC - Tech => Topic started by: polemon on 2011-01-05 01:53:48

Title: Problem with decoding AAC with FAAD2 after encoding with NeroAacEnc
Post by: polemon on 2011-01-05 01:53:48
Hi, I created some files with neroAacEnc (version 1.5.4.0) on Linux and they work fine with mplayer.

But when I want to play them with MPD, FAAD2, the decoder used in MPD for AAC decoding, reports the following error:

Code: [Select]
decoder: audio_format=44100:16:2, seekable=false
faad: error decoding AAC stream: Invalid number of channels

The file is not played, and MPD skips all AAC files in the current playlist queue.

In case this is of any importance, I created the AAC files from WAV PCM files with no extra options, so all I used was defaults.

Had anybody a similar experience?
If so, how could I circumvent that problem, apart from recompiling MPD, since it needs loads of -devel packages, that I don't feel like installing...

Distro is Fedora 14.
Title: Problem with decoding AAC with FAAD2 after encoding with NeroAacEnc
Post by: kerem on 2011-12-29 19:45:14
I had a similar problem. Well at least I got the same error and could not find much info on forums. I was trying to decode adts aac frames using faad2 2.5 which are encoded by faac. The error message I was getting was also "Invalid number of channels". When I checked NeAACDecOpen function in decoder.c file which creates the NeAACDecHandle, I noticed that it is by default not expecting adts frames.

Code: [Select]
hDecoder->config.downMatrix = 0;
hDecoder->adts_header_present = 0;
hDecoder->adif_header_present = 0;


When I changed that to 1 for adts, decoder started to work without any problems. Make sure you are initializing it properly.