
> **Warning:** One entry might be your iGPU. Don’t 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.

### Configuring Tdarr
1. Go to `http://:8265`.
2. You should see your nodes listed:

3. For each node, click it and set CPU/GPU worker counts based on your ARC card:
- **ARC A310**
- Transcode: CPU (0), GPU (2–3)
- Health Check: CPU (2), GPU (0)
- **ARC A380**
- Transcode: CPU (0), GPU (2–4)
- Health Check: CPU (2), GPU (0)
- **ARC A500/A700**
- Transcode: CPU (0), GPU (2–5)
- Health Check: CPU (2), GPU (0)

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

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

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

---
# 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% → 1–2%)
- **v5:** Better quality, simpler flow
**JSON Script:** [av1_flow_v5.json](av1_flow_v5.json)
## 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.



---
# Optimizing AV1 Encoding Settings
Within the AV1 flow, adjust **CRF** and **bitrate** to balance quality and size. Make sure you’ve enabled hardware acceleration so the GPU does the heavy lifting. In general:
- **Higher CRF** → Lower quality, smaller files
- **Lower CRF** → Higher quality, larger files
I’ve 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.


---
# 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**:

2. Click **Library+**:

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.


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

6. 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.

7. In **Transcode Options**, uncheck “Classic Plugins,” go to the **Flows** tab, and pick the AV1 flow. (If you haven’t imported the flow yet, see the [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr) section first.)

8. Repeat for all your libraries.
9. Perform a **Fresh New Scan** to apply changes.

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

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

---
# SABNZBD Speed Control - Bonus
You can also tie SABnzbd’s download speed to Plex streaming demand. By throttling SABnzbd when Plex is active, you minimize buffering. Check out Tautulli’s 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](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.
## Step-by-Step Implementation for Unraid
1. Confirm Tdarr Node [N1] is running when no one’s transcoding in Plex:

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

3. A user begins transcoding in Plex:

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


5. Tdarr Node [N1] is now stopped:

## Script Behavior After Plex Transcoding Stops
When Plex finishes transcoding, the script waits a cooldown (e.g., 180 seconds) and then restarts Tdarr:
1. You’ll see a countdown timer in the logs before it restarts the container.
2. Tdarr Node starts again after the countdown:


3. Tdarr Node is fully 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/`.
```bash
sudo nano /usr/local/bin/tdarr_node_killer.sh
```
2. **Set the Proper Permissions**:
```bash
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:
```bash
sudo nano /etc/systemd/system/tdarr_node_killer.service
```
4. **Add the Following Content**:
```ini
[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**:
```bash
sudo systemctl daemon-reload
```
6. **Start and Enable the Service**:
```bash
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!