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

Reduce error output on muxing error

This commit is contained in:
Chocobozzz 2025-02-24 14:48:08 +01:00
parent b608a075c9
commit 0e8fff084a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 33 additions and 28 deletions

View file

@ -11,7 +11,7 @@ import { FileStorage, VideoFileFormatFlag, VideoFileMetadata, VideoFileStream, V
import { getFileSize, getLowercaseExtension } from '@peertube/peertube-node-utils'
import { getFFmpegCommandWrapperOptions } from '@server/helpers/ffmpeg/ffmpeg-options.js'
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
import { doRequestAndSaveToFile, generateRequestStream } from '@server/helpers/requests.js'
import { buildRequestError, doRequestAndSaveToFile, generateRequestStream } from '@server/helpers/requests.js'
import { CONFIG } from '@server/initializers/config.js'
import { MIMETYPES, REQUEST_TIMEOUTS } from '@server/initializers/constants.js'
import { VideoFileModel } from '@server/models/video/video-file.js'
@ -324,9 +324,12 @@ export async function muxToMergeVideoFiles (options: {
logger.warn(`Cannot mux files of video ${video.url}`, { err, inputs: inputsToLog, ...lTags(video.uuid) })
if (err.inputStreamError) {
err.inputStreamError = buildRequestError(err.inputStreamError)
}
throw err
}
} finally {
for (const destination of tmpDestinations) {
await remove(destination)
@ -338,7 +341,6 @@ async function buildMuxInput (
video: MVideo,
videoFile: MVideoFile
): Promise<{ input: Readable, isTmpDestination: false } | { input: string, isTmpDestination: boolean }> {
// ---------------------------------------------------------------------------
// Remote
// ---------------------------------------------------------------------------