aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/transcoding.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-06 17:55:37 +0100
committerChocobozzz <me@florianbigard.com>2022-01-06 17:55:37 +0100
commitcbe2f36d93c779ca08424336be7e3988e57be01d (patch)
tree49b46f450d6cabbd3b3b86dc25d0e3f3a2b4ab94 /server/controllers/api/videos/transcoding.ts
parent78a5dd9c69af1b1fcae48a25053b569aa0eae626 (diff)
downloadPeerTube-cbe2f36d93c779ca08424336be7e3988e57be01d.tar.gz
PeerTube-cbe2f36d93c779ca08424336be7e3988e57be01d.tar.zst
PeerTube-cbe2f36d93c779ca08424336be7e3988e57be01d.zip
Fix audio transcoding with video only file
Diffstat (limited to 'server/controllers/api/videos/transcoding.ts')
-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 }