mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Migz Plugin: Bug Fix
Resolve bug with Migz1FFMPEG where bitrate transcode targets were always displayed, even if the file already meets h265/container and isn't used.
This commit is contained in:
parent
c5a1ee55a9
commit
5ac9c85c06
1 changed files with 3 additions and 3 deletions
|
|
@ -65,9 +65,6 @@ function plugin(file, librarySettings, inputs) {
|
||||||
response.infoLog += "☒Target bitrate could not be calculated. Skipping this plugin. \n"
|
response.infoLog += "☒Target bitrate could not be calculated. Skipping this plugin. \n"
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
||||||
bitrateSettings = `-b:v ${targetBitrate}k -minrate ${minimumBitrate}k -maxrate ${maximumBitrate}k`
|
|
||||||
response.infoLog += `Container for output selected as ${inputs.container}. \n Current bitrate = ${~~(file.file_size / (duration * 0.0075))} \n Bitrate settings: \nTarget = ${targetBitrate} \nMinimum = ${minimumBitrate} \nMaximum = ${maximumBitrate} \n`
|
|
||||||
|
|
||||||
if (file.ffProbeData.streams[0].codec_name == 'hevc' && file.container == inputs.container) {
|
if (file.ffProbeData.streams[0].codec_name == 'hevc' && file.container == inputs.container) {
|
||||||
response.processFile = false
|
response.processFile = false
|
||||||
|
|
@ -81,6 +78,9 @@ function plugin(file, librarySettings, inputs) {
|
||||||
response.processFile = true;
|
response.processFile = true;
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bitrateSettings = `-b:v ${targetBitrate}k -minrate ${minimumBitrate}k -maxrate ${maximumBitrate}k`
|
||||||
|
response.infoLog += `Container for output selected as ${inputs.container}. \n Current bitrate = ${~~(file.file_size / (duration * 0.0075))} \n Bitrate settings: \nTarget = ${targetBitrate} \nMinimum = ${minimumBitrate} \nMaximum = ${maximumBitrate} \n`
|
||||||
|
|
||||||
//codec will be checked so it can be transcoded correctly
|
//codec will be checked so it can be transcoded correctly
|
||||||
if (file.video_codec_name == 'h263') {
|
if (file.video_codec_name == 'h263') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue