Skip to content

Instantly share code, notes, and snippets.

@sonOfRa
Created March 5, 2020 15:42
Show Gist options
  • Save sonOfRa/1b69d50cbdda3638b7b391d2ddd26be1 to your computer and use it in GitHub Desktop.
Save sonOfRa/1b69d50cbdda3638b7b391d2ddd26be1 to your computer and use it in GitHub Desktop.
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/error_log info;
events {
worker_connections 1024;
use epoll;
}
rtmp {
server {
listen 1935;
chunk_size 8192;
application ingest {
live on;
meta copy;
exec ffmpeg -i rtmp://localhost/ingest/$name -c:v libx264 -c:a copy rtmp://localhost/live/$name;
exec ffmpeg -i rtmp://localhost/ingest/$name -c:v libx264 -c:a copy -s 1920x1080 -filter:v fps=fps=30 rtmp://localhost/live/1080p_$name;
exec ffmpeg -i rtmp://localhost/ingest/$name -c:v libx264 -c:a copy -s 1280x720 -filter:v fps=fps=30 rtmp://localhost/live/720p_$name;
}
application live {
live on;
meta copy;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment