Tdarr_Plugins
Tdarr_Plugins copied to clipboard
New plugin Tdarr_Plugin_Yoda_AIO.js - combines functionality of multiple existing plugins in a single pass
Figured it's about time I shared this with the community. This plugin performs the same functionality as a few others, but performs it all in a single pass. I've been using this with great success on my media server for about a year now. Plugin includes sane defaults, and is highly customisable to achieve desired container/codecs.
- remux container
- reorder streams - video->audio->subtitles->attachments->data
- transcode video
- transcode audio
- remove unwanted audio tracks based on language (skips discarding any if it would result in no audio streams in output file)
- transcode subtitles
- remove unwanted subtitle tracks based on language
- extract subtitles to file
- remove file/stream titles
- remove unwanted images
- remove unwanted attachments
I have plans to extend this with:
- loudness normalisation and/or custom 2ch downmixing
- options to set h264/h265 profiles/levels
This looks like a great plugin... Does nearly all I am doing now with many plugins
I would recommend adding HDR detection into the code for your video transcode argument. If someone feeds this an HDR video file it is going to be spit out with WASHED out color
I use the following in my plugin
- The check for HDR
- If HDR is detected keep it
- ELSE encode in 10-bit
This in the transcode argument keeps HDR "-pix_fmt p010le -color_primaries bt2020 -colorspace bt2020nc -color_trc smpte2084"
Here is my code from my plugin that only deals with keeping HDR
if (stream.color_space === "bt2020nc") {
configuration.AddOutputSetting(
` -pix_fmt p010le -color_primaries bt2020 -colorspace bt2020nc -color_trc smpte2084 `
);
logger.AddSuccess("HDR Detected Maintaining");
} else {
configuration.AddOutputSetting(
` -pix_fmt p010le `
);
logger.AddSuccess("HDR Not Detected");
}
Looks like using -pix_fmt +
is probably the way to go.
According to the docs:
If pix_fmt is a single
+
, ffmpeg selects the same pixel format as the input (or graph output) and automatic conversions are disabled.
(Emphasis mine)
Edit: actually, some initial testing indicates that ffmpeg just uses the bit depth of the original file. Maybe older versions don't automatically match the original's bit depth? I'll do some more in-depth testing Soon :tm: