From 9408e59ce4fcf61dcd717f8f8b3d33926101626e Mon Sep 17 00:00:00 2001 From: Stickie Date: Sun, 6 Aug 2023 01:57:43 +0200 Subject: [PATCH 1/3] Update Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js Fixes issue with `undefined` being added to the ffmpeg args. > ffmpeg.exe undefined -i Affected other users too, see [discord discussion here](https://discord.com/channels/623392507828371476/623799920574595092/1118188978059878482). --- Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js b/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js index c4cb28c..20192b1 100644 --- a/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js +++ b/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js @@ -68,6 +68,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { reQueueAfter: true, // Leave as true. File will be re-qeued afterwards and pass through the plugin // filter again to make sure it meets conditions. + preset: '', // Initialize with an empty string }; // Check that inputs.container has been configured, else dump out From fe18f31eaf43b001b314e3df0f1af2b99c55ee46 Mon Sep 17 00:00:00 2001 From: Stickie Date: Sun, 6 Aug 2023 02:54:36 +0200 Subject: [PATCH 2/3] Removed `-tune` argument breaking functionality. --- Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js b/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js index 20192b1..2334353 100644 --- a/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js +++ b/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js @@ -229,7 +229,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { response.preset = '-c:v vp8_cuvid'; } - response.preset += `,-map 0 -c:v h264_nvenc -preset fast -crf 23 -tune film ${bitrateSettings} ` + response.preset += `,-map 0 -c:v h264_nvenc -preset fast -crf 23 ${bitrateSettings} ` + `-c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ${extraArguments}`; response.processFile = true; response.infoLog += 'File is not h264. Transcoding. \n'; From 112e53930006ceaf0e6fe85245f7ea397ed8bfb8 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Tue, 8 Aug 2023 05:36:31 +0100 Subject: [PATCH 3/3] Update tests --- .../Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js b/tests/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js index 0e4437a..ba27529 100644 --- a/tests/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js +++ b/tests/Community/Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264.js @@ -37,6 +37,7 @@ const tests = [ handBrakeMode: false, FFmpegMode: true, reQueueAfter: true, + preset: '', container: '.mkv', }, }, @@ -59,8 +60,8 @@ const tests = [ handBrakeMode: false, FFmpegMode: true, reQueueAfter: true, + preset: ',-map 0 -c:v h264_nvenc -preset fast -crf 23 -b:v 3058k -minrate 2140k -maxrate 3975k -bufsize 3058k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ', container: '.mkv', - preset: ',-map 0 -c:v h264_nvenc -preset fast -crf 23 -tune film -b:v 3058k -minrate 2140k -maxrate 3975k -bufsize 3058k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ', }, }, { @@ -81,6 +82,7 @@ const tests = [ handBrakeMode: false, FFmpegMode: true, reQueueAfter: true, + preset: '', container: '.mkv', }, }, @@ -107,8 +109,8 @@ const tests = [ handBrakeMode: false, FFmpegMode: true, reQueueAfter: true, + preset: ',-map 0 -c:v h264_nvenc -preset fast -crf 23 -b:v 1526k -minrate 1068k -maxrate 1983k -bufsize 1526k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ', container: '.mkv', - preset: 'undefined,-map 0 -c:v h264_nvenc -preset fast -crf 23 -tune film -b:v 1526k -minrate 1068k -maxrate 1983k -bufsize 1526k -c:a copy -c:s copy -max_muxing_queue_size 9999 -pix_fmt yuv420p ', }, }, { @@ -126,6 +128,7 @@ const tests = [ handBrakeMode: false, FFmpegMode: true, reQueueAfter: true, + preset: '', container: '.mp4', }, },