mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Improve target bitrate calculation
This commit is contained in:
parent
c826f34a45
commit
679c12e69c
24 changed files with 263 additions and 204 deletions
|
@ -47,13 +47,13 @@ async function run () {
|
|||
if (!video) throw new Error('Video not found.')
|
||||
|
||||
const dataInput: VideoTranscodingPayload[] = []
|
||||
const { videoFileResolution } = await video.getMaxQualityResolution()
|
||||
const { resolution } = await video.getMaxQualityResolution()
|
||||
|
||||
// Generate HLS files
|
||||
if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) {
|
||||
const resolutionsEnabled = options.resolution
|
||||
? [ options.resolution ]
|
||||
: computeResolutionsToTranscode(videoFileResolution, 'vod').concat([ videoFileResolution ])
|
||||
: computeResolutionsToTranscode(resolution, 'vod').concat([ resolution ])
|
||||
|
||||
for (const resolution of resolutionsEnabled) {
|
||||
dataInput.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue