]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/mpv.nix
julm: blackberry: fullscreen: default to true
[julm/julm-nix.git] / home-manager / profiles / mpv.nix
1 { pkgs, lib, ... }:
2 {
3 programs.mpv = {
4 enable = true;
5 bindings = {
6 # Volume normalization
7 # See https://github.com/mpv-player/mpv/issues/3979
8 "Alt+a" = ''cycle-values af "loudnorm=I=-25:TP=-1.5:LRA=1:linear=false" "dynaudnorm=framelen=100:gausssize=10:coupling=1:peak=0.58" "speechnorm" ""'';
9 "Alt+f" = "cycle video-unscaled";
10
11 # Show all chapters (like a right-clic on |<< or >>|)
12 "c" = "show_text \${chapter-list}";
13 "=" = "show-text \${playlist}";
14 "!" = "show-text \${track-list}";
15
16 # q is easier to type than Q
17 "q" = "quit-watch-later";
18 "ESC" = "quit-watch-later";
19 "Q" = "quit";
20 "ENTER" = "playlist-next force";
21
22 "Alt+BS" = "playlist-remove current";
23 };
24 config = {
25 af = "loudnorm=I=-25:TP=-1.5:LRA=1:linear=false";
26
27 hwdec = "auto-safe";
28 profile = "gpu-hq";
29 vo = "gpu";
30
31 ytdl-format = "18/mp4-480p/hls-480p/http-360p/mp4";
32
33 # Don't wait ages for the window to finally show up.
34 force-window = "immediate";
35
36 stop-screensaver = "yes";
37
38 slang = "eng,en,enUS,en-US,fr,fr-FR";
39 alang = "eng,en,enUS,en-US,fr,fr-FR";
40 sub-scale = "0.6";
41
42 # For arbtt
43 #title = "MPV: \${?pause==no:playing}\${?pause==yes:paused}: \${path}";
44 title = lib.mkDefault "MPV: \${?pause==no:playing}\${?pause==yes:paused}: ";
45
46 # Higher quality screenshots. Low compression rate to speed up saving.
47 screenshot-directory = "~/Images/mpv";
48 screenshot-format = "avif";
49 screenshot-avif-encoder = "libsvtav1";
50 screenshot-avif-pixfmt = "yuv420p";
51 # TODO: change crf = " wrt. resolution";
52 screenshot-avif-opts = "crf=24,aq-mode=complexity";
53 screenshot-high-bit-depth = "yes";
54 screenshot-tag-colorspace = "yes";
55 };
56 profiles = {
57 "extension.gif" = {
58 interpolation = "no";
59 };
60 };
61 };
62 }