Live data from Hacker News

Open Source YouTube to MP3 Downloader

github.com

61–70 of 92 posts

Re: Open Source YouTube to MP3 Downloader

#63

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.

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.

Re: Open Source YouTube to MP3 Downloader

#64
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)

Re: Open Source YouTube to MP3 Downloader

#65

for those of us comfy with the console: yt-dlp -x [YouTube or other url]

I 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.

Re: Open Source YouTube to MP3 Downloader

#66

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.

I still use an iPod with Rockbox firmware as my everyday music player so I also still need mp3s :3

RockBox added OPUS support ages ago. Absolutely no need to perform lossy-to-lossy conversion when you can just grab and use the opus stream.

Re: Open Source YouTube to MP3 Downloader

#67

Earlier quoted context omitted.

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.

Can you give examples of modern codecs which are a better choice?

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.

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

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.

Re: Open Source YouTube to MP3 Downloader

#68
post #11

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. https://github.com/minanagehsalalma/Youtube-Downloader-Bookm... ( https://raw.githubusercontent.com/minanagehsalalma/Youtube-D... )

Tried it on 4 videos. Didn't work on any of them.

Re: Open Source YouTube to MP3 Downloader

#69

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.

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.

This is exactly what the poster you're answering to said.

Re: Open Source YouTube to MP3 Downloader

#70

Earlier quoted context omitted.

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.

Can you give examples of modern codecs which are a better choice?

YouTube natively provides audio in AAC which is higher quality per bitrate than MP3.

AAC has very wide support. Only convert AAC to MP3 if your player really doesn't support AAC.

Post reply on HN