The README is the complete user documentation again: features, install, two sessions, usage, the full options table (and renamed options), every feature with problem, usage, limitations, security and "remove when", UI patches at user level (DevTools on the LAN, after a Steam update), changes outside Nix, rollback and uninstall. docs/ keeps only the technical side (how the patches work, writing patches, signatures and the update procedure, the SteamVR debugger mechanics, cleanup and installer internals), linked from each feature. docs/options.md, two-sessions.md and desktop-integration.md are gone (their content is in the README).
2.0 KiB
Jellyfin hardware decoding: how it works
jellyfin.hardwareDecoding.* (module jellyfin). What it does, how to
configure it and its caveats: README,
Jellyfin hardware decoding.
Why mpv doesn't use the decoder
The Frame's hardware decoder is a V4L2 memory-to-memory device
(qcom-iris, /dev/video*), which
- the Flatpak can't open: its
devices=dricovers only the GPU, and Flatpak has nothing between that anddevices=all; - mpv never tries: Jellyfin hard-sets
hwdec=auto-copy, and mpv'sautoprobing leaves out V4L2 M2M on purpose (its quality varies by SoC). Jellyfin has no way to pass mpv options.
The shim
An LD_PRELOAD shim (modules/jellyfin/mpv-hwdec-shim.c, a few libmpv
wrappers, only libc) rewrites an hwdec value starting with auto (set
through libmpv's mpv_set_* functions) to $SFN_MPV_HWDEC (the hwdec
option); explicit values such as no stay. It is preloaded from the Nix
store; only its store path is exposed (read-only) to the sandbox. It would
work for any libmpv app that sets hwdec=auto*, but only Jellyfin Desktop
is set up here.
The desktop entry
Nothing is written to Flatpak's overrides: a desktop entry shadowing the
Flatpak's (~/.local/share/applications/org.jellyfin.JellyfinDesktop.desktop,
same ID, so the KDE menu and the "+" menu start it) passes device access and
the shim as flatpak run options, so they apply to launches from that entry
and are gone with it:
flatpak run --branch=stable --arch=aarch64 --command=jellyfin-desktop \
--device=all --filesystem=<shim>:ro \
--env=LD_PRELOAD=<shim>/lib/mpv-hwdec-shim.so \
--env=SFN_MPV_HWDEC=v4l2m2m-copy,auto-copy org.jellyfin.JellyfinDesktop
(The exact line with the store path is the read-only option
steamFrame.jellyfin.hardwareDecoding.command.)
Older versions used a Flatpak override (via nix-flatpak or a Home Manager
link) and a shim copy in ~/.var/app/org.jellyfin.JellyfinDesktop;
steam-frame-nix-cleanup removes their entries from the override and the
copy.