mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the script, add build/run/stop
This commit is contained in:
parent
1783e1f764
commit
2cefe1a9bb
15 changed files with 148 additions and 106 deletions
10
README.md
10
README.md
|
@ -16,14 +16,18 @@ who is the contributors: <br/>
|
||||||
2. the name of all contributors will send in the response of NetConnection.connect and metadata.
|
2. the name of all contributors will send in the response of NetConnection.connect and metadata.
|
||||||
|
|
||||||
### Usage(simple)
|
### Usage(simple)
|
||||||
<strong>step 0:</strong> get srs<br/>
|
<strong>step -1:</strong> get srs<br/>
|
||||||
<pre>
|
<pre>
|
||||||
git clone https://github.com/winlinvip/simple-rtmp-server &&
|
git clone https://github.com/winlinvip/simple-rtmp-server &&
|
||||||
cd simple-rtmp-server/trunk
|
cd simple-rtmp-server/trunk
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 1:</strong> build and start srs all demo features.<br/>
|
<strong>step 0:</strong> build srs system.<br/>
|
||||||
<pre>
|
<pre>
|
||||||
bash scripts/demo.sh
|
bash scripts/build.sh
|
||||||
|
</pre>
|
||||||
|
<strong>step 1:</strong> start srs all demo features.<br/>
|
||||||
|
<pre>
|
||||||
|
bash scripts/run.sh
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 2:</strong> srs live show: [http://demo.srs.com/players](http://demo.srs.com/players) <br/>
|
<strong>step 2:</strong> srs live show: [http://demo.srs.com/players](http://demo.srs.com/players) <br/>
|
||||||
requires client add server ip to hosts. <br/>
|
requires client add server ip to hosts. <br/>
|
||||||
|
|
10
trunk/scripts/_step.build.sh
Executable file
10
trunk/scripts/_step.build.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
echo "编译SRS"
|
||||||
|
./configure --with-ssl --with-hls --with-ffmpeg --with-http && make
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "编译SRS成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.api.server.sh
Executable file
12
trunk/scripts/_step.start.api.server.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &"
|
||||||
|
echo "启动API服务器:$cmd"
|
||||||
|
pids=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动API服务器失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动API服务器成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.ffmpeg.demo.sh
Executable file
12
trunk/scripts/_step.start.ffmpeg.demo.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="nohup bash ./scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &"
|
||||||
|
echo "启动FFMPEG推送demo流(播放器上12路演示):$cmd"
|
||||||
|
pids=`ps aux|grep scripts|grep "/ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
nohup bash ./scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送demo流(播放器上12路演示)失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动FFMPEG推送demo流(播放器上12路演示)成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.ffmpeg.players.sh
Executable file
12
trunk/scripts/_step.start.ffmpeg.players.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &"
|
||||||
|
echo "启动FFMPEG推送players流(播放器上演示用):$cmd"
|
||||||
|
pids=`ps aux|grep scripts|grep "/ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送players流(播放器上演示用)失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动FFMPEG推送players流(播放器上演示用)成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.nginx.sh
Executable file
12
trunk/scripts/_step.start.nginx.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="sudo ./objs/nginx/sbin/nginx"
|
||||||
|
echo "启动NGINX(HLS服务):$cmd"
|
||||||
|
pids=`ps aux|grep nginx|grep process|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGKILL $pid; done
|
||||||
|
sudo ./objs/nginx/sbin/nginx
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动NGINX(HLS服务)失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动NGINX(HLS服务)成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.srs.19350.sh
Executable file
12
trunk/scripts/_step.start.srs.19350.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &"
|
||||||
|
echo "启动SRS转发服务器:$cmd"
|
||||||
|
pids=`ps aux|grep srs|grep "./objs"|grep "srs.19350.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS转发服务器失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动SRS转发服务器成功"
|
||||||
|
exit 0
|
12
trunk/scripts/_step.start.srs.sh
Executable file
12
trunk/scripts/_step.start.srs.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
cmd="nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &"
|
||||||
|
echo "启动SRS服务器:$cmd"
|
||||||
|
pids=`ps aux|grep srs|grep "./objs"|grep "srs.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS失败"; exit $ret; fi
|
||||||
|
|
||||||
|
echo "启动SRS服务器成功"
|
||||||
|
exit 0
|
8
trunk/scripts/build.sh
Executable file
8
trunk/scripts/build.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
# step 1: build srs
|
||||||
|
bash scripts/_step.build.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
echo "编译SRS成功"
|
|
@ -1,64 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
src_dir='src'
|
|
||||||
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
|
||||||
|
|
||||||
# step 1: build srs
|
|
||||||
echo "编译SRS"
|
|
||||||
./configure --with-ssl --with-hls --with-ffmpeg --with-http && make
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 2: start srs
|
|
||||||
cmd="nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &"
|
|
||||||
echo "启动SRS服务器:$cmd"
|
|
||||||
pids=`ps aux|grep srs|grep "./objs"|grep "srs.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 3(optinal): start srs listen at 19350 to forward to
|
|
||||||
cmd="nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &"
|
|
||||||
echo "启动SRS转发服务器:$cmd"
|
|
||||||
pids=`ps aux|grep srs|grep "./objs"|grep "srs.19350.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS转发服务器失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 4(optinal): start nginx for HLS
|
|
||||||
cmd="sudo ./objs/nginx/sbin/nginx"
|
|
||||||
echo "启动NGINX(HLS服务):$cmd"
|
|
||||||
pids=`ps aux|grep nginx|grep process|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGKILL $pid; done
|
|
||||||
sudo ./objs/nginx/sbin/nginx
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动NGINX(HLS服务)失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 5(optinal): start http hooks for srs callback
|
|
||||||
cmd="nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &"
|
|
||||||
echo "启动API服务器:$cmd"
|
|
||||||
pids=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动API服务器失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 6: publish demo live stream
|
|
||||||
cmd="nohup bash scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &"
|
|
||||||
echo "启动FFMPEG推送demo流(播放器上12路演示):$cmd"
|
|
||||||
pids=`ps aux|grep scripts|grep "ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup bash scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送demo流(播放器上12路演示)失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 7: publish players live stream
|
|
||||||
cmd="nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &"
|
|
||||||
echo "启动FFMPEG推送players流(播放器上演示用):$cmd"
|
|
||||||
pids=`ps aux|grep scripts|grep "ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送players流(播放器上演示用)失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 8: add server ip to client hosts as demo.
|
|
||||||
cat<<END
|
|
||||||
SRS系统启动成功,您需要在客户端机器设置hosts后即可观看演示:
|
|
||||||
# edit the folowing file:
|
|
||||||
# linux: /etc/hosts
|
|
||||||
# windows: C:\Windows\System32\drivers\etc\hosts
|
|
||||||
# where server ip is 192.168.2.111
|
|
||||||
192.168.2.111 demo.srs.com
|
|
||||||
默认的12路流演示:http://demo.srs.com/players
|
|
||||||
默认的播放器流演示:http://demo.srs.com/players/srs_player.html?vhost=players
|
|
||||||
推流(主播)应用演示:http://demo.srs.com/players/srs_publisher.html?vhost=players
|
|
||||||
视频会议(聊天室)应用演示:http://demo.srs.com/players/srs_chat.html?vhost=players
|
|
||||||
END
|
|
|
@ -3,51 +3,25 @@ src_dir='src'
|
||||||
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
# step 1: build srs
|
# step 1: build srs
|
||||||
echo "编译SRS"
|
#bash scripts/_step.build.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
./configure --with-ssl --with-hls --with-ffmpeg --with-http && make
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 2: start srs
|
# step 2: start srs
|
||||||
cmd="nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &"
|
bash scripts/_step.start.srs.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
echo "启动SRS服务器:$cmd"
|
|
||||||
pids=`ps aux|grep srs|grep "./objs"|grep "srs.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup ./objs/srs -c conf/srs.conf >./objs/logs/srs.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS失败"; exit $ret; fi
|
|
||||||
|
|
||||||
## step 3(optinal): start srs listen at 19350 to forward to
|
# step 3(optinal): start srs listen at 19350 to forward to
|
||||||
#cmd="nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &"
|
#bash scripts/_step.start.srs.19350.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
#echo "启动SRS转发服务器:$cmd"
|
|
||||||
#pids=`ps aux|grep srs|grep "./objs"|grep "srs.19350.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
#nohup ./objs/srs -c conf/srs.19350.conf > ./objs/logs/srs.19350.log 2>&1 &
|
|
||||||
#ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS转发服务器失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 4(optinal): start nginx for HLS
|
# step 4(optinal): start nginx for HLS
|
||||||
cmd="sudo ./objs/nginx/sbin/nginx"
|
bash scripts/_step.start.nginx.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
echo "启动NGINX(HLS服务):$cmd"
|
|
||||||
pids=`ps aux|grep nginx|grep process|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGKILL $pid; done
|
|
||||||
sudo ./objs/nginx/sbin/nginx
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动NGINX(HLS服务)失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 5(optinal): start http hooks for srs callback
|
# step 5(optinal): start http hooks for srs callback
|
||||||
cmd="nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &"
|
bash scripts/_step.start.api.server.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
echo "启动API服务器:$cmd"
|
|
||||||
pids=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
nohup python ./research/api-server/server.py 8085 >./objs/logs/api-server.log 2>&1 &
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动API服务器失败"; exit $ret; fi
|
|
||||||
|
|
||||||
## step 6: publish demo live stream
|
# step 6: publish demo live stream
|
||||||
#cmd="nohup bash scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &"
|
#bash scripts/_step.start.ffmpeg.demo.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
#echo "启动FFMPEG推送demo流(播放器上12路演示):$cmd"
|
|
||||||
#pids=`ps aux|grep scripts|grep "ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
# step 7: publish players live stream
|
||||||
#nohup bash scripts/ffmpeg.demo.sh >./objs/logs/ffmpeg-demo.log 2>&1 &
|
#bash scripts/_step.start.ffmpeg.players.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
#ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送demo流(播放器上12路演示)失败"; exit $ret; fi
|
|
||||||
##
|
|
||||||
## step 7: publish players live stream
|
|
||||||
#cmd="nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &"
|
|
||||||
#echo "启动FFMPEG推送players流(播放器上演示用):$cmd"
|
|
||||||
#pids=`ps aux|grep scripts|grep "ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
|
||||||
#nohup bash scripts/ffmpeg.players.sh >./objs/logs/ffmpeg-players.log 2>&1 &
|
|
||||||
#ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动FFMPEG推送players流(播放器上演示用)失败"; exit $ret; fi
|
|
||||||
|
|
||||||
# step 8: add server ip to client hosts as demo.
|
# step 8: add server ip to client hosts as demo.
|
||||||
cat<<END
|
cat<<END
|
||||||
|
|
38
trunk/scripts/run.sh
Executable file
38
trunk/scripts/run.sh
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
src_dir='src'
|
||||||
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
|
# step 1: build srs
|
||||||
|
#bash scripts/_step.build.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 2: start srs
|
||||||
|
bash scripts/_step.start.srs.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 3(optinal): start srs listen at 19350 to forward to
|
||||||
|
bash scripts/_step.start.srs.19350.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 4(optinal): start nginx for HLS
|
||||||
|
bash scripts/_step.start.nginx.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 5(optinal): start http hooks for srs callback
|
||||||
|
bash scripts/_step.start.api.server.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 6: publish demo live stream
|
||||||
|
bash scripts/_step.start.ffmpeg.demo.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 7: publish players live stream
|
||||||
|
bash scripts/_step.start.ffmpeg.players.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# step 8: add server ip to client hosts as demo.
|
||||||
|
cat<<END
|
||||||
|
SRS系统启动成功,您需要在客户端机器设置hosts后即可观看演示:
|
||||||
|
# edit the folowing file:
|
||||||
|
# linux: /etc/hosts
|
||||||
|
# windows: C:\Windows\System32\drivers\etc\hosts
|
||||||
|
# where server ip is 192.168.2.111
|
||||||
|
192.168.2.111 demo.srs.com
|
||||||
|
默认的12路流演示:http://demo.srs.com/players
|
||||||
|
默认的播放器流演示:http://demo.srs.com/players/srs_player.html?vhost=players
|
||||||
|
推流(主播)应用演示:http://demo.srs.com/players/srs_publisher.html?vhost=players
|
||||||
|
视频会议(聊天室)应用演示:http://demo.srs.com/players/srs_chat.html?vhost=players
|
||||||
|
END
|
|
@ -21,11 +21,11 @@ pids=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'`; for
|
||||||
# step 6: publish demo live stream
|
# step 6: publish demo live stream
|
||||||
echo "停止FFMPEG推送demo流(播放器上12路演示)"
|
echo "停止FFMPEG推送demo流(播放器上12路演示)"
|
||||||
ps aux|grep scripts|grep "ffmpeg.demo.sh"
|
ps aux|grep scripts|grep "ffmpeg.demo.sh"
|
||||||
pids=`ps aux|grep scripts|grep "ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
pids=`ps aux|grep scripts|grep "/ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
|
||||||
# step 7: publish players live stream
|
# step 7: publish players live stream
|
||||||
echo "停止FFMPEG推送players流(播放器上演示用)"
|
echo "停止FFMPEG推送players流(播放器上演示用)"
|
||||||
ps aux|grep scripts|grep "ffmpeg.players.sh"
|
ps aux|grep scripts|grep "ffmpeg.players.sh"
|
||||||
pids=`ps aux|grep scripts|grep "ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
pids=`ps aux|grep scripts|grep "/ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
|
||||||
|
|
||||||
echo "SRS系统服务均已停止"
|
echo "SRS系统服务均已停止"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue