Skip to content

Unraid - Comprehensive Guide to Enabling AV1 Encoding, Plex Deployment & GPU Management with Tdarr on Unraid 7.0

License

Notifications You must be signed in to change notification settings

plexguide/Unraid_Intel-ARC_Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intel ARC AV1 Guide Encoding on Unraid + Tdarr Node Killer + SAB Speed Control (Bonus)

Want to help? Click the ★ (Star) button in the upper-right corner!

This guide shows you how to optimize your media library with AV1 encoding on Unraid while efficiently managing GPU resources shared between Plex and Tdarr. By following these steps, you will reduce video file sizes, save substantial storage space, and ensure Plex always has access to the GPU when it needs it. You will also learn how to pause Tdarr automatically when Plex requires the GPU, then restart Tdarr afterward. Additionally, this guide explains how to adjust SABnzbd download speeds based on Plex streaming activity to prevent buffering.

What you’ll learn:

  • How to configure your Intel ARC GPU on Unraid.
  • How to set up and optimize Tdarr for AV1 encoding.
  • How to manage SABnzbd download speeds based on Plex streaming activity.
  • How to use the Tdarr Node Killer script to prioritize Plex GPU usage over Tdarr.

Whether you’re an experienced Unraid user or just beginning, this step-by-step guide will help you achieve better resource management, significant storage savings, and an improved streaming experience.

QUICK NOTE: Run a test on a small library or a few files; tweaking the CRF numbers before deploying AV1 on your entire library.


Table of Contents


Data Savings with AV1 Encoding

AV1 encoding drastically reduces file sizes. Using three Intel ARC GPUs to encode just 10-15% of a large library saved about 116TB. For a 300TB collection, careful AV1 conversion could reduce it to 75-100TB.

image

In other words, AV1 can deliver huge storage and cost savings.


AV1 Drawbacks

AV1 is not perfect. Some devices may not support AV1 decoding natively, and AV1 encoding can be more resource-intensive, taking longer to complete. For more details, visit the AV1 Drawbacks page.


Upgrading to Unraid 7.0 and Installing Required Plugins

Ensure you run Unraid 7.0 or newer, and install the required GPU plugins before setting up s or using the Tdarr Node Killer script.

Installing Intel GPU TOP Plugin

Install Intel GPU TOP by ich777 from the Unraid Community Apps. It lets you monitor Intel ARC GPU performance directly in Unraid.

Intel GPU TOP Plugin

Installing GPU Statistics Plugin

Install the GPU Statistics plugin by b3rs3rk. With Intel GPU TOP, this provides comprehensive GPU usage details during encoding or transcoding.

GPU Statistics Plugin

After installing both, you can see real-time GPU usage:

GPU Usage Example 1
GPU Usage Example 2


Deploying Plex with Intel ARC GPU Support

Adding the Intel ARC GPU to the Plex Docker Template

In your Plex Docker template, add the Intel ARC GPU as a device. Without this, Plex will not recognize the GPU for hardware acceleration.

Add Intel ARC GPU to Plex Template

Configuring Plex Settings

Enable hardware transcoding in Plex and HDR tone mapping (if supported). If multiple GPUs exist, choose the correct one.

image

Verifying GPU Transcoding

Play a media file that requires transcoding. Check Plex’s dashboard and GPU stats. You should see minimal CPU usage and smooth playback. If you have an AV1 file, play that for the test to verify that AV1 transcoding is working also!

Plex GPU Transcoding


Setting Up Tdarr

What is Tdarr?
Tdarr simplifies media transcoding with a user-friendly interface. It automates conversions without you needing complex command-line knowledge. Although it may seem confusing initially, once you understand it, Tdarr becomes an indispensable tool for media optimization.

If you find this guide helpful, consider clicking the ★ (Star) button above. It shows your support and helps others find this resource.

Deploying Tdarr Server

When installing Tdarr, you may see an option to deploy both the server and node in one container. For easier troubleshooting, deploy them separately.

  1. Install Tdarr (not Tdarr Node) from the Unraid App Store.
  2. Name it clearly, e.g., “Server” “TServer” “TdarrServer”
  3. Ensure the server IP is correct (usually your Unraid server’s IP).
  4. Set the internal node option to False, so you will deploy a separate node container later.
image image image

Tdarr Transcoding Location

Choose a suitable location for transcoding. For occasional use, an SSD/NVMe cache is fine. For heavy use (multiple streams, multiple GPUs), consider a dedicated NVMe. Avoid HDDs or RAM to prevent bottlenecks and errors.

Warning: Bottlenecks & SSD Wear

Continuous transcoding strains SSD/NVMe drives. Using a dedicated, cost-effective NVMe helps preserve your primary drives’ health.

Note this is optional. I have a cheap 512GB NVME that Tdarr transcodes to. Since Tdarr will transcode 100s of Terabytes of, avoid wearing out your primary SSD/NVME. I had an NVME provide me BAD SMART warning for reliability (due to wear and tear). I still use it, but cautiously (and works fine).

I also personally encountered where Tdarr bottleneck my primary NVME due to the amount of GPU's and Transcodes reading and writing to my primary appdata NVME.

image

Deploying Tdarr Node(s)

After deploying the Tdarr Server, install the Tdarr Node (listed separately). The node performs transcoding, while the server manages nodes, libraries, and workflows.

image
  1. Install Tdarr Node from the Unraid App Store.
  2. Give it a clear name, e.g., Node1. For multiple GPUs, deploy more nodes (N1, N2, etc.).


image
3. Ensure the server IP and Node IP match.


image
4. Keep configs/logs organized per node. 5. Match the transcode cache path from the server’s template. Add node identifiers if using multiple nodes. 6. Assign the correct GPU to each node. If multiple nodes exist, ensure they do not share the same GPU.


