idiosyn/home/config/nil/mpv.nix

57 lines
1 KiB
Nix
Raw Normal View History

2024-08-25 19:10:52 +02:00
{ ... }: { config, lib, pkgs, ... }@args:
let
osConfig = args.osConfig or { };
in lib.mkIf (osConfig.hardware.graphics.enable or false) {
programs.mpv = {
enable = true;
defaultProfiles = [ "high-quality" ];
config = {
#access-references = false;
# Video output
2024-09-18 09:17:13 +02:00
vo = "gpu-next";
gpu-api = "vulkan";
2024-08-25 19:10:52 +02:00
vd-lavc-dr = true;
scale = "ewa_lanczos4sharpest";
cscale = "spline64";
dscale = "mitchell";
tscale = "oversample";
# A/V sync
video-sync = "display-resample";
interpolation = true;
# Audio
volume = 100;
volume-max = 100;
# Subtitles
sub-auto = "fuzzy";
# Screenshots
screenshot-format = "avif";
# Cache
demuxer-max-bytes = "768MiB";
demuxer-max-back-bytes = "256MiB";
};
profiles = {
highres = {
scale = "spline64";
};
};
scripts = with pkgs.mpvScripts; [
mpris
autocrop
autodeint
];
scriptOpts = {
autocrop.auto = false;
};
};
}