Skip to content

Instantly share code, notes, and snippets.

Last active April 12, 2020 11:37
What would you like to do?
rtmp {
server {
listen 1935;
application encoder {
live on;
exec ffmpeg -i rtmp://localhost:1935/encoder/$name
-c:v libx264 -b:v 750k -f flv -s 640x360 rtmp://localhost:1935/hls/$name_high
-c:v libx264 -b:v 400k -f flv -s 426x240 rtmp://localhost:1935/hls/$name_mid
-c:v libx264 -b:v 200k -f flv -s 426x240 rtmp://localhost:1935/hls/$name_low;
application hls {
live on;
hls on;
hls_variant _high BANDWIDTH=878000,RESOLUTION=640x360;
hls_variant _mid BANDWIDTH=528000,RESOLUTION=426x240;
hls_variant _low BANDWIDTH=264000,RESOLUTION=426x240;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment