re-enable logic for target and input bitrates
This commit is contained in:
parent
750026f847
commit
016b5600e4
12
dist/main.js
vendored
12
dist/main.js
vendored
@ -215,13 +215,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;
|
||||
// }
|
||||
let targetBitrate = inputBitrate;
|
||||
if (targetBitrate > inputBitrate) {
|
||||
targetBitrate = inputBitrate;
|
||||
}
|
||||
logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
|
||||
if (shouldInitVaapi && streamNum != undefined) {
|
||||
latestStreamNum = streamNum;
|
||||
@ -250,8 +249,7 @@ 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 = inputBitrate;
|
||||
let targetBitrate = getTargetBitrate(resolution, fps);
|
||||
let shouldInitVaapi = (streamNum == undefined || streamNum <= latestStreamNum);
|
||||
if (targetBitrate > inputBitrate) {
|
||||
targetBitrate = inputBitrate;
|
||||
|
Loading…
Reference in New Issue
Block a user