0

I am trying to integrate the 3G video gateway with Asterisk(1.4.0).

When i load the module "app_transcoder.so" (which does the actual video transcoding), then

asterisk hangs and with "asterisk -vvvvvc" i got

asterisk: symbol lookup error: /usr/lib/asterisk/modules/app_transcoder.so: undefined symbol: avcodec_init

Showing the dependencies of app_transcoder.so by "ldd /usr/lib/asterisk/modules/app_transcoder.so" gives:

    linux-vdso.so.1 =>  (0x00007fff851ff000)
    libavcodec.so.54 => /usr/local/lib/libavcodec.so.54 (0x00007f8604ec3000) 
    libswscale.so.2 => /usr/local/lib/libswscale.so.2 (0x00007f8604c6e000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f86048d9000)
    libavutil.so.52 => /usr/local/lib/libavutil.so.52 (0x00007f86046a7000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f860448a000)
    libx264.so.142 => /usr/local/lib/libx264.so.142 (0x00007f86040d1000)
    libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8603ec6000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f8603c42000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f8603a2b000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003b14200000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f8603827000)

"avcodec_init" comes from libavcodec.so file but it has no symbols as from the commands:

nm -a /usr/local/lib/libavcodec.so.54

gives:

nm: /usr/local/lib/libavcodec.so.54: no symbols

i am following the instructions from Medooze

CentOS-6.4

ffmpeg-1.2.6

asterisk-1.4.0

x264- 0.142x

ptlib-2.6.7

mpeg4ip-1.6.1

Any advice is appreciated.

Riad
  • 3,822
  • 5
  • 28
  • 39

1 Answers1

1

add /usr/local/lib to your library path /etc/ld.so.conf

after that, execute "ldconfig"

recompile asterisk.

Found this ffmpeg mailing list: avcodec_init() isn't used nowadays. Instead avcodec_register_all() is used. It seems you may need to downgrade ffmpeg.

moonstruck
  • 2,729
  • 2
  • 26
  • 29
  • 1
    thanks. it was added earlier and recompiled. the problem is on the .so file i metioned.. as there is no symbol for "avcodec_init" function( as the symbol table should contain all function definitions ) "ldconfig -v | grep libavcodec" shows: ldconfig: /etc/ld.so.conf.d/kernel-2.6.32-431.5.1.el6.x86_64.conf:6: duplicate hwcap 1 nosegneg libavcodec.so.54 -> libavcodec.so.54.92.100 ldconfig: /usr/lib/libss7.so.1 is not a symbolic link – Riad Apr 09 '14 at 12:01
  • 2
    Just found in ffmpeg mailing list avcodec_init() isn't used nowadays. Instead avcodec_register_all() is used. It seems you may need to downgrade ffmpeg. – moonstruck Apr 10 '14 at 10:35
  • 2
    "avcodec_init() has been used nowadays." not in earlier. Thanks a lot @moonstruck. It worked for version 0.10 of ffmpeg. Please append your comment to the answer that i can give u credit. – Riad Apr 10 '14 at 17:43