Init commit

This commit is contained in:
ShreejitPanchal
2026-05-19 19:56:02 +08:00
commit 6601501eff
4047 changed files with 2185372 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { CONFIG } from '@server/initializers/config.js'
import { MUserId, MVideoFile, MVideoFullLight } from '@server/types/models/index.js'
import { TranscodingJobQueueBuilder, TranscodingRunnerJobBuilder } from './shared/index.js'
export function createOptimizeOrMergeAudioJobs (options: {
video: MVideoFullLight
videoFile: MVideoFile
isNewVideo: boolean
user: MUserId
}) {
return getJobBuilder().createOptimizeOrMergeAudioJobs(options)
}
// ---------------------------------------------------------------------------
export function createTranscodingJobs (options: {
transcodingType: 'hls' | 'web-video'
video: MVideoFullLight
resolutions: number[]
isNewVideo: boolean
user: MUserId
}) {
return getJobBuilder().createTranscodingJobs(options)
}
// ---------------------------------------------------------------------------
// Private
// ---------------------------------------------------------------------------
function getJobBuilder () {
if (CONFIG.TRANSCODING.REMOTE_RUNNERS.ENABLED === true) {
return new TranscodingRunnerJobBuilder()
}
return new TranscodingJobQueueBuilder()
}