diff --git a/README.md b/README.md index 2bd46fd90..88d50f5b8 100755 --- a/README.md +++ b/README.md @@ -22,11 +22,15 @@ step 2: start srs
 ./objs/simple_rtmp_server -c conf/srs.conf
 
-step 3(optional): start nginx for HLS
+step 3(optinal): start srs listen at 19350 for forward
+
+./objs/simple_rtmp_server -c conf/srs.19350.conf
+
+step 4(optional): start nginx for HLS
 sudo ./objs/nginx/sbin/nginx
 
-step 4: publish live stream
+step 5: publish live stream
 FMS URL: rtmp://127.0.0.1:1935/live
 Stream:  livestream
@@ -37,18 +41,25 @@ For example, use ffmpeg to publish:
         sleep 1; \
     done
 
-step 5: play live stream
+step 6: play live stream
 rtmp url: rtmp://127.0.0.1:1935/live/livestream
 m3u8 url: http://127.0.0.1:80/live/livestream.m3u8
 
-step 6: play live stream auto transcoded
+step 7: play live stream auto transcoded
 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
 
+step 8: play live stream auto forwarded, the hls dir change to /forward
+
+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
+
### System Requirements Supported operating systems and hardware: diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index f66eec9ca..35647a851 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -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 diff --git a/trunk/conf/srs.19350.conf b/trunk/conf/srs.19350.conf new file mode 100755 index 000000000..d40676478 --- /dev/null +++ b/trunk/conf/srs.19350.conf @@ -0,0 +1,11 @@ +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; +} + diff --git a/trunk/conf/srs.conf b/trunk/conf/srs.conf index 67bc8ef3a..fd394311a 100755 --- a/trunk/conf/srs.conf +++ b/trunk/conf/srs.conf @@ -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 1280; + vwidth 1728; # 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 1024; + vwidth 1382; 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; diff --git a/trunk/doc/source.flv b/trunk/doc/source.flv index 36f1765f7..cc6d00779 100644 Binary files a/trunk/doc/source.flv and b/trunk/doc/source.flv differ