diff --git a/hosts/common/programs/yt-dlp.nix b/hosts/common/programs/yt-dlp.nix index 206f41517..af719becf 100644 --- a/hosts/common/programs/yt-dlp.nix +++ b/hosts/common/programs/yt-dlp.nix @@ -46,12 +46,16 @@ in # (e.g. a 1440p/30fps video might be 3000-6000 Kbps, and can't be downloaded at > 1.7x) # # see available formats: `yt-dlp -F https://youtube.com/` + # + # `res:1080` means "prefer the best resolution <= 1080, followed by the _worst_ resolution > 1080" + # default sort ordering: lang,quality,res,fps,hdr:12,vcodec,channels,acodec,size,br,asr,proto,ext,hasaud,source,id. + # vcodec default ordering: av01 > vp9.2 > vp9 > h265 > h264 > vp8 > h263 > theora > other '' + (if cfg.config.defaultProfile == "high-quality" then '' - -S res:1440,fps:60,tbr:3000 + -S lang,res:1440,fps:60,vcodec,br:3000 '' else if cfg.config.defaultProfile == "mid-range" then '' - -S vcodec:h264,res:1080,fps:60,tbr:3000 + -S lang,res:1080,vcodec:vp9,fps:60,br:3000 '' else '' - -S vcodec:h264,height:360,fps:30,tbr:3000 + -S lang,vcodec:h264,height:360,fps:30,br:3000 ''); }; }