Open beta Leyla is free until December 31, 2026. Preorder at founders’ prices

Download

Hardware

Leyla plays a file as it is whenever the screen can show it, and that needs no hardware at all. This page is for the times something must be converted, and for keeping an eye on the disks your films live on.

When hardware matters

Every time a screen presses play it tells Leyla what it can decode, and Leyla picks the lightest of three ways to send the film:

Play
The file as it is. Nothing runs on the server.
Copy
The picture goes untouched and only the wrapping changes. This costs almost nothing, even on a Raspberry Pi.
Convert
Only what the screen cannot play is re-encoded. This is the one that needs a graphics chip, or a fast CPU, for 4K.

A server with no graphics chip still works. Conversions run on the CPU, which is fine for 1080p on most machines. How a film reaches a screen has the whole story.

What Leyla can use

MachineWhat Leyla usesHow it gets there
Intel with graphics (most “+” NAS models, mini PCs)Quick Sync and VAAPI/dev/dri
AMD with graphicsVAAPI/dev/dri
NVIDIA cardNVENCThe NVIDIA runtime
Raspberry Pi, ARM NAS boxes, Intel without graphicsThe CPUNothing to set

Turn it on

Intel or AMD

  1. Check the box has the device

    Terminal, on the box
    $ ls /dev/dri            # renderD128 means it is there
  2. Uncomment devices in the compose file

    compose.yaml, the leyla service
        devices:
          - /dev/dri:/dev/dri

    Leyla joins the device’s group itself. On unRAID, keep /dev/dri in the template.

  3. Start the container again

    Terminal
    $ docker compose up -d

Important On a box without /dev/dri, such as AMD Ryzen Synology models and most ARM boxes, the container will not start with devices uncommented. Comment the block out again and conversions run on the CPU.

NVIDIA

Install NVIDIA’s drivers and container runtime on the host first. On TrueNAS that is under Apps › Settings; on unRAID it is the Nvidia-Driver plugin. Then add this to the service:

compose.yaml, the leyla service
    runtime: nvidia
    environment:
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,video,utility

On unRAID, put --runtime=nvidia in Extra Parameters and set NVIDIA_VISIBLE_DEVICES in the template.

How Leyla decides to trust an encoder

Leyla tests each encoder on your own machine when it starts, with the shapes of video it will actually be asked to convert. Only what passes is used. An encoder that fails its test is never used, Leyla records why, and the CPU takes over.

HDR10, HLG and Dolby Vision go untouched to screens that show them. For a screen that cannot, Leyla tone-maps on the server, so a dark scene stays readable instead of grey.

The ffmpeg inside is Leyla’s own build (8.1.3). It has no network protocols: it reads files and pipes and nothing else, so a crafted file cannot make it fetch anything. Every ffmpeg runs as a separate, supervised process with a clean environment.

Disk health

Leyla warns about failing drives from the read errors it meets anyway, with nothing to set up. To add each drive’s own SMART counters, give the container the disks and the right to read them:

compose.yaml, the leyla service
    devices:
      - /dev/sda:/dev/sda   # one line per disk under a library
    cap_add:
      - SYS_RAWIO

Leyla reads the counters once a day and never wakes a sleeping disk. Network shares and pooled drives, such as mergerfs, have no disk to read. Leyla says so, and everything else works.

If something is wrong

  • The container will not start after you turned hardware transcoding on. The box has no /dev/dri. Comment the devices block out again.
  • Picture or sound stutters. The film is being converted and the CPU cannot keep up, usually 4K on a box without a graphics chip. A screen that plays the file as it is never stutters this way.