The Nginx RTMP module enables your server to receive and distribute live streams:
# /etc/nginx/nginx.conf - RTMP configuration
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
# HLS output
hls on;
hls_path /tmp/hls;
hls_fragment 3;
hls_playlist_length 60;
# Only allow publishing from trusted IPs
allow publish 10.0.0.0/8;
deny publish all;
}
}
}Install with: apt install nginx libnginx-mod-rtmp