Ubuntu14.04搭建licode环境

环境:阿里云ECS服务器 Ubuntu14.04

阿里云服务器开通以下外网端口

1、按照licode官网指导安装

Licode官网指导)很顺利安装完成,但是没有视频,怀疑是没有stun服务器导致。

2、搭建stun服务器

配置licode,把stun部署到同一台服务器上

config.erizoController.iceServers = [{'url': 'stun:127.0.0.1:3478'}];
config.erizo.stunserver = '127.0.0.1'; // default value: ''
config.erizo.stunport = 3478; // default value: 0

经过以上步骤发现还是无法预料,流推不到licode上

3、搭建turn服务器coturn

安装coturn服务器

coturn依赖库有很多:

ginstall: not found
install is /usr/bin/install
pkill is /usr/bin/pkill
sqlite3: not found
sqlite: not found
Use TMP dir /var/tmp
Compiler: cc
Library option -lsocket cannot be used
Library option -lwldap32 cannot be used
Library option -lwldap64 cannot be used
Library option -lintl cannot be used
Sockets code is fine: no sin_len field present
Ignore IP_RECVERR
Crypto SSL lib found.
SSL lib found.
Libevent2 development is not installed properly
ERROR: Libevent2 development libraries are not installed properly in required location.
ERROR: may be you have just too old libevent tool - then you have to upgrade it.
See the INSTALL file.
Abort.

注意必须安装libevert

4、启动coturn服务器

配置文件:/usr/local/etc/turnserver.conf

relay-device=eth0
listening-ip=172.17.249.252
listening-port=3478
tls-listening-port=5349
relay-ip=172.17.249.252
external-ip=39.106.89.206
relay-threads=50
lt-cred-mech
cert=/etc/turn_server_cert.pem
pkey=/etc/turn_server_pkey.pem
pidfile=”/var/run/turnserver.pid”
min-port=49152
max-port=65535
user=aly123456

配置 Long-Term 用户:

 turnadmin -a -u aly123456 -p 123456 -r beijing

启动:

turnserver -a -f -v -r beijing

测试 STUN:

turnutils_uclient -u aly123456 -w 123456 39.106.89.206

另外,licode必须配置turnserver和stunserver,修改配置如下:

config.erizoController.iceServers = [{'url': 'stun:39.106.99.106:3478'}, {'url':'turn:39.106.99.106:3469', 'username':'aly123456', 'credential':'123456'}];

config.erizoController.publicIP = '39.106.99.106'; //default value: ''
config.erizoController.networkinterface = 'eth0'; //default value: ''

config.erizoController.hostname = '39.106.89.206'; //default value: ''
config.erizoController.port = 8080; //default value: 8080

config.erizoAgent.publicIP = '39.106.99.106'; //default value: ''
config.erizoAgent.networkinterface = 'eth0'; //default value: ''

config.erizo.stunserver = '39.106.99.106'; // default value: ''
config.erizo.stunport = 3478; // default value: 0

config.erizo.turnserver = '39.106.99.106'; // default value: ''
config.erizo.turnport = 3469; // default value: 0
config.erizo.turnusername = 'aly123456';
config.erizo.turnpass = '123456';

 

调通视频

视频终于调通了,下面两台电脑的视频:

下一步研究Licode的内部结构,以及音视频流如何分发

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值