Repository navigation
Description
What happened
On a real Silo deployment with an NVIDIA Tesla P4 and Jellyfin FFmpeg 7.1.4, automatic hardware transcoding selected a complete hardware pipeline for a source that the GPU could encode but could not decode through the selected hardware path.
FFmpeg exited before producing the first playable manifest. Playback then failed instead of trying CPU decoding while retaining the working GPU encoder.
The client-visible failures observed during these sessions included:
All compatible playback recipes have already failed for this output route
and:
The playback transport failed before media became ready
The same source shape was successfully processed on the same server when decoding on the CPU, converting/uploading frames as NV12, scaling with CUDA, and encoding with NVENC. This shows that the GPU encoder remained usable even though the full hardware path did not.
Steps to reproduce
- Run Silo with a supported NVIDIA GPU and Jellyfin FFmpeg 7.1.4.
- Configure Playback → Hardware acceleration as
Auto. - Select an H.264 High 10 1080p source that is not accepted by the available NVIDIA hardware decoder.
- Request a lower-resolution H.264 transcode, such as 720p.
- Observe that the automatically selected full-hardware FFmpeg process exits before creating its first manifest.
- Observe that playback fails without retrying the viable CPU-decode → GPU-encode path.
- Run the same media shape using CPU decode, NV12 CUDA upload, CUDA scaling, and NVENC output.
- Observe that FFmpeg produces playable output on the same GPU.
Expected behavior
When playback.hw_accel=auto, a failure of the complete hardware path should not immediately discard a working hardware encoder.
Silo should attempt progressively safer startup paths:
- GPU decode → GPU encode.
- CPU decode → GPU encode.
- CPU decode → CPU encode.
Fallback should happen only after FFmpeg exits before producing the first manifest. A process that is still running but slow must not cause a duplicate encoder to start.
Explicit hardware selections, direct play, stream copy/remux, and validated HDR/tone-map recipes should keep their existing behavior.
Silo version / commit
90b5c0f4c44fcccebefa2822098638d6a2fc099a
Deployment
Docker container deployed on Kubernetes.
Clients affected
- Web UI
- Android
- iOS/tvOS/macOS
- Jellyfin-compat client
- Other/not client-specific
The failure is in FFmpeg startup and can affect any client route that requests the incompatible automatic transcode.
Relevant logs
No raw server logs are available from the pre-fix reproduction. The original pod was replaced before this issue was filed.The client-visible messages above are copied from the reproduced playback failures; they are not presented as server log lines.
Technical notes
Automatic selection currently resolves one hardware backend and treats that result as valid for the complete decode/filter/encode pipeline. Hardware support is not uniform across decode codec, profile, bit depth, pixel format, filters, driver, FFmpeg build, GPU generation, and encoder.
A bounded automatic fallback should:
- use the real manifest startup as validation instead of launching a separate probe;
- close a failed process before starting the next path;
- retain GPU encoding when only hardware decoding fails;
- cache only a path that actually produced a manifest;
- scope any cache entry to the media and executable recipe;
- expire cached fallback choices so a recovered GPU is retried;
- apply consistently to local, remote-node, Jellyfin-compatible, and reconstructed playback.
The tested implementation uses a 15-minute, 256-entry, concurrency-safe successful-path cache and avoids the concrete device that just failed when another configured hardware device is available.
AI harness
Codex desktop app
AI tool(s)
Codex exec_command, apply_patch, and in-app Browser
AI model(s)
GPT-5 (Codex)
AI involvement
AI-assisted
Independent or adversarial review
The complete implementation diff was reviewed across automatic eligibility, startup process lifecycle, media-specific cache isolation, cache concurrency and bounds, multi-device avoidance, explicit acceleration behavior, tone-map exclusions, local/remote/Jellyfin/reconstruction parity, throttle defaults and hysteresis, segment cleanup, FFmpeg log volume, session correlation, and Admin rendering.
Review findings were resolved by restricting adaptive fallback to ordinary auto video transcodes, refusing to retry a process that remains alive, writing cache preferences only after manifest readiness, bounding cache lifetime and size, preserving specialized tone-map paths, propagating resource policy through durable recipes, emitting full diagnostics only on lifecycle events, and moving log-sink calls outside session locks.
Confirmations
- I reproduced this myself on a real deployment.
- No synthesized or AI-summarized server logs are presented as raw evidence.
- The absence of retained pre-fix server logs is stated explicitly.
Activity