NixOS-Configs/home/gui/mpv.nix
2025-05-14 20:27:37 -05:00

56 lines
1.6 KiB
Nix

{ pkgs, ... }: {
programs = {
mpv = {
enable = true;
# package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { vapoursynthSupport = true; }) { youtubeSupport = true; };
config = {
cache = "yes";
cache-on-disk = "no";
cache-pause-initial = "yes";
cache-pause-wait = "5";
cache-secs = "3600";
demuxer-cache-wait = "no";
demuxer-donate-buffer = "yes";
demuxer-max-back-bytes = "244141KiB";
demuxer-max-bytes = "732422KiB";
demuxer-readahead-secs = "60";
demuxer-seekable-cache = "auto";
demuxer-thread = "yes";
force-seekable = "yes";
hls-bitrate = "max";
hr-seek-framedrop = "no";
hr-seek = "yes";
index = "default";
save-position-on-quit = "yes";
script-opts = "ytdl_hook-ytdl_path=/home/don/.local/bin/yt-dlp";
# scripts=[ pkgs.mpvScripts.autoload ];
slang = "en";
user-agent = "Mozilla/5.0";
video-reversal-buffer = "488281KiB";
ytdl = "yes";
ytdl-format = "bestvideo+bestaudio";
# Only needed when/if youtube blocks annon access again
ytdl-raw-options = "no-playlist=,cookies-from-browser=firefox";
# ytdl-raw-options = "no-playlist=";
};
profiles = {
"protocol.https" = {
speed = 1.77;
keep-open = true;
};
};
};
yt-dlp = {
enable = true;
extraConfig = ''
--no-mtime
'';
settings = {
retries = "infinite";
fragment-retries = "infinite";
buffer-size = "16K";
http-chunk-size = "10M";
};
};
};
}