Beginning Nginx Config for RTMP Restreaming #nginx #raspberrypi4 #raspberrypi5 #raspberrypi

6 months ago
7

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 766;
# multi_accept on;
}

rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
interleave on;
hls off;
hls_path /tmp/hls;
hls_fragment 15s;
dash off;
dash_path /tmp/dash;
dash_fragment 15s;

allow publish 192.168.1.0/24;
deny publish all;
}
}

server {

listen 1936;
chunk_size 4096;

application RestreamRTMP {
live on;
record off;
interleave on;
hls off;
hls_path /tmp/hls;
hls_fragment 15s;
dash off;
dash_path /tmp/dash;
dash_fragment 15s;

push rtmp://live.twitch.tv/app/streamkey;
push rtmp://stream.dlive.tv/live/streamkey;
push rtmp://a.rtmp.youtube.com/live2/streamkey;
push rtmp://127.0.0.1:1940/rtmp/streamkey;

allow publish 192.168.1.0/24;
deny publish all;

}

}
server {

listen 1937;
chunk_size 4096;

application RestreamRTMP {
live on;
record off;
interleave on;
hls off;
hls_path /tmp/hls;
hls_fragment 15s;
dash off;
dash_path /tmp/dash;
dash_fragment 15s;

# push rtmp://or.pscp.tv:80/x/f1qn4v18yrbt;
push rtmp://127.0.0.1:1940/rtmp/streamkey

allow publish 192.168.1.0/24;
deny publish all;

}

}

}

Loading comments...