switch targetBitrate to inputBitrate
This commit is contained in:
parent
11c0799ad0
commit
22b624d738
13
dist/main.js
vendored
13
dist/main.js
vendored
@ -215,12 +215,13 @@ 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;
|
||||
// }
|
||||
let targetBitrate = inputBitrate;
|
||||
logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
|
||||
if (shouldInitVaapi && streamNum != undefined) {
|
||||
latestStreamNum = streamNum;
|
||||
@ -249,8 +250,8 @@ 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 targetBitrate = inputBitrate;
|
||||
let shouldInitVaapi = (streamNum == undefined || streamNum <= latestStreamNum);
|
||||
if (targetBitrate > inputBitrate) {
|
||||
targetBitrate = inputBitrate;
|
||||
|
Loading…
Reference in New Issue
Block a user