diff --git a/README.md b/README.md index 6f67e4d69..4a93dc5ec 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ simple-rtmp-server srs(simple rtmp origin live server) over state-threads.
srs is a simple, high-performance, running in single process, origin live server.
-srs supports rtmp, HLS, transcoding, forward, http hooks.
+srs supports vhost, rtmp, HLS, transcoding, forward, http hooks.
blog: [http://blog.csdn.net/win_lin](http://blog.csdn.net/win_lin)
see also: [https://github.com/winlinvip/simple-rtmp-server](https://github.com/winlinvip/simple-rtmp-server)
see also: [http://winlinvip.github.io/simple-rtmp-server](http://winlinvip.github.io/simple-rtmp-server) @@ -12,30 +12,36 @@ 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
+step 1: build srs
 tar xf simple-rtmp-server-*.*.tar.gz
 cd simple-rtmp-server-*.*/trunk
 ./configure --with-ssl --with-hls --with-ffmpeg --with-http
 make
 
-step 2: start srs
+or get the latest code:
-./objs/simple_rtmp_server -c conf/srs.conf
+git clone  https://github.com/winlinvip/simple-rtmp-server
+cd simple-rtmp-server/trunk
+./configure --with-ssl --with-hls --with-ffmpeg --with-http
 
-step 3(optinal): start srs listen at 19350 to forward to
+step 2: start srs
-./objs/simple_rtmp_server -c conf/srs.19350.conf
+./objs/srs -c conf/srs.conf
 
-step 4(optional): start nginx for HLS
+step 3(optinal): start srs listen at 19350 to forward to
+
+./objs/srs -c conf/srs.19350.conf
+
+step 4(optinal): start nginx for HLS
 sudo ./objs/nginx/sbin/nginx
 
-step 5(optional): start http hooks for srs callback
+step 5(optinal): start http hooks for srs callback
 python ./research/api-server/server.py 8085
 
-step 6: publish live stream
+step 6: publish live stream
 FMS URL: rtmp://127.0.0.1:1935/live
 Stream:  livestream
@@ -47,7 +53,7 @@ For example, use ffmpeg to publish:
         sleep 1; \
     done
 
-step 7: add server ip to client hosts as demo.
+step 7: add server ip to client hosts as demo.
 # edit the folowing file:
 # linux: /etc/hosts
@@ -55,26 +61,41 @@ step 7: add server ip to client hosts as demo. 
# where server ip is 192.168.2.111 192.168.2.111 demo
-step 8: play live stream.
+step 8: play live stream.
+players: http://demo:80/players
 rtmp url: rtmp://demo:1935/live/livestream
 m3u8 url: http://demo:80/live/livestream.m3u8
+for android: http://demo:80/live/livestream.html
 
-step 9: play live stream auto transcoded
+step 9(optinal): play live stream auto transcoded
 rtmp url: rtmp://demo:1935/live/livestream_ld
 m3u8 url: http://demo:80/live/livestream_ld.m3u8
+for android: http://demo:80/live/livestream_ld.html
 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
 
-step 10: play live stream auto forwarded, the hls dir change to /forward
+step 10(optinal): play live stream auto forwarded, the hls dir change to /forward
 rtmp url: rtmp://demo:19350/live/livestream
 m3u8 url: http://demo:80/forward/live/livestream.m3u8
+for android: http://demo:80/forward/live/livestream.html
 rtmp url: rtmp://demo:19350/live/livestream_ld
 m3u8 url: http://demo:80/forward/live/livestream_ld.m3u8
+for android: http://demo:80/forward/live/livestream_ld.html
 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
+
+step 11(optinal): modify the config and reload it (all features support reload)
+
+killall -1 srs
+
+or use specified signal to reload:
+
+killall -s SIGHUP srs
 
### Architecture @@ -192,7 +213,15 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw * nginx v1.5.0: 139524 lines
### History -* v0.8, 2013-12-08, v0.8 released. 19186 lines. +* v0.9, 2013-12-15, ensure the HLS(ts) is continous when republish stream. +* v0.9, 2013-12-15, fix the hls reload bug, feed it the sequence header. +* v0.9, 2013-12-15, refine protocol, use int64_t timestamp for ts and jitter. +* v0.9, 2013-12-15, support set the live queue length(in seconds), drop when full. +* v0.9, 2013-12-15, fix the forwarder reconnect bug, feed it the sequence header. +* v0.9, 2013-12-15, support reload the hls/forwarder/transcoder. +* v0.9, 2013-12-14, refine the thread model for the retry threads. +* v0.9, 2013-12-10, auto install depends tools/libs on centos/ubuntu. +* v0.8, 2013-12-08, [v0.8](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.8) released. 19186 lines. * v0.8, 2013-12-08, support http hooks: on_connect/close/publish/unpublish/play/stop. * v0.8, 2013-12-08, support multiple http hooks for a event. * v0.8, 2013-12-07, support http callback hooks, on_connect. @@ -201,32 +230,32 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw * v0.8, 2013-12-06, support max_connections, drop if exceed. * v0.8, 2013-12-05, support log_dir, write ffmpeg log to file. * v0.8, 2013-12-05, fix the forward/hls/encoder bug. -* v0.7, 2013-12-03, v0.7 released. 17605 lines. +* v0.7, 2013-12-03, [v0.7](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.7) released. 17605 lines. * v0.7, 2013-12-01, support dead-loop detect for forwarder and transcoder. * v0.7, 2013-12-01, support all ffmpeg filters and params. * v0.7, 2013-11-30, support live stream transcoder by ffmpeg. * v0.7, 2013-11-30, support --with/without -ffmpeg, build ffmpeg-2.1. * v0.7, 2013-11-30, add ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2. -* v0.6, 2013-11-29, v0.6 released. 16094 lines. +* v0.6, 2013-11-29, [v0.6](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.6) released. 16094 lines. * v0.6, 2013-11-29, add performance summary, 1800 clients, 900Mbps, CPU 90.2%, 41MB. * v0.6, 2013-11-29, support forward stream to other edge server. * v0.6, 2013-11-29, support forward stream to other origin server. * v0.6, 2013-11-28, fix memory leak bug, aac decode bug. * v0.6, 2013-11-27, support --with or --without -hls and -ssl options. * v0.6, 2013-11-27, support AAC 44100HZ sample rate for iphone, adjust the timestamp. -* v0.5, 2013-11-26, v0.5 released. 14449 lines. +* v0.5, 2013-11-26, [v0.5](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.5) released. 14449 lines. * v0.5, 2013-11-24, support HLS(m3u8), fragment and window. * v0.5, 2013-11-24, support record to ts file for HLS. * v0.5, 2013-11-21, add ts_info tool to demux ts file. * v0.5, 2013-11-16, add rtmp players(OSMF/jwplayer5/jwplayer6). -* v0.4, 2013-11-10, v0.4 released. 12500 lines. +* v0.4, 2013-11-10, [v0.4](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.4) released. 12500 lines. * v0.4, 2013-11-10, support config and reload the pithy print. * v0.4, 2013-11-09, support reload config(vhost and its detail). * v0.4, 2013-11-09, support reload config(listen and chunk_size) by SIGHUP(1). * v0.4, 2013-11-09, support longtime(>4.6hours) publish/play. * v0.4, 2013-11-09, support config the chunk_size. * v0.4, 2013-11-09, support pause for live stream. -* v0.3, 2013-11-04, v0.3 released. 11773 lines. +* v0.3, 2013-11-04, [v0.3](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.3) released. 11773 lines. * v0.3, 2013-11-04, support refer/play-refer/publish-refer. * v0.3, 2013-11-04, support vhosts specified config. * v0.3, 2013-11-02, support listen multiple ports. @@ -234,12 +263,12 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw * v0.3, 2013-10-29, support pithy print log message specified by stage. * v0.3, 2013-10-28, support librtmp without extended-timestamp in 0xCX chunk packet. * v0.3, 2013-10-27, support cache last gop for client fast startup. -* v0.2, 2013-10-25, v0.2 released. 10125 lines. +* v0.2, 2013-10-25, [v0.2](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.2) released. 10125 lines. * v0.2, 2013-10-25, support flash publish. * v0.2, 2013-10-25, support h264/avc codec by rtmp complex handshake. * v0.2, 2013-10-24, support time jitter detect and correct algorithm * v0.2, 2013-10-24, support decode codec type to cache the h264/avc sequence header. -* v0.1, 2013-10-23, v0.1 released. 8287 lines. +* v0.1, 2013-10-23, [v0.1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.1) released. 8287 lines. * v0.1, 2013-10-23, support basic amf0 codec, simplify the api using c-style api. * v0.1, 2013-10-23, support shared ptr msg for zero memory copy. * v0.1, 2013-10-22, support vp6 codec with rtmp protocol specified simple handshake. diff --git a/trunk/auto/build_ffmpeg.sh b/trunk/auto/build_ffmpeg.sh index 04de4b01a..2e177e160 100755 --- a/trunk/auto/build_ffmpeg.sh +++ b/trunk/auto/build_ffmpeg.sh @@ -59,7 +59,9 @@ else echo "build x264" cd $ff_current_dir && rm -rf x264-snapshot-20131129-2245-stable && unzip -q ${ff_src_dir}/x264-snapshot-20131129-2245-stable.zip && - cd x264-snapshot-20131129-2245-stable && ./configure --prefix=${ff_release_dir} --bit-depth=8 --enable-static && make && make install + cd x264-snapshot-20131129-2245-stable && + ./configure --prefix=${ff_release_dir} --disable-opencl --bit-depth=8 --enable-static && + make && make install ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi fi @@ -86,7 +88,8 @@ else --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ --enable-libfreetype \ --enable-libx264 --enable-libmp3lame --enable-libaacplus \ - --enable-pthreads --extra-libs=-lpthread --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers && + --enable-pthreads --extra-libs=-lpthread \ + --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers && make && make install - ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi + ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build ffmpeg failed"; exit 1; fi fi diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 1024bdea7..31541ad12 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -3,6 +3,168 @@ # TODO: check gcc/g++ echo "check gcc/g++/gdb/make/openssl-devel" echo "depends tools are ok" +##################################################################################### +# for Ubuntu +##################################################################################### +function Ubuntu_prepare() +{ + uname -v|grep Ubuntu >/dev/null 2>&1 + ret=$?; if [[ 0 -ne $ret ]]; then + return; + fi + + echo "Ubuntu detected, install tools if needed" + + gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install gcc" + require_sudoer "sudo apt-get install -y gcc" + sudo apt-get install -y gcc + echo "install gcc success" + fi + + g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install g++" + require_sudoer "sudo apt-get install -y g++" + sudo apt-get install -y g++ + echo "install g++ success" + fi + + make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install make" + require_sudoer "sudo apt-get install -y make" + sudo apt-get install -y make + echo "install make success" + fi + + autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install autoconf" + require_sudoer "sudo apt-get install -y autoconf" + sudo apt-get install -y autoconf + echo "install autoconf success" + fi + + libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install libtool" + require_sudoer "sudo apt-get install -y libtool" + sudo apt-get install -y libtool + echo "install libtool success" + fi + + if [[ ! -f /usr/include/pcre.h ]]; then + echo "install libpcre3-dev" + require_sudoer "sudo apt-get install -y libpcre3-dev" + sudo apt-get install -y libpcre3-dev + echo "install libpcre3-dev success" + fi + + if [[ ! -f /usr/include/zlib.h ]]; then + echo "install zlib1g-dev" + require_sudoer "sudo apt-get install -y zlib1g-dev" + sudo apt-get install -y zlib1g-dev + echo "install zlib1g-dev success" + fi + + if [[ ! -d /usr/include/freetype2 ]]; then + echo "install libfreetype6-dev" + require_sudoer "sudo apt-get install -y libfreetype6-dev" + sudo apt-get install -y libfreetype6-dev + echo "install libfreetype6-dev success" + fi + + if [[ ! -d /usr/include/openssl ]]; then + echo "install libssl-dev" + require_sudoer "sudo apt-get install -y libssl-dev" + sudo apt-get install -y libssl-dev + echo "install libssl-dev success" + fi + + echo "Ubuntu install tools success" +} +Ubuntu_prepare +##################################################################################### +# for Centos +##################################################################################### +function Centos_prepare() +{ + if [[ ! -f /etc/redhat-release ]]; then + return; + fi + + echo "Centos detected, install tools if needed" + + gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install gcc" + require_sudoer "sudo yum install -y gcc" + sudo yum install -y gcc + echo "install gcc success" + fi + + g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install gcc-c++" + require_sudoer "sudo yum install -y gcc-c++" + sudo yum install -y gcc-c++ + echo "install gcc-c++ success" + fi + + make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install make" + require_sudoer "sudo yum install -y make" + sudo yum install -y make + echo "install make success" + fi + + automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install automake" + require_sudoer "sudo yum install -y automake" + sudo yum install -y automake + echo "install automake success" + fi + + autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install autoconf" + require_sudoer "sudo yum install -y autoconf" + sudo yum install -y autoconf + echo "install autoconf success" + fi + + libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install libtool" + require_sudoer "sudo yum install -y libtool" + sudo yum install -y libtool + echo "install libtool success" + fi + + if [[ ! -f /usr/include/pcre.h ]]; then + echo "install pcre-devel" + require_sudoer "sudo yum install -y pcre-devel" + sudo yum install -y pcre-devel + echo "install pcre-devel success" + fi + + if [[ ! -f /usr/include/zlib.h ]]; then + echo "install zlib-devel" + require_sudoer "sudo yum install -y zlib-devel" + sudo yum install -y zlib-devel + echo "install zlib-devel success" + fi + + if [[ ! -d /usr/include/freetype2 ]]; then + echo "install freetype-devel" + require_sudoer "sudo yum install -y freetype-devel" + sudo yum install -y freetype-devel + echo "install freetype-devel success" + fi + + if [[ ! -d /usr/include/openssl ]]; then + echo "install openssl-devel" + require_sudoer "sudo yum install -y openssl-devel" + sudo yum install -y openssl-devel + echo "install openssl-devel success" + fi + + echo "Centos install tools success" +} +Centos_prepare ##################################################################################### # st-1.9 @@ -48,6 +210,16 @@ fi ##################################################################################### # nginx for HLS, nginx-1.5.0 ##################################################################################### +function write_nginx_html5() +{ + cat<> ${html_file} + +END +} if [ $SRS_HLS = YES ]; then if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then echo "nginx-1.5.7 is ok."; @@ -72,6 +244,17 @@ if [ $SRS_HLS = YES ]; then # create forward dir mkdir -p ${SRS_OBJS}/nginx/html/forward + + # generate default html pages for android. + html_file=${SRS_OBJS}/nginx/html/live/livestream.html && hls_stream=livestream.m3u8 && write_nginx_html5 + html_file=${SRS_OBJS}/nginx/html/live/livestream_ld.html && hls_stream=livestream_ld.m3u8 && write_nginx_html5 + html_file=${SRS_OBJS}/nginx/html/live/livestream_sd.html && hls_stream=livestream_sd.m3u8 && write_nginx_html5 + html_file=${SRS_OBJS}/nginx/html/forward/live/livestream.html && hls_stream=livestream.m3u8 && write_nginx_html5 + html_file=${SRS_OBJS}/nginx/html/forward/live/livestream_ld.html && hls_stream=livestream_ld.m3u8 && write_nginx_html5 + html_file=${SRS_OBJS}/nginx/html/forward/live/livestream_sd.html && hls_stream=livestream_sd.m3u8 && write_nginx_html5 + + # copy players to nginx html dir. + cp research/players ${SRS_OBJS}/nginx/html/ -r fi if [ $SRS_HLS = YES ]; then @@ -87,6 +270,7 @@ if [ $SRS_HTTP = YES ]; then if [[ -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]]; then echo "CherryPy-3.2.4 is ok."; else + require_sudoer "configure --with-http" echo "install CherryPy-3.2.4"; ( sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} && diff --git a/trunk/conf/srs.conf b/trunk/conf/srs.conf index 90dc040cc..8f324c733 100755 --- a/trunk/conf/srs.conf +++ b/trunk/conf/srs.conf @@ -1,5 +1,14 @@ # the listen ports, split by space. listen 1935; +<<<<<<< HEAD +======= +# the default chunk size is 128, max is 65536, +# some client does not support chunk size change, +# however, most clients supports it and it can improve +# performance about 10%. +# default: 4096 +chunk_size 65000; +>>>>>>> upstream/master # the logs dir. # if enabled ffmpeg, each stracoding stream will create a log file. # default: ./objs/logs @@ -21,14 +30,26 @@ vhost __defaultVhost__ { chunk_size 65000; enabled on; gop_cache on; - hls on; - hls_path ./objs/nginx/html; - hls_fragment 5; - hls_window 30; + queue_length 30; forward 127.0.0.1:19350; + hls { + enabled on; + hls_path ./objs/nginx/html; + 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; + enabled on; + ffmpeg ./objs/ffmpeg/bin/ffmpeg; engine ld { enabled on; vfilter { @@ -82,11 +103,17 @@ vhost dev { chunk_size 65000; enabled on; gop_cache on; - hls on; - hls_path ./objs/nginx/html; - hls_fragment 5; - hls_window 30; + queue_length 10; forward 127.0.0.1:19350; +<<<<<<< HEAD +======= + hls { + enabled on; + hls_path ./objs/nginx/html; + hls_fragment 5; + hls_window 30; + } +>>>>>>> upstream/master http_hooks { enabled off; on_connect http://127.0.0.1:8085/api/v1/clients; @@ -97,7 +124,7 @@ vhost dev { on_stop http://127.0.0.1:8085/api/v1/sessions; } transcode { - enabled on; + enabled off; ffmpeg ./objs/ffmpeg/bin/ffmpeg; engine dev { enabled on; @@ -641,36 +668,40 @@ vhost removed.vhost.com { enabled off; } # the vhost with hls specified. -vhost no-hls.vhost.com { - # whether the hls is enabled. - # if off, donot write hls(ts and m3u8) when publish. - # default: on - hls on; - # the hls output path. - # the app dir is auto created under the hls_path. - # for example, for rtmp stream: - # rtmp://127.0.0.1/live/livestream - # http://127.0.0.1/live/livestream.m3u8 - # where hls_path is /hls, srs will create the following files: - # /hls/live the app dir for all streams. - # /hls/live/livestream.m3u8 the HLS m3u8 file. - # /hls/live/livestream-1.ts the HLS media/ts file. - # in a word, the hls_path is for vhost. - # default: ./objs/nginx/html - hls_path /data/nginx/html; - # the hls fragment in seconds, the duration of a piece of ts. - # default: 10 - hls_fragment 10; - # the hls window in seconds, the number of ts in m3u8. - # default: 60 - hls_window 60; +vhost with-hls.vhost.com { + hls { + # whether the hls is enabled. + # if off, donot write hls(ts and m3u8) when publish. + # default: off + enabled on; + # the hls output path. + # the app dir is auto created under the hls_path. + # for example, for rtmp stream: + # rtmp://127.0.0.1/live/livestream + # http://127.0.0.1/live/livestream.m3u8 + # where hls_path is /hls, srs will create the following files: + # /hls/live the app dir for all streams. + # /hls/live/livestream.m3u8 the HLS m3u8 file. + # /hls/live/livestream-1.ts the HLS media/ts file. + # in a word, the hls_path is for vhost. + # default: ./objs/nginx/html + hls_path /data/nginx/html; + # the hls fragment in seconds, the duration of a piece of ts. + # default: 10 + hls_fragment 10; + # the hls window in seconds, the number of ts in m3u8. + # default: 60 + hls_window 60; + } } # the vhost with hls disabled. vhost no-hls.vhost.com { - # whether the hls is enabled. - # if off, donot write hls(ts and m3u8) when publish. - # default: on - hls off; + hls { + # whether the hls is enabled. + # if off, donot write hls(ts and m3u8) when publish. + # default: off + enabled off; + } } # the vhost for min delay, donot cache any stream. vhost min.delay.com { @@ -683,6 +714,11 @@ vhost min.delay.com { # set to on if requires client fast startup. # default: on gop_cache off; + # the max live queue length in seconds. + # if the messages in the queue exceed the max length, + # drop the old whole gop. + # default: 30 + queue_length 10; } # the vhost for antisuck. vhost refer.anti_suck.com { diff --git a/trunk/configure b/trunk/configure index 652d2fff1..698ee8f73 100755 --- a/trunk/configure +++ b/trunk/configure @@ -15,14 +15,15 @@ BLACK="\\e[0m" # parse user options. . auto/options.sh -# if specifies http, requires sudo to install the CherryPy. -if [ $SRS_HTTP = YES ]; then +function require_sudoer() +{ sudo echo "" >/dev/null 2>&1 - ret=$?; if [[ 0 -ne $ret ]]; then echo - "--with-http requires sudoer, ret=$ret"; + + ret=$?; if [[ 0 -ne $ret ]]; then + echo "\"$1\" require sudoer failed. ret=$ret"; exit $ret; fi -fi +} # clean the exists if [[ -f Makefile ]]; then @@ -56,11 +57,11 @@ help: @echo " server build the srs(simple rtmp server) over st(state-threads)" clean: - (rm -f Makefile; cd ${SRS_OBJS}; rm -rf Makefile *.hpp src st_*_load) + (rm -f Makefile; cd ${SRS_OBJS}; rm -rf srs Makefile *.hpp src st_*_load) server: _prepare_dir @echo "build the srs(simple rtmp server) over st(state-threads)" - \$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} simple_rtmp_server + \$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} srs # the ./configure will generate it. _prepare_dir: @@ -86,7 +87,7 @@ GCC = g++ LINK = \$(GCC) AR = ar -.PHONY: default simple_rtmp_server +.PHONY: default srs default: @@ -115,7 +116,7 @@ MODULE_FILES=("srs_core" "srs_core_log" "srs_core_server" "srs_core_handshake" "srs_core_pithy_print" "srs_core_config" "srs_core_refer" "srs_core_reload" "srs_core_hls" "srs_core_forward" "srs_core_encoder" - "srs_core_http") + "srs_core_http" "srs_core_thread") MODULE_DIR="src/core" . auto/modules.sh CORE_OBJS="${MODULE_OBJS[@]}" @@ -141,7 +142,7 @@ if [ $SRS_SSL = YES ]; then else LINK_OPTIONS="-ldl" fi -BUILD_KEY="simple_rtmp_server" APP_MAIN="srs_main_server" APP_NAME="simple_rtmp_server" SO_PATH="" . auto/apps.sh +BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" SO_PATH="" . auto/apps.sh echo 'configure ok! ' @@ -179,6 +180,7 @@ echo "\" make \" to build the srs(simple rtmp server)." echo "\" make help \" to get the usage of make" if [ $SRS_HLS = YES ]; then echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" + echo "\" http://demo:80/players \" rtmp players(OSMF/JWPlayer)" fi if [ $SRS_FFMPEG = YES ]; then echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" @@ -186,4 +188,4 @@ fi if [ $SRS_HTTP = YES ]; then echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server" fi -echo "\" ./objs/simple_rtmp_server -c conf/srs.conf \" to start the srs live server" +echo "\" ./objs/srs -c conf/srs.conf \" to start the srs live server" diff --git a/trunk/research/players/index.html b/trunk/research/players/index.html old mode 100644 new mode 100755 index ae70bfe9a..fb71b139b --- a/trunk/research/players/index.html +++ b/trunk/research/players/index.html @@ -9,4 +9,5 @@

OSMF播放器

JWPlayer5

JWPlayer6

+

VLC for HLS/rtmp/rtsp/http....

diff --git a/trunk/research/players/jwplayer5/index.html b/trunk/research/players/jwplayer5/index.html old mode 100644 new mode 100755 index 56f5adb3f..aa36e15e2 --- a/trunk/research/players/jwplayer5/index.html +++ b/trunk/research/players/jwplayer5/index.html @@ -17,7 +17,7 @@
- Url(RTMP/HTTP): + Url(RTMP/HTTP):
diff --git a/trunk/research/players/jwplayer6/index.html b/trunk/research/players/jwplayer6/index.html old mode 100644 new mode 100755 index 96d981931..ce667be99 --- a/trunk/research/players/jwplayer6/index.html +++ b/trunk/research/players/jwplayer6/index.html @@ -17,7 +17,7 @@
- Url(RTMP/HTTP): + Url(RTMP/HTTP):
diff --git a/trunk/research/players/osmf/index.html b/trunk/research/players/osmf/index.html old mode 100644 new mode 100755 index 8619ea125..6b8a73008 --- a/trunk/research/players/osmf/index.html +++ b/trunk/research/players/osmf/index.html @@ -19,7 +19,7 @@ div.control{padding-bottom:10px; background-color:#333333; }
- Url(RTMP/HTTP): + Url(RTMP/HTTP):