Smart Transcode

Troubleshooting: Podman

For the image run with Podman, rootless (as your user) or rootful (sudo podman). Examples use smart-transcode as the container name; rootful commands start with sudo.

First: look at the container

podman ps -a --filter name=smart-transcode
podman logs --tail 100 smart-transcode
podman exec smart-transcode id                          # who it runs as inside
podman exec smart-transcode tail -n 50 /config/transcode.log
podman inspect smart-transcode --format '{{.State.Status}} {{.State.ExitCode}}'

Started with Quadlet or a systemd unit? Use the service's log too: systemctl --user status smart-transcode and journalctl --user -u smart-transcode -n 100 (rootful: without --user).

It will not start or the image will not pull

  • “short-name resolution” errors: use the full name docker.io/aarondyck/smart-transcode:latest.
  • Rootless cannot use port below 1024. Publish a high port (-p 8080:8080), or lower the limit: sudo sysctl net.ipv4.ip_unprivileged_port_start=80.
  • Name already in use: podman rm -f smart-transcode, then run again (the data is in your config folder).
  • Quadlet unit not found or ignored: the file must be in ~/.config/containers/systemd/ (rootful: /etc/containers/systemd/) and end in .container. Run systemctl --user daemon-reload, and check what Quadlet makes of it: /usr/lib/systemd/system-generators/podman-system-generator --user --dryrun.
  • It stops when you log out (rootless): loginctl enable-linger $USER.

I cannot open the page

  • Test on the host: curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080/api/auth/me should print 200. podman port smart-transcode shows the mapping.
  • Other machines cannot connect: open the firewall (sudo firewall-cmd --add-port=8080/tcp --permanent && sudo firewall-cmd --reload).
  • Behind a reverse proxy: list the proxy in Settings → Security → Reverse proxies. Reverse proxy.

Permission denied, empty library, wrong file owner

Read User and group IDs first; the Podman section explains why rootless is different. The checks:

ls -ln /srv/media                                       # on the host: owner numbers
podman exec smart-transcode ls -ln /srv/media           # inside
podman exec smart-transcode id                          # who the app runs as
podman unshare ls -ln /srv/media                        # rootless: the same folder as the user namespace sees it
  • Rootless: the container must run as you: --userns=keep-id --user "$(id -u):$(id -g)" (Quadlet: UserNS=keep-id, User=, Group=). PUID/PGID are not used when you set --user. Without keep-id a UID such as 1000 inside maps to a high number on the host (look at /etc/subuid) and cannot write your files, which show as nobody inside.
  • Your media must belong to you (or be writable by your group). Rootless Podman can only act as the user who runs it.
  • Rootful: works like Docker: set PUID and PGID to the owner of the media.
  • “unable to open database file”: the /config folder must be owned by the same user the container runs as (ls -ln on the host).

SELinux (Fedora, RHEL, Rocky, Alma)

The most common cause of “permission denied” on these systems even when the numbers match.

getenforce                                  # Enforcing?
sudo ausearch -m avc -ts recent             # denials from the last few minutes

Run the container with --security-opt label=disable (Quadlet: SecurityLabelDisable=true), or relabel each volume with :z (-v /srv/media:/srv/media:z, which relabels the whole folder, slow on a big library and shared with other programs).

My GPU is not listed (or conversions use the CPU)

NVIDIA (CDI)

nvidia-smi
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml      # regenerate after every driver update
nvidia-ctk cdi list                                              # should list nvidia.com/gpu=all
podman run --rm --device nvidia.com/gpu=all --security-opt label=disable ubuntu nvidia-smi
  • The container needs --device nvidia.com/gpu=all and -e NVIDIA_DRIVER_CAPABILITIES=compute,video,utility.
  • “unresolvable CDI devices”: the CDI file is missing or stale: regenerate it as above.
  • Check inside: podman exec smart-transcode nvidia-smi and podman exec smart-transcode ffmpeg -hide_banner -encoders | grep nvenc.

Intel and AMD (/dev/dri)

ls -l /dev/dri                                          # which group owns renderD128 (usually render or video)
id                                                      # are YOU in that group? (rootless)
podman exec smart-transcode ls -l /dev/dri
podman exec smart-transcode id
  • Pass the device (--device /dev/dri) and, rootless, --group-add keep-groups so your render / video group follows you into the container. If you are not in that group on the host: sudo usermod -aG render $USER and log in again.
  • Rootful: the container joins the device's group itself.
  • With several GPUs, set SMART_TRANSCODE_VAAPI_DEVICE to the right node (ls -l /dev/dri/by-path).

Press Re-detect in Settings → Video after any change.

Sonarr / Radarr cannot connect

Put the containers in one Podman network (podman network create media, --network media on each) and use the container name in the address (http://sonarr:8989). In a pod they share localhost. Add a path mapping when they see the media under different paths. Integrations.

Conversions fail

  • Open the file's status in History for ffmpeg's messages and the exact command. Reproduce it inside: podman exec -it smart-transcode bash.
  • Disk space: podman exec smart-transcode df -h /srv/media. The new file needs about its own size free next to the original.
  • Raise logging to DEBUG in Settings → Debug, reproduce, and read /config/transcode.log.

Updating

podman pull docker.io/aarondyck/smart-transcode:latest
podman rm -f smart-transcode && ./start.sh              # or run your podman run command again
systemctl --user restart smart-transcode              # Quadlet: restarts with the new image

Your database lives in your config folder, so it survives. Pin a version with the tag :1.0 instead of :latest.