HD Видеоконференции на OpenMCU



Если Вы обнаружили проблему в работе сервера OpenMCU-ru, пожалуйста, сообщите о ней в разделе форума "Обнаруженные ошибки", приложив информацию, которая поможет разработчикам её воспроизвести - трассировку (в случае некорректной работы сервера, либо проблем с согласованием терминалов) и backtrace (при падении сервера с ошибкой).

Автор Тема: avcodec.h missing while configure OpenMCU-ru 4.0  (Прочитано 2154 раз)

eudyzerpa

  • Новичок
  • *
  • Сообщений: 26
  • Карма: 0
  • #Security | #Privacy | #SysAdmin | #Voip | #VC
    • Eudy Alberto Zerpa Vargas
Hello there OpenMCU-ru Team,

I am trying to build OpenMCU again, this time using the 4.0 source code version on CENTOS 7 as you suggested, the problem this time ocurs while running ./configure script, the output shows the avcodec headers missing and recomended to install either FFMpeg or Libav but I already have both packages installed.

I will appreaciate any light you can shed in this matter, in order to help me advance.

Best regards

sarpc

  • Пользователь
  • **
  • Сообщений: 50
  • Карма: 0
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #1 : 01 Март 2017, 08:09:25 »
rpm -q ffmpeg ffmpeg-compat ffmpeg-compat-devel ffmpeg-devel ffmpeg-libs  ?

http://firstwiki.ru/index.php/%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0_FFMPEG

rpm -ivh https://www.mirrorservice.org/sites/dl.atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el7.x86_64.rpm
sed -i 's,http://dl,https://www.mirrorservice.org/sites/dl,' /etc/yum.repos.d/atrpms*.repo

#yum install ffmpeg ffmpeg-compat ffmpeg-compat-devel ffmpeg-devel ffmpeg-libs

eudyzerpa

  • Новичок
  • *
  • Сообщений: 26
  • Карма: 0
  • #Security | #Privacy | #SysAdmin | #Voip | #VC
    • Eudy Alberto Zerpa Vargas
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #2 : 29 Март 2017, 22:05:45 »
Hi sarpc,

Thanks a lot for your help, i was not around lately but just back, sorry for the late response

Best regards

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #3 : 17 Май 2017, 00:53:14 »
Hi,I am compiling it from source, I did download the ffmpeg from the website and then installed the libav but still errors me, with

"configure: error: libavcodec library not found! Install FFmpeg or Libav."

What else am I missing?

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #4 : 17 Май 2017, 01:12:48 »
You need headers to link openmcu with ffmpeg.
1. May be the easiest way is to use ffmpeg-dev (development version).
2. Or build ffmpeg from source code which surely contains headers.
Good luck! :)

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #5 : 17 Май 2017, 01:29:33 »
I definitely missing something, I installed FFmpeg from source and libav, also tried THE steps, these steps

http://firstwiki.ru/index.php/%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0_FFMPEG

and some packages are missing

[root@localhost openmcu]# yum install ffmpeg ffmpeg-compat ffmpeg-compat-devel ffmpeg-devel ffmpeg-libs
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.edatel.net. co
 * epel: mirror.math.prince ton.edu
 * extras: mirror.edatel.net. co
 * rpmforge: mirror.lstn.net
 * updates: mirror.edatel.net. co
Package ffmpeg-2.2.1-65.el6.x86_64 already installed and latest version
No package ffmpeg-compat available.
No package ffmpeg-compat-devel available.
Package ffmpeg-devel-2.2.1-65.el6.x86_64 already installed and latest version
No package ffmpeg-libs available.
Nothing to do

but installed ffmpeg with ffmpeg-devel.

Still no luck, I am using Centos 6
« Последнее редактирование: 17 Май 2017, 01:35:57 от suhijo »

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #6 : 17 Май 2017, 01:54:45 »
OK, let's take a look on the stage where you get this error

AC_CHECK_HEADERS([avcodec.h libavcodec/avcodec.h ffmpeg/avcodec.h libav/avcodec.h ffmpeg/libavcodec/avcodec.h libav/libavcodec/avcodec.h], USE_AVCODEC=1, [], [-])
if test ${USE_AVCODEC} = 0; then
  AC_MSG_ERROR(avcodec headers not found! Install FFmpeg or Libav.)
fi

AC_CHECK_LIB(avcodec, avcodec_version, USE_AVCODEC=1, USE_AVCODEC=0)
if test ${USE_AVCODEC} = 0; then
  AC_MSG_ERROR(libavcodec library not found! Install FFmpeg or Libav.)
fi

So yes, you definitely HAVE headers, because the first check works.
But the second check fails!

Please try run ffmpeg from command line (bash, sh, etc). Will you get similar error? Could your system run it?

If no, this will mean you still need to install ffmpeg properly. Please avoid multiple installations. Also please note that libav and ffmpeg both have very similar if not the same headers so do not install them both at the same time (and their headers).

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #7 : 17 Май 2017, 01:59:06 »
root@server4:~# ffmpeg
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 15 2012 07:33:09 with gcc 4.5.2
  configuration: --enable-shared
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfi               le}...

Use -h to get full help or, even better, run 'man ffmpeg'
root@server4:~#

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #8 : 17 Май 2017, 05:01:21 »
EHLO Kay27 thanks for the reply, this is the output of my ffmpeg
[root@localhost ~]# ffmpeg
ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
  configuration:
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

I was at that part of the code in the configure script, my question is where does he look for avcodec.h? I run some find
[root@localhost ~]# find /usr/include | grep "avcodec.h"
/usr/include/libavfilter/avcodec.h
/usr/include/libavcodec/avcodec.h
and there are some headers

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #9 : 17 Май 2017, 06:50:49 »
Please try to locate libavcodec.so

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #10 : 17 Май 2017, 18:45:21 »
[root@localhost /]# find /usr/| grep  "libavcodec\.so"
/usr/lib64/libavcodec.so.57
/usr/lib64/libavcodec.so.57.89.100
/usr/lib64/libavcodec.so.56
/usr/lib64/libavcodec.so.56.60.100
/usr/lib64/libavcodec.so
???

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #11 : 17 Май 2017, 21:21:14 »
Well, I had to make some links from lib64 to lib so configure could work(libavcodec, libswscale,  but now Make fails.

libtool: link: ranlib .libs/libg722_1.a
libtool: link: ( cd ".libs" && rm -f "libg722_1.la" && ln -s "../libg722_1.la" "libg722_1.la" )
make[3]: Leaving directory '/usr/src/openmcu-master/libs/libg722_1/src'
make[2]: Leaving directory '/usr/src/openmcu-master/libs/libg722_1/src'
make[2]: Entering directory '/usr/src/openmcu-master/libs/libg722_1'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/usr/src/openmcu-master/libs/libg722_1'
make[1]: Leaving directory '/usr/src/openmcu-master/libs/libg722_1'
(make        -C openmcu-ru) || exit $?
make[1]: Entering directory '/usr/src/openmcu-master/openmcu-ru'
fatal: Not a git repository (or any of the parent directories): .git
[CC] obj/main.o
In file included from utils.h:7:0,
                 from conference.h:7,
                 from mcu.h:7,
                 from main.cxx:3:
utils_av.h:120:4: error: ‘AV_CH_LAYOUT_MONO’ was not declared in this scope
   ,AV_CH_LAYOUT_MONO
    ^
utils_av.h:121:4: error: ‘AV_CH_LAYOUT_STEREO’ was not declared in this scope
   ,AV_CH_LAYOUT_STEREO
    ^
utils_av.h:122:4: error: ‘AV_CH_LAYOUT_2_1’ was not declared in this scope
   ,AV_CH_LAYOUT_2_1
    ^
utils_av.h:123:4: error: ‘AV_CH_LAYOUT_3POINT1’ was not declared in this scope
   ,AV_CH_LAYOUT_3POINT1
    ^
utils_av.h:124:4: error: ‘AV_CH_LAYOUT_5POINT0’ was not declared in this scope
   ,AV_CH_LAYOUT_5POINT0
    ^
utils_av.h:125:4: error: ‘AV_CH_LAYOUT_5POINT1’ was not declared in this scope
   ,AV_CH_LAYOUT_5POINT1
    ^
utils_av.h:126:4: error: ‘AV_CH_LAYOUT_7POINT0’ was not declared in this scope
   ,AV_CH_LAYOUT_7POINT0
    ^
utils_av.h:127:4: error: ‘AV_CH_LAYOUT_7POINT1’ was not declared in this scope
   ,AV_CH_LAYOUT_7POINT1
    ^
In file included from ../libs/ptlib/include/ptlib/pluginmgr.h:99:0,
                 from ../libs/h323plus/include/h323pluginmgr.h:132,
                 from ../libs/h323plus/include/h323.h:496,
                 from ../libs/h323plus/include/gkclient.h:248,
                 from ../libs/h323plus/include/h323.h:494,
                 from ../libs/h323plus/include/h323ep.h:379,
                 from ../libs/h323plus/include/h323.h:493,
                 from config.h:64,
                 from precompile.h:18,
                 from main.cxx:2:
../libs/ptlib/include/ptlib/plugin.h:217:13: warning: ‘PPlugin_PVideoInputDevice_FakeVideo_loader’ defined but not used [-Wunused-variable]
   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();
             ^
../libs/ptlib/include/ptlib/videoio.h:1168:1: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’
 PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice);
 ^
