Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-15 13:41:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
63cec6f967e359e4d5d06dcd0fd2840d45156acd
63cec6f9
1 parent
d911c85a
update readme
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
21 行增加
和
12 行删除
README.md
trunk/conf/srs.conf
README.md
查看文件 @
63cec6f
...
...
@@ -12,7 +12,7 @@ see also: [http://winlinvip.github.io/simple-rtmp-server](http://winlinvip.githu
winlin(winterserver):
[
http://blog.csdn.net/win_lin
](
http://blog.csdn.net/win_lin
)
### Usage
step 1:
build srs
<br/>
<strong>
step 1:
</strong>
build srs
<br/>
<pre>
tar xf simple-rtmp-server-
*.*
.tar.gz
cd simple-rtmp-server-
*.*
/trunk
...
...
@@ -25,23 +25,23 @@ git clone https://github.com/winlinvip/simple-rtmp-server
cd simple-rtmp-server/trunk
./configure --with-ssl --with-hls --with-ffmpeg --with-http
</pre>
step 2:
start srs
<br/>
<strong>
step 2:
</strong>
start srs
<br/>
<pre>
./objs/srs -c conf/srs.conf
</pre>
step 3(optinal):
start srs listen at 19350 to forward to
<br/>
<strong>
step 3(optinal):
</strong>
start srs listen at 19350 to forward to
<br/>
<pre>
./objs/srs -c conf/srs.19350.conf
</pre>
step 4(optional):
start nginx for HLS
<br/>
<strong>
step 4(optinal):
</strong>
start nginx for HLS
<br/>
<pre>
sudo ./objs/nginx/sbin/nginx
</pre>
step 5(optional):
start http hooks for srs callback
<br/>
<strong>
step 5(optinal):
</strong>
start http hooks for srs callback
<br/>
<pre>
python ./research/api-server/server.py 8085
</pre>
step 6:
publish live stream
<br/>
<strong>
step 6:
</strong>
publish live stream
<br/>
<pre>
FMS URL: rtmp://127.0.0.1:1935/live
Stream: livestream
...
...
@@ -53,7 +53,7 @@ For example, use ffmpeg to publish:
sleep 1;
\
done
</pre>
step 7:
add server ip to client hosts as demo.
<br/>
<strong>
step 7:
</strong>
add server ip to client hosts as demo.
<br/>
<pre>
# edit the folowing file:
# linux: /etc/hosts
...
...
@@ -61,13 +61,13 @@ step 7: add server ip to client hosts as demo. <br/>
# where server ip is 192.168.2.111
192.
168.2.111 demo
</pre>
step 8:
play live stream.
<br/>
<strong>
step 8:
</strong>
play live stream.
<br/>
<pre>
rtmp url: rtmp://demo:1935/live/livestream
m3u8 url: http://demo:80/live/livestream.m3u8
for android: http://demo:80/live/livestream.html
</pre>
step 9:
play live stream auto transcoded
<br/>
<strong>
step 9(optinal):
</strong>
play live stream auto transcoded
<br/>
<pre>
rtmp url: rtmp://demo:1935/live/livestream_ld
m3u8 url: http://demo:80/live/livestream_ld.m3u8
...
...
@@ -76,7 +76,7 @@ rtmp url: rtmp://demo:1935/live/livestream_sd
m3u8 url: http://demo:80/live/livestream_sd.m3u8
for android: http://demo:80/live/livestream_sd.html
</pre>
step 10:
play live stream auto forwarded, the hls dir change to /forward
<br/>
<strong>
step 10(optinal):
</strong>
play live stream auto forwarded, the hls dir change to /forward
<br/>
<pre>
rtmp url: rtmp://demo:19350/live/livestream
m3u8 url: http://demo:80/forward/live/livestream.m3u8
...
...
@@ -88,7 +88,7 @@ rtmp url: rtmp://demo:19350/live/livestream_sd
m3u8 url: http://demo:80/forward/live/livestream_sd.m3u8
for android: http://demo:80/forward/live/livestream_sd.html
</pre>
step 11:
modify the config and reload it (all features support reload)
<br/>
<strong>
step 11(optinal):
</strong>
modify the config and reload it (all features support reload)
<br/>
<pre>
killall -1 srs
</pre>
...
...
trunk/conf/srs.conf
查看文件 @
63cec6f
...
...
@@ -28,6 +28,15 @@ vhost __defaultVhost__ {
hls_fragment
5
;
hls_window
30
;
}
http_hooks
{
enabled
off
;
on_connect
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
clients
;
on_close
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
clients
;
on_publish
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
streams
;
on_unpublish
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
streams
;
on_play
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
sessions
;
on_stop
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
sessions
;
}
transcode
{
enabled
on
;
ffmpeg
./
objs
/
ffmpeg
/
bin
/
ffmpeg
;
...
...
@@ -85,7 +94,7 @@ vhost dev {
gop_cache
on
;
#forward 127.0.0.1:19350;
hls
{
enabled
o
n
;
enabled
o
ff
;
hls_path
./
objs
/
nginx
/
html
;
hls_fragment
5
;
hls_window
30
;
...
...
请
注册
或
登录
后发表评论