update demo script, remove ffmpeg publish. use ingest instead
正在显示
3 个修改的文件
包含
32 行增加
和
8 行删除
| @@ -112,6 +112,18 @@ vhost demo.srs.com { | @@ -112,6 +112,18 @@ vhost demo.srs.com { | ||
| 112 | output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; | 112 | output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; |
| 113 | } | 113 | } |
| 114 | } | 114 | } |
| 115 | + ingest { | ||
| 116 | + enable on; | ||
| 117 | + input { | ||
| 118 | + type file; | ||
| 119 | + url ./doc/source.200kbps.768x320.flv; | ||
| 120 | + } | ||
| 121 | + ffmpeg ./objs/ffmpeg/bin/ffmpeg; | ||
| 122 | + engine { | ||
| 123 | + enable off; | ||
| 124 | + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream; | ||
| 125 | + } | ||
| 126 | + } | ||
| 115 | } | 127 | } |
| 116 | 128 | ||
| 117 | vhost players { | 129 | vhost players { |
| @@ -145,6 +157,18 @@ vhost players { | @@ -145,6 +157,18 @@ vhost players { | ||
| 145 | output rtmp://127.0.0.1:[port]/[app]?vhost=players_pub/[stream]; | 157 | output rtmp://127.0.0.1:[port]/[app]?vhost=players_pub/[stream]; |
| 146 | } | 158 | } |
| 147 | } | 159 | } |
| 160 | + ingest { | ||
| 161 | + enable on; | ||
| 162 | + input { | ||
| 163 | + type file; | ||
| 164 | + url ./doc/source.200kbps.768x320.flv; | ||
| 165 | + } | ||
| 166 | + ffmpeg ./objs/ffmpeg/bin/ffmpeg; | ||
| 167 | + engine { | ||
| 168 | + enable off; | ||
| 169 | + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/demo; | ||
| 170 | + } | ||
| 171 | + } | ||
| 148 | } | 172 | } |
| 149 | 173 | ||
| 150 | vhost players_pub { | 174 | vhost players_pub { |
| @@ -25,10 +25,10 @@ bash scripts/_step.start.srs.19350.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $r | @@ -25,10 +25,10 @@ bash scripts/_step.start.srs.19350.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $r | ||
| 25 | bash scripts/_step.start.api.server.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi | 25 | bash scripts/_step.start.api.server.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi |
| 26 | 26 | ||
| 27 | # step 6: publish demo live stream | 27 | # step 6: publish demo live stream |
| 28 | -bash scripts/_step.start.ffmpeg.demo.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi | 28 | +#bash scripts/_step.start.ffmpeg.demo.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi |
| 29 | 29 | ||
| 30 | # step 7: publish players live stream | 30 | # step 7: publish players live stream |
| 31 | -bash scripts/_step.start.ffmpeg.players.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi | 31 | +#bash scripts/_step.start.ffmpeg.players.sh; ret=$?; if [[ 0 -ne $ret ]]; then exit $ret; fi |
| 32 | 32 | ||
| 33 | # step 8: add server ip to client hosts as demo. | 33 | # step 8: add server ip to client hosts as demo. |
| 34 | ip=`ifconfig|grep "inet"|grep "addr"|grep "Mask"|grep -v "127.0.0.1"|awk 'NR==1 {print $2}'|awk -F ':' '{print $2}'` | 34 | ip=`ifconfig|grep "inet"|grep "addr"|grep "Mask"|grep -v "127.0.0.1"|awk 'NR==1 {print $2}'|awk -F ':' '{print $2}'` |
| @@ -22,13 +22,13 @@ ps aux|grep python|grep research|grep "api-server" | @@ -22,13 +22,13 @@ ps aux|grep python|grep research|grep "api-server" | ||
| 22 | 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 | 22 | 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 |
| 23 | 23 | ||
| 24 | # step 6: publish demo live stream | 24 | # step 6: publish demo live stream |
| 25 | -echo "停止FFMPEG推送demo流(播放器上12路演示)" | ||
| 26 | -ps aux|grep scripts|grep "ffmpeg.demo.sh" | ||
| 27 | -pids=`ps aux|grep scripts|grep "/_ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done | 25 | +#echo "停止FFMPEG推送demo流(播放器上12路演示)" |
| 26 | +#ps aux|grep scripts|grep "ffmpeg.demo.sh" | ||
| 27 | +#pids=`ps aux|grep scripts|grep "/_ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done | ||
| 28 | 28 | ||
| 29 | # step 7: publish players live stream | 29 | # step 7: publish players live stream |
| 30 | -echo "停止FFMPEG推送players流(播放器上演示用)" | ||
| 31 | -ps aux|grep scripts|grep "ffmpeg.players.sh" | ||
| 32 | -pids=`ps aux|grep scripts|grep "/_ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done | 30 | +#echo "停止FFMPEG推送players流(播放器上演示用)" |
| 31 | +#ps aux|grep scripts|grep "ffmpeg.players.sh" | ||
| 32 | +#pids=`ps aux|grep scripts|grep "/_ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done | ||
| 33 | 33 | ||
| 34 | echo "SRS系统服务均已停止" | 34 | echo "SRS系统服务均已停止" |
-
请 注册 或 登录 后发表评论