aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos/transcoding.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/videos/transcoding.ts b/server/controllers/api/videos/transcoding.ts
index dd6fbd3de..388689c8a 100644
--- a/server/controllers/api/videos/transcoding.ts
+++ b/server/controllers/api/videos/transcoding.ts
@@ -29,7 +29,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
29 29
30 const body: VideoTranscodingCreate = req.body 30 const body: VideoTranscodingCreate = req.body
31 31
32 const { resolution: maxResolution, isPortraitMode } = await video.getMaxQualityResolution() 32 const { resolution: maxResolution, isPortraitMode, audioStream } = await video.getMaxQualityFileInfo()
33 const resolutions = computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ]) 33 const resolutions = computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ])
34 34
35 video.state = VideoState.TO_TRANSCODE 35 video.state = VideoState.TO_TRANSCODE
@@ -42,6 +42,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
42 videoUUID: video.uuid, 42 videoUUID: video.uuid,
43 resolution, 43 resolution,
44 isPortraitMode, 44 isPortraitMode,
45 hasAudio: !!audioStream,
45 copyCodecs: false, 46 copyCodecs: false,
46 isNewVideo: false, 47 isNewVideo: false,
47 autoDeleteWebTorrentIfNeeded: false, 48 autoDeleteWebTorrentIfNeeded: false,
@@ -53,6 +54,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
53 videoUUID: video.uuid, 54 videoUUID: video.uuid,
54 isNewVideo: false, 55 isNewVideo: false,
55 resolution: resolution, 56 resolution: resolution,
57 hasAudio: !!audioStream,
56 isPortraitMode 58 isPortraitMode
57 }) 59 })
58 } 60 }