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:
parent
ea6c2b064f
commit
272a902b2a
19 changed files with 226 additions and 156 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue