Update Setting up an HLS Broadcast server with NGINX
parent
ebb7301d21
commit
e16d4a5881
|
|
@ -10,7 +10,29 @@
|
|||
The first part of this server config handles ingesting the raw RTMP datastream and converting to a series of files which can be fetched via web request, as the HLS protocol perscribes.
|
||||
1. Edit open `/etc/nginx/nginx.conf`
|
||||
2. Add the following block to your `nginx.conf`:
|
||||
<code>
|
||||
rtmp {
|
||||
server {
|
||||
listen 1935;
|
||||
chunk_size 4096;
|
||||
max_message 1M;
|
||||
#allow publish from specific ip
|
||||
allow publish 192.168.69.69;
|
||||
#deny publish to everyone else
|
||||
deny publish all;
|
||||
|
||||
application stream{
|
||||
live on;
|
||||
hls on;
|
||||
hls_nested on;
|
||||
hls_path /srv/live;
|
||||
|
||||
hls_fragment 2s;
|
||||
hls_playlist_length 10s;
|
||||
}
|
||||
}
|
||||
}
|
||||
</code>
|
||||
|
||||
## Web Server Configuration
|
||||
This part of the configuration handles setting up the web server which serves the files that make up the HLS stream.
|
||||
|
|
|
|||
Loading…
Reference in a new issue