Clone
6
v2_CN_SampleDemo
winlin edited this page 2022-01-06 11:57:15 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

HOME > CN > Demo

Demo的部署

SRS的DEMO的部署提供网页演示播放/推送RTMP到SRS播放HLS转码视频会议等。

注意强烈建议初学者不要动demo只要看demo就好建议学完Usage的每个单独的使用然后再动demo。

假设服务器的IP是192.168.1.170

第一步设置客户端hosts注意是客户端需要将demo.srs.com这个域名/vhost解析到服务器

# edit the folowing file:
# linux: /etc/hosts
# windows: C:\Windows\System32\drivers\etc\hosts
# where server ip is 192.168.1.170
192.168.1.170 demo.srs.com

第二步获取SRS。详细参考GIT获取代码

git clone https://github.com/ossrs/srs
cd srs/trunk

或者使用git更新已有代码

git pull

第三步编译SRS。详细参考Build

bash scripts/build.sh

第三步启动SRS的DEMO启动ffmpeg/api-server/srs等。

bash scripts/run.sh

访问SRS的DEMOhttp://demo.srs.com:8085

第四步停止SRS的DEMO停止ffmpeg/api-server/srs等。

bash scripts/stop.sh

备注DEMO的所有链接都是可以点的所有功能都是可用的。

备注请将所有实例的IP地址192.168.1.170都换成部署的服务器IP地址。

备注DEMO不依赖nginx使用cherrypy做演示网站以及分发HLS依赖FFMPEG需要演示转码。

Winlin 2014.3