Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Last active April 12, 2020 11:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save leandromoreira/6aa8654a03600f6f993c41068476fa9a to your computer and use it in GitHub Desktop.
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