#user nobody; worker_processes 1; error_log logs/error.log debug; error_log logs/error.log notice; error_log logs/error.log info; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 8080; server_name localhost; # rtmp stat location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { # you can move stat.xsl to a different location root html; } # rtmp control location /control { rtmp_control all; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } rtmp { server { listen 1935; chunk_size 8192; application live { live on; record off; push rtmp://localhost/youtube/${name}; exec ffmpeg -i rtmp://localhost/$app/$name -c:v libx264 -preset veryfast -c:a copy -b:v 3500k -bufsize 3500k -maxrate 3500k -s 1280x720 -r 30 -f flv rtmp://localhost/twitch/$name; push rtmp://localhost/dailymotion/${name}; push rtmp://localhost/hitbox/${name}; } application streamup { live on; record off; push rtmp://origin.streamuplive.com/app{{ my_key }}; } } }