mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
update readme
This commit is contained in:
parent
b5adb8c9f9
commit
aadff96e14
1 changed files with 14 additions and 9 deletions
23
README.md
23
README.md
|
@ -45,18 +45,23 @@ sudo ./objs/nginx/sbin/nginx
|
||||||
<pre>
|
<pre>
|
||||||
python ./research/api-server/server.py 8085
|
python ./research/api-server/server.py 8085
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 6:</strong> publish live stream <br/>
|
<strong>step 6:</strong> publish demo live stream <br/>
|
||||||
<pre>
|
<pre>
|
||||||
FMS URL: rtmp://127.0.0.1/live
|
FMS URL: rtmp://127.0.0.1/live?vhost=demo.srs.com
|
||||||
Stream: livestream
|
Stream: livestream
|
||||||
For example, use ffmpeg to publish:
|
FFMPEG to publish the default demo stream:
|
||||||
for((;;)); do \
|
for((;;)); do \
|
||||||
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
|
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
|
||||||
-vcodec copy -acodec copy \
|
-vcodec copy -acodec copy \
|
||||||
-f flv -y rtmp://127.0.0.1/live?vhost=demo.srs.com/livestream; \
|
-f flv -y rtmp://127.0.0.1/live?vhost=demo.srs.com/livestream; \
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
done
|
done
|
||||||
publish the demo stream for players:
|
</pre>
|
||||||
|
<strong>step 7:</strong> publish players live stream <br/>
|
||||||
|
<pre>
|
||||||
|
FMS URL: rtmp://127.0.0.1/live?vhost=players
|
||||||
|
Stream: livestream
|
||||||
|
FFMPEG to publish the players demo stream:
|
||||||
for((;;)); do \
|
for((;;)); do \
|
||||||
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
|
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
|
||||||
-vcodec copy -acodec copy \
|
-vcodec copy -acodec copy \
|
||||||
|
@ -64,7 +69,7 @@ publish the demo stream for players:
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
done
|
done
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 7:</strong> add server ip to client hosts as demo. <br/>
|
<strong>step 8:</strong> add server ip to client hosts as demo. <br/>
|
||||||
<pre>
|
<pre>
|
||||||
# edit the folowing file:
|
# edit the folowing file:
|
||||||
# linux: /etc/hosts
|
# linux: /etc/hosts
|
||||||
|
@ -72,14 +77,14 @@ publish the demo stream for players:
|
||||||
# where server ip is 192.168.2.111
|
# where server ip is 192.168.2.111
|
||||||
192.168.2.111 demo.srs.com
|
192.168.2.111 demo.srs.com
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 8:</strong> play live stream. <br/>
|
<strong>step 9:</strong> play live stream. <br/>
|
||||||
<pre>
|
<pre>
|
||||||
players: http://demo.srs.com/players
|
players: http://demo.srs.com/players
|
||||||
rtmp url: rtmp://demo.srs.com/live/livestream
|
rtmp url: rtmp://demo.srs.com/live/livestream
|
||||||
m3u8 url: http://demo.srs.com/live/livestream.m3u8
|
m3u8 url: http://demo.srs.com/live/livestream.m3u8
|
||||||
for android: http://demo.srs.com/live/livestream.html
|
for android: http://demo.srs.com/live/livestream.html
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 9(optinal):</strong> play live stream auto transcoded<br/>
|
<strong>step 10(optinal):</strong> play live stream auto transcoded<br/>
|
||||||
<pre>
|
<pre>
|
||||||
rtmp url: rtmp://demo.srs.com/live/livestream_ld
|
rtmp url: rtmp://demo.srs.com/live/livestream_ld
|
||||||
m3u8 url: http://demo.srs.com/live/livestream_ld.m3u8
|
m3u8 url: http://demo.srs.com/live/livestream_ld.m3u8
|
||||||
|
@ -88,7 +93,7 @@ rtmp url: rtmp://demo.srs.com/live/livestream_sd
|
||||||
m3u8 url: http://demo.srs.com/live/livestream_sd.m3u8
|
m3u8 url: http://demo.srs.com/live/livestream_sd.m3u8
|
||||||
for android: http://demo.srs.com/live/livestream_sd.html
|
for android: http://demo.srs.com/live/livestream_sd.html
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 10(optinal):</strong> play live stream auto forwarded, the hls dir change to /forward<br/>
|
<strong>step 11(optinal):</strong> play live stream auto forwarded, the hls dir change to /forward<br/>
|
||||||
<pre>
|
<pre>
|
||||||
rtmp url: rtmp://demo.srs.com:19350/live/livestream
|
rtmp url: rtmp://demo.srs.com:19350/live/livestream
|
||||||
m3u8 url: http://demo.srs.com/forward/live/livestream.m3u8
|
m3u8 url: http://demo.srs.com/forward/live/livestream.m3u8
|
||||||
|
@ -100,7 +105,7 @@ rtmp url: rtmp://demo.srs.com:19350/live/livestream_sd
|
||||||
m3u8 url: http://demo.srs.com/forward/live/livestream_sd.m3u8
|
m3u8 url: http://demo.srs.com/forward/live/livestream_sd.m3u8
|
||||||
for android: http://demo.srs.com/forward/live/livestream_sd.html
|
for android: http://demo.srs.com/forward/live/livestream_sd.html
|
||||||
</pre>
|
</pre>
|
||||||
<strong>step 11(optinal):</strong> modify the config and reload it (all features support reload)<br/>
|
<strong>step 12(optinal):</strong> modify the config and reload it (all features support reload)<br/>
|
||||||
<pre>
|
<pre>
|
||||||
killall -1 srs
|
killall -1 srs
|
||||||
</pre>
|
</pre>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue