Skip to content

Instantly share code, notes, and snippets.

@laureen71
Last active December 10, 2024 02:35
Show Gist options
  • Save laureen71/f46d45566dc4521b6a253c7b57dc0e32 to your computer and use it in GitHub Desktop.
Save laureen71/f46d45566dc4521b6a253c7b57dc0e32 to your computer and use it in GitHub Desktop.
TLS encapsulation RTMP Traffic (RTMPS) with nginx stream module
worker_processes auto;
load_module modules/ngx_stream_module.so;
# NO RTMP module needed here!
...
stream {
server {
listen 0.0.0.0:1935 ssl;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
proxy_pass rtmp-server.domain.local:1935;
# if you want to run all on one server, change host & port here, eg:
# proxy_pass localhost:1936;
}
}
load_module modules/ngx_rtmp_module.so;
...
rtmp {
server {
listen 0.0.0.0:1935;
# if you want to run all on one server, change port here, eg:
# listen 127.0.0.1:1936;
chunk_size 4000;
notify_method get;
interleave on;
wait_key on;
wait_video on;
application live {
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment