From 3d073f9ef640279551b6b4b76a7254d984124690 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 7 Apr 2014 14:33:27 +0800 Subject: [PATCH] update demo script, remove ffmpeg publish. use ingest instead --- trunk/conf/demo.conf | 24 ++++++++++++++++++++++++ trunk/scripts/run.sh | 4 ++-- trunk/scripts/stop.sh | 12 ++++++------ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/trunk/conf/demo.conf b/trunk/conf/demo.conf index c9db5a59e..c9b7ddaa7 100644 --- a/trunk/conf/demo.conf +++ b/trunk/conf/demo.conf @@ -112,6 +112,18 @@ vhost demo.srs.com { output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } + ingest { + enable on; + input { + type file; + url ./doc/source.200kbps.768x320.flv; + } + ffmpeg ./objs/ffmpeg/bin/ffmpeg; + engine { + enable off; + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream; + } + } } vhost players { @@ -145,6 +157,18 @@ vhost players { output rtmp://127.0.0.1:[port]/[app]?vhost=players_pub/[stream]; } } + ingest { + enable on; + input { + type file; + url ./doc/source.200kbps.768x320.flv; + } + ffmpeg ./objs/ffmpeg/bin/ffmpeg; + engine { + enable off; + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/demo; + } + } } vhost players_pub { diff --git a/trunk/scripts/run.sh b/trunk/scripts/run.sh index 67cb4e9af..4e23868af 100755 --- a/trunk/scripts/run.sh +++ b/trunk/scripts/run.sh @@ -25,10 +25,10 @@ bash scripts/_step.start.srs.19350.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $r 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 +#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 +#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. ip=`ifconfig|grep "inet"|grep "addr"|grep "Mask"|grep -v "127.0.0.1"|awk 'NR==1 {print $2}'|awk -F ':' '{print $2}'` diff --git a/trunk/scripts/stop.sh b/trunk/scripts/stop.sh index 98c5d45b9..1a99a3109 100755 --- a/trunk/scripts/stop.sh +++ b/trunk/scripts/stop.sh @@ -22,13 +22,13 @@ ps aux|grep python|grep research|grep "api-server" 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 # step 6: publish demo live stream -echo "停止FFMPEG推送demo流(播放器上12路演示)" -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 +#echo "停止FFMPEG推送demo流(播放器上12路演示)" +#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 # step 7: publish players live stream -echo "停止FFMPEG推送players流(播放器上演示用)" -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 +#echo "停止FFMPEG推送players流(播放器上演示用)" +#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 echo "SRS系统服务均已停止"