ubuntu16.04 编译freeswitch1.9的视频mod_av模块

来源:互联网 发布:java elasticsearch 编辑:程序博客网 时间:2024/06/06 08:40

1。

apt-get install -y autoconf git libtool g++ zlib1g-dev  libjpeg-dev libsqlite3-dev

  libcurl4-openssl-dev libpcre3-dev libspeex-dev  libspeexdsp-dev  libldns-dev libedit-dev 

libssl-dev  pkg-config  yasm liblua50-dev libopus-dev libsndfile1-dev libpq-dev

2. lua安装

apt-get install libreadline-dev apt-get install lua5.2 lua5.2-doc liblua5.2-dev

apt install libtiff5 libtiff5-dev 

3.

cd /usr/src

git clone https://freeswitch.org/stash/scm/sd/libav.git
cd libav
CFLAGS="-fPIC" ./configure --enable-pic --enable-shared
make CXXFLAGS="-fPIC"
make install

4.

cd /usr/src

git clone https://freeswitch.org/stash/scm/fs/freeswitch.git

./bootstrap.sh -j

(

bootstrap: libtool not found.  You need libtool version 1.5.14 or newer to build FreeSWITCH from source.


dpkg -L libtool
发现没有/usr/bin/libtool
dpkg -l libtool
libtool 是2.4.6-0.1版本的
在ubuntu只有libtoolize,修改bootstrap.sh,
libtool=${LIBTOOL:-`${LIBDIR}/apr/build/PrintPath glibtool libtool libtool22 libtool15 libtool14
libtoolize`} 

参考地址http://blog.csdn.net/ssj901217/article/details/77837527

)

5.
vim mod.conf 打开mod_av

6.

./configure --enable-core-pgsql-support

q1:  mod_lua.cpp:37:17: fatal error: lua.h: No such file or directory 
#include “lua.h” //找不到lua.h头文件
 
解决:将lua库所有的头文件拷贝到 freeswitch/src/mod/languages/mod_lua/ 中


q2:  /usr/bin/ld: cannot find -llua 
collect2: error: ld returned 1 exit status//找不到lua库 (找到liblua5.2.so位置 )
解决:1、之前在1-1中已经安装了liblua50-dev,为什么找不到lua库呢? 
2、使用ls -l liblua*可以看到其中确实没有liblua.so的库 
3、做一个软连接 ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so/usr/lib/x86_64-linux-gnu/liblua.so 再次make编译即可  


6.
:make install


声源:可选
make  cd-sounds-install
make  cd-moh-install
make samples

成功后freeswitch 在 /usr/local下

7.视频

cd /usr/local/freeswitch
conf/vars.xml 下设置
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=G722,PCMU,PCMA,GSM,H263,H264,VP8"/>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM,H263,H264,VP8"/>
在conf/autoload_configs/modules.conf.xml 最后面添加


   <!-- av modules -->
 <load module="mod_av"/>


8. 



后台启动freeswitch
freeswitch -nc

找sip工具测试 

9

错误参考

FreeSWITCH 安装配置的 各种坑, 填坑   http://www.bubuko.com/infodetail-2032889.html  

FreeSWITCH 差包下载地址 http://files.freeswitch.org/downloads/libs/

freeswitch 1.6 centos6.5 安装记录 http://blog.chinaunix.net/uid-27086996-id-5673895.html

Ubuntu 16.04.3安装 freeswitch 1.6 http://blog.csdn.net/ssj901217/article/details/77837527


交流q群 261074724