From 9a504443fd89a8cf9bf5dc60d36d1d4a15135a82 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Sat, 7 Sep 2024 16:28:30 +0000 Subject: [PATCH] api/stream: add support for 8kbps option for mp3 downloads --- api/src/stream/types.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/stream/types.js b/api/src/stream/types.js index ed949e5e..aa9becf2 100644 --- a/api/src/stream/types.js +++ b/api/src/stream/types.js @@ -225,6 +225,10 @@ const convertAudio = (streamInfo, res) => { args.push("-b:a", `${streamInfo.audioBitrate}k`) } + if (streamInfo.audioFormat === "mp3" && streamInfo.audioBitrate === "8") { + args.push("-ar", "12000"); + } + if (streamInfo.audioFormat === "opus") { args.push("-vbr", "off") }