3 ms·
for those of us comfy with the console: yt-dlp -x [YouTube or other url]
by thot_experiment 2y ago
for those of us comfy with the console:
yt-dlp -x [YouTube or other url]
- mvdtnz 2y agoI think the "or other url" is important here. I didn't realise for a long time that I could put a reddit, Twitter or other URLs in there to download videos. You can find a complete list of supported sites here: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites....
- samtheprogram 2y agoThis is incredibly understated, and I’ve used it for various sites, but it should be noted that the alternative sites are some times out of date in yt-dlp. 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.
- willsoon 2y agoOh yes. I know 'the others'. Works well.
- DavidPiper 2y agoThanks, I didn't know about -x ! My usual is: yt-dlp -f 140 [url] The -f 140 maps to the m4a format.
- shmerl 2y agoWhy not Opus.
- samtheprogram 2y agoThere are many reasons, and as a user of Opus you are probably aware of the trade offs?
- shmerl 2y agoHaven't tracked trade offs recently, but I always use Opus when I save audio from Youtube since it's the best codec option there.
- thot_experiment 2y agoWait what, what situation is opus worse than m4a? In my ABXing it's never lost to another lossy format.
- DavidPiper 2y agoMy personal ecosystem is built around Apple-native formats.
- jwilk 2y ago"-f m4a" also works and it's easier to remember.
- mik09 2y agomy first reaction as well
- willsoon 2y agoI used to download with yt-dlp -x. But the sound is not good at all. I am not using a re-encoded format, so some yt videos may not have good sound quality.
- dada78641 2y agoI have a command set up that basically does this: 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.
- rldjbpin 2y agoimo a better alternative (did not test on other sites) 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.