aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/ffmpeg-utils.ts4
-rw-r--r--server/initializers/constants.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index a4d02908d..f85b9f316 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -56,7 +56,7 @@ export type AvailableEncoders = {
56// --------------------------------------------------------------------------- 56// ---------------------------------------------------------------------------
57 57
58function convertWebPToJPG (path: string, destination: string): Promise<void> { 58function convertWebPToJPG (path: string, destination: string): Promise<void> {
59 const command = ffmpeg(path) 59 const command = ffmpeg(path, { niceness: FFMPEG_NICE.THUMBNAIL })
60 .output(destination) 60 .output(destination)
61 61
62 return runCommand(command) 62 return runCommand(command)
@@ -67,7 +67,7 @@ function processGIF (
67 destination: string, 67 destination: string,
68 newSize: { width: number, height: number } 68 newSize: { width: number, height: number }
69): Promise<void> { 69): Promise<void> {
70 const command = ffmpeg(path) 70 const command = ffmpeg(path, { niceness: FFMPEG_NICE.THUMBNAIL })
71 .fps(20) 71 .fps(20)
72 .size(`${newSize.width}x${newSize.height}`) 72 .size(`${newSize.width}x${newSize.height}`)
73 .output(destination) 73 .output(destination)
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 0b4b41273..a78a66d78 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -362,8 +362,8 @@ const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = {
362const FFMPEG_NICE: { [ id: string ]: number } = { 362const FFMPEG_NICE: { [ id: string ]: number } = {
363 // parent process defaults to niceness = 0 363 // parent process defaults to niceness = 0
364 // reminder: lower = higher priority, max value is 19, lowest is -20 364 // reminder: lower = higher priority, max value is 19, lowest is -20
365 THUMBNAIL: 2, // low value in order to avoid blocking server 365 LIVE: 5, // prioritize over VOD and THUMBNAIL
366 LIVE: 9, // prioritize over VOD 366 THUMBNAIL: 10,
367 VOD: 15 367 VOD: 15
368} 368}
369 369