mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-17 11:16:26 -07:00
Migz Plugin Additions
1) Transcode plugin using nvidia GPU. 2) Plugin to clean title metadata from video if detected. This only cleans the title, the current plugin cleans all metadata if title is detected. 3) Plugin to clean audio, remove unwanted languages & tag unknown language tracks. 4) Plugin to clean subtitles, remove unwanted languages & tag unknown language tracks. 5) Plugin to convert stereo tracks to AAC and/or create downmix audio tracks. 6) Organise streams into order.
This commit is contained in:
parent
fc343a8c97
commit
7b84114d83
6 changed files with 740 additions and 0 deletions
65
Community/Tdarr_Plugin_MC93_Migz2CleanTitle.js
Normal file
65
Community/Tdarr_Plugin_MC93_Migz2CleanTitle.js
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
function details() {
|
||||
return {
|
||||
id: "Tdarr_Plugin_MC93_Migz2CleanTitle",
|
||||
Stage: "Pre-processing",
|
||||
Name: "Migz-Clean title metadata",
|
||||
Type: "Video",
|
||||
Operation: "Clean",
|
||||
Description: `[TESTING]This plugin removes video title metadata if it exists. \n\n`,
|
||||
Version: "1.00",
|
||||
Link: ""
|
||||
}
|
||||
}
|
||||
|
||||
function plugin(file) {
|
||||
var response = {
|
||||
|
||||
processFile : false,
|
||||
preset : '',
|
||||
container: '.' + file.container,
|
||||
handBrakeMode : false,
|
||||
FFmpegMode : true,
|
||||
reQueueAfter : false,
|
||||
infoLog : '',
|
||||
|
||||
}
|
||||
|
||||
var ffmpegCommandInsert = ''
|
||||
var videoIdx = 0
|
||||
var convert = false
|
||||
|
||||
if (file.fileMedium !== "video") {
|
||||
console.log("File is not video")
|
||||
response.infoLog += "☒File is not video \n"
|
||||
response.processFile = false;
|
||||
return response
|
||||
}
|
||||
|
||||
if(file.meta.Title != undefined ){
|
||||
ffmpegCommandInsert += ` -metadata title="" `
|
||||
convert = true
|
||||
}
|
||||
|
||||
for (var i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "video") {
|
||||
if (file.ffProbeData.streams[i].tags.title != undefined) {
|
||||
ffmpegCommandInsert += ` -metadata:s:v:${videoIdx} title="" `
|
||||
convert = true
|
||||
}
|
||||
videoIdx++
|
||||
}
|
||||
}
|
||||
|
||||
if(convert == true){
|
||||
response.infoLog += "☒File has title metadata \n"
|
||||
response.preset = `,${ffmpegCommandInsert} -c copy`
|
||||
response.reQueueAfter = true;
|
||||
response.processFile = true;
|
||||
}else{
|
||||
response.infoLog += "☑File has no title metadata \n"
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
module.exports.details = details;
|
||||
module.exports.plugin = plugin;
|
||||
Loading…
Add table
Add a link
Reference in a new issue