From 4c47dd74ad683e7447719faa1f22e1d7e19783db Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 27 Jul 2018 19:02:27 -0700 Subject: [PATCH] Revert "Reduce audio bitrate when streaming with a low video bitrate" due to breakage on GFE 3.14.1 --- src/SdpGenerator.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/SdpGenerator.c b/src/SdpGenerator.c index d63de22..f6e17dc 100644 --- a/src/SdpGenerator.c +++ b/src/SdpGenerator.c @@ -11,7 +11,6 @@ #define CHANNEL_MASK_STEREO 0x3 #define CHANNEL_MASK_51_SURROUND 0xFC -#define LOW_BITRATE_THRESHOLD 5000 #define HIGH_BITRATE_THRESHOLD 15000 typedef struct _SDP_OPTION { @@ -375,23 +374,6 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) { err |= addAttributeString(&optionHead, "x-nv-audio.surround.AudioQuality", "0"); HighQualitySurroundEnabled = 0; } - - if (StreamConfig.bitrate < LOW_BITRATE_THRESHOLD && audioChannelCount == 2) { - // At low bitrates, cap the stereo audio bitrate to reduce data usage. For some reason, - // GFE seems to always enable high quality (512 Kbps) mode for stereo even though we - // don't specify that we want it via SDP. 5.1 audio properly remains at normal quality - // mode by default. To work around high quality mode, use adaptive bitrate with a - // min = max clamp (like we do for video). - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.adaptiveBitrateEnable", "1"); - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.local2chMin", "96"); - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.local2chMax", "96"); - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.remote2chMin", "96"); - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.remote2chMax", "96"); - } - else { - // Disable audio bitrate cap - err |= addAttributeString(&optionHead, "x-nv-audioBitrate.adaptiveBitrateEnable", "0"); - } } }