From 70a974335f83c31a315942cad556986a84869cb3 Mon Sep 17 00:00:00 2001 From: matty Date: Sat, 13 Apr 2024 14:01:10 -0400 Subject: [PATCH] maybe fix bitrate shit nigga --- dist/main.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/main.js b/dist/main.js index 6ecf56f..ba3314c 100644 --- a/dist/main.js +++ b/dist/main.js @@ -146,11 +146,12 @@ function buildInitOptions() { async function vodBuilder(params) { const { resolution, fps, streamNum, inputBitrate } = params; const streamSuffix = streamNum == undefined ? '' : `:${streamNum}`; - let targetBitrate = getTargetBitrate(resolution, fps); + // let targetBitrate = getTargetBitrate(resolution, fps); + let targetBitrate = inputBitrate; let shouldInitVaapi = (streamNum == undefined || streamNum <= latestStreamNum); - if (targetBitrate > inputBitrate) { - targetBitrate = inputBitrate; - } + // if (targetBitrate > inputBitrate) { + // targetBitrate = inputBitrate; + // } logger.info(`Building encoder options, received ${JSON.stringify(params)}`); if (shouldInitVaapi && streamNum != undefined) { latestStreamNum = streamNum; @@ -174,11 +175,12 @@ async function vodBuilder(params) { async function liveBuilder(params) { const { resolution, fps, streamNum, inputBitrate } = params; const streamSuffix = streamNum == undefined ? '' : `:${streamNum}`; - let targetBitrate = getTargetBitrate(resolution, fps); + // let targetBitrate = getTargetBitrate(resolution, fps); + let targetBitrate = inputBitrate; let shouldInitVaapi = (streamNum == undefined || streamNum <= latestStreamNum); - if (targetBitrate > inputBitrate) { - targetBitrate = inputBitrate; - } + // if (targetBitrate > inputBitrate) { + // targetBitrate = inputBitrate; + // } logger.info(`Building encoder options, received ${JSON.stringify(params)}`); if (shouldInitVaapi && streamNum != undefined) { latestStreamNum = streamNum;