From 0f9b9505a8d7af1d38cd498e26103b035f9a9236 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 10 Oct 2021 17:17:14 +0800 Subject: [PATCH] RTC: Change rtc.aac to discard by default. v4.0.172 --- trunk/conf/docker.conf | 2 ++ trunk/conf/full.conf | 4 +-- trunk/conf/rtc.conf | 8 ++---- trunk/conf/rtc2rtmp.conf | 7 +----- trunk/conf/rtmp2rtc.conf | 37 ++++++++++++++++++++++++++++ trunk/conf/srs.conf | 2 ++ trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_config.cpp | 2 +- trunk/src/core/srs_core_version4.hpp | 2 +- 9 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 trunk/conf/rtmp2rtc.conf diff --git a/trunk/conf/docker.conf b/trunk/conf/docker.conf index c8e4ede8d..49b885487 100644 --- a/trunk/conf/docker.conf +++ b/trunk/conf/docker.conf @@ -29,5 +29,7 @@ vhost __defaultVhost__ { } rtc { enabled on; + aac discard; + rtc_to_rtmp off; } } diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index b8ba91835..145c670b8 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -467,8 +467,8 @@ vhost rtc.vhost.srs.com { # For transmuxing RTMP to RTC, the strategy for aac audio. # transcode Transcode aac to opus. # discard Discard aac audio packet. - # default: transcode - aac transcode; + # default: discard + aac discard; ############################################################### # For transmuxing RTC to RTMP. # Whether trans-mux RTC to RTMP streaming. diff --git a/trunk/conf/rtc.conf b/trunk/conf/rtc.conf index 742669e18..71a2573b8 100644 --- a/trunk/conf/rtc.conf +++ b/trunk/conf/rtc.conf @@ -21,19 +21,15 @@ stats { } rtc_server { enabled on; - # Listen at udp://8000 listen 8000; - # - # The $CANDIDATE means fetch from env, if not configed, use * as default. - # - # The * means retrieving server IP automatically, from all network interfaces, - # @see https://github.com/ossrs/srs/wiki/v4_CN_RTCWiki#config-candidate candidate $CANDIDATE; } vhost __defaultVhost__ { rtc { enabled on; + aac discard; + rtc_to_rtmp off; } http_remux { enabled on; diff --git a/trunk/conf/rtc2rtmp.conf b/trunk/conf/rtc2rtmp.conf index 3410cdaea..0f5ef741b 100644 --- a/trunk/conf/rtc2rtmp.conf +++ b/trunk/conf/rtc2rtmp.conf @@ -19,19 +19,14 @@ stats { } rtc_server { enabled on; - # Listen at udp://8000 listen 8000; - # - # The $CANDIDATE means fetch from env, if not configed, use * as default. - # - # The * means retrieving server IP automatically, from all network interfaces, - # @see https://github.com/ossrs/srs/wiki/v4_CN_RTCWiki#config-candidate candidate $CANDIDATE; } vhost __defaultVhost__ { rtc { enabled on; + aac transcode; rtc_to_rtmp on; } http_remux { diff --git a/trunk/conf/rtmp2rtc.conf b/trunk/conf/rtmp2rtc.conf new file mode 100644 index 000000000..0f5ef741b --- /dev/null +++ b/trunk/conf/rtmp2rtc.conf @@ -0,0 +1,37 @@ + +listen 1935; +max_connections 1000; +daemon off; +srs_log_tank console; + +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} + +http_api { + enabled on; + listen 1985; +} +stats { + network 0; +} +rtc_server { + enabled on; + listen 8000; + candidate $CANDIDATE; +} + +vhost __defaultVhost__ { + rtc { + enabled on; + aac transcode; + rtc_to_rtmp on; + } + http_remux { + enabled on; + mount [vhost]/[app]/[stream].flv; + } +} + diff --git a/trunk/conf/srs.conf b/trunk/conf/srs.conf index 7f79f1150..ddee85a28 100644 --- a/trunk/conf/srs.conf +++ b/trunk/conf/srs.conf @@ -30,5 +30,7 @@ vhost __defaultVhost__ { } rtc { enabled on; + aac discard; + rtc_to_rtmp off; } } diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index f9a40667c..fda6d3e6d 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2021-10-10, RTC: Change rtc.aac to discard by default. v4.0.172 * v4.0, 2021-10-10, Fix [#2304](https://github.com/ossrs/srs/issues/2304) Remove Push RTSP feature. v4.0.171 * v4.0, 2021-10-10, Fix [#2653](https://github.com/ossrs/srs/issues/2653) Remove HTTP RAW API. v4.0.170 * v4.0, 2021-10-08, Merge [#2654](https://github.com/ossrs/srs/pull/2654): Parse width and width from SPS/PPS. v4.0.169 diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 5bbb4f3e2..9130cc68c 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -3661,7 +3661,7 @@ bool SrsConfig::get_rtc_bframe_discard(string vhost) bool SrsConfig::get_rtc_aac_discard(string vhost) { - static bool DEFAULT = false; + static bool DEFAULT = true; SrsConfDirective* conf = get_rtc(vhost); diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index fbb1c6570..cdaae1122 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 171 +#define VERSION_REVISION 172 #endif