diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-10 11:04:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-10 11:04:00 +0100 |
commit | 67eeec8b955339120ff5d3c8286fdf0715e6270c (patch) | |
tree | ec28e8c218ed4e80f5f1f86f59fe2acb360950a9 /server/helpers | |
parent | 93904032506dd222404d9be60fd2e41763554665 (diff) | |
download | PeerTube-67eeec8b955339120ff5d3c8286fdf0715e6270c.tar.gz PeerTube-67eeec8b955339120ff5d3c8286fdf0715e6270c.tar.zst PeerTube-67eeec8b955339120ff5d3c8286fdf0715e6270c.zip |
Add minimum bitrate limit
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index cc79828f6..ab29d4691 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -286,7 +286,10 @@ async function getLiveTranscodingCommand (options: { | |||
286 | 286 | ||
287 | addDefaultEncoderParams({ command, encoder: builderResult.encoder, fps: resolutionFPS, streamNum: i }) | 287 | addDefaultEncoderParams({ command, encoder: builderResult.encoder, fps: resolutionFPS, streamNum: i }) |
288 | 288 | ||
289 | logger.debug('Apply ffmpeg live video params from %s using %s profile.', builderResult.encoder, profile, builderResult, lTags()) | 289 | logger.debug( |
290 | 'Apply ffmpeg live video params from %s using %s profile.', builderResult.encoder, profile, builderResult, | ||
291 | { fps: resolutionFPS, resolution, ...lTags() } | ||
292 | ) | ||
290 | 293 | ||
291 | command.outputOption(`${buildStreamSuffix('-c:v', i)} ${builderResult.encoder}`) | 294 | command.outputOption(`${buildStreamSuffix('-c:v', i)} ${builderResult.encoder}`) |
292 | applyEncoderOptions(command, builderResult.result) | 295 | applyEncoderOptions(command, builderResult.result) |
@@ -310,7 +313,10 @@ async function getLiveTranscodingCommand (options: { | |||
310 | 313 | ||
311 | addDefaultEncoderParams({ command, encoder: builderResult.encoder, fps: resolutionFPS, streamNum: i }) | 314 | addDefaultEncoderParams({ command, encoder: builderResult.encoder, fps: resolutionFPS, streamNum: i }) |
312 | 315 | ||
313 | logger.debug('Apply ffmpeg live audio params from %s using %s profile.', builderResult.encoder, profile, builderResult, lTags()) | 316 | logger.debug( |
317 | 'Apply ffmpeg live audio params from %s using %s profile.', builderResult.encoder, profile, builderResult, | ||
318 | { fps: resolutionFPS, resolution, ...lTags() } | ||
319 | ) | ||
314 | 320 | ||
315 | command.outputOption(`${buildStreamSuffix('-c:a', i)} ${builderResult.encoder}`) | 321 | command.outputOption(`${buildStreamSuffix('-c:a', i)} ${builderResult.encoder}`) |
316 | applyEncoderOptions(command, builderResult.result) | 322 | applyEncoderOptions(command, builderResult.result) |
@@ -622,7 +628,7 @@ async function presetVideo (options: { | |||
622 | logger.debug( | 628 | logger.debug( |
623 | 'Apply ffmpeg params from %s for %s stream of input %s using %s profile.', | 629 | 'Apply ffmpeg params from %s for %s stream of input %s using %s profile.', |
624 | builderResult.encoder, streamType, input, profile, builderResult, | 630 | builderResult.encoder, streamType, input, profile, builderResult, |
625 | lTags() | 631 | { resolution, fps, ...lTags() } |
626 | ) | 632 | ) |
627 | 633 | ||
628 | if (streamType === 'video') { | 634 | if (streamType === 'video') { |