1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Optimize video thumbnail generation

Process images in worker threads
Reduce ffmpeg calls
This commit is contained in:
Chocobozzz 2023-10-19 14:18:22 +02:00
parent ea6c2b064f
commit 272a902b2a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
19 changed files with 226 additions and 156 deletions

View file

@ -13,10 +13,11 @@ import { MIMETYPES } from '@server/initializers/constants.js'
async function buildNewFile (options: {
path: string
mode: 'web-video' | 'hls'
ffprobe?: FfprobeData
}) {
const { path, mode } = options
const { path, mode, ffprobe: probeArg } = options
const probe = await ffprobePromise(path)
const probe = probeArg ?? await ffprobePromise(path)
const size = await getFileSize(path)
const videoFile = new VideoFileModel({