mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Merge pull request #17 from robejo9/patch-10
Bitrate Modifer of Null added
This commit is contained in:
commit
1ee1d8a87f
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue