mirror of
https://github.com/ossrs/srs.git
synced 2025-11-23 19:34:05 +08:00
This PR reorganizes SRS configuration structure by moving RTMP-specific
configurations from global scope to a dedicated `rtmp {}` section, and
includes various cleanups.
**Before (SRS 6.x):**
```nginx
listen 1935;
chunk_size 60000;
max_connections 1000;
```
**After (SRS 7.0+):**
```nginx
max_connections 1000;
rtmp {
listen 1935;
chunk_size 60000;
}
```
Cleanup:
* Removed unused threads_interval configuration and related code
* Cleaned up reload handlers and removed obsolete functionality
---------
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
84 lines
1.4 KiB
Plaintext
84 lines
1.4 KiB
Plaintext
|
|
pid ./objs/srs.pid;
|
|
srs_log_tank console;
|
|
srs_log_level trace;
|
|
max_connections 1000;
|
|
daemon off;
|
|
# RTMP server configuration
|
|
rtmp {
|
|
listen 1935;
|
|
}
|
|
http_api {
|
|
enabled on;
|
|
listen 1985;
|
|
crossdomain on;
|
|
raw_api {
|
|
enabled on;
|
|
allow_reload on;
|
|
allow_query on;
|
|
allow_update on;
|
|
}
|
|
}
|
|
# for SRS1.
|
|
http_stream {
|
|
enabled on;
|
|
listen 8080;
|
|
dir ./objs/nginx/html;
|
|
}
|
|
vhost __defaultVhost__ {
|
|
# for SRS1.
|
|
http {
|
|
enabled on;
|
|
mount [vhost]/hls;
|
|
dir ./objs/nginx/html/hls;
|
|
}
|
|
|
|
# for SRS1.
|
|
refer github.com github.io;
|
|
refer_publish github.com github.io;
|
|
refer_play github.com github.io;
|
|
|
|
# for SRS2
|
|
publish_1stpkt_timeout 20000;
|
|
publish_normal_timeout 7000;
|
|
|
|
# for SRS2
|
|
mr {
|
|
enabled off;
|
|
latency 350;
|
|
}
|
|
|
|
# for SRS1
|
|
mode remote;
|
|
origin 127.0.0.1:1935 localhost:1935;
|
|
|
|
token_traverse off;
|
|
vhost same.edge.srs.com;
|
|
|
|
debug_srs_upnode off;
|
|
|
|
# for SRS1
|
|
forward 127.0.0.1:1936 127.0.0.1:1937;
|
|
|
|
# for SRS1
|
|
time_jitter full;
|
|
|
|
# for SRS2
|
|
mix_correct off;
|
|
|
|
#for SRS1
|
|
atc on;
|
|
atc_auto on;
|
|
|
|
# for SRS2
|
|
mw_latency 100;
|
|
|
|
# for SRS1
|
|
gop_cache off;
|
|
queue_length 10;
|
|
|
|
# for SRS2
|
|
send_min_interval 10.0;
|
|
reduce_sequence_header on;
|
|
}
|