The ffmpeg-devel Makefile provides --enable-faadbin to the ffmpeg configure script, which enables fancy runtime loading of libfaad. Recent(?) changes to libfaad includes renaming of all the library functions, and #defines in faad.h to map the old functions to new ones. However, the ffmpeg linkage is done with fancy macros, which don't end up allowing the expansion of the faad.h macros. This results in ffmpeg trying to map faacDecGetErrorMessage from a library that only has NeAACDecGetErrorMessage. Fix: Don't pass --enable-faadbin to ffmpeg. How-To-Repeat: cd /usr/ports/multimedia/ffmpeg-devel make install use ffmpeg to transcode an input file that has aac
Responsible Changed From-To: freebsd-ports-bugs->lioux Over to maintainer
Responsible Changed From-To: lioux->freebsd-multimedia Maintainership was transferred.
State Changed From-To: open->closed Faad 2.5 includes API compat with 2.4. Everything should work with latest ffmpeg now too.
While faad 2.5,1 includes API compatability, as I stated in the description of the problem, the linkage that ffmpeg uses is not able to use that API compatability. This is because the faad API compatability is performed with #defines, and the ffmpeg linkage happens with fancy macros that put together the function names in a way that doesn't allow the #defines to work. (The dfaac() macro in libavcodec/faad.c uses "faacDec" ## a to put symbols together to get, e.g. faacDecGetErrorMessage, into strings, which it then looks up in the shared library with dlsym(), which never gives the "compatability API" a chance to get in the middle). Were you able to get the steps in "how-to-repeat:" to work, or did you just close the PR because you think it is supposed to work? I think it is supposed to work too, but that doesn't mean it does. I spent an hour rebuilding faad (of which I already had 2.5,1 installed) and ffmpeg-devel (which I upgraded from ffmpeg-devel-0.4.9.c.2006032300_4 to ffmpeg-devel-0.4.9.c.2006032300_5) to make sure that the bug was still there. frogbits% pkg_info -I ffmpeg\* faad\* faad2-2.5,1 MPEG-2 and MPEG-4 AAC audio decoder ffmpeg-devel-0.4.9.c.2006032300_5 Hyper fast realtime audio/video encoder/converter, streamin frogbits% ffmpeg -i Diego-2.mp4 /tmp/foo.mpeg FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard configuration: --cc=cc --prefix=/usr/local --make=gmake --disable-debug --enable-memalign-hack --enable-shared --source-path=/usr/ports/multimedia/ffmpeg-devel/work/FFMpeg-2006032300 --enable-a52 --enable-dts --enable-faac --enable-faad --enable-faadbin --enable-gpl --enable-libgsm --enable-mp3lame --enable-libogg --enable-pp --enable-pthreads --enable-vorbis --enable-x264 --enable-xvid libavutil version: 49.0.0 libavcodec version: 51.8.0 libavformat version: 50.4.0 built on Apr 2 2007 10:02:29, gcc: 3.4.4 [FreeBSD] 20050518 Seems that stream 0 comes from film source: 24000.00 (24000/1) -> 23.98 (24000/1001) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Diego-2.mp4': Duration: 00:42:45.1, start: 0.000000, bitrate: 1129 kb/s Stream #0.0(eng), 23.98 fps(r): Video: mpeg4, yuv420p, 640x480 Stream #0.1(eng): Audio: aac, 44100 Hz, stereo Output #0, mpeg, to '/tmp/foo.mpeg': Stream #0.0, 23.98 fps(c): Video: mpeg1video, yuv420p, 640x480, q=2-31, 200 kb/s Stream #0.1: Audio: mp2, 44100 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [aac @ 0x28356028]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! Error while opening codec for input stream #0.1 Bill
Similar results (although now it's an infinite loop instead of a single error) with the recently-committed ffmpeg-devel update. frogbits% pwd /usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-03-31 frogbits% cd ../..; make package-name ffmpeg-devel-2007.03.31 frogbits% cd work/ffmpeg-2007-03-31 frogbits% env LD_LIBRARY_PATH=libavformat:libavcodec:libavutil ./ffmpeg -i ~/tmp/Diego-2.mp4 /dev/null FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --cc=cc --prefix=/usr/local --make=gmake --disable-debug --enable-memalign-hack --enable-shared --enable-pp --extra-cflags=-fPIC -O2 -fno-strict-aliasing -pipe -I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-pthread --disable-bktr --enable-gpl --enable-liba52 --enable-liba52bin --enable-libdts --enable-libfaac --enable-libfaad --enable-libfaadbin --disable-mmx --enable-libgsm --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-x264 --enable-xvid libavutil version: 49.4.0 libavcodec version: 51.40.2 libavformat version: 51.11.0 built on Apr 2 2007 10:29:11, gcc: 3.4.4 [FreeBSD] 20050518 [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! .. [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! [aac @ 0x283c1808]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0! Seems stream 0 codec frame rate differs from container frame rate: 24000.00 (24000/1) -> 23.98 (24000/1001) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/fenner/tmp/Diego-2.mp4': Duration: 00:42:45.1, start: 0.000000, bitrate: 1129 kb/s Stream #0.0(eng): Video: mpeg4, yuv420p, 640x480, 23.98 fps(r) Stream #0.1(eng): Audio: aac Unable for find a suitable output format for '/dev/null' frogbits% (during the "..." I was pounding on ^C.) Why the resistance to a) testing a reported bug, or b) applying the reported fix? Bill
ahze 2007-04-02 21:19:17 UTC FreeBSD ports repository Modified files: multimedia/ffmpeg-devel Makefile Log: - Fix faad 2.5 runtime PR: ports/109379 Reported by: fenner Revision Changes Path 1.105 +3 -0 ports/multimedia/ffmpeg-devel/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"