../libs/ptlib/include/ptlib/plugin.h:217:13: warning: ‘PPlugin_PVideoInputDevice_YUVFile_loader’ defined but not used [-Wunused-variable]
   int const PPlugin_##serviceType##_##serviceName##_loader = PPlugin_##serviceType##_##serviceName##_link();
             ^
../libs/ptlib/include/ptlib/videoio.h:1179:3: note: in expansion of macro ‘PPLUGIN_STATIC_LOAD’
   PPLUGIN_STATIC_LOAD(YUVFile, PVideoInputDevice);
   ^
Makefile:59: recipe for target 'obj/main.o' failed
make[1]: *** [obj/main.o] Error 1
make[1]: Leaving directory '/usr/src/openmcu-master/openmcu-ru'
Makefile:763: recipe for target 'all' failed
make: *** [all] Error 2

:'(

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #12 : 18 Май 2017, 00:31:13 »
It looks rather fun but we have similar russian thread where the guy finally migrated to Debian distribution and had no prob. This thread: https://videoswitch.ru/forum/index.php?topic=1091.0

I don't know what's wrong with ffmpeg packages in CentOS but one of main our developers successfully uses CentOS 6 and 7 and also has no prob.

It's probably better not to make symbolic links this way, but if you already did - don't forget to do the same with (lib)swresample or avresample... But it's at whole, it's not for AV_CH_LAYOUT_MONO which includes from avcodec.h, so if compiler doesn't find it - it means something really wrong with ffmpeg headers. I suspect multiple installation. Remove all your ffmpeg packages, make sure openmcu stops with first error 'avcodec headers not found! Install FFmpeg or Libav.' and then build your own ffmpeg from official source code with # ./configure --enable-shared && make && make install && ldconfig
Or try to use installation script, https://wiki.videoswitch.ru/en/install/src_linux#auto-build-script

suhijo

  • Новичок
  • *
  • Сообщений: 6
  • Карма: 1
Re: avcodec.h missing while configure OpenMCU-ru 4.0
« Ответ #13 : 18 Май 2017, 03:06:53 »
Thank you Kay, I was able to install it finally. I had to 1 compile ffmpeg with --enable-shared and installed the package libttool-ltdl-devel.