Live data from Hacker News

Open Source YouTube to MP3 Downloader

github.com

31–40 of 92 posts

Re: Open Source YouTube to MP3 Downloader

#33

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). 1: https://gist.github.com/entropie/d265e94136b9777cc6b3190189b...

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.

Re: Open Source YouTube to MP3 Downloader

#34

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 us…

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.

Re: Open Source YouTube to MP3 Downloader

#35
post #19

Earlier quoted context omitted.

a) highlighting that this extracts the audio track only I think it's pretty clear from the title that this is audio-only.

MP3 (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.

Laypeople have known what MP3s are since Napster was making headlines. Laypeople have mostly never heard of MP4.

Re: Open Source YouTube to MP3 Downloader

#36

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?

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

Re: Open Source YouTube to MP3 Downloader

#37
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... )

Doesn't work with DASH

Re: Open Source YouTube to MP3 Downloader

#38
post #25

This seems to be a pretty straightforward GUI wrapper around https://github.com/Tyrrrz/YoutubeExplode and https://github.com/AydinAdn/MediaToolkit (see 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 is a well-maintained public domain alternative.

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

Re: Open Source YouTube to MP3 Downloader

#39
post #31

Earlier quoted context omitted.

Thanks, I didn't know about -x ! My usual is: yt-dlp -f 140 [url] The -f 140 maps to the m4a format.

Why not Opus.

There are many reasons, and as a user of Opus you are probably aware of the trade offs?

Re: Open Source YouTube to MP3 Downloader

#40
post #7

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

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: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites....

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.

Post reply on HN