Skip to content

Instantly share code, notes, and snippets.

@somoso
Created July 14, 2019 09:05
Show Gist options
  • Save somoso/00eb8cd7c4e68c02c58448f3cbb5af78 to your computer and use it in GitHub Desktop.
Save somoso/00eb8cd7c4e68c02c58448f3cbb5af78 to your computer and use it in GitHub Desktop.
NGINX RTMP Config file for streaming h264 vid w/ mp3 audio
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
exec ffmpeg -threads 16 -re -i rtmp://localhost:1935/$app/$name -an -vcodec h264 -s 320x240 -f flv rtmp://localhost:1935/real/${name};
exec ffmpeg -threads 16 -re -i rtmp://localhost:1935/$app/$name -vn -acodec mp3 -q:a 9 -f flv rtmp://localhost:1935/audio/${name};
}
application real {
live on;
}
application audio {
live on;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment