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-01 12:16:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5502344e852b2bc9864342e00104c947b4dc6aad
5502344e
1 parent
5cc1ad6d
add forward sample
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
47 行增加
和
22 行删除
README.md
trunk/auto/depends.sh
trunk/conf/srs.19350.conf
trunk/conf/srs.conf
trunk/doc/source.flv
README.md
查看文件 @
5502344
...
...
@@ -22,11 +22,15 @@ step 2: start srs <br/>
<pre>
./objs/simple_rtmp_server -c conf/srs.conf
</pre>
step 3(optional): start nginx for HLS
<br/>
step 3(optinal): start srs listen at 19350 for forward
<br/>
<pre>
./objs/simple_rtmp_server -c conf/srs.19350.conf
</pre>
step 4(optional): start nginx for HLS
<br/>
<pre>
sudo ./objs/nginx/sbin/nginx
</pre>
step
4
: publish live stream
<br/>
step
5
: publish live stream
<br/>
<pre>
FMS URL: rtmp://127.0.0.1:1935/live
Stream: livestream
...
...
@@ -37,18 +41,25 @@ For example, use ffmpeg to publish:
sleep 1;
\
done
</pre>
step
5
: play live stream
<br/>
step
6
: play live stream
<br/>
<pre>
rtmp url: rtmp://127.0.0.1:1935/live/livestream
m3u8 url: http://127.0.0.1:80/live/livestream.m3u8
</pre>
step
6
: play live stream auto transcoded
<br/>
step
7
: play live stream auto transcoded
<br/>
<pre>
rtmp url: rtmp://127.0.0.1:1935/live/livestream_ld
m3u8 url: http://127.0.0.1:80/live/livestream_ld.m3u8
rtmp url: rtmp://127.0.0.1:1935/live/livestream_sd
m3u8 url: http://127.0.0.1:80/live/livestream_sd.m3u8
</pre>
step 8: play live stream auto forwarded, the hls dir change to /forward
<br/>
<pre>
rtmp url: rtmp://127.0.0.1:19350/live/livestream_ld
m3u8 url: http://127.0.0.1:80/forward/live/livestream_ld.m3u8
rtmp url: rtmp://127.0.0.1:19350/live/livestream_sd
m3u8 url: http://127.0.0.1:80/forward/live/livestream_sd.m3u8
</pre>
### System Requirements
Supported operating systems and hardware:
...
...
trunk/auto/depends.sh
查看文件 @
5502344
...
...
@@ -67,6 +67,9 @@ if [ $SRS_HLS = YES ]; then
# nginx default use nobody, so cannot read the ts/m3u8 created by srs.
cp
${
SRS_OBJS
}
/nginx/conf/nginx.conf
${
SRS_OBJS
}
/nginx/conf/nginx.conf.bk
sed -i
"s/^.user nobody;/user
`
whoami
`
;/g"
${
SRS_OBJS
}
/nginx/conf/nginx.conf
# create forward dir
mkdir -p
${
SRS_OBJS
}
/nginx/html/forward
fi
if
[
$SRS_HLS
=
YES
]
;
then
...
...
trunk/conf/srs.19350.conf
0 → 100755
查看文件 @
5502344
listen
19350
;
chunk_size
65000
;
vhost
__
defaultVhost__
{
enabled
on
;
gop_cache
on
;
hls
on
;
hls_path
./
objs
/
nginx
/
html
/
forward
;
hls_fragment
5
;
hls_window
30
;
}
...
...
trunk/conf/srs.conf
查看文件 @
5502344
...
...
@@ -15,7 +15,7 @@ vhost __defaultVhost__ {
hls_path
./
objs
/
nginx
/
html
;
hls_fragment
5
;
hls_window
30
;
#forward 127.0.0.1:1936
;
forward
127
.
0
.
0
.
1
:
19350
;
transcode
{
enabled
on
;
ffmpeg
./
objs
/
ffmpeg
/
bin
/
ffmpeg
;
...
...
@@ -28,8 +28,8 @@ vhost __defaultVhost__ {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
768
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
1
;
vprofile
baseline
;
vpreset
superfast
;
...
...
@@ -51,8 +51,8 @@ vhost __defaultVhost__ {
vcodec
libx264
;
vbitrate
500
;
vfps
20
;
vwidth
768
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
1
;
vprofile
main
;
vpreset
fast
;
...
...
@@ -81,8 +81,8 @@ vhost mirror.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
2
;
vprofile
baseline
;
vpreset
superfast
;
...
...
@@ -111,8 +111,8 @@ vhost drawtext.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
2
;
vprofile
baseline
;
vpreset
superfast
;
...
...
@@ -141,8 +141,8 @@ vhost crop.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
2
;
vprofile
baseline
;
vpreset
superfast
;
...
...
@@ -171,8 +171,8 @@ vhost logo.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vheight
320
;
vwidth
1152
;
vheight
480
;
vthreads
2
;
vprofile
baseline
;
vpreset
superfast
;
...
...
@@ -220,7 +220,7 @@ vhost all.transcode.vhost.com {
# video framerate.
vfps
25
;
# video width, must be even numbers.
vwidth
1
280
;
vwidth
1
728
;
# video height, must be even numbers.
vheight
720
;
# the max threads for ffmpeg to used.
...
...
@@ -268,7 +268,7 @@ vhost all.transcode.vhost.com {
vcodec
libx264
;
vbitrate
1200
;
vfps
25
;
vwidth
1
024
;
vwidth
1
382
;
vheight
576
;
vthreads
6
;
vprofile
main
;
...
...
@@ -288,7 +288,7 @@ vhost all.transcode.vhost.com {
vcodec
libx264
;
vbitrate
800
;
vfps
25
;
vwidth
720
;
vwidth
1152
;
vheight
480
;
vthreads
4
;
vprofile
main
;
...
...
@@ -308,7 +308,7 @@ vhost all.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vwidth
768
;
vheight
320
;
vthreads
2
;
vprofile
baseline
;
...
...
@@ -335,7 +335,7 @@ vhost ffempty.transcode.vhost.com {
vcodec
libx264
;
vbitrate
300
;
vfps
20
;
vwidth
480
;
vwidth
768
;
vheight
320
;
vthreads
2
;
vprofile
baseline
;
...
...
trunk/doc/source.flv
查看文件 @
5502344
This file is too large to display.
请
注册
或
登录
后发表评论