FreeSwitch一些模組的安裝

FSGUI發表於2020-04-01

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 ..

# live 555

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

# vlc 

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/

 

# mod_shout playmp3

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

 

# mpg123

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/


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69968472/viewspace-2683872/,如需轉載,請註明出處,否則將追究法律責任。

相關文章