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,21 @@
import { VideoTranscriptionPayload } from '@peertube/peertube-models'
import { generateSubtitle } from '@server/lib/video-captions.js'
import { Job } from 'bullmq'
import { logger, loggerTagsFactory } from '../../../helpers/logger.js'
import { VideoModel } from '../../../models/video/video.js'
const lTags = loggerTagsFactory('transcription')
export async function processVideoTranscription (job: Job) {
const payload = job.data as VideoTranscriptionPayload
logger.info('Processing video transcription in job %s.', job.id)
const video = await VideoModel.load(payload.videoUUID)
if (!video) {
logger.info('Do not process transcription job %d, video does not exist.', job.id, lTags(payload.videoUUID))
return
}
return generateSubtitle({ video })
}