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`,
// Work out currentBitrate using "Bitrate = file size / (number of minutes * .0075)" - Used from here https://blog.frame.io/2017/03/06/calculate-video-bitrates/
// Use the same calculation used for currentBitrate but divide it in half to get targetBitrate. Logic of h265 can be half the bitrate as h264 without losing quality.
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`,
// Work out currentBitrate using "Bitrate = file size / (number of minutes * .0075)" - Used from here https://blog.frame.io/2017/03/06/calculate-video-bitrates/
// Use the same calculation used for currentBitrate but divide it in half to get targetBitrate. Logic of h265 can be half the bitrate as h264 without losing quality.
Description:`This plugin removes title metadata from video/audio/subtitles, if it exists. Video checking is mandatory, audio and subtitles are optional.\n\n`,
tooltip:`Specify language tag/s here for the audio tracks you'd like to keep, recommended to keep "und" as this stands for undertermined, some files may not have the language specified. Must follow ISO-639-2 3 letter format. https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
\\nExample:\\n
eng
@ -19,169 +21,201 @@ function details() {
eng,und
\\nExample:\\n
eng,und,jap`
eng,und,jap`,
},
{
name:'commentary',
name:"commentary",
tooltip:`Specify if audio tracks that contain commentary/description should be removed.
\\nExample:\\n
true
\\nExample:\\n
false`
false`,
},
{
name:'tag_language',
name:"tag_language",
tooltip:`Specify a single language for audio tracks with no language or unknown language to be tagged with, leave empty to disable, you must have "und" in your list of languages to keep for this to function. Must follow ISO-639-2 3 letter format. https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
\\nExample:\\n
eng
\\nExample:\\n
por`
por`,
},
{
name:'tag_title',
name:"tag_title",
tooltip:`Specify audio tracks with no title to be tagged with the number of channels they contain. Do NOT use this with mp4, as mp4 does not support title tags.
\\nExample:\\n
true
\\nExample:\\n
false`
false`,
},
]
}
],
};
}
functionplugin(file,librarySettings,inputs){
varresponse={
processFile:false,
preset:'',
container:'.'+file.container,
preset:"",
container:"."+file.container,
handBrakeMode:false,
FFmpegMode:true,
reQueueAfter:false,
infoLog:'',
}
infoLog:"",
};
// Check if file is a video. If it isn't then exit plugin.
if(file.fileMedium!=="video"){
console.log("File is not video")
response.infoLog+="☒File is not video \n"
console.log("File is not video");
response.infoLog+="☒File is not video \n";
response.processFile=false;
returnresponse
returnresponse;
}
// Check if inputs.language has been configured. If it hasn't then exit plugin.
if(inputs.language==""){
response.infoLog+="☒Language/s keep have not been configured within plugin settings, please configure required options. Skipping this plugin. \n"
response.infoLog+=
"☒Language/s keep have not been configured within plugin settings, please configure required options. Skipping this plugin. \n";
response.infoLog+=`☒Audio stream detected as being an unwanted language, removing. Audio stream 0:a:${audioIdx} - ${file.ffProbeData.streams[i].tags.language.toLowerCase()}\n`
response.infoLog+=`☒Audio stream detected as being an unwanted language, removing. Audio stream 0:a:${audioIdx} - ${file.ffProbeData.streams[
i
].tags.language.toLowerCase()}\n`;
convert=true;
}
}catch(err){}
// Catch error here incase the title metadata is completely missing.
try{
// Check if inputs.commentary is set to true AND if stream is audio AND then checks for stream titles with the following "commentary, description, sdh". Removing any streams that are applicable.
response.infoLog+=`☒Audio stream detected as being Commentary or Description, removing. Audio stream 0:a:${audioIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`
response.infoLog+=`☒Audio stream detected as being Commentary or Description, removing. Audio stream 0:a:${audioIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`;
convert=true;
}
}catch(err){}
// Check if inputs.tag_language has something entered (Entered means user actually wants something to happen, empty would disable this) AND checks that stream is audio.
response.infoLog+=`☒Audio stream detected as having unknown language tagged, tagging as ${inputs.tag_language}. \n`;
convert=true;
}
}catch(err){}
// Checks if the tags metadata is completely missing, if so this would cause playback to show language as "undefined". No catch error here otherwise it would never detect the metadata as missing.
response.infoLog+=`☒Audio stream detected as having no language tagged, tagging as ${inputs.tag_language}. \n`;
convert=true;
}
// Checks if the tags.language metadata is completely missing, if so this would cause playback to show language as "undefined". No catch error here otherwise it would never detect the metadata as missing.
response.infoLog+=`☒Audio stream detected as having no language tagged, tagging as ${inputs.tag_language}. \n`;
convert=true;
}
}
}
try{
// Check if title metadata is missing from any streams AND inputs.tag_title set to true AND if stream type is audio. Add title to any applicable streams.
tooltip:`Specify language tag/s here for the subtitle tracks you'd like to keep. Must follow ISO-639-2 3 letter format. https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
\\nExample:\\n
eng
\\nExample:\\n
eng,jap`
eng,jap`,
},
{
name:'commentary',
name:"commentary",
tooltip:`Specify if subtitle tracks that contain commentary/description should be removed.
\\nExample:\\n
true
\\nExample:\\n
false`
false`,
},
{
name:'tag_language',
name:"tag_language",
tooltip:`Specify a single language for subtitle tracks with no language or unknown language to be tagged with, leave empty to disable. Must follow ISO-639-2 3 letter format. https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
\\nExample:\\n
eng
\\nExample:\\n
por`
por`,
},
]
}
],
};
}
functionplugin(file,librarySettings,inputs){
varresponse={
processFile:false,
preset:'',
container:'.'+file.container,
preset:"",
container:"."+file.container,
handBrakeMode:false,
FFmpegMode:true,
reQueueAfter:false,
infoLog:'',
}
infoLog:"",
};
// Check if file is a video. If it isn't then exit plugin.
if(file.fileMedium!=="video"){
console.log("File is not video")
response.infoLog+="☒File is not video \n"
console.log("File is not video");
response.infoLog+="☒File is not video \n";
response.processFile=false;
returnresponse
returnresponse;
}
// Check if inputs.language has been configured. If it hasn't then exit plugin.
if(inputs.language==""){
response.infoLog+="☒Language/s keep have not been configured within plugin settings, please configure required options. Skipping this plugin. \n"
response.infoLog+=
"☒Language/s keep have not been configured within plugin settings, please configure required options. Skipping this plugin. \n";
response.infoLog+=`☒Subtitle stream detected as being an unwanted language, removing. Subtitle stream 0:s:${subtitleIdx} - ${file.ffProbeData.streams[i].tags.language.toLowerCase()}\n`
response.infoLog+=`☒Subtitle stream detected as being an unwanted language, removing. Subtitle stream 0:s:${subtitleIdx} - ${file.ffProbeData.streams[
i
].tags.language.toLowerCase()}\n`;
convert=true;
}
}catch(err){}
// Catch error here incase the title metadata is completely missing.
try{
// Check if inputs.commentary is set to true AND if stream is subtitle AND then checks for stream titles with the following "commentary, description, sdh". Removing any streams that are applicable.
response.infoLog+=`☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${SubtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`
response.infoLog+=`☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${SubtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`;
convert=true;
}
}catch(err){}
// Check if inputs.tag_language has something entered (Entered means user actually wants something to happen, empty would disable this) AND checks that stream is subtitle.
response.infoLog+=`☒Subtitle stream detected as having unknown language tagged, tagging as ${inputs.tag_language}. \n`;
convert=true;
}
}catch(err){}
// Checks if the tags metadata is completely missing, if so this would cause playback to show language as "undefined". No catch error here otherwise it would never detect the metadata as missing.
response.infoLog+=`☒Subtitle stream detected as having no language tagged, tagging as ${inputs.tag_language}. \n`;
convert=true;
}
// Checks if the tags.language metadata is completely missing, if so this would cause playback to show language as "undefined". No catch error here otherwise it would never detect the metadata as missing.
tooltip:`Specify if any 2.0 audio tracks should be converted to aac for maximum compatability with devices. Optional.
\\nExample:\\n
true
\\nExample:\\n
false`
false`,
},
{
name:'downmix',
name:"downmix",
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. Optional.
\\nExample:\\n
true
\\nExample:\\n
false`
false`,
},
]
}
],
};
}
functionplugin(file,librarySettings,inputs){
varresponse={
processFile:false,
container:'.'+file.container,
container:"."+file.container,
handBrakeMode:false,
FFmpegMode:true,
reQueueAfter:true,
infoLog:'',
}
infoLog:"",
};
// Check if both inputs.aac_stereo AND inputs.downmix have been left empty. If they have then exit plugin.
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
returnresponse
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;
returnresponse;
}
// Check if file is a video. If it isn't then exit plugin.
// Check if audioIdx or subtitleIdx do NOT equal 0, if they do then it means a audio or subtitle track has already appeared before the video track so file needs to be organized.
// Check if subtitleIdx does NOT equal 0, if it does then it means a subtitle track has already appeared before an audio track so file needs to be organized.
if(subtitleIdx!="0"){
convert=true
response.infoLog+="☒ Audio not second. \n"
convert=true;
response.infoLog+="☒ Audio not second. \n";
}
// Increment audioIdx.
audioIdx++
audioIdx++;
// Check if audio track is 2 channel.
if(file.ffProbeData.streams[i].channels=="2"){
// Check if audio6Idx or audio8Idx do NOT equal 0, if they do then it means a 6 channel or 8 channel audio track has already appeared before the 2 channel audio track so file needs to be organized.
if(audio6Idx!="0"||audio8Idx!="0"){
convert=true
response.infoLog+="☒ Audio 2ch not first. \n"
convert=true;
response.infoLog+="☒ Audio 2ch not first. \n";
}
// Increment audio2Idx.
audio2Idx++
audio2Idx++;
}
// Check if audio track is 6 channel.
if(file.ffProbeData.streams[i].channels=="6"){
// Check if audio8Idx does NOT equal 0, if it does then it means a 8 channel audio track has already appeared before the 6 channel audio track so file needs to be organized.
Description:`[Contains built-in filter] If the file is not in h265 it will be trancoded into h265 with FFmpeg using the following command '-e x265 -q 22 --encoder-preset slow --all-audio --all-subtitles copy:aac -E fdk_aac -Q 4 -x aq-mode=3'. If no aac, aac track will be added. Subtitles are kept. Metadata is removed.\n\n
Name:"Tiered FFMPEG NVENC settings depending on resolution",
Type:"Video",
Operation:"Transcode",
Operation:"Transcode",
Description:`[Contains built-in filter] This plugin uses different FFMPEG NVENC transcoding settings for 480p,576p,720p,1080p and 4KUHD. If files are not in hevc they will be transcoded. The output container is mkv. \n\n`,
Name:"Dallas FFmpeg h264 mp4. Video: h264/mp4, Subs: Convert to mov_text or drop, Audio: aac",
Name:
"Dallas FFmpeg h264 mp4. Video: h264/mp4, Subs: Convert to mov_text or drop, Audio: aac",
Type:"Video",
Description:`This plugin transcodes into H264 with an MP4 container using the FFmpeg preset you select (slow,medium,fast,veryfast). It maintains all compatible subtitles and audio tracks. Drops picture tracks such as mjpeg\n\n`,
Description:`This plugin will check for subtitles, they should be named according to the ISO 639-2 language code.\nA subtitle could look like this: eng.srt\n If there are subtitles found they will be added with FFMPEG, if there are no subs of that language found.\n On first run node module iso-639-2 will be installed in the documents folder.\n Created by @control#0405`,
Description:"Plugin that checks for unwanted audio, per 1.104 beta you can change the languages yourself from within Tdarr!\nUntill you enter a value it keep english tracks by default.\nUndefined languages are kept to prevent videos without sound.\nIf you would like to keep track of the languages you have for each file you can use the 'special' option.\nCreated by @control#0405",
Operation:"Remove Audio",
Description:
"Plugin that checks for unwanted audio, per 1.104 beta you can change the languages yourself from within Tdarr!\nUntill you enter a value it keep english tracks by default.\nUndefined languages are kept to prevent videos without sound.\nIf you would like to keep track of the languages you have for each file you can use the 'special' option.\nCreated by @control#0405",
tooltip:`Desired Languages you would like to keep, language format has to be according to the iso-639-2 standard: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes\\nExample:\\eng,dut`
name:"languages",
tooltip:`Desired Languages you would like to keep, language format has to be according to the iso-639-2 standard: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes\\nExample:\\eng,dut`,
},
{
name:'special',
tooltip:`This is if you want a specific language to be logged to a file in your Tdarr documents folder.\\nIt will add the name of the file that is being processed if this language(s) has been found.\\nThe file is created the first time it finds a file with the language.\\nThe languages don't have to be in "languages".\\nExample:\\eng,dut`
name:"special",
tooltip:`This is if you want a specific language to be logged to a file in your Tdarr documents folder.\\nIt will add the name of the file that is being processed if this language(s) has been found.\\nThe file is created the first time it finds a file with the language.\\nThe languages don't have to be in "languages".\\nExample:\\eng,dut`,
},
{
name:'container',
tooltip:`Enter the output container of the new file.\\n Default: .mkv\\nExample:\\n.mkv`
name:"container",
tooltip:`Enter the output container of the new file.\\n Default: .mkv\\nExample:\\n.mkv`,
Description:`Uses iiDrakeii's filter, and crops video files when letterboxing is detected.\nThis uses the FFMPEG NVENC transcoding(hw).\nIf a file is 4K it will be scaled down to 1080p.\nNow with user definable bitrates!(since 1.104 beta)\nCreated by @control#0405`,
tooltip:`Desired bitrate for a 1080p video, minimum transcode size is based of this too!\\n 720p will be half of 1080p, 480p will be half of 720p.\\nThe default is '3000', this value is based of movies.\\nI would suggest 1500-2000 for series.\\nExample:\\n3000`
name:"bitrate",
tooltip:`Desired bitrate for a 1080p video, minimum transcode size is based of this too!\\n 720p will be half of 1080p, 480p will be half of 720p.\\nThe default is '3000', this value is based of movies.\\nI would suggest 1500-2000 for series.\\nExample:\\n3000`,
},
{
name:'container',
tooltip:`Enter the output container of the new file.\\n Default: .mkv\\nExample:\\n.mkv`
name:"container",
tooltip:`Enter the output container of the new file.\\n Default: .mkv\\nExample:\\n.mkv`,
@ -244,7 +259,8 @@ function crop_decider(file, crop_height) {
}else{
returns.log+=`☒ - Crop is not necessary\n`;
}
}elseif(imageWidth<770){//file won't be cropped at this resolution
}elseif(imageWidth<770){
//file won't be cropped at this resolution
returns.log+=`No crop: Resolution < 720p\n`;
}
@ -255,42 +271,48 @@ function size_check(file, min_bitrate) {
varduration=file.meta.Duration;//duration of video in seconds
varsource=file.meta.SourceFile;//source file
varstats=fs.statSync(source);
varsize=stats["size"]/1000000000;
varsize=stats["size"]/1000000000;
size=size.toFixed(2);
varreturns={
size:0,
log:``
}
log:``,
};
//tree for resolution : quality
if(file.video_resolution==="1080p"||file.video_resolution==="4KUHD"){//file will be encoded if the resolution is 1080p, or greater (it will be downscaled)
varmin_transcode_size=(min_bitrate*duration*0.125)/1000000;//minimum size in GB for transcode
@ -331,13 +366,24 @@ function encoder_string(file, avg_rate, max_rate, container) {
varsub=``;
//tree for resolution : quality
if(file.video_resolution==="1080p"||file.video_resolution==="4KUHD"){//file will be encoded if the resolution is 1080p, or greater (it will be downscaled)
Description:`[Contains built-in filter] This plugin for 4K video removes subs. If no AC3 track exists, it adds one (max 5.1 channels). If only an AC3 commentary track exists, it adds a new AC3 main track (max 5.1 channels). The output container is the same as the original file. \n\n`,
Description:`[Contains built-in filter] This plugin removes subs, metadata (if a title exists) and adds a stereo 192kbit AAC track if an AAC track (English or any) doesn't exist. The output container is mp4. \n\n
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`
returnresponse
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`;
returnresponse;
}
}
if(file.meta.Title!="undefined"&&hasSubs){
response.infoLog+="☒File has title and has subs \n"
Description:`[Contains built-in filter] This plugin removes metadata (if a title exists) and adds a stereo 192kbit AAC track if an AAC track (any) doesn't exist. The output container is mp4. \n\n
Description:`[Contains built-in filter] High Quality FFMPEG transcoding settings for Animation. Converts all audio to AAC 512K. Preserves track names, metadata and attachments/fonts. Proper use of x265-params. CRF 18. Preset medium. 10-Bit Video encoding. Skips h.265 encoded videos. The output container is mkv. \n\n`,
Description:`[Contains built-in filter] This plugin uses different FFmpeg transcoding settings for 480p,576p,720p and 1080p. If files are not in hevc they will be transcoded. The output container is mkv. \n\n`,
Version:"1.01",
Link:"",
Tags:"pre-processing,ffmpeg,h265,video only,"
}
Tags:"pre-processing,ffmpeg,h265,video only,",
};
}
functionplugin(file){
vartranscode=0;//if this var changes to 1 the file will be transcoded
//default values that will be returned
//default values that will be returned
varresponse={
processFile:false,
preset:'',
container:'.mkv',
preset:"",
container:".mkv",
handBrakeMode:false,
FFmpegMode:true,
reQueueAfter:true,
infoLog:''
}
infoLog:"",
};
//check if the file is a video, if not the function will be stopped immediately
//check if the file is a video, if not the function will be stopped immediately
if(file.fileMedium!=="video"){
response.processFile=false
response.infoLog+="☒File is not a video! \n"
returnresponse
response.processFile=false;
response.infoLog+="☒File is not a video! \n";
returnresponse;
}else{
response.infoLog+="☑File is a video! \n"
response.infoLog+="☑File is a video! \n";
}
//check if the file is already hevc, it will not be transcoded if true and the function will be stopped immediately
Description:`[Contains built-in filter] This plugin transcodes all 4K videos to h265 using nvenc (if not in h265 already). For 4K and files in other resolutions: If not in mkv the file is remuxed into mkv. If the English language track is not in AC3,EAC3 or DTS then an AC3 track is added.\n\n
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`
returnresponse
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`;
returnresponse;
}
}
if(file.container!='mkv'){
if(file.container!="mkv"){
response.processFile=true;
response.preset=', -map 0 -c copy'
response.container='.mkv'
response.handBrakeMode=false
response.FFmpegMode=true
response.preset=", -map 0 -c copy";
response.container=".mkv";
response.handBrakeMode=false;
response.FFmpegMode=true;
response.reQueueAfter=true;
response.infoLog+="☒File is not in mkv container! \n"
returnresponse
response.infoLog+="☒File is not in mkv container! \n";
returnresponse;
}else{
response.infoLog+="☑File is in mkv container! \n"
response.infoLog+="☑File is in mkv container! \n";
Description:`[Contains built-in filter] This plugin transcodes all videos to h265 (if not in h265 already) and remuxes if not in mkv. If the English language track is not in AC3,EAC3 or DTS then an AC3 track is added.\n\n
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`
returnresponse
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`;
returnresponse;
}
}
if(file.container!='mkv'){
if(file.container!="mkv"){
response.processFile=true;
response.preset=', -map 0 -c copy'
response.container='.mkv'
response.handBrakeMode=false
response.FFmpegMode=true
response.preset=", -map 0 -c copy";
response.container=".mkv";
response.handBrakeMode=false;
response.FFmpegMode=true;
response.reQueueAfter=true;
response.infoLog+="☒File is not in mkv container! \n"
returnresponse
response.infoLog+="☒File is not in mkv container! \n";
returnresponse;
}else{
response.infoLog+="☑File is in mkv container! \n"
response.infoLog+="☑File is in mkv container! \n";
Description:`[Contains built-in filter] This plugin transcodes all videos to h265 10 bit (if not in h265 already) and remuxes if not in mkv. If the English language track is not in AC3,EAC3 or DTS then an AC3 track is added.\n\n
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`
returnresponse
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`;
returnresponse;
}
}
if(file.container!='mkv'){
if(file.container!="mkv"){
response.processFile=true;
response.preset=', -map 0 -c copy'
response.container='.mkv'
response.handBrakeMode=false
response.FFmpegMode=true
response.preset=", -map 0 -c copy";
response.container=".mkv";
response.handBrakeMode=false;
response.FFmpegMode=true;
response.reQueueAfter=true;
response.infoLog+="☒File is not in mkv container! \n"
returnresponse
response.infoLog+="☒File is not in mkv container! \n";
returnresponse;
}else{
response.infoLog+="☑File is in mkv container! \n"
response.infoLog+="☑File is in mkv container! \n";
Description:`[Contains built-in filter] This plugin transcodes all videos to h265 using nvenc (if not in h265 already) and remuxes if not in mkv. If the English language track is not in AC3,EAC3 or DTS then an AC3 track is added.\n\n
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`
returnresponse
response.infoLog+=`☒File has no language track in ${requiredAudioCodecs}. No ${preferredLangTrack} track marked so transcoding audio track 1 into ${preferredCodec}! \n`;
returnresponse;
}
}
if(file.container!='mkv'){
if(file.container!="mkv"){
response.processFile=true;
response.preset=', -map 0 -c copy'
response.container='.mkv'
response.handBrakeMode=false
response.FFmpegMode=true
response.preset=", -map 0 -c copy";
response.container=".mkv";
response.handBrakeMode=false;
response.FFmpegMode=true;
response.reQueueAfter=true;
response.infoLog+="☒File is not in mkv container! \n"
returnresponse
response.infoLog+="☒File is not in mkv container! \n";
returnresponse;
}else{
response.infoLog+="☑File is in mkv container! \n"
response.infoLog+="☑File is in mkv container! \n";
Description:`[Contains built-in filter] This plugin removes audio tracks which are not English or are not undefined. It ensures at least 1 audio track is left in any language. \n\n
Description:`[Contains built-in filter] This plugin transcodes into H264 using FFmpeg's 'Medium' preset if the file is not in H264 already. It maintains all subtitles. It removes metadata (if a title exists), and maintains all audio tracks. The output container is MP4. \n\n
Description:`[Contains built-in filter] This plugin transcodes into H264 using FFmpeg's 'Fast' preset if the file is not in H264 already. It maintains all subtitles. It removes metadata (if a title exists), and maintains all audio tracks. The output container is MP4. \n\n
Description:`[Contains built-in filter] This plugin transcodes into H264 using FFmpeg's 'Slow' preset if the file is not in H264 already. It maintains all subtitles. It removes metadata (if a title exists), and maintains all audio tracks. The output container is MP4. \n\n
Description:`[Contains built-in filter] This plugin transcodes into H264 using FFmpeg's 'VeryFast' preset if the file is not in H264 already. It maintains all subtitles. It removes metadata (if a title exists), and maintains all audio tracks. The output container is MP4. \n\n
2.Determine an id for your plugin. Every id must start with 'Tdarr_Plugin_xxxx' where xxxx is a random mini id containing the following:
Numeric digits (0-9)
Uppercase letters (A-Z)
Lowercase letters (a-z)
Numeric digits (0-9)
Uppercase letters (A-Z)
Lowercase letters (a-z)
The rest of the plugin id can be whatever you like. See the plugins folder for examples:
@ -56,20 +56,17 @@ For the plugin link, I'll add this once you create a PR to community plugins.
}
Please see the bottom of this README for the structure of an example file object. To see a specific file's details, search for the file in the search tab and click the 'i' info button.
Please see the bottom of this README for the structure of an example file object. To see a specific file's details, search for the file in the search tab and click the 'i' info button.
6.Once you have finished configuring your plugin,
For community plugins:
Create a pull request to have your plugin added to:
Add them to 'User\Documents\Tdarr\Plugins\Local'. In Tdarr, select 'Local' in the plugin section of the library you're in and add your local plugin id.
Example file object:
var file = {
_id: 'C:/Users/H/Desktop/Test Input1/Sample.mp4',
@ -312,6 +309,3 @@ Add them to 'User\Documents\Tdarr\Plugins\Local'. In Tdarr, select 'Local' in th
Tags:"ffmpeg,h265",//Provide tags to categorise your plugin in the plugin browser.Tag options: h265,hevc,h264,nvenc h265,nvenc h264,video only,audio only,subtitle only,handbrake,ffmpeg,radarr,sonarr,pre-processing,post-processing,configurable
Tags:"ffmpeg,h265",//Provide tags to categorise your plugin in the plugin browser.Tag options: h265,hevc,h264,nvenc h265,nvenc h264,video only,audio only,subtitle only,handbrake,ffmpeg,radarr,sonarr,pre-processing,post-processing,configurable
Inputs:[//(Optional) Inputs you'd like the user to enter to allow your plugin to be easily configurable from the UI
Inputs:[
//(Optional) Inputs you'd like the user to enter to allow your plugin to be easily configurable from the UI
{
name:'language',
name:"language",
tooltip:`Enter one language tag here for the language of the subtitles you'd like to keep.
\\nExample:\\n
@ -28,41 +25,36 @@ module.exports.details = function details() {
\\nExample:\\n
de` //Each line following `Example:` will be clearly formatted. \\n used for line breaks
de`, //Each line following `Example:` will be clearly formatted. \\n used for line breaks
Stage:"Post-processing",//Preprocessing or Post-processing. Determines when the plugin will be executed. This plugin does some stuff after all plugins have been executed
@ -12,11 +8,12 @@ module.exports.details = function details() {
Description:`This plugin does some stuff after all plugins have been executed. \n\n`,
Tags:"ffmpeg,h265",//Provide tags to categorise your plugin in the plugin browser.Tag options: h265,hevc,h264,nvenc h265,nvenc h264,video only,audio only,subtitle only,handbrake,ffmpeg,radarr,sonarr,pre-processing,post-processing,configurable
Tags:"ffmpeg,h265",//Provide tags to categorise your plugin in the plugin browser.Tag options: h265,hevc,h264,nvenc h265,nvenc h264,video only,audio only,subtitle only,handbrake,ffmpeg,radarr,sonarr,pre-processing,post-processing,configurable
Inputs:[//(Optional) Inputs you'd like the user to enter to allow your plugin to be easily configurable from the UI
Inputs:[
//(Optional) Inputs you'd like the user to enter to allow your plugin to be easily configurable from the UI
{
name:'language',
name:"language",
tooltip:`Enter one language tag here for the language of the subtitles you'd like to keep.
\\nExample:\\n
@ -26,277 +23,273 @@ module.exports.details = function details() {
fr
\\nExample:\\n
de` //Each line following `Example:` will be clearly formatted. \\n used for line breaks
de`, //Each line following `Example:` will be clearly formatted. \\n used for line breaks
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track. \n`
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track. \n`,
};
}
}
}
}
functionattemptMakeStreamUnd(langTag){
console.log(
"No tracks with specified lang tag exist. Checking undefined tracks."
);
console.log('No tracks with specified lang tag exist. Checking undefined tracks.')
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track. \n`
}
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track. \n`,
note:`The required channel count ${channelCount} is lower than the highest available channel count (${highestChannelCount.channels}). Adding it and removing others! \n`
note:`The required channel count ${channelCount} is lower than the highest available channel count (${highestChannelCount.channels}). Adding it and removing others! \n`,
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track, removing others. \n`
}
note:`The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track, removing others. \n`,
};
}
}
}
functionattemptMakeStreamUnd(langTag){
console.log(
"No tracks with specified lang tag exist. Checking undefined tracks."
);
console.log('No tracks with specified lang tag exist. Checking undefined tracks.')
note:`No ${reqLang} streams. The required channel count ${channelCount} is lower than the highest available channel count (${highestChannelCount.channels}).Adding it and removing others! \n`
}
note:`No ${reqLang} streams. The required channel count ${channelCount} is lower than the highest available channel count (${highestChannelCount.channels}).Adding it and removing others! \n`,
note:`No ${reqLang} streams. The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track, removing others. \n`
}
note:`No ${reqLang} streams. The required channel count (${channelCount}) is higher than the highest channel available in specified lang tag (${highestChannelCount.channels}). Adding lower channel track, removing others. \n`,