mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Support max FPS configuration
This commit is contained in:
parent
0bd2474fed
commit
bbaf96d60d
37 changed files with 736 additions and 623 deletions
|
@ -2,11 +2,11 @@ import { FfprobeData } from 'fluent-ffmpeg'
|
|||
import { CONFIG } from '@server/initializers/config.js'
|
||||
import { canDoQuickAudioTranscode, canDoQuickVideoTranscode, ffprobePromise } from '@peertube/peertube-ffmpeg'
|
||||
|
||||
export async function canDoQuickTranscode (path: string, existingProbe?: FfprobeData): Promise<boolean> {
|
||||
export async function canDoQuickTranscode (path: string, maxFPS: number, existingProbe?: FfprobeData): Promise<boolean> {
|
||||
if (CONFIG.TRANSCODING.PROFILE !== 'default') return false
|
||||
|
||||
const probe = existingProbe || await ffprobePromise(path)
|
||||
|
||||
return await canDoQuickVideoTranscode(path, probe) &&
|
||||
return await canDoQuickVideoTranscode(path, maxFPS, probe) &&
|
||||
await canDoQuickAudioTranscode(path, probe)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue