1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +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

@ -49,11 +49,14 @@ async function run () {
const dataInput: VideoTranscodingPayload[] = []
const maxResolution = video.getMaxQualityFile().resolution
// FIXME: check the file has audio
const hasAudio = true
// Generate HLS files
if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) {
const resolutionsEnabled = options.resolution
? [ parseInt(options.resolution) ]
: computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false })
: computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio })
for (const resolution of resolutionsEnabled) {
dataInput.push({
@ -61,7 +64,7 @@ async function run () {
videoUUID: video.uuid,
resolution,
hasAudio: true,
hasAudio,
copyCodecs: false,
isNewVideo: false,
@ -77,8 +80,7 @@ async function run () {
createHLSIfNeeded: true,
// FIXME: check the file has audio
hasAudio: true,
hasAudio,
isNewVideo: false,
resolution: parseInt(options.resolution)