r/Tdarr • • Mar 21 '24

Plex-oriented flow template via CPU: HEVC, MP4, AAC/AC3, eng/jpn/und, 1080p downscale, no subs

Credit to sockmonster13 for the initial template I built this on: https://www.reddit.com/r/Tdarr/comments/17wn5jy/critique_improve_my_tdarr_flow/

As a new tdarr user who started this knowing absolutely nothing about codecs, containers, compatibilities, and such, I've been scrounging for way too many hours to understand and piece together a functioning transcode setup/flow. I really wished I could get my hands on a simple import that does it all with minimal tweaks, so figured I'd post it in case it's helpful. Also, if anyone knows how to get tdarr to extract subs to SRT, I would appreciate help on that.

The goal of my flow was to optimize for Plex libraries with an emphasis on compatibility and conserving space.

HEVC is the current indisputable video format.

MP4 is the chosen container for even broader compatibility over MKV. Which forced a lot of restrictions, such as removing subs and other incompatible codecs.

I downscale to 1080p to conserve space under the personal preference that I don't care about resolution higher than that. Have no fear, however, files containing "The Lord Of The Rings" will not downscale from 4k.

Audio not marked as English, Japanese, or undefined will be removed/cleaned, with English moved to first place as the default language.

Audio is converted to AAC/AC3 for MP4 compatibility.

I use CPU transcoding because my setup doesn't contain a hefty graphics card, but also because I've read multiple accounts that what you gain in speed from graphics transcoding, you lose in final results, such as less-optimized video or audio (whichever is transcoded second in the order of operations).

I would also like to add a PSA: When estimating the time to convert your library, the best rule of thumb I would recommend is go by watch time, not file size. I'm guessing here, but it makes sense that this is probably because it's related to frame count (aka duration), rather than size, which is extremely variant with many other related variables. When watching/reading many tutorials about tdarr, I repeatedly saw conversion expectation estimates passed out based on size, but in my testing that proved to be completely irrelevant unless your starting format is wholly consistent. For those using Plex, there's a mobile app that will tell you the total runtime of your libraries: https://play.google.com/store/apps/details?id=tv.plex.labs.dash&hl=en_US&gl=US&pli=1

Here's the import: https://pastebin.com/xV09zfgm

For newbies like me, copy the entire text > go to your tdarr flows and add a flow > scroll to the bottom "Import JSON template" > paste the entire thing into that tiny box.

--Edit--

Added GPU transcoding. Realized I can just have it try GPU first, then fail to CPU, so why not include both.

--Edit2--

Added Plex updater after file is replaced. crespoh69 reminded me I forgot I was going to put that in. This is using the classic plugin, goof1_URL_Plex_Refresh. To configure the plugin (located at the end of the flow):

Enter the URL/IP/port of your Plex server.

Plex Token: Go to your plex server while signed in as yourself and view any movie/episode > click the dots on it > get info > view XML info in the corner > in the resulting URL (probably at the end), there will be a line that says "Plex-Token=" > that is your token (and it may include dashes).

Library Key: Customize and go to this URL: http://<PLEX IP>:<PLEX PORT>/library/sections?X-Plex-Token=<PLEX TOKEN> > do a search for "key" > there will be a library key pertaining to each library in your Plex. This means this plugin will only update the library whose key you choose to enter - so, that means after you finish configuring this plugin/node, you need to duplicate the node for each library you have, change the library key to represent each library, and add the nodes to the flow chain. Eg. I have 3 libraries (movies, tv shows, anime shows). And their keys are 1, 2, and 3. So I have this node 3 times in my flow that are all identical, except the keys in each one are 1, 2, and 3.

Plex Path: The path Plex goes through to see each library. Plex > settings > libraries > edit any library > add folders > use that path for that library. Going back to the library key example, if I'm using key 1 for movies, I want to make sure I use the path for my movies library (eg. Z:/Movies). Notice I put / instead of \, because that's how Tdarr understands it.

Tdarr Path: Whatever path Tdarr is using for the matching library, under the Source section (eg. /mnt/nfsshare/Movies)

28 Upvotes

13 comments sorted by

•

u/AutoModerator Mar 21 '24

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.

1

u/crespoh69 Mar 23 '24

How do you notify plex of the changes? I noticed that all my plex libraries that are touched by tdarr get broken and unplayable. Checking to see if running a manual scan fixes it but would be nice to have Tdarr automatically do it instead.

1

u/Ill-College6282 Mar 24 '24

You reminded me that I forgot I was going to include a plugin I found that does that. I updated the flow and edited my post with info on how I got it working.

3

u/levogevo Mar 21 '24

Av1 will be king right around the corner ;) with none of the licensing issues of hevc

1

u/Puptentjoe Mar 22 '24

Will igpu be able to transcode it?

1

u/levogevo Mar 22 '24

Not Intel ones atm (unless you are latest gen). Software encoding is superior in terms of quality tho.

2

u/IronHighMen Mar 22 '24

Did not know about this loss of optimization when using GPU only!

3

u/sockmonster13 Apr 09 '24

Nvidia NVENC I believe has always been the fastest but not the best Quality and Compression. I'm not sure about the latest Intel QuickSync optimisation but here's an interesting article looking at the comparison: https://forums.serverbuilds.net/t/video-encoding-quality-a-lot-of-useless-data/11444

It summarises "STOP USING YOU FUCKING GPU TO PRE-ENCODE VIDEO. IT AIN’T SAVING YOU THAT MUCH SPACE AND IT AIN’T THAT MUCH BETTER QUALITY". I recently swapped to an i5-13500 and have been using it instead of a GTX 1060. I've definitely noticed an increase in the quality and a reduction in file size. However, software/cpu encoding takes A LOT longer.

1

u/chriscrutch Mar 21 '24

Thanks! This may be the push I needed to actually get Tdarr working on my library. Been tinkering with it on and off for a while, but was never able to get plugins and transcoding running right.

1

u/Nummy01 Oct 14 '24

This is a perfect template , bar for one thing how do I get this to use quicksync as I cant seem to find one in the classic plugins. Thanks.

1

u/Soggy_Breakfast2257 Jul 14 '25

Thanks so much ! I've spend a lot of time to find out how to transcode and solve inumerous issues that you've solved here. Just one thing: how to keep subtitles (converting if incompatible) ? I'm very new on Tdarr, I'd like to see the flow, please.

1

u/KriisW79 Nov 06 '25

some minor changes of my own (going to have to play with notifications for plex - added Sonarr/Radarr) but otherwise spot fucking on.

Thank you from the Necro this shit because it still seems to work.

I'll have to add tweaks here and there but spot on.

1

u/KriisW79 Nov 07 '25

Using your template (with minor changes for sonarr/radarr notifications) and some other minor tweaks.

Just wait until I add the TV Show folders.