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

Fix audio transcoding with video only file

This commit is contained in:
Chocobozzz 2022-01-06 17:55:37 +01:00
parent 78a5dd9c69
commit cbe2f36d93
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 46 additions and 16 deletions

View file

@ -29,7 +29,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
const body: VideoTranscodingCreate = req.body
const { resolution: maxResolution, isPortraitMode } = await video.getMaxQualityResolution()
const { resolution: maxResolution, isPortraitMode, audioStream } = await video.getMaxQualityFileInfo()
const resolutions = computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ])
video.state = VideoState.TO_TRANSCODE
@ -42,6 +42,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
videoUUID: video.uuid,
resolution,
isPortraitMode,
hasAudio: !!audioStream,
copyCodecs: false,
isNewVideo: false,
autoDeleteWebTorrentIfNeeded: false,
@ -53,6 +54,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
videoUUID: video.uuid,
isNewVideo: false,
resolution: resolution,
hasAudio: !!audioStream,
isPortraitMode
})
}