FreeSwitch一些模块的安装

一笑奈何 提交于 2020-04-03 19:36:35

FreeSwitch 视频支持,需要特殊安装一些依赖 还有安装顺序问题
这里列出来 安装libyuv libvpx opus mod_av 等模块的代码 方便大家使用

环境:
CentOS 6.x 64
FreeSwitch 1.6.20

URL=file.qzlink.com

#bugfix: step1 libyuv
cd /usr/local/src/freeswitch/libs
rm -rf libyuv
wget http://$URL/freeswitch/libyuv.zip
unzip libyuv.zip
cd libyuv
make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/"
make install
yes|cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/
yes|cp /usr/lib/libyuv.so /usr/lib64/
#bugfix :step2 libvpx
cd /usr/local/src/freeswitch/libs
rm -rf libvpx
wget http://$URL/freeswitch/libvpx.zip
unzip libvpx.zip
cd libvpx
./configure --enable-pic --disable-static --enable-shared
make
make install
yes|cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/
#bugfix :step3 opus
cd /usr/local/src/freeswitch/libs
rm -rf opus
wget http://$URL/freeswitch/opus.zip
unzip opus.zip
cd opus
./autogen.sh
./configure
make
make install
yes|cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig
#bugfix step4 libpng
cd /usr/local/src/freeswitch/libs
rm -rf libpng
wget http://$URL/freeswitch/libpng.zip
unzip libpng.zip
cd libpng
./configure
make
make install
yes|cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/
#bugfix step5 mod_sndfile
cd /usr/local/src/freeswitch/libs
rm -rf libsndfile
wget http://$URL/freeswitch/libsndfile-1.0.27.tar.gz
tar zxvf libsndfile-1.0.27.tar.gz
cd libsndfile-1.0.27
./configure
make
make install
yes|cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig
cd ..
#step 6 install x264 (mod_av needed)

rm -rf zxvf libav-11.8.tar.gz
wget http://$URL/highswitch_v2/x264-snapshot-20170226-2245-stable.tar.bz2
tar -jxvf x264-snapshot-20170226-2245-stable.tar.bz2
rm -rf x264-snapshot-20170226-2245-stable.tar.bz2
cd x264-snapshot-20170226-2245-stable
./configure --enable-shared --enable-static --disable-opencl
make
make install
yes|cp /usr/local/lib/pkgconfig/x2 /usr/lib64/pkgconfig
cd ..
#否则编译mod_av的时候 提示x264找不到
#然后把产生的.a 。so 文件 搞到系统的 /usr/lib64 目录下
yes|p /usr/local/lib/libx
/usr/lib64/
#step 7 mod_av
cd ..
rm -rf zxvf libav-11.8.tar.gz
wget http://$URL/highswitch_v2/libav-11.8.tar.gz
tar zxvf libav-11.8.tar.gz
rm -rf libav-11.8.tar.gz
cd libav-11.8
./configure --enable-shared --enable-libx264 --enable-gpl --extra-cflags=-fPIC
#如果没有参数 --extra-cflags=-fPIC 可以 修改config.mak 给CPPFLAGS 加上-fPIC参数
make
make install
yes|cp /usr/local/lib/pkgconfig/.pc /usr/lib64/pkgconfig/
yes|cp -f /usr/local/lib/
/usr/lib64/
cd ..
rm -rf live.2017.01.26.tar.gz
wget http://$URL/highswitch_v2/live.2017.01.26.tar.gz
tar zxvf live.2017.01.26.tar.gz
rm -rf live.2017.01.26.tar.gz
cd live
./genMakefiles linux-64bit
make
make install

cd ..
rm -rf vlc-2.2.4.tar.xz
wget http://$URL/highswitch_v2/vlc-2.2.4.tar.xz
tar xvf vlc-2.2.4.tar.xz
rm -rf vlc-2.2.4.tar.xz
cd vlc-2.2.4
sed -i 's#LIVE555_PREFIX-"/usr"#LIVE555_PREFIX-"/usr/local"#g' configure
./configure --enable-run-as-root --enable-realrtsp --disable-mad --disable-a52 --disable-jpeg --enable-live555
make
make install
yes|cp /usr/local/lib/pkgconfig/libvlc.pc /usr/lib64/pkgconfig/

cd ..
rm -rf libshout-2.2.2.tar.gz
wget http://$URL/highswitch_v2/libshout-2.2.2.tar.gz
tar zxvf libshout-2.2.2.tar.gz
rm -rf libshout-2.2.2.tar.gz
cd libshout-2.2.2
./configure
make
make install

cd ..
rm -rf mpg123-1.23.8.tar.bz2
wget http://$URL/highswitch_v2/mpg123-1.23.8.tar.bz2
tar jxvf mpg123-1.23.8.tar.bz2
rm -rf mpg123-1.23.8.tar.bz2
cd mpg123-1.23.8
./configure
make
make install

#lame
cd ..
rm -rf lame-3.98.4.tar.gz
wget http://$URL/highswitch_v2/lame-3.98.4.tar.gz
tar zxvf lame-3.98.4.tar.gz
rm -rf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure
make linux
make install

文档:http://zengqf.gitee.io/ifreeswitchgui/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!