- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel CS for WebRTC是一套完整的WebRTC的通讯架构套件,包括了服务端软件和客户端SDK,其中客户端SDK支持Web,Android,iOS和Windows平台。该套件对通讯协议的细节进行了封装,可以使开发者专注于应用层的软件开发。
目标:
- 搭建WebRTC系统,实现在web页面上进行实时通讯
步骤:
1.环境准备
CentOS 7以上操作
外网访问IP:120.92.100.101(需要是你机器的实际IP,后面依这个IP为例)
2.下载Intel CS for webrtc 软件包。
到https://software.intel.com/en-us/webrtc-sdk/download页面进行下载
或者直接使用wget下载:
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/13165/Intel_CS_WebRTC.v4.0.1.zip
3.获取webrtc MCU安装文件
unzip Intel_CS_WebRTC.v4.0.1.zip
解压后,会列出全部支持的客户端SDK和服务端软件。
实现Web端音频通话,我们只需要安装MCU即可。
tar xvf CS_WebRTC_Conference_Server_MCU.v4.0.1.tgz
所有文件会解压到Release-v4.0.1目录下。
Intel CS WebRTC依赖于一些第三方的软件,如Nodejs,ffmpeg等。Nodejs需要单独安装。
4.安装Nodejs
wget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.gz
tar -xzvf node-v6.9.5-linux-x64.tar.gz
mv node-v6.9.5-linux-x64 /opt/
ln -s /opt/node-v6.9.5-linux-x64/bin/node /usr/local/bin/node
ln -s /opt/node-v6.9.5-linux-x64/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
5.安装其它依赖软件
进入Relase-v4.0.1目录,执行如下命令:
bin/init-all.sh --deps
考虑到有可能不支持硬件的GPU加速,我们使用软件方式,执行如下命令:
bin/init-all.sh –software
这个命令执行完成后,会生成两组superServiceId和sampleServiceKey,这两个值在登录控制台时会用到。
6.配置对外服务IP
如果服务直接配置了对外服务的IP,请跳过本步;如果使用的虚机有EIP,需要配置对外服务的IP。
vi webrtc_agent/agent.toml
修改:
network_interfaces = []
为:
network_interfaces = [{name = "eth0", replaced_ip_address = "120.92.100.101"}]
vi portal/portal.toml
修改:
ip_address=””
为:
ip_address=”120.92.100.101”
7.配置UDP通讯端口
如果是虚机,在虚机网络管理中打开UDP的可访问端口,推荐范围2000-9000,同时需要在配置文件中进行配置。
vi webrtc_agent/agent.toml
修改:
# The webrtc port range
maxport = 0 #default: 0
minport = 0 #default: 0
为:
# The webrtc port range
maxport = 9000 #default: 0
minport = 2000 #default: 0
8.打开TCP通讯端口
如果是虚机,在虚机网络管理中打开TCP的可访问端口,推荐范围2000-9000
9.关闭防火墙(需要管理员权限)
sudo systemctl stop firewalld.service
10.启动 Intel CS WebRTC
./bin/start-all.sh
如果没有报错,表示启动功能,并最后看到下面的字样:
1 rooms in this service.
sampleRoom Id: XXXXXXX
11.通过Chrome浏览器打开控制台f
http://120.92.100.101:3300/console/
会提示输入superServiceId和sampleServiceKey,输入步骤5中产生的任意一组,如果成功,会看到创建的room列表,当前为空。
12.通过Chrome浏览器,使用默认room进行音视频通话
成功后,会看到两个窗口,上面是本地的采集窗口,下面是视频通讯的多窗口
如果没有正常显示,可以通过Chrome浏览器的开发工具查看具体的原因。
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Edward, 谢谢你提供的中文版说明,我们会将你的文档置顶,方便更多的使用者
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Quijiao, 說實在的, Intel CS 的相關資料實在是太少了, 中英文都一樣
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi wu,我根据文档搭建完成后,进入https://IP:3004界面显示“Try a different resolution: ”,Room房间已经见好了,安装过程中并没有错误,请问下这是什么原因了,谢谢!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
相比V4.1版,V4.2.1版移除了nuve模块,我这边配置完后,浏览器相互之间无法推送画面,
webrtc_agent 日志显示如下:
2019-07-29 21:12:03,458 - WARN: LibNiceConnection - id: 70477873774694056, message: failed and not received all candidates, newComponentState:4
2019-07-29 21:12:03,458 - WARN: LibNiceConnection - id: 517711952492342800, message: failed and not received all candidates, newComponentState:4
chrome显示错误:
index.js:96 Uncaught TypeError: Cannot read property 'stop' of undefined
at subscribeDifferentResolution (index.js:96)
at HTMLButtonElement.click (index.js:184)
at HTMLButtonElement.dispatch (jquery-3.2.1.min.js:3)
at HTMLButtonElement.q.handle (jquery-3.2.1.min.js:3)
owt.js:9 ICE connection state changed to checking
owt.js:9 ICE connection state changed to failed
owt.js:9 Uncaught (in promise) Error: ICE connection failed or closed.
at t.value (owt.js:9)
at RTCPeerConnection._pc.oniceconnectionstatechange (owt.js:9)
a @ owt.js:9
r @ owt.js:9
t @ owt.js:9
value @ owt.js:9
_pc.oniceconnectionstatechange @ owt.js:9
owt.js:9 ICE connection state changed to failed
owt.js:9 Uncaught (in promise) Error: ICE connection failed or closed.
at t.value (owt.js:9)
at RTCPeerConnection._pc.oniceconnectionstatechange (owt.js:9)
看起来像是穿透的问题,虽然配置了STUN服务器,但是我这边没使用p2p,也需要穿透服务嘛
请问这是哪里配置错误呢
谢谢
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
没改动任何配置,今早起来可以了。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
很有参考价值的文档,希望多提供一些相关的。谢谢

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page