yt-dlp -x [YouTube or other url] yt-dlp -x [YouTube or other url] yt-dlp -i --format "bestaudio" -x --convert-thumbnail jpg --add-metadata --embed-metadata --embed-thumbnail --audio-format "best" -o "%(autonumber)02d %(title)s (%(upload_date>%Y-%m-%d)s) [%(id)s].%(ext)s" "https:// ... youtube URL ..."
This adds some tags and the thumbnail as cover file. It will save to whatever format the video itself has, usually .opus.https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites....
I was hoping for a working download for NPR Music, but it failed me last week for Kiefer’s set on Tiny Desk. Couldn’t airplay or chromecast it (without doing the whole screen, with all the trade offs that entails), and HDMI did a weird thing on macOS where the playback was sped up in every major browser.
Had a resort to a Firefox extension to download the video and Plex it in order to use the TV. Of course, I didn’t see if they had a Roku or similar app, and was just impatient to wait for the YouTube upload. Sigh.
My usual is:
yt-dlp -f 140 [url]
The -f 140 maps to the m4a format.yt-dlp -f bestaudio <url>
it directly downloads the audio from youtube and does not require ffmpeg unlike the -x option. moreover, you can specify format (m4a or default webm) like so - replace "bestaudio" with "bestaudio[ext=<format>]"
this only falls short unless you explicitly need it in mp3 container.