arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.45k stars 3.51k forks source link

rtmps support. #1619

Open abinash67 opened 3 years ago

abinash67 commented 3 years ago

I just want to support rtmps in nginx+rtmp module conf.Please help me to configure that.

abinash67 commented 3 years ago

Our stunnel configuration: pid = /var/run/stunnel4/stunnel.pid

output = /var/log/stunnel4/stunnel.log

setuid = stunnel4

setgid = stunnel4

https://www.stunnel.org/faq.html

socket = r:TCP_NODELAY=1

socket = l:TCP_NODELAY=1

debug = 4

[fb-live]

client = yes

accept = 1936

connect = rtmps.allthingsott.com:443 #this is our subdomain that is pointed to our rtmp+nginx module server

verifyChain = no

abinash67 commented 3 years ago

our nginx configuration: rtmp {

    server {

            listen 1935;

            chunk_size 4096;

            application live {

                    live on;

                    record off;

                    push rtmp://127.0.0.1:1936/rtmp/<<stream key>>;

            }

    }

}

laureen71 commented 3 years ago

check out that gist, it shows how to use nginx's stream module to receive TLS encapsulated RTMP (RTMPS) streams on the RTMP module: https://gist.github.com/laureen71/f46d45566dc4521b6a253c7b57dc0e32

If you want to use all on one server, just change the port of the RTMP server.

In both cases the public URL would then be rtmps://host.domain.com:1935/live/...