mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
refactor(server): video transcode processor (#2163)
* refactor(server): video transcode processor * refactor: rename shouldRotate to isVideoVertical, remove unnecessary await * refactor: rename getOptions to getFfmpegOptions to be clearer in that context * fix: optimal preset converting vertical videos already smaller than target resolution --------- Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
@@ -153,3 +153,18 @@ export class ThumbnailGeneratorProcessor {
|
||||
await this.mediaService.handleGenerateWepbThumbnail(job.data);
|
||||
}
|
||||
}
|
||||
|
||||
@Processor(QueueName.VIDEO_CONVERSION)
|
||||
export class VideoTranscodeProcessor {
|
||||
constructor(private mediaService: MediaService) {}
|
||||
|
||||
@Process({ name: JobName.QUEUE_VIDEO_CONVERSION, concurrency: 1 })
|
||||
async onQueueVideoConversion(job: Job<IBaseJob>): Promise<void> {
|
||||
await this.mediaService.handleQueueVideoConversion(job.data);
|
||||
}
|
||||
|
||||
@Process({ name: JobName.VIDEO_CONVERSION, concurrency: 2 })
|
||||
async onVideoConversion(job: Job<IAssetJob>) {
|
||||
await this.mediaService.handleVideoConversion(job.data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user