aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/programs/jellyfin-mpv-shim.nix44
-rw-r--r--modules/users/schererleander/hm-linux.nix5
2 files changed, 27 insertions, 22 deletions
diff --git a/modules/programs/jellyfin-mpv-shim.nix b/modules/programs/jellyfin-mpv-shim.nix
index 681add5..b4306c2 100644
--- a/modules/programs/jellyfin-mpv-shim.nix
+++ b/modules/programs/jellyfin-mpv-shim.nix
@@ -4,36 +4,44 @@
lib,
...
}:
- let
- inherit (lib) optionalAttrs;
- in
{
systemd.user.services.jellyfin-mpv-shim.Service.Environment = [
"ENABLE_HDR_WSI=1"
];
+ # mpvConfig only supports flat key=value; write full mpv.conf to include profile sections
+ xdg.configFile."jellyfin-mpv-shim/mpv.conf".text = ''
+ vo=gpu-next
+ gpu-api=vulkan
+ hwdec=vaapi
+ target-colorspace-hint=yes
+ target-contrast=inf
+ target-peak=500
+ hdr-compute-peak=yes
+ deband=yes
+ video-sync=display-resample
+
+ [sdr-to-hdr]
+ profile-cond=p["video-params/gamma"] ~= nil and p["video-params/gamma"] ~= "pq" and p["video-params/gamma"] ~= "hlg"
+ profile-restore=copy-equal
+ inverse-tone-mapping=yes
+ tone-mapping=spline
+ tone-mapping-mode=rgb
+ gamut-mapping-mode=clip
+ target-trc=pq
+ target-prim=bt.2020
+ '';
+
services.jellyfin-mpv-shim = {
enable = true;
settings = {
player_name = "mpv-shim";
- allow_transcode_to_h256 = true;
+ allow_transcode_to_h265 = true;
};
- mpvConfig = {
- vo = "gpu-next";
- gpu-api = "vulkan";
- target-colorspace-hint = "yes";
- target-peak = 500;
+ mpvBindings = {
UP = "add chapter 1";
DOWN = "add chapter -1";
- }
- // (optionalAttrs false {
- target-trc = "pq";
- target-prim = "bt.2020";
- #target-peak = 406;
- #tone-mapping = "spline";
- #tone-mapping-mode = "rgb";
- inverse-tone-mapping = "yes";
- });
+ };
};
};
}
diff --git a/modules/users/schererleander/hm-linux.nix b/modules/users/schererleander/hm-linux.nix
index 3730a6f..ab26450 100644
--- a/modules/users/schererleander/hm-linux.nix
+++ b/modules/users/schererleander/hm-linux.nix
@@ -2,10 +2,6 @@
flake.modules.homeManager.schererleander-linux =
{ inputs, pkgs, ... }:
{
- home.packages = with pkgs; [
- jellyfin-desktop
- ];
-
imports = with inputs.self.modules.homeManager; [
schererleander-base
sway
@@ -14,6 +10,7 @@
nextcloud-client
vlc
ghostty
+ jellyfin-mpv-shim
];
};
}