闲来无事,早就听说freeswitch支持H264转码了,可以实现混屏了,所以搭建一下,看看效果,现在把搭建的步骤记录下:
1.搭建Debian8:
不是主要工作,请参考http://www.linuxidc.com/Linux/2015-04/115860.htm
2.添加源:
echo "deb http://files.freeswitch.org/repo/deb/debian/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
apt-get update
3.安装依赖
apt-get install -y --force-yes freeswitch-video-deps-most
4.下载,配置
git config --global pull.rebase true
cd /usr/src/
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch.git
cd freeswitch.git
./bootstrap.sh -j
./configure
perl -i -pe 's/#applications\/mod_av/applications\/mod_av/g' modules.conf
5.编译
make
make install
make cd-sounds-install
make cd-moh-install
make samples
6.配置
echo "net.core.rmem_max = 16777216" > /etc/sysctl.d/vid.conf
echo "net.core.wmem_max = 16777216" >> /etc/sysctl.d/vid.conf
echo "kernel.core_pattern = core.%p" >> /etc/sysctl.d/vid.conf
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
sysctl -w kernel.core_pattern=core.%p
在conf/vars.xml中的编码部分添加H264
在conf/autoload_configs/modules.conf.xml 最后面添加
<!-- av modules -->
<load module="mod_av"/>
7.启动./freeswitch
8.使用两个microSIP和一个linphone手机端测试效果如下: