From 52afe4037557d7100f4edaf0e5273ee36601e085 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 24 Oct 2021 14:16:14 +0200 Subject: mpv: ... --- user-profiles/mpv/default.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'user-profiles') diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix index 6b0ea076..0235d615 100644 --- a/user-profiles/mpv/default.nix +++ b/user-profiles/mpv/default.nix @@ -1,4 +1,4 @@ -{ config, userName, pkgs, ... }: +{ config, lib, userName, pkgs, ... }: { home-manager.users.${userName}.programs.mpv = { enable = true; @@ -7,15 +7,28 @@ }; config = { ytdl = true; - ytdl-format = "bestvideo[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]/best[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]/best[protocol!=http_dash_segments]"; - ytdl-raw-options = "netrc=,mark-watched=,cookies=${config.home-manager.users.${userName}.home.homeDirectory}/Downloads/cookies.txt"; + ytdl-format = lib.concatStringsSep "/" [ + "bestvideo[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]" + "best[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]" + "best[protocol!=http_dash_segments]" + ]; + ytdl-raw-options = lib.concatStringsSep "," [ + "netrc=" + "mark-watched=" + "cookies=${config.home-manager.users.${userName}.home.homeDirectory}/Downloads/cookies.txt" + ]; sub = false; osd-font = "DejaVu Sans"; vo = "gpu"; hwdec = "auto"; force-window = "yes"; - script-opts = "osc-layout=topbar,vidscale=no,deadzonesize=0.9"; af = "lavfi=[dynaudnorm=f=100:g=31:s=20.0]"; + script-opts = lib.concatStringsSep "," [ + "osc-layout=topbar" + "vidscale=no" + "deadzonesize=0.9" + "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" + ]; }; scripts = let reload = pkgs.stdenv.mkDerivation rec { -- cgit v1.2.3