mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add sample video
This commit is contained in:
parent
a7c83b1aee
commit
1da09e5ffb
3 changed files with 20 additions and 17 deletions
11
README.md
11
README.md
|
@ -31,8 +31,11 @@ step 4: publish live stream <br/>
|
||||||
FMS URL: rtmp://127.0.0.1:1935/live
|
FMS URL: rtmp://127.0.0.1:1935/live
|
||||||
Stream: livestream
|
Stream: livestream
|
||||||
For example, use ffmpeg to publish:
|
For example, use ffmpeg to publish:
|
||||||
ffmpeg -re -i source.flv -vcodec copy -acodec copy \
|
for((;;)); do \
|
||||||
-f flv -y rtmp://127.0.0.1:1935/live/livestream
|
./objs/ffmpeg/bin/ffmpeg -re -i doc/source.flv -vcodec copy -acodec copy \
|
||||||
|
-f flv -y rtmp://127.0.0.1:1935/live/livestream; \
|
||||||
|
sleep 1; \
|
||||||
|
done
|
||||||
</pre>
|
</pre>
|
||||||
step 5: play live stream <br/>
|
step 5: play live stream <br/>
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -41,8 +44,8 @@ m3u8 url: http://127.0.0.1:80/live/livestream.m3u8
|
||||||
</pre>
|
</pre>
|
||||||
step 6: play live stream auto transcoded<br/>
|
step 6: play live stream auto transcoded<br/>
|
||||||
<pre>
|
<pre>
|
||||||
rtmp url: rtmp://127.0.0.1:1935/live/livestream_fast
|
rtmp url: rtmp://127.0.0.1:1935/live/livestream_ld
|
||||||
m3u8 url: http://127.0.0.1:80/live/livestream_fast.m3u8
|
m3u8 url: http://127.0.0.1:80/live/livestream_ld.m3u8
|
||||||
rtmp url: rtmp://127.0.0.1:1935/live/livestream_sd
|
rtmp url: rtmp://127.0.0.1:1935/live/livestream_sd
|
||||||
m3u8 url: http://127.0.0.1:80/live/livestream_sd.m3u8
|
m3u8 url: http://127.0.0.1:80/live/livestream_sd.m3u8
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -20,7 +20,7 @@ vhost __defaultVhost__ {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
#ffmpeg ./research/ffempty/ffempty;
|
#ffmpeg ./research/ffempty/ffempty;
|
||||||
engine fast{
|
engine ld{
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
#vf 'drawtext=text=SRS';
|
#vf 'drawtext=text=SRS';
|
||||||
|
@ -31,7 +31,7 @@ vhost __defaultVhost__ {
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 300;
|
vbitrate 300;
|
||||||
vfps 20;
|
vfps 20;
|
||||||
vwidth 480;
|
vwidth 768;
|
||||||
vheight 320;
|
vheight 320;
|
||||||
vthreads 1;
|
vthreads 1;
|
||||||
vprofile baseline;
|
vprofile baseline;
|
||||||
|
@ -45,7 +45,7 @@ vhost __defaultVhost__ {
|
||||||
aparams {
|
aparams {
|
||||||
profile:a aac_low;
|
profile:a aac_low;
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_fast;
|
output rtmp://[vhost]:[port]/[app]/[stream]_ld;
|
||||||
}
|
}
|
||||||
engine sd{
|
engine sd{
|
||||||
enabled on;
|
enabled on;
|
||||||
|
@ -55,8 +55,8 @@ vhost __defaultVhost__ {
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 500;
|
vbitrate 500;
|
||||||
vfps 20;
|
vfps 20;
|
||||||
vwidth 720;
|
vwidth 768;
|
||||||
vheight 480;
|
vheight 320;
|
||||||
vthreads 1;
|
vthreads 1;
|
||||||
vprofile main;
|
vprofile main;
|
||||||
vpreset fast;
|
vpreset fast;
|
||||||
|
@ -85,7 +85,7 @@ vhost all.transcode.vhost.com {
|
||||||
# the transcode engine for matched stream.
|
# the transcode engine for matched stream.
|
||||||
# all matched stream will transcoded to the following stream.
|
# all matched stream will transcoded to the following stream.
|
||||||
# the transcode set name(ie. hd) is optional and not used.
|
# the transcode set name(ie. hd) is optional and not used.
|
||||||
engine super{
|
engine ffsuper{
|
||||||
# whether the engine is enabled
|
# whether the engine is enabled
|
||||||
# default: off.
|
# default: off.
|
||||||
enabled on;
|
enabled on;
|
||||||
|
@ -143,9 +143,9 @@ vhost all.transcode.vhost.com {
|
||||||
# [port] the intput stream port.
|
# [port] the intput stream port.
|
||||||
# [app] the input stream app.
|
# [app] the input stream app.
|
||||||
# [stream] the input stream name.
|
# [stream] the input stream name.
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_super;
|
output rtmp://[vhost]:[port]/[app]/[stream]_ffsuper;
|
||||||
}
|
}
|
||||||
engine hd{
|
engine ffhd{
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 1200;
|
vbitrate 1200;
|
||||||
|
@ -163,9 +163,9 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_hd;
|
output rtmp://[vhost]:[port]/[app]/[stream]_ffhd;
|
||||||
}
|
}
|
||||||
engine sd{
|
engine ffsd{
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 800;
|
vbitrate 800;
|
||||||
|
@ -183,9 +183,9 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_sd;
|
output rtmp://[vhost]:[port]/[app]/[stream]_ffsd;
|
||||||
}
|
}
|
||||||
engine fast{
|
engine fffast{
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 300;
|
vbitrate 300;
|
||||||
|
@ -203,7 +203,7 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_fast;
|
output rtmp://[vhost]:[port]/[app]/[stream]_fffast;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
trunk/doc/source.flv
Normal file
BIN
trunk/doc/source.flv
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue