Created
May 7, 2016 17:50
-
-
Save aikar/937ae21ad9bc9600269cfbb4a1b1e96f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#worker_processes 4; | |
rtmp { | |
access_log logs/stream.log; | |
server { | |
listen 1935; | |
chunk_size 4096; | |
application programming { | |
live on; | |
meta on; | |
push $hitbox; | |
push $twitch; | |
push rtmp://localhost:1935/livecoding_downscale/livecoding; | |
push $beam; | |
push_reconnect 1s; | |
on_publish "http://aikar.co/stream.php?live=1"; | |
on_publish_done "http://aikar.co/stream.php?live=0"; | |
} | |
application gaming { | |
live on; | |
meta on; | |
push $hitbox; | |
push $twitch; | |
push $beam; | |
push_reconnect 1s; | |
} | |
application livecoding_downscale { | |
live on; | |
meta on; | |
allow play 10.0.0.0/24; | |
allow play 127.0.0.1; | |
exec ffmpeg -i "rtmp://127.0.0.1/livecoding_downscale/livecoding" | |
-c:a copy | |
-c:v libx264 | |
-preset fast | |
-framerate 30 | |
-threads 4 | |
-pix_fmt yuv420p | |
-s "1600x900" | |
-bufsize 1500k -b:v 1500k | |
-maxrate 1500k -minrate 1500k | |
-f flv "$livecoding"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment