Interestingly, while the readme file mentions that crayon license, the license file itself is an unmodified MIT license. I wonder what the legal status of that is.
Personally I just use a bookmarklet. Nothing to install, no website to visit. Just a local bookmark that shows the list of the video/audio file direct links.
Hmm, I'm not the creator of it, but yes it's been working for me. I would have thought a regex match would be pretty universal. I'm using a chromium based browser if that matters. Here's what I see when I use it: https://i.imgur.com/7eS132D.png
Can't you still work around DASH by changing your user agent, claiming that you are running Safari? (It used to be the case, but I haven't been in the streaming industry for years now so it may be obsolete)
I mean “work around the fact it doesn't work with DASH”
Also, MPEG-DASH is the typical bloated design-by-committee standard, that have twenty ways to do the same thing and that makes it very hard to implement fully. It's PDF or SVG all over again.
(I uses to work on an implementation of a DASH web player that had much better coverage of the standard that the reference implementation back in 2015, and I can tell you it was a PITA)
HLS, while a bit primitive in a few annoying way (inclusing the fact that it mandated, at the time, the use of MPEG-2 TS), is at least a pragmatic standard that is reasonably implementable. (Even though HLS.js being really good compared to the DASH alternative makes it less likely that you'd need to do it by yourself).
Who needs MP3 in 2024? Retrocomputing does! So a really lightweight YouTube client capable of running on Windows 95 and/or 486-class machines producing MP3 output would make a really great sense. Can this? For everyone else there are AAC and OPUS.
All iPods supported AAC and I imagine alternative firmware adds opus support, so you can just grab the original audio files from YouTube instead of converting them to MP3.
As long as there’s no mp3directcut https://mpesch3.de/) clone for Opus, the format lacks non-destructive fast editing. And while it can cut and edit raw aac, it works a lot better with mp3.
Non destructive editing is more important with the new formats, because they compress to smaller files and cause greater problems when you unpack and recompress them.
I always use MP3 since it's the most compatible. Doesn't make a difference for my hearing and I can use it anywhere. E.g. some car radios still have problems with other formats. Saying "who needs this" is very dismissive.
Something in between. I actually thought of all the vintage tech (I'm a huge fan of) but car audios (which can be routinely used by non-geeks who generally use more or less modern tech for everything else) specifically didn't come into my mind.
I 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:
This 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.
I 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.
imo 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.
YouTube presents audio in 2 forms under various bitrates and formats. AAC and OPUS.
The Opus track @128kbps (even better than the sometimes available AAC @160kbps) is the highest quality and can be downloaded and played back by demuxing its WebM container to .opus or using a player which understands the WebM container.
This is what I prefer: Downloading original OPUS audio, demuxing to .opus, without reconversions using a bash oneliner. Highest Quality you can get from YouTube.
Appreciate the minimalistic UI, no frills.
170 MB for a YouTube MP3 Downloader seems a bit steep though.
> The Opus track @128kbps (even better than the sometimes available AAC @160kbps) is the highest quality…
Opus has an advantage over AAC-LC (not HE variants) at lower bitrates, but by 128 kbps Opus loses any efficiency advantage. AAC-LC is going to give you slightly better quality and far broader device compatibility.
I remux into ogg which still supports Opus but seemed to have wider player support. Great way to get tracks that don't seem to be available anywhere other than streaming.
Hmm, maybe whatever I was running into problems with just doesn't recognize the extension then. Sadly I don't remember what it was. Coulda been Plex, which wouldn't surprise me.
A lazy indexer could skip just based on filename, and a well implemented and current (although... Opus is a decade old now?) player would properly detect the Opus stream inside the .ogg file and decode properly.
I remember using online tools for this a decade ago. I'm surprised to see a new project for it. I wonder if there's a specific use-case the author needed it for or if this was just for fun.
Have you tried using online tools for this a _week_ ago?
Youtube has been pretty good at fighting the online tools, meanwhile, spammers have been pretty good at filling search results with non-tools full of ads.
I've found it difficult to do the occasional drive-by download, because none of the old tools (kickyouotube, etc) that I remember the name of work or exists, and googling for online services returns junk.
I love this kind of projects to learn how to program or to be introduced to a new programming language!
Back in the day, when I was starting out in programming, I made one that was practically the same so that my parents could download songs from youtube without help (https://github.com/ErlantzCalvo/Alcachofa)
Several years ago, after finishing a coding bootcamp, I created this little web app that turns YouTube channels into an XML podcast feed. Might need to dust it off. https://github.com/plasticbugs/podcasty
a) highlighting that this extracts the audio track only (not everyone is 100% firm with their audio and video formats)
b) investigating whether one could, instead of downloading the highest video quality and then discarding it, download only the highest quality audio? (yt-dlp and cousins allow that.)
Fewer remember modified mp4 with patched atom location to help play media while downloading off a CDN.
For most mobile users, using the more modern VP9 and HEVC essentially just burns battery life, and even modern GPU based desktop users usually see their card warm up on YT.
MP4 is far from perfect, but play/resume/skip-to location media mods for a web-server are common (js or html5 support is stable.) This saves a lot of grief setting up media servers, but most people now just use an online platform... rather than figure this stuff out.
I kind of miss the days a lazy layman coudn't post lame garbage video content.
Nice. I’ve been building something similar in php. But then you have to have a web server to run it. And it uses yt-dlp, so you also often have to make sure that is up to date before you run it.
I do too, don’t get me wrong. yt-dlp has much more rich features and does a good bit more than this… however I’ve just been trying to challenge myself to make simple apps and I prefer GUIs over command.
1) MP3 is dated. Modern codecs give better quality at smaller filesizes.
2) Any lossy re-encoding step degrades quality. You'll get the highest quality by saving the stream direct from the server and skipping the re-encode step. Just pass --extract-audio and skip all those other arguments.
Here is one test where they compare some formats. Opus came out on top, even though for MP3, they allowed for a significantly larger bitrate. The downside is that the test is old, encoders evolve all the time, although this is true to both Opus and MP3.
The other kind of comparison to consider is transparency - the ability of a lossy codec to be indistinguishable from the uncompressed source. MP3 is supposed to achieve this at 192 kbps, while OPUS can do it in 128.
The best choice, at the end of the day, is wholly dependent of the context of the usage. If all of the source is in MP3 to begin with, it doesn't make sense to convert.
I use a telgram bot (controlled by node-red) that sends the URLs to a script [1] that uses a FIFO to download them one by one via yt-dlp. If the sender ID is from my mum, only the audio track is saved and made available to her via jellyfin. It has been working almost too well for 2 years. She has downloaded almost 1TB of audiobooks (all from youtube).
I've been meaning to do something similar but slap HTTP in front of it and use a bookmarklet. It seems like this script is both the daemon and the submitter though? That's nice.
https://github.com/yt-dlp/yt-dlp is a well-maintained public domain alternative.