Skip to main content

Topic: Open Source Fraunhofer AAC Encoder (fdk-aac) (Read 182882 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #125
nu774, does Fraunhofer manage multichannel better on fdk than its premium encoder (the one that comes with Winamp/fhgaacenc)?

I don't know. I have no access to it's source code or something.

Quote
Also, do we need to keep libfdk-aac-0.dll for anything?

If you are using fdkaac_autobuild, no. FDK library is statically linked to the executable.
DLL is built just in case people want to use it.

  • Pulstar
  • [*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #126
I'm using FDK now for all SBR encodes.. But I wonder how it stacks against Apple's encoder in terms of LC efficiency at lower bitrates.

  • halb27
  • [*][*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #127
Thank you very much, nu774, for this great automatic fdkaac.exe creating tool.

I got a lot of warnings and -fno-exceptions when compiling. Do I have to care about it?
lame3995o -Q1

  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #128
Thank you very much, nu774, for this great automatic fdkaac.exe creating tool.

I got a lot of warnings and -fno-exceptions when compiling. Do I have to care about it?

Although Makefile in that automatic script is hand-written by me, libfdk-aac is not my project and it's out of my controll, and -fno-exceptions (and -fno-rtti) is specified in upstream Makefile.am anyway
(I guess that's because they want to avoid dependency to libstdc++ and also some of overheads, but I dunno).
In short, I don't care, and you don't have to ... unless something really went wrong when running the encoder, of course.

  • halb27
  • [*][*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #129
Thank you. So I feel fine.
lame3995o -Q1

  • lithopsian
  • [*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #130
I built this front end on Debian (after writing my own because I wanted input on stdin, not nearly as good as the one from nu774!), also the libraries.  Works very well.  The Linux build, at least for my architecture, uses shared libraries although nothing else on my system uses them.  ffmpeg might I suppose, but I don't use that.

Playing the files through Deadbeef I get a tiny jump between tracks.  Deadbeef is known not to play Nero files gapless, although it does play faac files perfectly.  The fdk-aac tracks have a much smalled gap than Nero.  Audacious plays files encoded with the fdk-aac library just about perfectly (is there the tiniest skip on some tracks?)

  • raducutzu
  • [*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #131
It seems just an issue of white space in the path.
It didn't work in your first example, where fdkaac_autobuild is located at "C:\Program Files (x86)\Utilities\fdkaac_autobuild"
It went on the second example, this time "d:\Tools\fdkaac_autobuild" was used.


It happened to me, as well. For it to work, it has to be installed in a folder without a blank in the path, C:\Program Files (x86) does have one in between.

Thanks for this great tool.

  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #132
White-space-in-the-path issue basically comes from mingw/msys restriction, and there's nothing I can do for it.
Anyway nice to hear that you enjoyed it.

  • gottogo99
  • [*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #133
I've been experimenting with using this encoder for video encodes.  Is there any way to eliminate the delay, like the --no-delay option in qaac?  Thanks.

  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #134
I've been experimenting with using this encoder for video encodes.  Is there any way to eliminate the delay, like the --no-delay option in qaac?  Thanks.

No. However, you can trim out certain amount of unnecessary start padding by m4acut.
Code: [Select]
 fdkaac -b 128 foo.wav -o tmp.m4a && m4acut tmp.m4a -o result.m4a

In case of FDK LC-AAC encoder, the amount of delay is 2048(=whole 2 AAC frames).
m4acut will cut it down to 1024
(Since 1 frame is enough as priming for AAC decoder, m4acut will discard frames beyond that).

  • gottogo99
  • [*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #135
Belated thanks, I've been out of town.

  • bp0
  • [*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #136
There is a HAK wiki page with collected information for Fraunhofer FDK AAC, and at Wikipedia Fraunhofer FDK AAC.

  • smok3
  • [*][*][*][*][*]
  • Moderator
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #137
@nu774,
a. Should fdkaac compile into a static binary?
(On Debian I have this:
Code: [Select]
ldd ./fdkaac 
    linux-vdso.so.1 =>  (0x00007fffa6e58000)
    libfdk-aac.so.0 => /usr/local/lib/libfdk-aac.so.0 (0x00007fc586100000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc585e7e000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc585af2000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fc5863d6000)
)
b. Is it compilable on OSX (Mountain Lion)?
  • Last Edit: 15 September, 2014, 05:45:14 PM by smok3
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

  • lithopsian
  • [*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #138
When I build libfdk from source on Linux I get a static library as well as a shared library.  Look in .libs.

I haven't built libfdk on OSX, but the build files are set up for a wide range of platforms, just about everything you can imagine.
  • Last Edit: 15 September, 2014, 06:47:07 PM by lithopsian

  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #139
@nu774,
a. Should fdkaac compile into a static binary?
b. Is it compilable on OSX (Mountain Lion)?

a. Both of libfdk-aac and fdkaac are GNU autotools based, so you can follow the general rule for it.
If you configure libfdk-aac with --disable-shared then static only libfdk-aac library will be generated, and it will be picked when building fdkaac. If both of static and shared libs are present, shared one will be picked by default.

b. Yes, haven't tried it myself, but some users seem to have succeeded in it.

  • Dynamic
  • [*][*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #140
There is a HAK wiki page with collected information for Fraunhofer FDK AAC, and at Wikipedia Fraunhofer FDK AAC.


The tables in that HA Wiki page look the wrong way round.

Firstly, 48kHz low-pass for VBR mode 5 - is plausible given 96kHz sampling rate is allowed, but seems like a big leap.

Then, higher low-pass for CBR modes in stereo than in mono ?!?

I don't have the correct figures to check this myself.
Dynamic – the artist formerly known as DickD

  • bp0
  • [*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #141
There is a HAK wiki page with collected information for Fraunhofer FDK AAC, and at Wikipedia Fraunhofer FDK AAC.


The tables in that HA Wiki page look the wrong way round.

Firstly, 48kHz low-pass for VBR mode 5 - is plausible given 96kHz sampling rate is allowed, but seems like a big leap.

Then, higher low-pass for CBR modes in stereo than in mono ?!?

I don't have the correct figures to check this myself.


The sentence above the table explains it a bit:
"The default bandwidth (or low-pass filter cutoff) for each bitrate mode will be the minimum of the appropriate value in the tables below or half the sample rate. This can be overridden, but the maximum value is 20000 Hz"

In the case of mode 5, I think it is simply that there is no filter applied. 48kHz in this case is the "half the sample rate" for the maximum input sample rate of 96kHz, which means it is the maximum possible. If you were only encoding something from a CD that was 44.1kHz, then you're limited to 22kHz anyway, and maybe only 20kHz (but it seems like that 20kHz limit seems to only be applied if a specific bandwidth was requested).

The effect is that mode 5 is just the full frequency range.

My understanding of it could be completely wrong, though. Feel free to correct me. 

As to why there is a higher filter for multi-channel, I don't know. I'm just using the values in the table in bandwidth.cpp

Edit: I looked into it a little more, and edited the HAK wiki page to reflect the understanding that VBR mode 5 effectively has no filter applied. I'm pretty sure that is right.
  • Last Edit: 26 September, 2014, 06:43:06 PM by bp0

  • bp0
  • [*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #142
Edit: I looked into it a little more, and edited the HAK wiki page to reflect the understanding that VBR mode 5 effectively has no filter applied. I'm pretty sure that is right.

Posts #34 (with pictures!) and #89 in this thread seem to confirm it as well.
  • Last Edit: 27 September, 2014, 12:33:09 AM by bp0

  • bp0
  • [*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #143
Then, higher low-pass for CBR modes in stereo than in mono ?!?

I think I have an answer for this. Since a channel that is combined stereo with another channel takes much fewer bits to encode, they allow more frequency on those channels, since they've got the extra space for it anyway in CBR.
FDK Bandwith (low-pass filter defaults)

I've also updated the VBR bitrate mode table to show that they actually limit a "stereo" channel more than a full "mono" channel, so the VBR stream bitrate calculations are slightly more complicated than just bitrate*channels. This is again because the a stereo channel doesn't need as many bits because it shares alot with the channel it is combined with.
FDK Bitrate Modes, with examples

EDIT: Additional note: It was Garf who explained this in IRC.
  • Last Edit: 01 October, 2014, 11:59:50 PM by bp0

Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #144
What should I do to get this bloody thing to compile?! I am using the autobuild (on Windows Vista 32-bit), and MinGW/MSYS have installed correctly, but I keep getting errors when trying to build either libfdk or fdkaac...

Lib error:
Code: [Select]
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ./libAACdec/src/aacdecoder_lib.o: bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status
make: *** [libfdk-aac-0.dll] Error 1



Exe error:
Code: [Select]
cc -O2 -DHAVE_CONFIG_H -I.  -c -o src/aacenc.o src/aacenc.c
In file included from src/aacenc.c:14:0:
src/aacenc.h:8:32: fatal error: fdk-aac/aacenc_lib.h: No such file or directory
#include <fdk-aac/aacenc_lib.h>
                                ^
compilation terminated.
make: *** [src/aacenc.o] Error 1
  • Last Edit: 23 December, 2014, 03:32:08 AM by Makaveli7184

  • nu774
  • [*][*][*][*][*]
  • Developer
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #145
Thanks for reporting.
It looks like they have added a new source file about a month ago or so, so the build is failing.

I have updated Makefile on the repo now, so please try running build_libfdk_aac.bat and build_fdkaac.bat again (These batch files will automatically download new Makefile from the repo).

Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #146
Thanks nu, it's working now.

  • mzso
  • [*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #147
Where can I find windows binaries with this mystical codec?
Ffmpeg is supposed to have, but no-one compiled a build with it...

  • kurtnoise
  • [*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #148
the license relative to it doesn't allow to distribute it publicly...
  • Last Edit: 29 January, 2015, 10:51:38 AM by kurtnoise

  • mzso
  • [*][*][*][*]
Open Source Fraunhofer AAC Encoder (fdk-aac)
Reply #149
the license relative to it doesn't allow to distribute it publicly...

So only compiler wizards have it then? (I guess the other good one, Apple's encoder is not easy to procure either?)