Add missing niceness to ffmpeg thumbnail processes
This commit is contained in:
parent
5d84d717b2
commit
a4a8cd3971
|
@ -56,7 +56,7 @@ export type AvailableEncoders = {
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function convertWebPToJPG (path: string, destination: string): Promise<void> {
|
function convertWebPToJPG (path: string, destination: string): Promise<void> {
|
||||||
const command = ffmpeg(path)
|
const command = ffmpeg(path, { niceness: FFMPEG_NICE.THUMBNAIL })
|
||||||
.output(destination)
|
.output(destination)
|
||||||
|
|
||||||
return runCommand(command)
|
return runCommand(command)
|
||||||
|
@ -67,7 +67,7 @@ function processGIF (
|
||||||
destination: string,
|
destination: string,
|
||||||
newSize: { width: number, height: number }
|
newSize: { width: number, height: number }
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const command = ffmpeg(path)
|
const command = ffmpeg(path, { niceness: FFMPEG_NICE.THUMBNAIL })
|
||||||
.fps(20)
|
.fps(20)
|
||||||
.size(`${newSize.width}x${newSize.height}`)
|
.size(`${newSize.width}x${newSize.height}`)
|
||||||
.output(destination)
|
.output(destination)
|
||||||
|
|
|
@ -362,8 +362,8 @@ const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = {
|
||||||
const FFMPEG_NICE: { [ id: string ]: number } = {
|
const FFMPEG_NICE: { [ id: string ]: number } = {
|
||||||
// parent process defaults to niceness = 0
|
// parent process defaults to niceness = 0
|
||||||
// reminder: lower = higher priority, max value is 19, lowest is -20
|
// reminder: lower = higher priority, max value is 19, lowest is -20
|
||||||
THUMBNAIL: 2, // low value in order to avoid blocking server
|
LIVE: 5, // prioritize over VOD and THUMBNAIL
|
||||||
LIVE: 9, // prioritize over VOD
|
THUMBNAIL: 10,
|
||||||
VOD: 15
|
VOD: 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user