import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding'
import { Notifier } from '../../notifier'
import { CONFIG } from '../../../initializers/config'
-import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/typings/models'
+import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/types/models'
async function processVideoTranscoding (job: Bull.Job) {
const payload = job.data as VideoTranscodingPayload
if (videoArg === undefined) return undefined
// Outside the transaction (IO on disk)
- const { videoFileResolution } = await videoArg.getMaxQualityResolution()
+ const { videoFileResolution, isPortraitMode } = await videoArg.getMaxQualityResolution()
const { videoDatabase, videoPublished } = await sequelizeTypescript.transaction(async t => {
// Maybe the video changed in database, refresh it
if (!videoDatabase) return undefined
// Create transcoding jobs if there are enabled resolutions
- const resolutionsEnabled = computeResolutionsToTranscode(videoFileResolution)
+ const resolutionsEnabled = computeResolutionsToTranscode(videoFileResolution, 'vod')
logger.info(
- 'Resolutions computed for video %s and origin file height of %d.', videoDatabase.uuid, videoFileResolution,
+ 'Resolutions computed for video %s and origin file resolution of %d.', videoDatabase.uuid, videoFileResolution,
{ resolutions: resolutionsEnabled }
)
dataInput = {
type: 'new-resolution' as 'new-resolution',
videoUUID: videoDatabase.uuid,
- resolution
+ resolution,
+ isPortraitMode
}
} else if (CONFIG.TRANSCODING.HLS.ENABLED) {
dataInput = {
type: 'hls',
videoUUID: videoDatabase.uuid,
resolution,
- isPortraitMode: false,
+ isPortraitMode,
copyCodecs: false
}
}