please let me touch the mp3s
2024-03-16
For when there is no other way to get the mp3 files for an album.
First, install yt-dlp. Install instructions are on the yt-dlp github. Or, on Arch, just:
sudo pacman -Syu yt-dlp
Navigate wherever you want to put these files. You'll probably want to make a directory to hold them:
mkdir album && cd album
Then, run this command with your YouTube URL inserted in the marked place. This can handle a full playlist or just one video, but I'm working with a playlist:
yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --write-thumbnail --convert-thumbnails png 'https://www.youtube.com/playlist?list=OLAK5uy_mhV0gG7uk8ScgI_doUdr-Q8qw3jnn9QmM' && rm *.png
Now you have all the files you need (music and cover art), and no more. I really tried to find a way to only download the square jpg from the playlist, but couldn't find it. So, we write the thumbnail of each video as a png, the playlist thumbnail as jpg (don't ask me why it doesn't convert), and we delete the pngs. Wasteful, but clean.
Unfortunately, they're not tagged. I like Tagger, which is available in the AUR.
yay tagger && tagger
Tagger's GUI is pretty self explanatory. Select your directory to pull up all the songs, then edit them. Note that you can ctrl+click and shift+click the tracklist on the left to edit multiple files at once. It should look something like this when you're all done.
You can share your freshly tagged files on Soulseek to save others from having to do the same in the future. Nicotine+ is really great, and much easier to use than SoulseekQt.