image

To identify GPUs:

  • ls -la /dev/dri/


image

WARNING: One entry might be your iGPU. Do not assign the iGPU to a Tdarr Node.

Tip: Visit your Plex and headover to Transcoding (as shown in the picture) and click your GPU list. The listed order shown in Plex is the same order of the GPUs when typing ls -la /dev/dri. In the photo example below, you will notice I skipped render129, which is actually the iGPU.


image

Plex lists my order of graphics cards as Intel ARC 380 > Raphel (AMD iGPU) > Intel ARC 380 > Intel ARC 380. The second one listed on Plex (Raphel - AMD iGPU) is in the same order of ls -la /dev/dri as render129. Basically, I skipped that one and used render130 for (Node2) and render131 for N3 (Node3).

Configuring Tdarr

Go to:

If configured correctly, you will see your nodes:


image

If you have multiple nodes, repeat the following steps for each:

  1. Click a Node.
  2. Set the numbers according to your ARC card type:
  • ARC 310

    • Transcode: CPU (0), GPU (3)
    • Healthcheck: CPU (2), GPU (0)
  • ARC 380

    • Transcode: CPU (0), GPU (4)
    • Healthcheck: CPU (2), GPU (0)
  • ARC 500/700 Series

    • Transcode: CPU (0), GPU (6)
    • Healthcheck: CPU (2), GPU (0)


image

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


image

  1. In the staging section, check “auto-accept successful transcodes.” Not doing this prevents Tdarr from replacing old files and wastes space.


image

  1. Scroll further down to “Status” and adjust the order of transcoding. For example, start with your largest files. Customize as desired.


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, reducing failure rates from ~25% to nearly 0%

JSON Script: av1_flow_v4.json

image

What is the AV1 Flow?

The AV1 Flow is a predefined workflow that transcodes media into AV1, delivering significant space savings without requiring you to master encoding parameters. This step is required prior to setting up the libraries!

Importing the AV1 Flow in Tdarr

  1. Open the Flows section in Tdarr.
  2. Scroll down and select “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

Adjust CRF and bitrate in the AV1 flow to balance quality and file size. Ensure hardware acceleration is on so the GPU does most of the work. Test out on a few files to figure where you like it, but I have discovered over time the set numbers provide the best balance between quality and size.

Keep in mind the following:

  • Bigger Number: Worst Quality, Smaller File
  • Lower Number: Better Quality, Bigger File


image

image


Setting Up Tdarr Libraries

Libraries let you target specific media locations. For simplicity, we’ll use “tv” and “movies” as examples, but you can create as many as needed.

  1. Click Libraries:


image

  1. Click Library+:


image

  1. Name it “TV” or “Movies.” Repeat these steps for additional libraries.
  2. Under Source, set your media path. Also below that, turn on the [hourly] scan to find new items (important).


image

image

  1. Under Transcode Cache, set the path as shown (e.g., /temp).


image

  1. Under Filters, add AV1 to “Codecs to Skip” so you do not re-encode existing AV1 files. You can also skip small files if desired.


image

  1. Under Transcode Options, deselect classic plugins, select the “Flows” tab, and choose the AV1 flow. If you have not yet imported the AV1 flow, follow the steps in the AV1 Flow section above this section and then return here.


image

  1. Repeat for all your libraries.
  2. Perform a FRESH NEW SCAN to apply changes.


image

  1. Return to the home page. After a few minutes, you should see transcoding activity. If not, review GPU and node assignments.


image

  1. If errors increase rapidly, double-check configurations or GPU assignments.


image


SABNZBD Speed Control - Bonus

Use the SAB Speed Script to dynamically adjust SABnzbd download speeds based on Plex streaming activity. It slows downloads when Plex is active, preventing buffering, and speeds them up off-peak.

Requirements:

Script: sab_speed_control.sh

Run it at array startup and in the background.

image image

Tdarr Node Killer Script

Change Log:

  • v1: Original script
  • v2: Uses Tautulli for simpler detection

Overview

The Tdarr Node Killer script ensures Plex gets GPU priority. If Plex and Tdarr share the GPU, the script pauses Tdarr when Plex begins transcoding and restarts it after Plex finishes.

Script Behavior

  • When Plex starts transcoding, it stops the Tdarr Node.
  • After Plex stops, it waits a cooldown (e.g., 3 minutes) before restarting Tdarr, preventing rapid cycling.

Script: tdarr_node_killer.sh

Install User Scripts, add the script, set it to run at array startup, and run it in the background.

image

Step-by-Step Implementation for Unraid

  1. Tdarr Node [N1] running, no Plex transcoding:
    image

  2. Script monitoring Plex:
    image

  3. Plex user starts transcoding:

    Plex User Starts Transcoding

  4. Script detects transcoding & stops Tdarr Node:
    image


    image

  5. Tdarr Node [N1] completely stopped:
    image

Script Behavior After Plex Transcoding Stops

After Plex finishes, the script waits, then restarts Tdarr:

  1. Countdown 180 seconds before restarting the shutdown docker container.

  2. Tdarr Node restarts after cooldown:


    image


    image

  3. Tdarr Node fully online again:

    Tdarr Node Online

Troubleshooting Common Issues

  • Plex Not Using GPU? Check Plex Docker template and transcoding settings.
  • Tdarr Not Restarting? Verify script, Tautulli API settings, and background execution.
  • High CPU Usage? If HDR tone mapping is on, ensure GPU and drivers support it. Update all plugins and drivers.

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 you’re 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 don’t 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 server’s performance, reduce storage costs, and keep everyone happy with smooth, high-quality streams.

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

About

Unraid - Comprehensive Guide to Enabling AV1 Encoding, Plex Deployment & GPU Management with Tdarr on Unraid 7.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages