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.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/transcoding.ts b/server/controllers/api/videos/transcoding.ts
index 9aca761c1..a39e47dfe 100644
--- a/server/controllers/api/videos/transcoding.ts
+++ b/server/controllers/api/videos/transcoding.ts
@@ -32,9 +32,10 @@ async function createTranscoding (req: express.Request, res: express.Response) {
32 32
33 const body: VideoTranscodingCreate = req.body 33 const body: VideoTranscodingCreate = req.body
34 34
35 const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile() 35 const { resolution: maxResolution, hasAudio } = await video.probeMaxQualityFile()
36
36 const resolutions = await Hooks.wrapObject( 37 const resolutions = await Hooks.wrapObject(
37 computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false }), 38 computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio }),
38 'filter:transcoding.manual.resolutions-to-transcode.result', 39 'filter:transcoding.manual.resolutions-to-transcode.result',
39 body 40 body
40 ) 41 )
@@ -46,7 +47,6 @@ async function createTranscoding (req: express.Request, res: express.Response) {
46 video.state = VideoState.TO_TRANSCODE 47 video.state = VideoState.TO_TRANSCODE
47 await video.save() 48 await video.save()
48 49
49 const hasAudio = !!audioStream
50 const childrenResolutions = resolutions.filter(r => r !== maxResolution) 50 const childrenResolutions = resolutions.filter(r => r !== maxResolution)
51 51
52 const children = await Bluebird.mapSeries(childrenResolutions, resolution => { 52 const children = await Bluebird.mapSeries(childrenResolutions, resolution => {