change rtmp ports

This commit is contained in:
cronekorkn 2022-12-05 16:38:45 +01:00
parent 407318445d
commit 0d5d8500df
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
4 changed files with 12 additions and 9 deletions

View file

@ -4,12 +4,12 @@ OBS
publish publish
------- -------
obs stream to `rtmps://rtmp.sublimity.de:1937/24b626n246n2462v46bb2n2` stream key `ckn` obs stream to `rtmps://rtmp.sublimity.de:1936/24b626n246n2462v46bb2n2` stream key `ckn`
input input
----- -----
- Media Source - Media Source
- uncheck Local File - uncheck Local File
- Input: `rtmps://rtmp.sublimity.de:1937/24b626n246n2462v46bb2n2/ckn` - Input: `rtmps://rtmp.sublimity.de:1936/24b626n246n2462v46bb2n2/ckn`

View file

@ -1,11 +1,11 @@
stream { stream {
upstream rtmp { upstream rtmp {
server 127.0.0.1:1936; server 127.0.0.1:1935;
} }
server { server {
listen 1937 ssl; listen 1936 ssl;
listen [::]:1937 ssl; listen [::]:1936 ssl;
ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem; ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem;
ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem; ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem;
@ -16,7 +16,7 @@ stream {
rtmp { rtmp {
server { server {
listen 127.0.0.1:1936; listen 127.0.0.1:1935;
chunk_size 4096; chunk_size 4096;
application ${stream_key} { application ${stream_key} {
@ -32,7 +32,7 @@ rtmp {
deny publish all; # no need to publish on /live deny publish all; # no need to publish on /live
allow play all; # playing allowed allow play all; # playing allowed
pull rtmp://127.0.0.1:1936/${stream_key}; pull rtmp://127.0.0.1:1935/${stream_key};
} }
} }
} }

View file

@ -4,6 +4,9 @@ files = {
'context': { 'context': {
'server_name': node.metadata.get('nginx-rtmps/hostname'), 'server_name': node.metadata.get('nginx-rtmps/hostname'),
'stream_key': node.metadata.get('nginx-rtmps/stream_key'), 'stream_key': node.metadata.get('nginx-rtmps/stream_key'),
} },
'triggers': [
'svc_systemd:nginx:restart',
],
}, },
} }

View file

@ -7,7 +7,7 @@ defaults = {
}, },
'nftables': { 'nftables': {
'input': { 'input': {
'tcp dport 1937 accept', 'tcp dport 1936 accept',
}, },
}, },
} }