diff options
Diffstat (limited to 'server/lib/transcoding')
-rw-r--r-- | server/lib/transcoding/default-transcoding-profiles.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/transcoding/default-transcoding-profiles.ts b/server/lib/transcoding/default-transcoding-profiles.ts index ba98a11ca..8f01f57a5 100644 --- a/server/lib/transcoding/default-transcoding-profiles.ts +++ b/server/lib/transcoding/default-transcoding-profiles.ts | |||
@@ -49,7 +49,7 @@ const defaultX264LiveOptionsBuilder: EncoderOptionsBuilder = (options: EncoderOp | |||
49 | 49 | ||
50 | return { | 50 | return { |
51 | outputOptions: [ | 51 | outputOptions: [ |
52 | ...getCommonOutputOptions(targetBitrate), | 52 | ...getCommonOutputOptions(targetBitrate, streamNum), |
53 | 53 | ||
54 | `${buildStreamSuffix('-r:v', streamNum)} ${fps}`, | 54 | `${buildStreamSuffix('-r:v', streamNum)} ${fps}`, |
55 | `${buildStreamSuffix('-b:v', streamNum)} ${targetBitrate}` | 55 | `${buildStreamSuffix('-b:v', streamNum)} ${targetBitrate}` |
@@ -271,11 +271,11 @@ function capBitrate (inputBitrate: number, targetBitrate: number) { | |||
271 | return Math.min(targetBitrate, inputBitrateWithMargin) | 271 | return Math.min(targetBitrate, inputBitrateWithMargin) |
272 | } | 272 | } |
273 | 273 | ||
274 | function getCommonOutputOptions (targetBitrate: number) { | 274 | function getCommonOutputOptions (targetBitrate: number, streamNum?: number) { |
275 | return [ | 275 | return [ |
276 | `-preset veryfast`, | 276 | `-preset veryfast`, |
277 | `-maxrate ${targetBitrate}`, | 277 | `${buildStreamSuffix('-maxrate:v', streamNum)} ${targetBitrate}`, |
278 | `-bufsize ${targetBitrate * 2}`, | 278 | `${buildStreamSuffix('-bufsize:v', streamNum)} ${targetBitrate * 2}`, |
279 | 279 | ||
280 | // NOTE: b-strategy 1 - heuristic algorithm, 16 is optimal B-frames for it | 280 | // NOTE: b-strategy 1 - heuristic algorithm, 16 is optimal B-frames for it |
281 | `-b_strategy 1`, | 281 | `-b_strategy 1`, |