nixos-config/home/mpv.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2022-02-03 19:38:54 +00:00
{ pkgs, config, ... }:
let
2023-06-06 00:51:11 +00:00
ffmpeg_5 = pkgs.ffmpeg_5-full;
2022-02-03 19:38:54 +00:00
scripts = with pkgs.mpvScripts; [ sponsorblock ];
2023-08-26 23:00:18 +00:00
mpv = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { inherit ffmpeg_5; }) {
inherit scripts;
};
2022-02-03 19:38:54 +00:00
2023-08-26 23:00:18 +00:00
in {
2023-06-06 00:51:11 +00:00
home.packages = [ ffmpeg_5 ];
programs.mpv = {
enable = true;
package = mpv;
config = {
slang = "eng,en";
alang = "eng,en";
hwdec = "vaapi";
vo = "gpu";
audio-display = "no";
audio-normalize-downmix = "yes";
replaygain = "track";
2022-06-28 00:06:42 +00:00
2023-08-26 23:00:18 +00:00
script-opts-set =
"sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]";
};
# Don't make this profile default since not all machines can handle it
profiles.gpu-hq = {
scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp";
};
# 1.5 times speed, ≈702 cents pitch up
profiles.wat = {
speed = "1.5";
audio-pitch-correction = "no";
};
bindings = {
WHEEL_UP = "ignore";
WHEEL_DOWN = "ignore";
WHEEL_LEFT = "ignore";
WHEEL_RIGHT = "ignore";
k = "add sub-scale -0.1";
K = "add sub-scale +0.1";
2021-08-01 19:48:12 +00:00
"[" = "add speed -0.1";
"]" = "add speed 0.1";
"{" = "add speed -1";
"}" = "add speed 1";
};
};
}