Update: MigzPlugins

Updated all plugins to include "-max_muxing_queue_size 4096"
This commit is contained in:
Migz93 2020-03-29 17:28:20 +01:00
parent 86835f6682
commit b22c576c84
5 changed files with 49 additions and 49 deletions

View file

@ -15,7 +15,7 @@ function details() {
tooltip: `Specify if any 2.0 audio tracks should be converted to aac for maximum compatability with devices.
\\nExample:\\n
true
\\nExample:\\n
false`
},
@ -24,7 +24,7 @@ function details() {
tooltip: `Specify if downmixing should be used to create extra audio tracks. I.e if you have an 8ch but no 2ch or 6ch, create the missing audio tracks from the 8 ch. Likewise if you only have 6ch, create the missing 2ch from it.
\\nExample:\\n
true
\\nExample:\\n
false`
},
@ -48,8 +48,8 @@ function plugin(file, librarySettings, inputs) {
response.infoLog += "☒File is not video. \n"
response.processFile = false;
return response
}
}
if (inputs.aac_stereo == "" && inputs.downmix == "") {
response.infoLog += "☒Neither aac_stereo or downmix options have been configured within plugin settings, please configure required options. Skipping this plugin. \n"
response.processFile = false
@ -68,22 +68,22 @@ function plugin(file, librarySettings, inputs) {
if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio") {
if (file.ffProbeData.streams[i].channels == "2") {
has2Channel = true
}
}
if (file.ffProbeData.streams[i].channels == "6") {
has6Channel = true
}
}
if (file.ffProbeData.streams[i].channels == "8") {
has8Channel = true
}
}
}
} catch (err) { }
}
for (var i = 0; i < file.ffProbeData.streams.length; i++) {
if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio") {
if (inputs.downmix.toLowerCase() == "true") {
if (has8Channel == true && has6Channel == false && file.ffProbeData.streams[i].channels == "8") {
ffmpegCommandInsert += `-map 0:${i} -c:a:${audioIdx} ac3 -ac 6 -metadata:s:a:${audioIdx} title="5.1 " `
ffmpegCommandInsert += `-map 0:${i} -c:a:${audioIdx} ac3 -ac 6 -metadata:s:a:${audioIdx} title="5.1 " `
response.infoLog += "☒Audio track is 8 channel, no 6 channel exists. Creating 2 channel from 6 channel. \n"
convert = true
}
@ -102,19 +102,19 @@ function plugin(file, librarySettings, inputs) {
}
audioIdx++
}
}
if (convert == true) {
response.processFile = true;
response.preset = `, -map 0 -c:v copy -c:a copy ${ffmpegCommandInsert} -strict -2 -c:s copy `
response.preset = `, -map 0 -c:v copy -c:a copy ${ffmpegCommandInsert} -strict -2 -c:s copy -max_muxing_queue_size 4096 `
} else {
response.infoLog += "☑File contains all required audio formats. \n"
response.processFile = false;
}
return response
}
module.exports.details = details;
module.exports.plugin = plugin;
module.exports.plugin = plugin;