2025-03-13 08:52:28 -04:00
2024-08-11 09:13:26 -04:00
2025-03-13 08:52:28 -04:00


image

Warning: One entry might be your iGPU. Dont assign your iGPU to a Tdarr node.

Tip: Go to Plex → Settings → Transcoding. When you pick a GPU in Plex, the GPU order matches the order from ls -la /dev/dri. In the example below, render129 is the iGPU, so I skip it and use render130 for Node2 and render131 for Node3.


image

Configuring Tdarr

  1. Go to http://<your-unraid-IP>:8265.
  2. You should see your nodes listed:


image

  1. For each node, click it and set CPU/GPU worker counts based on your ARC card:

    • ARC A310

      • Transcode: CPU (0), GPU (23)
      • Health Check: CPU (2), GPU (0)
    • ARC A380

      • Transcode: CPU (0), GPU (24)
      • Health Check: CPU (2), GPU (0)
    • ARC A500/A700

      • Transcode: CPU (0), GPU (25)
      • Health Check: CPU (2), GPU (0)


image

  1. Click Options, scroll to the bottom, and enable “GPU Workers to do CPU Tasks,” then close.


image

  1. In the staging section, check Auto-accept successful transcodes so Tdarr replaces old files automatically.


image

  1. In Status, pick the queue order (e.g., largest files first).


image


Setting up the AV1 Tdarr Flow

Change Log

  • v1: Original AV1 flow
  • v2: Removed B-frames
  • v3: Improved quality
  • v4: Removed images from files (failure rates ~25% → 12%)
  • v5: Better quality, simpler flow

JSON Script: av1_flow_v5.json

image

What is the AV1 Flow?

The AV1 Flow is a prebuilt workflow that encodes your media to AV1 for huge storage savings, without requiring expert knowledge of encoding parameters. You must import it before creating your Tdarr libraries.

Importing the AV1 Flow in Tdarr

  1. In Tdarr, go to Flows.
  2. Scroll down and click Import.
  3. Paste the AV1 Flow JSON.
  4. Apply it to your libraries.

Adding a New Flow in Tdarr
Scroll to Import Option
Pasting the JSON Content


Optimizing AV1 Encoding Settings

Within the AV1 flow, adjust CRF and bitrate to balance quality and size. Make sure youve enabled hardware acceleration so the GPU does the heavy lifting. In general:

  • Higher CRF → Lower quality, smaller files
  • Lower CRF → Higher quality, larger files

Ive found the default settings in the AV1 Flow give an excellent quality-to-size ratio. If you want finer control, test small sets of files and tweak CRF/bitrate until you find your sweet spot.


image

image


Setting Up Tdarr Libraries

Libraries let you specify locations and define how Tdarr processes them. For instance, you might have separate libraries for “tv” and “movies.” Adjust to your setup.

  1. Click Libraries:

    image

  2. Click Library+:
    image

  3. Name your new library (e.g., “TV,” “Movies,” etc.).

  4. Under Source, point it to your media folder. Enable [Hourly] scanning to catch new content.


image

image

  1. Under Transcode Cache, set the path to /temp (or your chosen transcode folder).


image

  1. In Filters, add AV1 to “Codecs to Skip,” so you never re-encode existing AV1 files. You can also skip small files if you like.


image

  1. In Transcode Options, uncheck “Classic Plugins,” go to the Flows tab, and pick the AV1 flow. (If you havent imported the flow yet, see the Importing the AV1 Flow in Tdarr section first.)


image

  1. Repeat for all your libraries.
  2. Perform a Fresh New Scan to apply changes.


image

  1. After scanning, the home page should show transcoding activity. If not, re-check your GPU assignments and node settings.


image

  1. If you see tons of errors, review your GPU configuration or flow settings.


image


SABNZBD Speed Control - Bonus

You can also tie SABnzbds download speed to Plex streaming demand. By throttling SABnzbd when Plex is active, you minimize buffering. Check out Tautullis scripts or the SABnzbd API for ways to reduce speed during high stream loads. This is optional but can significantly improve user experience if you often saturate your internet bandwidth with downloads.


Tdarr Node Killer Script

