Verified Commit 41085b15 authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix live bitrate

parent 3edbafb6
......@@ -101,7 +101,7 @@ class MuxingSession extends EventEmitter {
this.fps = options.fps
this.bitrate = options.bitrate
this.ratio = options.bitrate
this.ratio = options.ratio
this.allResolutions = options.allResolutions
......
......@@ -237,5 +237,8 @@ export {
function capBitrate (inputBitrate: number, targetBitrate: number) {
if (!inputBitrate) return targetBitrate
return Math.min(targetBitrate, inputBitrate)
// Add 30% margin to input bitrate
const inputBitrateWithMargin = inputBitrate + (inputBitrate * 0.3)
return Math.min(targetBitrate, inputBitrateWithMargin)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment