Self hosted

TDARR: Optimize your Self-hosted Video Streaming Library

Discover how Tdarr, a distributed transcoding system, can automate your media library management with health checks, plugins, etc

Managing a home media library can be daunting. Maintaining an organized, accessible, and efficient media library is important for video enthusiasts and casual viewers alike. Enter Tdarr, a powerful tool designed to help you manage and optimize your media files. This post will provide an in-depth exploration of Tdarr, its features, and how you can use it to transform your media library management experience.

Tdarr V2: A Glimpse into the Future of Distributed Transcoding

Tdarr V2, the latest version of this software, provides an enhanced approach to media library management and media libraries files based transcoding. Designed as a distributed transcoding system, It is a cross-platform application, making it usable on various operating systems, including Windows, Linux, MacOS, and even running as a Docker containerโ€‹.

Tdarr distributed transcoding system
Tdarr distributed transcoding system

One of the key features of the solution is its transcoding capabilities. The software allows you to automate your media library with your own transcode settings and remux management, making it easier to process your media files as needed. For instance, it enables you to set rules for the required codecs, containers, languages, and other specifications that your media should have. This ensures your media library is well-organized and increases compatibility with your devicesโ€‹โ€‹.

The Tdarr Server and Tdarr Node System

The system is composed of two primary components: the Tdarr server and the Tdarr nodes. The server serves as the central process that all nodes connect with. These nodes are processes running on the same or other devices that collect tasks from the serverโ€‹.

This architecture allows for a distributed transcoding system where tasks are spread across various nodes, enhancing efficiency and performance. With the server and cross-platform nodes, you can efficiently process your files, whether you’re using Windows, Linux, or MacOSโ€‹.

Media Server Management

One of the biggest challenges of maintaining a large media library is media server management. Automating this process can save countless hours of manual work. This is where Tdarr steps in as a solution. It is a self-hosted software that automates the process of managing and optimizing your media library.

Tdarr V2 is a cross-platform conditional-based transcoding application for automating media library transcode/remux management. It allows you to process your media files as required. For example, you can set rules for the required codecs, containers, languages etc that your media should have which helps keeps things organized and can increase compatibility with your devices. A common use for it is to convert video files from h264 to h265 (hevc), saving 40%-50% in sizeโ€‹.

Media Library Management with Tdarr Plugins

Plugins are an integral part of the system. These plugins provide infinite control over processing your files, allowing you to tailor the system to your specific needs. For instance, you can install Nvidia plugin to allow for hardware transcoding in a container, enhancing the speed and efficiency of file processingโ€‹.

Tdarr plugins add to the power of the solution
Tdarr plugins add to the power of the solution

Tdarr: Putting Your Spare Hardware to Work

One of the unique aspects of Tdarr is its ability to utilize spare hardware. You can use nodes for Windows, Linux, and macOS to process your media files, allowing you to maximize your hardware usage. This feature, coupled with worker limits, ensures efficient resource management, enabling you to strike a balance between performance and resource utilization

Tdarr Health Checks

Tdarr video health checking is used to analyze the health of media files in your library. These checks can identify issues like corruption in the files that might impact playback. The feature is part of the Tdarr’s automation capabilities, which allow for easier and more efficient management of large media libraries.

Health checks are performed by specific workers known as Health Check workers. In Tdarr, there are two types of health check workers: CPU and GPU. These workers can be fired up and closed down as necessary, providing flexibility in managing system resources.

Health checks in Tdarr are designed to work in tandem with its transcoding capabilities. If a health check identifies an issue with a file, Tdarr can automatically queue that file for transcoding to attempt to fix the problem. This allows for an automated workflow where files are constantly being checked and fixed as necessary, ensuring the highest possible quality for your media library.

Docker Deployment

Docker has revolutionized the way we deploy applications, and Tdarr is no exception. It allows us to isolate the Tdarr application in a container, making it easy to deploy, scale, and manage.

You can use Docker run to deploy Tdarr, including files GPU configuration, etc.:

