]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/mpv.nix
julm: oignon: install transmission-remote-gtk
[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-template = "%{filename:unknown}.%wH-%wM-%wS-%wT";
49 screenshot-format = "avif";
50 screenshot-avif-encoder = "libsvtav1";
51 screenshot-avif-pixfmt = "yuv420p";
52 # TODO: change crf wrt. resolution
53 screenshot-avif-opts = "crf=24,aq-mode=complexity";
54 screenshot-high-bit-depth = "yes";
55 screenshot-tag-colorspace = "yes";
56 };
57 profiles = {
58 "extension.gif" = {
59 interpolation = "no";
60 };
61 };
62 };
63 }