winlin

update readme

@@ -22,6 +22,9 @@ And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --<br @@ -22,6 +22,9 @@ And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --<br
22 people who have submitted patches, reported bugs, added translations, helped<br/> 22 people who have submitted patches, reported bugs, added translations, helped<br/>
23 answer newbie questions, and generally made SRS that much better: [AUTHORS.txt](https://github.com/winlinvip/simple-rtmp-server/blob/master/AUTHORS.txt) 23 answer newbie questions, and generally made SRS that much better: [AUTHORS.txt](https://github.com/winlinvip/simple-rtmp-server/blob/master/AUTHORS.txt)
24 24
  25 +### Wiki
  26 +[https://github.com/winlinvip/simple-rtmp-server/wiki](https://github.com/winlinvip/simple-rtmp-server/wiki)
  27 +
25 ### Usage(simple) 28 ### Usage(simple)
26 <strong>Requires: Centos6/Ubuntu12 64bits, others see [Build](https://github.com/winlinvip/simple-rtmp-server/wiki/Build)</strong><br/> 29 <strong>Requires: Centos6/Ubuntu12 64bits, others see [Build](https://github.com/winlinvip/simple-rtmp-server/wiki/Build)</strong><br/>
27 <strong>Step -1:</strong> get SRS<br/> 30 <strong>Step -1:</strong> get SRS<br/>
@@ -259,10 +259,6 @@ if [ $SRS_HLS = YES ]; then @@ -259,10 +259,6 @@ if [ $SRS_HLS = YES ]; then
259 ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/players && 259 ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/players &&
260 rm -f ${SRS_OBJS}/nginx/crossdomain.xml && 260 rm -f ${SRS_OBJS}/nginx/crossdomain.xml &&
261 ln -sf `pwd`/research/players/crossdomain.xml ${SRS_OBJS}/nginx/html/crossdomain.xml 261 ln -sf `pwd`/research/players/crossdomain.xml ${SRS_OBJS}/nginx/html/crossdomain.xml
262 -  
263 - # override the default index.  
264 - rm -f ${SRS_OBJS}/nginx/html/index.html &&  
265 - ln -sf `pwd`/research/players/nginx_index.html ${SRS_OBJS}/nginx/html/index.html  
266 fi 262 fi
267 263
268 if [ $SRS_HLS = YES ]; then 264 if [ $SRS_HLS = YES ]; then
@@ -303,6 +299,33 @@ ln -sf `pwd`/research/players research/api-server/static-dir/players && @@ -303,6 +299,33 @@ ln -sf `pwd`/research/players research/api-server/static-dir/players &&
303 rm -f research/api-server/static-dir/crossdomain.xml && 299 rm -f research/api-server/static-dir/crossdomain.xml &&
304 ln -sf `pwd`/research/players/crossdomain.xml research/api-server/static-dir/crossdomain.xml 300 ln -sf `pwd`/research/players/crossdomain.xml research/api-server/static-dir/crossdomain.xml
305 301
  302 +# only when the nginx is ok,
  303 +# if api-server not enalbed, use nginx as demo.
  304 +if [ $SRS_HLS = YES ]; then
  305 + if [ $SRS_HTTP = YES ]; then
  306 + # override the default index.
  307 + rm -f ${SRS_OBJS}/nginx/html/index.html &&
  308 + ln -sf `pwd`/research/players/nginx_index.html ${SRS_OBJS}/nginx/html/index.html
  309 + else
  310 + rm -f ${SRS_OBJS}/nginx/html/index.html &&
  311 + cat<<END >> ${SRS_OBJS}/nginx/html/index.html
  312 +<!DOCTYPE html>
  313 +<html>
  314 +<head>
  315 + <title>SRS</title>
  316 + <meta charset="utf-8">
  317 +</head>
  318 +<body>
  319 + <script type="text/javascript">
  320 + setTimeout(function(){
  321 + window.location.href = "players/index.html" + window.location.search;
  322 + }, 3000);
  323 + </script>
  324 +</body>
  325 +END
  326 + fi
  327 +fi
  328 +
306 ##################################################################################### 329 #####################################################################################
307 # openssl, for rtmp complex handshake 330 # openssl, for rtmp complex handshake
308 ##################################################################################### 331 #####################################################################################
@@ -54,13 +54,15 @@ cat << END @@ -54,13 +54,15 @@ cat << END
54 54
55 --with-ssl enable rtmp complex handshake, requires openssl-devel installed. 55 --with-ssl enable rtmp complex handshake, requires openssl-devel installed.
56 to delivery h264 video and aac audio to flash player. 56 to delivery h264 video and aac audio to flash player.
  57 + --with-hls enable hls streaming, build nginx as http server for hls.
57 --with-http enable http hooks, build cherrypy as demo api server. 58 --with-http enable http hooks, build cherrypy as demo api server.
58 srs will call the http hooks, such as: on_connect. 59 srs will call the http hooks, such as: on_connect.
59 - --with-hls enable hls streaming, build nginx as http server for hls. 60 + --with-ffmpeg enable transcoding with ffmpeg.
60 61
61 --without-ssl disable rtmp complex handshake. 62 --without-ssl disable rtmp complex handshake.
62 --without-hls disable hls, rtmp streaming only. 63 --without-hls disable hls, rtmp streaming only.
63 --without-http disable http, http hooks callback. 64 --without-http disable http, http hooks callback.
  65 + --without-ffmpeg disable the ffmpeg transcoding feature.
64 66
65 END 67 END
66 68
@@ -158,7 +158,7 @@ echo "configure summary:" @@ -158,7 +158,7 @@ echo "configure summary:"
158 if [ $SRS_HLS = YES ]; then 158 if [ $SRS_HLS = YES ]; then
159 echo -e "${GREEN}HLS over nginx is enabled${BLACK}" 159 echo -e "${GREEN}HLS over nginx is enabled${BLACK}"
160 else 160 else
161 - echo -e "warning: without HLS support" 161 + echo -e "${YELLOW}warning: without HLS support${BLACK}"
162 fi 162 fi
163 if [ $SRS_SSL = YES ]; then 163 if [ $SRS_SSL = YES ]; then
164 echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}" 164 echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}"
@@ -179,6 +179,7 @@ fi @@ -179,6 +179,7 @@ fi
179 # mkdir dirs 179 # mkdir dirs
180 mkdir -p ${SRS_OBJS}/logs 180 mkdir -p ${SRS_OBJS}/logs
181 181
  182 +ip=`ifconfig|grep "inet addr"| grep -v "127.0.0.1"|awk '{print $2}'|awk -F ':' 'NR==1 {print $2}'`
182 # next step. 183 # next step.
183 echo "" 184 echo ""
184 echo "you can:" 185 echo "you can:"
@@ -186,7 +187,7 @@ echo "\" make \" to build the srs(simple rtmp server)." @@ -186,7 +187,7 @@ echo "\" make \" to build the srs(simple rtmp server)."
186 echo "\" make help \" to get the usage of make" 187 echo "\" make help \" to get the usage of make"
187 if [ $SRS_HLS = YES ]; then 188 if [ $SRS_HLS = YES ]; then
188 echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" 189 echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
189 - echo "\" http://demo:80/players \" rtmp players(OSMF/JWPlayer)" 190 + echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)"
190 fi 191 fi
191 if [ $SRS_FFMPEG = YES ]; then 192 if [ $SRS_FFMPEG = YES ]; then
192 echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" 193 echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"