docker run -ti 
    -v /docker/tdarr/server:/app/server 
    -v /docker/tdarr/configs:/app/configs 
    -v /docker/tdarr/logs:/app/logs 
    -v /media:/media 
    -v /transcode_cache:/temp 
    -e "serverIP=0.0.0.0" 
    -e "serverPort=8266" 
    -e "webUIPort=8265" 
    -e "internalNode=true" 
    -e "inContainer=true" 
    -e "nodeName=MyInternalNode" 
    --network bridge 
    -p 8265:8265 
    -p 8266:8266 
    -e "TZ=Europe/London" 
    -e PUID=1000 
    -e PGID=1000 
    -e "NVIDIA_DRIVER_CAPABILITIES=all" 
    -e "NVIDIA_VISIBLE_DEVICES=all" 
    --gpus=all 
    --device=/dev/dri:/dev/dri 
    --log-opt max-size=10m 
    --log-opt max-file=5 
    ghcr.io/haveagitgat/tdarr

Running the Docker run command.

Running the Tdarr Docker container using the Docker run command
Running the Tdarr Docker container using the Docker run command

The Tdarr container provisioned and ready to access with the WebUI.

Tdarr provisioned and web UI is listening
Tdarr provisioned and web UI is listening

Here’s an example Docker Compose file to deploy Tdarr:

version: "3.4"
services:
  tdarr:
    container_name: tdarr
    image: ghcr.io/haveagitgat/tdarr:latest
    restart: unless-stopped
    network_mode: bridge
    ports:
      - 8265:8265 # webUI port
      - 8266:8266 # server port
      - 8267:8267 # Internal node port
      - 8268:8268 # Example extra node port
    environment:
      - TZ=Europe/London
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK_SET=002
      - serverIP=0.0.0.0
      - serverPort=8266
      - webUIPort=8265
      - internalNode=true
      - inContainer=true
      - nodeName=MyInternalNode
    volumes:
      - /docker/tdarr/server:/app/server
      - /docker/tdarr/configs:/app/configs
      - /docker/tdarr/logs:/app/logs
      - /media:/media
      - /transcode_cache:/temp


# node example
  tdarr-node:
    container_name: tdarr-node
    image: ghcr.io/haveagitgat/tdarr_node:latest
    restart: unless-stopped
    network_mode: service:tdarr
    environment:
      - TZ=Europe/London
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK_SET=002
      - nodeName=MainNode
      - serverIP=0.0.0.0
      - serverPort=8266
      - inContainer=true
    volumes:
      - /docker/tdarr/configs:/app/configs
      - /docker/tdarr/logs:/app/logs
      - /media:/media
      - /transcode_cache:/temp   

Replace the paths with the actual paths on your machine. This file will create a container with the necessary environment variables and volume mappings

Server overview dashboard.

Server dashboard for Tdarr
Server dashboard for Tdarr

What can it do?

Note the following details of what you can do with Tdarr:

  • Cross-platform Tdarr Nodes which work together with Tdarr Server to process your files
  • GPU and CPU workers
  • Use/create Tdarr Plugins for infinite control on how your files are processed: https://github.com/HaveAGitGat/Tdarr_Plugins
  • Audio and video library management
  • 7 day, 24 hour scheduler
  • Folder watcher
  • Worker stall detector
  • Load balancing between libraries/drives
  • Use HandBrake or FFmpeg
  • Tested on a 1,000,000 file dummy library
  • Search for files based on hundreds of properties
  • Library stats
  • Hardware transcoding container (install Nvidia plugin on unRAID/Nvidia runtime container on Ubuntu)

After setting the library or tdarr folder, your files are optimized and replaced in your media library for better efficiency.

Files optimized and replaced
Files optimized and replaced

Viewing your transcoding nodes:

Viewing your different nodes for transcoding
Viewing your different nodes for transcoding

Viewing the job history and operations.

Viewing Tdarr job reports
Viewing Tdarr job reports

You can also schedule your libraries for optimization.

Scheduling your libraries for optimization
Scheduling your libraries for optimization

You can stack your optimizations and plugins to transcode your videos as needed.

Stacking plugins and optimizations
Stacking plugins and optimizations

Wrapping up

Tdarr is an excellent tool for anyone looking to automate their media library management. It has many powerful features, such as distributed transcoding, health checks, and the ability to use Nvidia plugins, make it incredibly versatile and efficient.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

2 Comments

  1. Tdarr is OK but I much more prefere fileflows. It also can run in a docker container. But the hurdle of getting started ad your transcode going is much smaller for fileflows…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.