New FDK-AAC version

368 views
Skip to first unread message

Matthias Brändli

unread,
Sep 12, 2018, 9:05:09 AM9/12/18
to CRC-mmbTools Google Group
Hello all,

FDK-AAC was recently updated to version 2, and I've applied our DAB+
patch against that version. You are welcome to test, it's in the
dabplus2 branch:

https://github.com/Opendigitalradio/fdk-aac/tree/dabplus2

The library changed from libfdk-aac.so.1 to libfdk-aac.so.2, so be
careful when upgrading:

- Delete /usr/local/lib/libfdk-aac.so*
- Compile the fdk-aac dabplus2 branch
- sudo make install
- sudo ldconfig
- Clean, ./configure and recompile ODR-AudioEnc
- Use ldd odr-audioenc to check that it uses libfdk-aac.so.2

On my system, it linked ODR-AudioEnc against /usr/lib/libfdk-aac.so.1
which comes from the distribution package, and I wasn't able to get it
to link against my compiled v2. I had to uninstall the libfdk-aac
distribution package.

Please write me a note if you do a test, even if you don't see/hear a
difference.

Cheers
mpb

888...@gmail.com

unread,
Sep 13, 2018, 11:05:50 AM9/13/18
to mmbtools
Hi,

I have error with jack input:

Starting encoding
odr-audioenc: libFDK/src/FDK_bitbuffer.cpp:138: void FDK_InitBitBuffer(HANDLE_FDK_BITBUF, UCHAR*, UINT, UINT): Assertion `hBitBuf->ValidBits <= hBitBuf->bufBits' failed.

When I set raw input it works fine.

Matthias Brändli

unread,
Sep 13, 2018, 11:21:19 AM9/13/18
to crc-mm...@googlegroups.com
I noticed that 152kbps doesn't work, maybe higher bitrates too.

However I'm surprised there's a dependency on the input.

mpb
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

888...@gmail.com

unread,
Sep 13, 2018, 1:09:03 PM9/13/18
to mmbtools
With raw input 192kbps works fine.

888...@gmail.com

unread,
Sep 13, 2018, 1:12:56 PM9/13/18
to mmbtools
With jack input limit is144kbps.

Francesco Berti

unread,
Sep 13, 2018, 1:26:08 PM9/13/18
to mmbtools
I confirm don't work for bitrate up to 144K, It seems slightly better of last version especially at low bitrate with ps.
I remember in old version of fdk there was the problem with bitrate higher than 144k......

888...@gmail.com

unread,
Sep 13, 2018, 3:33:20 PM9/13/18
to mmbtools
Strange thing now, because stoped working both inputs over 144kbps


On Thursday, September 13, 2018 at 7:09:03 PM UTC+2, 888...@gmail.com wrote:

888...@gmail.com

unread,
Sep 26, 2018, 4:49:12 AM9/26/18
to mmbtools
Hi,

Is there anybody who kowns how to fix this new fdk-aac version?

Have a nice day!

Matthias Brändli

unread,
Sep 27, 2018, 6:22:59 AM9/27/18
to crc-mm...@googlegroups.com
Hi,

I guess I will at some point, but its neither urgent nor important right
now.

Did you hear any quality changes compared to the previous version?

mpb

888...@gmail.com

unread,
Sep 27, 2018, 7:03:43 AM9/27/18
to mmbtools
Hi,

Yes I hear difference at bitrate 144kps, it sounds a bit better but not at all music, I don't know how to explain it in english, highs are smoother and sometimes more floating sound artifacts like very old mp3 codecs. Standard AAC-LC codecs to streaming sound better at the same netto bitrate.

Matthias Brändli

unread,
Sep 27, 2018, 7:06:03 AM9/27/18
to crc-mm...@googlegroups.com
And lower bitrates, around 80kbps? I don't know any production
transmission that uses 144kbps.

mpb

Stefan Pöschel

unread,
Sep 27, 2018, 5:16:48 PM9/27/18
to crc-mm...@googlegroups.com
In Germany there are (at least) hr2 and BR-KLASSIK which transmit AAC-LC
at 144 kbps.

I will try to have a look soon, why the new version crashes at higher
bitrates...

Regards,
Stefan

Peter Whisker

unread,
Dec 9, 2018, 4:42:25 PM12/9/18
to mmbtools
Hi Matthias

I've just got round to testing this as my EasyDABv2 has been off-air for a few months with a blown output stage and damaged PCB tracks. I've now got it up and running again.

I normally feed a pipeline of sox or ffmpeg into odr-aacenc with maximum quality resampling from 44.1k (if required) and signal level adjustment. My test services are at 64k, 72k, 96k and 128k - usually streams from Internet Radio which I broadcast in my house at very low power (<10mW). I have a Perl script which outputs to supervisor scripts

The new libfdk-aac.so.2 is working OK - I find it hard to tell much of a difference in the sound but perhaps it is a bit better.

Thanks for your great work
Peter

Matthias Brändli

unread,
Dec 17, 2018, 3:18:37 AM12/17/18
to crc-mm...@googlegroups.com
Hi Peter,

On 09/12/2018 22:42, Peter Whisker wrote:
> The new libfdk-aac.so.2 is working OK - I find it hard to tell much of a
> difference in the sound but perhaps it is a bit better.

Thanks for the short note. I don't expect there is any quality change in
that version, as the changes happened mostly in other parts of the FDK
codebase.

There have been more changes to v2 that I need to pull into the DAB+
version, but as this is mostly maintenance work, I tend to not give it
high priority.

mpb

berti.fran...@gmail.com

unread,
Jan 16, 2019, 6:26:39 PM1/16/19
to mmbtools
Hi , probably the problem of stop working for bitrates > 144kbits is in this part (line 1619)
 
 
/* Bitstream output buffer */
hAacEncoder->outBufferInBytes =
1 << (DFRACT_BITS - CntLeadingZeros(fixMax(
1, ((1) * hAacEncoder->nMaxAacChannels * 6144) >>
3))); /* buffer has to be 2^n */
if (NULL == (hAacEncoder->outBuffer = (UCHAR *)FDKcalloc(
hAacEncoder->outBufferInBytes, sizeof(UCHAR)))) {
err = AACENC_MEMORY_ERROR;
goto bail;
}
It seams like the old problem of the max output buffer, probably Stefan can check if in the new aacenc_lib.cpp (https://github.com/Opendigitalradio/fdk-aac/blob/dabplus2/libAACenc/src/aacenc_lib.cpp) line 1619 is present a mistake.

888...@gmail.com

unread,
Jan 30, 2019, 4:27:54 PM1/30/19
to mmbtools
Hi,

I made some maybe stupid modyfication in line 1622:
from:
1, ((1) * hAacEncoder->nMaxAacChannels * 6144) 
>>

to:
1, ((1) * hAacEncoder->nMaxAacChannels * 6144 * 2) >

And output buffer now is 4096 and 192kps encoding without crash, what do you think about it?


Francesco

unread,
Feb 1, 2019, 7:02:56 AM2/1/19
to mmbtools
Confirm, now it work. 

Matthias Brändli

unread,
Feb 4, 2019, 5:18:37 AM2/4/19
to crc-mm...@googlegroups.com
Hi all,

I don't understand why the buffer size is calculated the way it is, but
if doubling it fixes the issue, it's probably good enough. Thanks for
researching the topic.

Let's hope other usages of the library are not broken now.

mpb
> <https://github.com/Opendigitalradio/fdk-aac/blob/dabplus2/libAACenc/src/aacenc_lib.cpp>)
> line 1619 is present a mistake.
>
Reply all
Reply to author
Forward
0 new messages