mpv: Install all anime4k shaders
This commit is contained in:
parent
19dbc29559
commit
b38ee5f22a
@ -1,11 +1,12 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
anime4k = pkgs.callPackage ../../../packages/anime4k {};
|
||||||
makeMpvProfile = { shader, additional ? {} }: {
|
makeMpvProfile = { shader, additional ? {} }: {
|
||||||
glsl-shaders = "~/.config/mpv/shaders/${shader}";
|
glsl-shaders = "${anime4k}/usr/share/shaders/${shader}";
|
||||||
scale = "ewa_lanczossharp";
|
scale = "ewa_lanczossharp";
|
||||||
cscale = "ewa_lanczossharp";
|
cscale = "ewa_lanczossharp";
|
||||||
gpu-context = "auto";
|
gpu-context = "wayland";
|
||||||
gpu-api = "opengl";
|
gpu-api = "opengl";
|
||||||
hwdec = "vaapi";
|
hwdec = "vaapi";
|
||||||
vo = "gpu";
|
vo = "gpu";
|
||||||
@ -15,29 +16,25 @@ let
|
|||||||
} // additional;
|
} // additional;
|
||||||
in {
|
in {
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = [ pkgs.mpv ];
|
environment.systemPackages = with pkgs; [ mpv ];
|
||||||
|
|
||||||
home-manager.users."${config.system.singleUser}" = {
|
home-manager.users."${config.system.singleUser}" = {
|
||||||
xdg.configFile = {
|
|
||||||
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl;
|
|
||||||
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
script-opts = "try_ytdl_first=no";
|
script-opts = "try_ytdl_first=no";
|
||||||
|
af = "loudnorm=I=-30";
|
||||||
};
|
};
|
||||||
defaultProfiles = [ "anime" ];
|
defaultProfiles = [ "anime" ];
|
||||||
profiles = {
|
profiles = {
|
||||||
anime = (makeMpvProfile {
|
anime = (makeMpvProfile {
|
||||||
shader = "Anime4K_Upscale_CNN_UL_x2_Deblur.glsl";
|
shader = "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
|
||||||
additional = {
|
additional = {
|
||||||
fullscreen = "";
|
fullscreen = "";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
"anime-denoise" = (makeMpvProfile {
|
"anime-denoise" = (makeMpvProfile {
|
||||||
shader = "Anime4K_Upscale_CNN_UL_x2_Denoise.glsl";
|
shader = "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
23
packages/anime4k/default.nix
Normal file
23
packages/anime4k/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ stdenv, lib }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "Anime4k";
|
||||||
|
version = "4.0.0-RC";
|
||||||
|
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "https://github.com/bloc97/Anime4K.git";
|
||||||
|
ref = "cb56502ed429a5a3e48ed62c5245d6445a209c7c";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
find ./glsl/ -type f -iname '*.glsl' -exec install -Dm 644 {} -t $out/usr/share/shaders/ \;
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A High-Quality Real Time Upscaler for Anime Video ";
|
||||||
|
homepage = "A High-Quality Real Time Upscaler for Anime Video ";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user