]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/yt-dlp.nix
yt-dlp: add vcodec=av1|vp9
[julm/julm-nix.git] / home-manager / profiles / yt-dlp.nix
1 { pkgs, lib, ... }:
2 {
3 imports = [
4 ./aria2c.nix
5 ];
6 home.packages = [
7 # error: phantomjs 1.9.8 has been dropped due to lack of maintenance and security issues
8 #pkgs.phantomjs
9 pkgs.yt-dlp
10 ];
11 xdg.configFile."yt-dlp/config".text = ''
12 #--download-archive .downloaded
13 --embed-chapters
14 --embed-subs
15 --sub-langs all
16 --format ${lib.concatStringsSep "/" [
17 "bestvideo[height<=480][vcodec=av1]+bestaudio"
18 "bestvideo[height<=480][vcodec=vp9]+bestaudio"
19 "bestvideo[height<=480][ext=mp4]+bestaudio"
20 "bestvideo[height<=480]+bestaudio"
21
22 "best[height<=480][ext=av1]"
23 "best[height<=480][ext=vp9]"
24 "best[height<=480][ext=mp4]"
25 "best[height<=480]"
26
27 "best"
28 ]}
29 --output "%(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)s - %(title)s.%(id)s.%(format_id)s.%(ext)s"
30 --match-filter !is_live
31 --prefer-free-formats
32 --sub-format ass/srt/best
33 --sub-langs "en.*,fr,-live_chat,-rechat"
34 --user-agent Mozilla/5.0
35 '';
36 }