Enable HLS video via /hls on HTTP

This commit is contained in:
Jason Rivers 2016-04-29 16:17:37 +01:00
parent 2a94179d72
commit ae84ecce49
2 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,5 @@
# Docker-nginx-rtmp
Docker image for an RTMP server running on nginx
Docker image for an RTMP/HLS server running on nginx
NGINX Version 1.9.15
nginx-rtmp-module Version 1.1.7
@ -7,6 +7,8 @@ nginx-rtmp-module Version 1.1.7
### Configurations
This image exposes port 1935 for RTMP Steams and has 2 channels open "live" and "testing".
Live is also accessable via HLS on port 8080
It also exposes 8080 so you can access http://<your server ip>:8080/stat to see the streaming statistics.
The configuration file is in /opt/nginx/conf/
@ -30,6 +32,7 @@ Play Path/Stream Key: mystream
In your favorite RTMP video player connect to the stream using the URL:
rtmp://&lt;your server ip&gt;/live/mystream
http://&lt;your server ip&gt;/hls/mystream.m3u8
### Tested players
* VLC

View file

@ -16,6 +16,15 @@ http {
listen 8080;
server_name localhost;
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}
location /on_publish {
return 201;
}
@ -49,6 +58,8 @@ rtmp {
live on;
record off;
on_publish http://localhost:8080/on_publish;
hls on;
hls_path /tmp/hls;
}
application testing {
live on;