mirror of
https://github.com/vale981/Docker-nginx-rtmp
synced 2025-03-04 09:01:40 -05:00
Enable HLS video via /hls on HTTP
This commit is contained in:
parent
2a94179d72
commit
ae84ecce49
2 changed files with 15 additions and 1 deletions
|
@ -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://<your server ip>/live/mystream
|
||||
http://<your server ip>/hls/mystream.m3u8
|
||||
|
||||
### Tested players
|
||||
* VLC
|
||||
|
|
11
nginx.conf
11
nginx.conf
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue