diff --git a/home/gui/mpv.nix b/home/gui/mpv.nix index 1658a9e..5858083 100644 --- a/home/gui/mpv.nix +++ b/home/gui/mpv.nix @@ -1,31 +1,46 @@ { pkgs, ... }: { - programs.mpv = { - enable = true; - package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { vapoursynthSupport = true; }) { youtubeSupport = true; }; - config = { - cache-on-disk = "yes"; - cache = "yes"; - demuxer-max-back-bytes = "100M"; - demuxer-max-bytes = "500M"; - demuxer-readahead-secs = "20"; - pause = "no"; - save-position-on-quit = "yes"; - slang = "en"; - user-agent = "Mozilla/5.0"; - ytdl-format = "bestvideo+bestaudio"; - ytdl-raw-options = "no-playlist="; - ytdl = "yes"; - script-opts = "ytdl_hook-ytdl_path=/etc/profiles/per-user/don/bin/yt-dlp"; - #scripts = [ pkgs.mpvScripts.autoload ]; - }; - profiles = { - "protocol.https" = { - speed = 1.77; - keep-open = true; + programs = { + mpv = { + enable = true; + package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { vapoursynthSupport = true; }) { youtubeSupport = true; }; + config = { + cache-on-disk = "yes"; + cache = "yes"; + demuxer-max-back-bytes = "100M"; + demuxer-max-bytes = "500M"; + demuxer-readahead-secs = "20"; + pause = "no"; + save-position-on-quit = "yes"; + slang = "en"; + user-agent = "Mozilla/5.0"; + ytdl-format = "bestvideo+bestaudio"; + ytdl-raw-options = "no-playlist="; + ytdl = "yes"; + script-opts = "ytdl_hook-ytdl_path=/etc/profiles/per-user/don/bin/yt-dlp"; +#scripts = [ pkgs.mpvScripts.autoload ]; }; - "protocol.http" = { - profile = "protocol.https"; + profiles = { + "protocol.https" = { + speed = 1.77; + keep-open = true; + }; + "protocol.http" = { + profile = "protocol.https"; + }; + }; + }; + yt-dlp = { + enable = true; + extraConfig = + '' + --no-mtime + ''; + settings = { + retries = "infinite"; + fragment-retries = "infinite"; + buffer-size = "16K"; + http-chunk-size = "10M"; }; }; };