Skip to content

Commit

Permalink
RTMPS: add conf file
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhihong committed Feb 7, 2024
1 parent 0e52327 commit b7d82f1
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
22 changes: 22 additions & 0 deletions trunk/conf/forward.master.rtmps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# the config for srs to forward
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/sample-forward
# @see full.conf for detail config.

listen 1935;
max_connections 1000;
pid ./objs/srs.master.pid;
daemon off;
srs_log_tank console;
rtmps {
enabled on;
listen 1943;
key ./conf/server.key;
cert ./conf/server.crt;
}
vhost __defaultVhost__ {
forward {
rtmps on;
enabled on;
destination 127.0.0.1:19430;
}
}
17 changes: 17 additions & 0 deletions trunk/conf/forward.slave.rtmps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# the config for srs to forward
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/sample-forward
# @see full.conf for detail config.

listen 19350;
max_connections 1000;
pid ./objs/srs.slave.pid;
daemon off;
srs_log_tank console;
rtmps {
enabled on;
listen 19430;
key ./conf/server.key;
cert ./conf/server.crt;
}
vhost __defaultVhost__ {
}
24 changes: 24 additions & 0 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,26 @@ listen 1935;
# Overwrite by env SRS_CHUNK_SIZE
# default: 60000
chunk_size 60000;
# the rtmps listen ports
rtmps {
# Whether rtmps is enabled.
# Overwrite by env SRS_RTMPS_ENABLED
# default: off
enabled on;
# The rtmps listen port
# Default: 1943
listen 1943;
# The SSL private key file, generated by:
# openssl genrsa -out server.key 2048
# Overwrite by env SRS_RTMPS_KEY
# default: ./conf/server.key
key ./conf/server.key;
# The SSL public cert file, generated by:
# openssl req -new -x509 -key server.key -out server.crt -days 3650 -subj "/C=CN/ST=Beijing/L=Beijing/O=Me/OU=Me/CN=ossrs.net"
# Overwrite by env SRS_RTMPS_CERT
# default: ./conf/server.crt
cert ./conf/server.crt;
}

#############################################################################################
# HTTP sections
Expand Down Expand Up @@ -1087,6 +1107,10 @@ vhost same.vhost.forward.srs.com {
# active-active for cdn to build high available fault tolerance system.
# format: {ip}:{port} {ip_N}:{port_N}
destination 127.0.0.1:1936 127.0.0.1:1937;

# Whether enable forward whith rtmps format.
# default: off
rtmps on;

# when client(encoder) publish to vhost/app/stream, call the hook in creating backend forwarder.
# the request in the POST data string is a object encode by json:
Expand Down
13 changes: 13 additions & 0 deletions trunk/conf/rtmps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
rtmps {
enabled on;
listen 1943;
key ./conf/server.key;
cert ./conf/server.crt;
}
vhost __defaultVhost__ {
}

0 comments on commit b7d82f1

Please sign in to comment.