From 7abb6060a91588fe21cad0f59f38941da728511c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 10 Jan 2021 21:02:55 +0100 Subject: specific niceness for live transcoding --- server/helpers/ffmpeg-utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/helpers/ffmpeg-utils.ts') diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 1f5e8d8f6..d01e6f80e 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -594,7 +594,10 @@ function presetOnlyAudio (command: ffmpeg.FfmpegCommand): ffmpeg.FfmpegCommand { function getFFmpeg (input: string, type: 'live' | 'vod') { // We set cwd explicitly because ffmpeg appears to create temporary files when trancoding which fails in read-only file systems - const command = ffmpeg(input, { niceness: FFMPEG_NICE.TRANSCODING, cwd: CONFIG.STORAGE.TMP_DIR }) + const command = ffmpeg(input, { + niceness: type === 'live' ? FFMPEG_NICE.LIVE : FFMPEG_NICE.VOD, + cwd: CONFIG.STORAGE.TMP_DIR + }) const threads = type === 'live' ? CONFIG.LIVE.TRANSCODING.THREADS -- cgit v1.2.3