1) Set bufsize at a variable level dependant on bitrate. (Thanks winsome)
2) Add variable to enable transcoding files to 10bit if preferred.
3) Added two options to GPU transcode plugin after extensive testing/research with different options.
*-cq:v 19
*-rc-lookahead:v 32
4) Modify bitrate cutoff check to completely skip file if below cutoff, rather then check if it should be remuxed.
5) Tidy up some wording.
Description:`Files not in H265 will be transcoded into H265 using Nvidia GPU with ffmpeg, settings are dependant on file bitrate, working by the logic that H265 can support the same ammount of data at half the bitrate of H264. NVDEC & NVENC compatable GPU required. \n\n`,
tooltip:`Specify output container of file, ensure that all stream types you may have are supported by your chosen container. mkv is recommended.
\\nExample:\\n
mkv
\\nExample:\\n
mp4`
@ -25,10 +25,19 @@ function details() {
tooltip:`Specify bitrate cutoff, files with a current bitrate lower then this will not be transcoded. Rate is in kbps. Leave empty to disable.
\\nExample:\\n
6000
\\nExample:\\n
4000`
},
{
name:'enable_10bit',
tooltip:`Specify if output file should be 10bit. Default is false.
\\nExample:\\n
true
\\nExample:\\n
false`
},
]
}
}
@ -90,24 +99,22 @@ function plugin(file, librarySettings, inputs) {
returnresponse
}
// Check if inputs.bitrate)cutoff has something entered (Entered means user actually wants something to happen, empty would disable this).
// Check if inputs.bitratecutoff has something entered (Entered means user actually wants something to happen, empty would disable this).
if(inputs.bitrate_cutoff!=""){
// Checks if currentBitrate is below inputs.bitrate_cutoff, if so then continue.
// Checks if currentBitrate is below inputs.bitrate_cutoff, if so then cancel plugin without touching original files.
if(currentBitrate<=inputs.bitrate_cutoff){
// Check if file.container matches inputs.container. If so nothing for plugin to do. Else remux container to inputs.container.
if(file.container==inputs.container){
response.processFile=false
response.infoLog+=`☑Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff} & file container is already ${inputs.container}. Nothing to do, skipping. \n`
returnresponse
}else{
response.processFile=true
response.preset+=`, -c copy ${extraArguments}`
response.infoLog+=`☒Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff} but is not in correct container. Remuxing to ${inputs.container} but not transcoding. \n`
returnresponse
}
response.processFile=false
response.infoLog+=`☑Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff}. Nothing to do, cancelling plugin. \n`
Description:`Files not in H265 will be transcoded into H265 using CPU with ffmpeg, settings are dependant on file bitrate, working by the logic that H265 can support the same ammount of data at half the bitrate of H264. \n\n`,
tooltip:`Specify if output file should be 10bit. Default is false.
\\nExample:\\n
true
\\nExample:\\n
false`
},
]
}
}
@ -90,24 +99,22 @@ function plugin(file, librarySettings, inputs) {
returnresponse
}
// Check if inputs.bitrate)cutoff has something entered (Entered means user actually wants something to happen, empty would disable this).
// Check if inputs.bitratecutoff has something entered (Entered means user actually wants something to happen, empty would disable this).
if(inputs.bitrate_cutoff!=""){
// Checks if currentBitrate is below inputs.bitrate_cutoff, if so then continue.
// Checks if currentBitrate is below inputs.bitrate_cutoff, if so then cancel plugin without touching original files.
if(currentBitrate<=inputs.bitrate_cutoff){
// Check if file.container matches inputs.container. If so nothing for plugin to do. Else remux container to inputs.container.
if(file.container==inputs.container){
response.processFile=false
response.infoLog+=`☑Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff} & file container is already ${inputs.container}. Nothing to do, skipping. \n`
returnresponse
}else{
response.processFile=true
response.preset+=`, -c copy ${extraArguments}`
response.infoLog+=`☒Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff} but is not in correct container. Remuxing to ${inputs.container} but not transcoding. \n`
returnresponse
}
response.processFile=false
response.infoLog+=`☑Current bitrate is below configured bitrate cutoff of ${inputs.bitrate_cutoff}. Nothing to do, cancelling plugin. \n`