Post date: 2016/05/14 8:49:48
参考:
AWS EC2とNginx-rtmp-moduleとVideo.jsとOBSを使ってライブストリーミング配信(RTMPとHLS)
/usr/local/nginx/conf/nginx.conf
server{
...
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /usr/local/nginx/html/stat.xsl;
}
#rtmp control
location /control {
rtmp_control all;
}
#hls location
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
}
root /usr/local/nginx/html;
add_header Cache-Control no-cache;
}
...
rtmp_auto_push on;
rtmp {
server {
listen 1935;
chunk_size 4096;
access_log logs/rtmp_access.log;
ping 30s;
ping_timeout 10s;
application live {
live on;
push rtmp://localhost/hls;
}
application hls {
live on;
hls on;
hls_path /usr/local/nginx/html/hls;
hls_fragment 3s;
}
}
}
/var/www/html/video/hls/index.html
/etc/apache2/apache.conf