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.
- Data Savings with AV1 Encoding
- AV1 Drawbacks
- Upgrading to Unraid 7.0 and Installing Required Plugins
- Deploying Plex with Intel ARC GPU Support
- Setting Up Tdarr
- Setting up the AV1 Tdarr Flow
- Setting Up Tdarr Libraries
- Optimizing AV1 Encoding Settings
- SABNZBD Speed Control - Bonus
- Tdarr Node Killer Script
- Experimental: Running the Script on Other Operating Systems
- Backup and Recovery Tips
- Summary
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.
In other words, AV1 can deliver huge storage and cost savings.
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.
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.
Install Intel GPU TOP by ich777 from the Unraid Community Apps. It lets you monitor Intel ARC GPU performance directly in Unraid.
Install the GPU Statistics plugin by b3rs3rk. With Intel GPU TOP, this provides comprehensive GPU usage details during encoding or transcoding.
After installing both, you can see real-time GPU usage:
In your Plex Docker template, add the Intel ARC GPU as a device. Without this, Plex will not recognize the GPU for hardware acceleration.
Enable hardware transcoding in Plex and HDR tone mapping (if supported). If multiple GPUs exist, choose the correct one.
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!
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.
When installing Tdarr, you may see an option to deploy both the server and node in one container. For easier troubleshooting, deploy them separately.
- Install Tdarr (not Tdarr Node) from the Unraid App Store.
- Name it clearly, e.g., “Server” “TServer” “TdarrServer”
- Ensure the server IP is correct (usually your Unraid server’s IP).
- Set the internal node option to False, so you will deploy a separate node container later.
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.
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.
After deploying the Tdarr Server, install the Tdarr Node (listed separately). The node performs transcoding, while the server manages nodes, libraries, and workflows.
- Install Tdarr Node from the Unraid App Store.
- Give it a clear name, e.g., Node1. For multiple GPUs, deploy more nodes (N1, N2, etc.).
3. Ensure the server IP and Node IP match.
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.
To identify GPUs:
ls -la /dev/dri/
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.
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).
Go to:
If configured correctly, you will see your nodes:
If you have multiple nodes, repeat the following steps for each:
- Click a Node.
- 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)
- Click Options, scroll towards the bottom, enable “GPU Workers to do CPU Tasks,” then close the window.
- In the staging section, check “auto-accept successful transcodes.” Not doing this prevents Tdarr from replacing old files and wastes space.
- Scroll further down to “Status” and adjust the order of transcoding. For example, start with your largest files. Customize as desired.
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
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!
- Open the Flows section in Tdarr.
- Scroll down and select “Import.”
- Paste the AV1 Flow JSON.
- Apply it to your libraries.
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
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.
- Click Libraries:
- Click Library+:
- Name it “TV” or “Movies.” Repeat these steps for additional libraries.
- Under Source, set your media path. Also below that, turn on the [hourly] scan to find new items (important).
- Under Transcode Cache, set the path as shown (e.g., /temp).
- 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.
- 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.
- Repeat for all your libraries.
- Perform a FRESH NEW SCAN to apply changes.
- Return to the home page. After a few minutes, you should see transcoding activity. If not, review GPU and node assignments.
- If errors increase rapidly, double-check configurations or GPU assignments.
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:
- Tautulli for Plex monitoring
- User Scripts from the Unraid App Store
Script: sab_speed_control.sh
Run it at array startup and in the background.
Change Log:
- v1: Original script
- v2: Uses Tautulli for simpler detection
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.
- 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.
After Plex finishes, the script waits, then restarts Tdarr:
-
Countdown 180 seconds before restarting the shutdown docker container.
-
Tdarr Node restarts after cooldown:
-
Tdarr Node fully online again:
- 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.
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.
-
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
-
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
-
Create a Service File: Create a service file for the script:
sudo nano /etc/systemd/system/tdarr_node_killer.service
-
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
-
Reload Systemd:
sudo systemctl daemon-reload
-
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.
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.
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!