From 5b9409bf532936acd656081a42a68d2b41f9a164 Mon Sep 17 00:00:00 2001 From: robejo9 Date: Sat, 14 Dec 2019 00:49:23 -0600 Subject: [PATCH] Bitrate Modifer of Null added Created modifier for null value to avoid 0 input for bitrate target. --- ...Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Community/Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV.js b/Community/Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV.js index 0ec049c..19b277a 100644 --- a/Community/Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV.js +++ b/Community/Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV.js @@ -81,7 +81,7 @@ function plugin(file) { //codec will be checked so it can be transcoded correctly if (file.video_resolution === "480p" || file.video_resolution === "576p" ) { bitratecheck = 1000000; - if(bitrateprobe < bitratecheck) { + if(bitrateprobe != null && bitrateprobe < bitratecheck) { bitratetarget = parseInt((bitrateprobe * .8) / 1024); // Lower Bitrate to 60% of original and convert to KB bitratemax = bitratetarget + 500; // Set max bitrate to 6MB Higher } @@ -97,7 +97,7 @@ function plugin(file) { //codec will be checked so it can be transcoded correctly if(file.video_resolution === "720p") { bitratecheck = 2000000; - if(bitrateprobe < bitratecheck) { + if(bitrateprobe != null && bitrateprobe < bitratecheck) { bitratetarget = parseInt((bitrateprobe * .8) / 1024); // Lower Bitrate to 60% of original and convert to KB bitratemax = bitratetarget + 2000; // Set max bitrate to 6MB Higher } @@ -113,7 +113,7 @@ function plugin(file) { //codec will be checked so it can be transcoded correctly if(file.video_resolution === "1080p") { bitratecheck = 2500000; - if(bitrateprobe < bitratecheck) { + if(bitrateprobe != null && bitrateprobe < bitratecheck) { bitratetarget = parseInt((bitrateprobe * .8) / 1024); // Lower Bitrate to 60% of original and convert to KB bitratemax = bitratetarget + 2500; // Set max bitrate to 6MB Higher } @@ -129,7 +129,7 @@ function plugin(file) { //codec will be checked so it can be transcoded correctly if(file.video_resolution === "4KUHD") { bitratecheck = 14000000; - if(bitrateprobe < bitratecheck) { + if(bitrateprobe != null && bitrateprobe < bitratecheck) { bitratetarget = parseInt((bitrateprobe * .7) / 1024); // Lower Bitrate to 60% of original and convert to KB bitratemax = bitratetarget + 6000; // Set max bitrate to 6MB Higher }