Change Log

  • v1: Original script
  • v2: Switched to Tautulli for simpler detection
  • v3: Option to avoid killing Tdarr node on local-only transcodes
  • v4: Added a threshold to kill the Tdarr container only if transcodes exceed (default) 3 sessions
  • v5: Added Tautulli API connectivity check in logs at startup

Overview

The Tdarr Node Killer script ensures Plex always has GPU priority. When Plex starts transcoding on the same GPU, the script stops Tdarr. Once Plex stops, it waits a short cooldown and restarts Tdarr.

Script Behavior

  • Stops the Tdarr Node container as soon as Plex begins GPU transcoding.
  • Waits for Plex transcoding to end, then restarts Tdarr after a short cooldown (e.g., 3 minutes).

Script: tdarr_node_killer.sh

Use User Scripts in Unraid to install this script, set it to run on array startup, and keep it running in the background.

image

Step-by-Step Implementation for Unraid

  1. Confirm Tdarr Node [N1] is running when no ones transcoding in Plex:

    image

  2. The script runs and waits for Plex transcoding activity:

    image

  3. A user begins transcoding in Plex:

    Plex User Starts Transcoding

  4. The script detects transcoding and stops the Tdarr Node:


    image

    image

  5. Tdarr Node [N1] is now stopped:


    image

Script Behavior After Plex Transcoding Stops

When Plex finishes transcoding, the script waits a cooldown (e.g., 180 seconds) and then restarts Tdarr:

  1. Youll see a countdown timer in the logs before it restarts the container.

  2. Tdarr Node starts again after the countdown:


    image

    image

  3. Tdarr Node is fully online:

    Tdarr Node Online

Troubleshooting Common Issues

  • Plex Not Using GPU? Re-check your Plex Docker template and transcoding settings.
  • Tdarr Not Restarting? Make sure the script has the right container name, Tautulli API key, and is set to run in the background.
  • High CPU Usage? Some features, like HDR tone mapping, can be CPU-intensive. Ensure your GPU and drivers support it. Update drivers if needed.

Experimental: Running the Script on Other Operating Systems

You can run this script on other Linux distributions or OSes that support Docker and systemd. The steps are similar: place the script, set permissions, and create a systemd service.

  1. Save the Script: Save your Tdarr Node Killer Script as tdarr_node_killer.sh in /usr/local/bin/.

    sudo nano /usr/local/bin/tdarr_node_killer.sh
    
  2. Set the Proper Permissions:

    sudo chmod +x /usr/local/bin/tdarr_node_killer.sh
    sudo chown root:root /usr/local/bin/tdarr_node_killer.sh
    
  3. Create a Service File: Create a service file for the script:

    sudo nano /etc/systemd/system/tdarr_node_killer.service
    
  4. Add the Following Content:

    [Unit]
    Description=Tdarr Node Killer Script
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/bin/bash /usr/local/bin/tdarr_node_killer.sh
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    
  5. Reload Systemd:

    sudo systemctl daemon-reload
    
  6. Start and Enable the Service:

    sudo systemctl start tdarr_node_killer.service
    sudo systemctl enable tdarr_node_killer.service
    

This ensures the script runs automatically and manages your GPU resources even if youre not on Unraid.


Backup and Recovery Tips

Before making changes:

  • Backup Plex configs (metadata, watch history, etc.).
  • Backup Docker templates so you can quickly restore containers.
  • Backup your Unraid flash drive so you dont lose your server setup.

Test your backups occasionally to ensure they work when you need them.


Summary

By setting up AV1 encoding with Intel ARC GPUs, you can achieve massive storage savings and still maintain great quality. Adding the optional Tdarr Node Killer Script ensures Plex always has priority access to the GPU when needed. With careful tuning and a bit of experimentation, you can streamline your servers performance, reduce storage costs, and keep everyone happy with smooth, high-quality streams.

Found this useful? Consider clicking the star (★) button at the top!

Description
Unraid - Comprehensive Guide to Enabling AV1 Encoding, Plex Deployment & GPU Management with Tdarr on Unraid 7.0+
Readme GPL-3.0 356 KiB
Languages
Shell 100%