Skip to content

Commit

Permalink
Update nginx.conf
Browse files Browse the repository at this point in the history
增加了hls的支持,这样就可以支持移动端html5的网页看直播了,推流地址还是没变
  • Loading branch information
qingyanjiu authored Sep 27, 2016
1 parent 5310472 commit a6ee6c3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ http {
#location ~ /\.ht {
# deny all;
#}
location /live {
# Serve HLS fragments
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}
}


Expand Down Expand Up @@ -148,7 +157,8 @@ rtmp {

application live {
live on;

hls on;
hls_path /tmp/hls;
drop_idle_publisher 10s;

recorder preview {
Expand All @@ -158,12 +168,10 @@ rtmp {
record_interval 3600s;

exec_record_done bash -c "/ffmpeg-3.1.3-64bit-static/ffmpeg -i $path -vcodec png -vframes 1 -an -f rawvideo -s 640x360 -ss 00:00:01 -y /usr/local/nginx/html/$basename.png";
}

}
}
}


}
}
# stay in the foreground so Docker has a process to track
daemon off;

0 comments on commit a6ee6c3

Please sign in to comment.