From 128904cd3b9e6ecf7ee5a91564b0f0c67deb4530 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 3 Nov 2021 09:52:52 +0100 Subject: gkleen@sif: switch to yt-dlp --- accounts/gkleen@sif/default.nix | 4 ++-- user-profiles/mpv/default.nix | 6 ++++-- user-profiles/yt-dlp.nix | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 user-profiles/yt-dlp.nix diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 617c178c..e569f732 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -61,7 +61,7 @@ let ''; in { imports = with flake.nixosModules.userProfiles.${userName}; [ - mpv + mpv yt-dlp ]; home-manager.users.${userName} = { @@ -246,7 +246,7 @@ in { home = { packages = with pkgs; [ fira-code powerline-fonts nerdfonts pavucontrol keepassxc - youtube-dl sxiv xclip mumble pulseaudio-ctl libnotify synergy + sxiv xclip mumble pulseaudio-ctl libnotify synergy xorg.xbacklight screen-message pidgin-with-plugins google-play-music-desktop-player qt5ct playerctl evince thunderbird wrappedZulip zoom-us steam steam-run wireshark skype diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix index 642eb004..f8454508 100644 --- a/user-profiles/mpv/default.nix +++ b/user-profiles/mpv/default.nix @@ -8,8 +8,10 @@ config = { ytdl = true; 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]" + "bestvideo[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]" + "best[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]" + # "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 "," [ diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix new file mode 100644 index 00000000..946fd8d0 --- /dev/null +++ b/user-profiles/yt-dlp.nix @@ -0,0 +1,17 @@ +{ config, lib, userName, pkgs, ... }: +{ + home-manager.users.${userName} = { + home.packages = with pkgs; [ yt-dlp ]; + xdg.configFile."yt-dlp/config".text = '' + --netrc + --mark-watched + --format ${lib.concatStringsSep "/" [ + "bestvideo[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]" + "best[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]" + # "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]" + ]} + ''; + }; +} -- cgit v1.2.3