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: Problem with decoding AAC with FAAD2 after encoding with NeroAacEnc (Read 7139 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problem with decoding AAC with FAAD2 after encoding with NeroAacEnc

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.

Problem with decoding AAC with FAAD2 after encoding with NeroAacEnc

Reply #1
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.