How to download music from Youtube with yt-dlp (CLI)
Downloading (yt-dlp) You use this command: yt-dlp -f "bestvideo[height=2160]+bestaudio" -x --audio-format flac "VIDEO_URL" In this command, I’m downloading from a 4K video (2160p), and I like my music to be in the .flac file. Feel free to change the quality and filetype into whatever you like. Update metadata (ffmpeg) Since the metadata won’t come with the file by default, you may like to add it manually. To do this, yt-dlp should also work. However, my preferred method is to use ffmpeg, instead: ...