]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - server/lib/transcoding/shared/ffmpeg-builder.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / lib / transcoding / shared / ffmpeg-builder.ts
... / ...
CommitLineData
1import { Job } from 'bullmq'
2import { getFFmpegCommandWrapperOptions } from '@server/helpers/ffmpeg'
3import { logger } from '@server/helpers/logger'
4import { FFmpegVOD } from '@shared/ffmpeg'
5import { VideoTranscodingProfilesManager } from '../default-transcoding-profiles'
6
7export function buildFFmpegVOD (job?: Job) {
8 return new FFmpegVOD({
9 ...getFFmpegCommandWrapperOptions('vod', VideoTranscodingProfilesManager.Instance.getAvailableEncoders()),
10
11 updateJobProgress: progress => {
12 if (!job) return
13
14 job.updateProgress(progress)
15 .catch(err => logger.error('Cannot update ffmpeg job progress', { err }))
16 }
17 })
18}