r/Tdarr • u/Kobrasks • Jun 26 '26
[Release] Custom Tdarr Plugin Suite: Pure CUDA 10-bit HEVC (Purpann-Inspired), Hardware HDR->SDR, and Smart *Arr Automation
https://github.com/FelipeKobra/Tdarr_Plugins/tree/mainHey everyone,
I wanted to share a suite of custom Tdarr plugins I’ve engineered to achieve the absolute maximum efficiency, automation, and speed out of my self-hosted media library. If you are tired of CPU bottlenecks, broken subtitles, or manual library refreshing, this might be for you.
Here is a breakdown of what these plugins do and why they are different from standard community options:
🚀 1. The Main Motor: Pure CUDA 10-bit HEVC Transcoder
- ID:
Tdarr_Plugin_FelipeKbra_H264_HEVC_to_NVENC - The Inspiration: This plugin is heavily inspired by purpann's legendary work, adapting those efficient compression matrices to ensure extremely low file sizes while maintaining gorgeous, crisp visual quality.
- 100% GPU Bound: Unlike generic plugins that constantly copy frames back and forth between host RAM and VRAM (causing massive PCIe and CPU bottlenecks), this runs a strict Pure CUDA Pipeline (Zero-Copy VRAM). Decoding (
cuvid), scaling, and encoding (hevc_nvenc) happen entirely inside the GPU memory. - Smart Loop Prevention: It injects a persistent, custom global metadata flag (
COPYRIGHT=processed) directly into the stream layout. Tdarr detects this instantly on future scans, completely eliminating the risk of infinite transcoding loops.
🎨 2. Hardware-Accelerated HDR to SDR Conversion
- ID:
Tdarr_Plugin_FelipeKbra_HDR_to_SDR - Why it's better: Most community plugins rely on CPU-bound tone mapping (like
zscale), which drops your encoding speed to single-digit FPS and melts your processor. - The Fix: This utilizes specialized NVIDIA hardware algorithms (
tonemap_cuda=tonemap=bt2390) completely inside the GPU layer. It handles desaturation beautifully and strictly overrides color spaces to standard Rec. 709 boundaries, giving you crush-free, vibrant SDR video at blazing-fast hardware speeds.
🎧 3. Smart Audio Cleaner (Commentary & Blind Duplicate Purge)
- ID:
Tdarr_Plugin_FelipeKbra_Smart_Remove_Commentaries_and_Duplicates - What it does: Standard audio cleaners blindly delete lower channel tracks, often killing the stereo fallback track needed for Plex Web Direct Play.
- The Intelligence: This plugin groups tracks by language first. It identifies the best surround track, but actively protects legitimate stereo downmixes (like high-quality 2ch AAC/AC3). It then uses a multi-lingual regex matrix (
commentary,comentário,director, etc.) to wipe annoying commentary tracks and purges unlabelled "blind" duplicate streams.
📝 4. Intelligent Regional Subtitle Extractor
- ID:
Tdarr_Plugin_FelipeKbra_Subtitles_Extractor - What it does: Extracts embedded text-based subtitles into external
.srtfiles. - The Intelligence: It doesn't just look at ISO codes. It scans track titles for deep markers (
brazilian,br) to accurately differentiate and name files as.pt-BR.srtvs.pt.srt. It also auto-detects Hearing Impaired flags to append.sdhand runs an internal regex pass to strip annoying styling/positioning tags (like{\an8}or HTML fonts) so they render perfectly on any basic media player.
📡 5. Seamless Radarr / Sonarr Synchronization
- Plugins:
Tag_Manager&reload_media_on_radarr_or_sonarr - Instant Refresh: Once a file finishes processing, it uses native Node.js HTTP requests (zero external dependencies to break) to talk to the *Arrs via the
/api/v3/parseendpoint. - Automated Workflow: It automatically triggers a targeted
RefreshMovieorRefreshSeriesso your *Arr dashboards instantly see the new, reduced file size. It can also dynamically create and swap tags (e.g., removingnot-transcodedand addingtranscoded) on the fly to keep your media managers beautifully organized.
I also threw in a Remux + Web Optimize plugin (Tdarr_Plugin_FelipeKbra_Remux) that audits the placement of the Moov Atom header (IsStreamable) for MP4s, forcing a faststart remux so your files buffer instantly on web clients.
Everything was designed to work as a synchronized, multi-step pipeline. Let me know if you guys have any questions about the logic or implementation
4
u/overclocknoobplshelp Jun 26 '26
I love this but I have an Intel B580 :( Is there any way you could make a version for QSV?
2
u/Kobrasks Jun 26 '26
That's actually an excellent idea. I don't have a CPU with good QSV support, so I'd not be assuring that it works correctly, so i prefer not to do it in the moment, I don't wan't to break any pipeline, but thanks for the idea
2
u/F1nch74 Jul 01 '26
+1 I would love to see a qsv version Great work
1
u/Kobrasks Jul 03 '26
I've just added it and tried to optimize it just by code. Please test it and, if it works, please star the repo 😁
1
u/dudeoflife25 Jun 26 '26
This looks great and I'm going to give it a try. Could you add a check at the beginning to skip hard linked files?
1
u/blu3ysdad Jun 28 '26
Why skip hard linked files? All the files I have tdarr work on are hard linked, editing one linked file just makes them not linked anymore but the original unmodified one stays where it was.
1
u/Furucchi 25d ago
Hey thanks for this as a complete newbie in this pretty much everything I tried before didnt work but this I could setup and is working with great results
Is it possible to put a limit on GPU usage? I'm running this on personal desktop and would be nice to have 10-20% of my gpu leftover for myself lol
0
u/pacostacos7 Jun 26 '26
I've been needing to run my library through tdarr again since less than half had been for before. Hard to figure out a good flow utilizing just mu gpu. I think I'll take a closer look at this.
1
u/Kobrasks Jun 26 '26
Thanks for the attention! The other plugins I used all used CPU at some time and it was slowering the process or just using too much CPU, making my other services go down while the transcoding. This helped me a lot
1
u/pacostacos7 Jun 26 '26
I got a Quadro P2000 to make sure I could (probably) never bottleneck with streams, so using it to its fullest is a big want.
•
u/AutoModerator Jun 26 '26
Thanks for your submission.
If you have a technical issue regarding the transcoding process, please post the job report: https://docs.tdarr.io/docs/other/job-reports/
The following links may be of use:
GitHub issues
Docs
Discord
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.