Log in

View Full Version : BASS_AAC is not accuracy?


zeas
1st June 2010, 08:04
I use BASS_AAC lib to decode a peice of aac(in mp4 which encoded by NeroAacEnc) as a loop clip, but the front and end of decoded clip can't jion together.
Then I observed a fact that the returned length of func BASS_ChannelGetLength is longer than the func BASS_ChannelGetData could decode, which is longer than original PCM data too! I even specified a fixed length for BASS_ChannelGetData, but at the front of the decoded data is silence(about 3200 samples) and the sound has gap again...
I tried NeroAacDec.exe, it returned accuracy samples (only 4 samples less than original PCM).
And foobar2000 showed the currect samples.
MediaInfo.dll could recognize length of this mp4 in ms(not accuracy enough but better than bass_aac).

Does anyone know how to use BASS_AAC lib to get accuracy length or other free AAC decode library better than BASS_AAC ?

Kurtnoise
1st June 2010, 19:56
libfaad from faad2 project or libavcodec from FFmpeg...depends on what do you need exactly.

zeas
4th June 2010, 06:57
Now I know the NeroAACEnc created an MP4 atom iTunSMPB to help decoder for gapless playback.
The define of iTunSMPB's value: The 2nd value is encoder delay , the 3rd value is zero-padding, and the 4th hex value is the length in samples of the original track.
So I can get accuracy length. But the 2nd and 3rd value could seemingly not match to the PCM data from FAAD2(which BASS_AAC based)...

menno
9th June 2010, 18:28
FAAD2 based decoders drop 1 extra frame at the beginning of the file (1024 samples for LC AAC, 2048 samples for HE AAC).