Beginning Nginx Config for RTMP Restreaming

Опубликовано: 23 Июль 2026
на канале: Lilrex2015
331
5

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;

}

}


}

▶ Patreon: https://www.patreon.com/lilrex2015?ty=h
▶ Live Stream TIP: https://twitch.streamlabs.com/lilrex2015
▶ Twitch.tv/lilrex2015
▶ Twitter.com/lilrex2015
▶ Discord:   / discord  

Subscribe to my other channels

   / lilrex2015  
Film channel:    / @lilrexfilms  
Health Channel:    / @lilrexhealth  
Gaming:    / @lilrexgaming  
Cooking:    / @lilrexcooking  
Daily Chat:    / @dailychatshow  
Live:    / @lilrexlive  
Money:    / @lilrexmoney