Add yt-dlp config
This commit is contained in:
parent
87ef61ba56
commit
9ca2a2771b
4 changed files with 26 additions and 4 deletions
|
@ -8,5 +8,6 @@
|
||||||
./neovim
|
./neovim
|
||||||
./picom
|
./picom
|
||||||
./polybar
|
./polybar
|
||||||
|
./yt-dlp
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
22
config/packages/yt-dlp/config
Normal file
22
config/packages/yt-dlp/config
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Output format: album/tracks.format
|
||||||
|
-o "%(album,playlist_title)U/%(track_number,playlist_index)s - %(title)U.%(ext)s"
|
||||||
|
--windows-filenames
|
||||||
|
# --restrict-filenames
|
||||||
|
|
||||||
|
# Extract audio
|
||||||
|
-f bestaudio
|
||||||
|
--extract-audio
|
||||||
|
--audio-format mp3
|
||||||
|
|
||||||
|
# Thumbnail squared
|
||||||
|
--convert-thumbnails png
|
||||||
|
--ppa "ThumbnailsConvertor+ffmpeg_o:-c:v png -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\""
|
||||||
|
--embed-thumbnail
|
||||||
|
|
||||||
|
# Metadata, with playlist number as track number if the latter is missing
|
||||||
|
--embed-metadata
|
||||||
|
--parse-metadata "playlist_index:%(track_number)s"
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
--no-overwrites
|
||||||
|
--concurrent-fragments 4
|
3
config/packages/yt-dlp/default.nix
Normal file
3
config/packages/yt-dlp/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
home.file."/home/vylpes/.config/yt-dlp/config".source = ./config;
|
||||||
|
}
|
|
@ -114,10 +114,6 @@
|
||||||
gcm = "git commit -m";
|
gcm = "git commit -m";
|
||||||
gco = "git checkout";
|
gco = "git checkout";
|
||||||
|
|
||||||
yt-mp3 = "yt-dlp -xi --audio-format mp3";
|
|
||||||
yt-mp3-meta = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata";
|
|
||||||
yt-mp3-meta-cookies = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata --cookies-from-browser firefox";
|
|
||||||
|
|
||||||
s = "swallow";
|
s = "swallow";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue