M4A decoding fails (cannot load symbol)

Help
jazzslider
2010-01-19
2013-04-25
  • jazzslider
    jazzslider
    2010-01-19

    Hello!

    I'm attempting to use FUPPES to play back some of my non-DRM'd M4A files from iTunes on my Xbox 360 …since the Xbox 360 doesn't seem to play them back natively (?), I've set up the following file config to transcode them to MP3s:

    <file ext="m4a">
      <type>AUDIO_ITEM</type>
      <mime_type>audio/mp4a</mime_type>
      <transcode enabled="true">
        <ext>mp3</ext>
        <mime_type>audio/mpeg</mime_type>
        <dlna>MP3</dlna>
        <http_encoding>chunked</http_encoding>
        <decoder>faad</decoder>
        <encoder>lame</encoder>
        <bitrate>192</bitrate>
        <samplerate>44100</samplerate>
      </transcode>
    </file>
    

    I used the following ./configure command when building FUPPES, so faad should definitely be available:

    ./configure --prefix=/usr --enable-lame --enable-twolame --enable-vorbis --enable-ImageMagick --enable-mad --enable-faad --enable-video-transcoding --enable-transcoder-ffmpeg
    

    The ./configure output indicated that the "faad" decoder was available; however, my web interface only lists three audio decoders: FLAC, musepack, and vorbis.  Not sure if that means anything or not.

    Under this configuration, when I actually go in to try and play an M4A file via my Xbox, the "-log-level 3" debug output gives me an error I don't really understand: "cannot load symbol 'faacDecOpen'", and goes on to say that transcoding failed.

    What all this tells me is that there's some sort of problem with the faad decoder on my machine, I think.  I've installed it via the standard Debian Lenny packages (faad, libfaad-dev, libfaad0, libfaad2-0), and all the libraries FUPPES is looking for seem to be in the right place …but for whatever reason, it just can't load that symbol.

    Can anyone help me figure this out?

    Thanks!
    Adam

     
  • I've had the same problem with Debian Lenny, it seems that the API for libfaad was changed at some point.

    In src/lib/Transcoding/FaadWrapper.cpp, you need to change all the references to faad* to NeAAC*

    The easiest way to do that is to look at /usr/include/neaacdec.h , lines 48 through 58, and change eg (at line 353 or so).

      m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, "faacDecOpen");

    to
      m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, "NeAACDecOpen");

    That makes that bit happy.

    However, you may then run into the problem I'm currently having, where if your file is an mp4 rather than aac, then it'll fail to find libmp4ff.so.0 (which apparently is no longer shipped with Debian - http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg709989.html )

    Supposedly the fix is to use ffmpeg or mp4v2 instead, but I've not got around to trying that yet.

    HTH,

    Alex.

     
  • Have also fixed the libmp4ff issue for Debian now, so I can happily play .m4as on my Xbox 360 :)

    The diffs I made can be found at http://www.archifishal.co.uk/~aardvark/fuppesdiffs/ - they may not be nice, but they seem to work.

     
  • Sorry it's taken me so long but that looks excellent. And they have come at a really good time; right when I was trying to package Fuppes for debian. I think that I will go test these out on the development repository now.

    Thankyou archifishal and jazzslider. And could you please keep that link fresh for another week atleast archifishal, thanks.

    P.S. The changes to the Makefile should be in the Makefile.am's or the configure.ac otherwise they will be deleted upon the autoreconf. I'll move them there myself.

     
  • Yeah, the Makefile bit was a bit of a hack really - ideally I guess the configure scripts should see if a dynamic libmp4 is available and use it if it is, otherwise fall back to the static one (as statically linking against it probably isn't ideal)

     
  • jazzslider
    jazzslider
    2010-02-15

    Hello!

    Just wanted to let y'all know that this solution is working out great for me.  There are still a couple of M4As that I can't get to play on my 360, but the vast majority of them work perfectly.

    I haven't really had time to research the problem yet; so far, all I've noticed is that M4As I bought and downloaded from the iTunes store work fine, while M4As I ripped from CDs (through iTunes) do not.  That seems really strange to me, but again, I haven't had time to research this correctly.  Just need to analyze the streams and see what's different, I suppose :)

    Anyway, thanks very much for your help with this!
    Adam

     
  • This change is currently in the development repository and I have given it to Uli to check on. If all goes well it should be in the next dev release.