1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix running again transcoding on a video only file

This commit is contained in:
Chocobozzz 2022-11-07 10:25:24 +01:00
parent 11ae7e2917
commit a32bf8cd20
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 29 additions and 17 deletions

View file

@ -446,7 +446,15 @@ async function generateHlsPlaylistCommon (options: {
function buildOriginalFileResolution (inputResolution: number) {
if (CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION === true) return toEven(inputResolution)
const resolutions = computeResolutionsToTranscode({ input: inputResolution, type: 'vod', includeInput: false, strictLower: false })
const resolutions = computeResolutionsToTranscode({
input: inputResolution,
type: 'vod',
includeInput: false,
strictLower: false,
// We don't really care about the audio resolution in this context
hasAudio: true
})
if (resolutions.length === 0) return toEven(inputResolution)
return Math.max(...resolutions)