7 ms·
Open Source YouTube to MP3 Downloader
- jnkx 2y agoOr you can use for free https://mp3convert.org https://mp3convert.org :) fast and easy.
- deleted 2y ago[deleted]
- mouse_ 2y agoI like yt-dlp, but I also see the value in something that looks and functions just like those websites people end up using anyways.
- packjc 2y agoI 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.
- thot_experiment 2y agofor those of us comfy with the console: yt-dlp -x [YouTube or other url]
- 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.
- 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.
- 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.
- mik09 2y agomy first reaction as well
- 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.
- IronWolve 2y agoyt-dlp_linux -f bestaudio --audio-quality 2 --embed-thumbnail --add-metadata --extract-audio --audio-format mp3 --no-mtime -o "%(title)s.%(ext)s" http:// http://
- NewJazz 2y agoYeah except do yourself a favor and don't use mp3
- metaphor 2y agoWhy, objectively?
- fallingsquirrel 2y ago1) 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.
- dorkwood 2y agoCan you give examples of modern codecs which are a better choice?
- Repulsion9513 2y agoIn this case since YouTube will provide it in Opus, Opus is the best choice, so that you're not re-encoding from lossy to lossy.
- npteljes 2y agoHere 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. http://listening-test.coresv.net/results.htm http://listening-test.coresv.net/results.htm 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. https://wiki.hydrogenaud.io/index.php?title=Transparency https://wiki.hydrogenaud.io/index.php?title=Transparency 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.
- rubee64 2y agoGave it a try. Worked great!
- packjc 2y agoThank you for trying it out! Much appreciated :D
- geor9e 2y agoPersonally 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. https://github.com/minanagehsalalma/Youtube-Downloader-Bookmarklet https://github.com/minanagehsalalma/Youtube-Downloader-Bookm... (https://raw.githubusercontent.com/minanagehsalalma/Youtube-Downloader-Bookmarklet/main/PromptMimfiyed.js https://raw.githubusercontent.com/minanagehsalalma/Youtube-D...)
- 38 2y agoDoesn't work with DASH
- littlestymaar 2y agoCan'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)
- 38 2y agoWhat do you mean work around DASH? DASH is the correct way to do this. The combined formats are legacy.
- littlestymaar 2y agoI 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).
- FabHK 2y agoMight be worth 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.)
- userbinator 2y agoa) highlighting that this extracts the audio track only I think it's pretty clear from the title that this is audio-only.
- HaZeust 2y agoMP3 (audio-only) and MP4 (video) is a one-character difference. It's clear to the people that browse HackerNews, it is seldom clear to the layperson.
- nvy 2y agoLaypeople have known what MP3s are since Napster was making headlines. Laypeople have mostly never heard of MP4.
- Joel_Mckay 2y agoFewer 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. Have a wonderful day =3
- a_subsystem 2y agoNice. 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.
- nirav72 2y agoAnother one https://github.com/Tyrrrz/YoutubeDownloader https://github.com/Tyrrrz/YoutubeDownloader
- FrostKiwi 2y agoYouTube 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.
- Repulsion9513 2y agoI 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.
- brnt 2y ago.opus _is_ an Ogg container, just with another filename.
- Repulsion9513 2y agoHmm, 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.
- brnt 2y agoA 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.
- deleted 2y ago[deleted]
- 2y ago
- deleted 2y ago[deleted]
- entropie 2y agoI 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). 1: https://gist.github.com/entropie/d265e94136b9777cc6b3190189b30050 https://gist.github.com/entropie/d265e94136b9777cc6b3190189b...
- perfmode 2y agoelegant. how is the written?
- Repulsion9513 2y agoI'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.
- btown 2y agoThis seems to be a pretty straightforward GUI wrapper around https://github.com/Tyrrrz/YoutubeExplode https://github.com/Tyrrrz/YoutubeExplode and https://github.com/AydinAdn/MediaToolkit https://github.com/AydinAdn/MediaToolkit (see https://github.com/PackJC/YoutubeToMP3/blob/main/Form1.cs https://github.com/PackJC/YoutubeToMP3/blob/main/Form1.cs). Note the (admirable but non-OSI) terms of the former library if using any outputs from this software. https://github.com/yt-dlp/yt-dlp https://github.com/yt-dlp/yt-dlp is a well-maintained public domain alternative.
- josephcsible 2y agoInterestingly, 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.
- deleted 2y ago[deleted]
- Chilko 2y agoNote the final points of their reasoning: > Q: If I make a derivative work based on your project (e.g. use your library), would I need to also include your terms of use in my own project? > A: No, you don't have to do that. But I won't stop you if you want to.
- plasticbugs 2y agoSeveral 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 https://github.com/plasticbugs/podcasty
- qwerty456127 2y agoWho 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.
- ryanmcbride 2y agoI still use an iPod with Rockbox firmware as my everyday music player so I also still need mp3s :3
- chronogram 2y agoAll 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.
- ZoomZoomZoom 2y agoRockBox added OPUS support ages ago. Absolutely no need to perform lossy-to-lossy conversion when you can just grab and use the opus stream.
- qwerty456127 2y agoI installed Rockbox on iPod specifically to play Opus.
- tempaccount1234 2y agoAs long as there’s no mp3directcut https://mpesch3.de/ 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. This is why mp3 still is a good format for 2024.
- sunaookami 2y agoI 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.
- robertclaus 2y agoI 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.
- wodenokoto 2y agoHave 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.
- fein 2y agoIt's not online but stacher works quite well for my needs as a GUI wrapper for yt dlp. https://stacher.io/ https://stacher.io/
- bobse 2y agoHow do I run this on my phone where I listen to everything?
- guappa 2y agoYou install mobian and then… normally :D
- ssernikk 2y agoAlternatively you can install https://github.com/termux/termux-app https://github.com/termux/termux-app and then use https://github.com/yt-dlp/yt-dlp https://github.com/yt-dlp/yt-dlp in it
- Aissen 2y agoThere are open source apps for that you can find on f-droid.
- xk3 2y agoNewPipe or xklb in Termux
- deleted 2y ago[deleted]
- loris1 2y ago[dead]
- erlfire 2y agoI 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 https://github.com/ErlantzCalvo/Alcachofa)
- out_of_protocol 2y agoPlease don't reconvert good lossy format (opus) into much worser one (mp3). Lossy to lossy is always bad, especially so into worser one
- NayamAmarshe 2y agohttps://cobalt.tools https://cobalt.tools is another great option. No downloads, no ads, supports several websites.
- randweerr 2y ago[flagged]
- randweerrt 2y ago[flagged]
- khkhh 2y ago[flagged]
- khkhh 2y ago[flagged]