Live data from Hacker News

Show HN: YouTube-DL GUI Powered by Electron

github.com

131–140 of 142 posts

Re: Show HN: YouTube-DL GUI Powered by Electron

#131
post #76

Earlier quoted context omitted.

I'm a bit ignorant of the details b/c I haven't touched web stuff before. But on a high level, how does a Javascript/Electron app wrap-around/bundle-with youtube-dl - which (looking at github) is a python app? Or does youtube-dl need to be already be pre-installed on the system?

Electron is a small Chromium browser that can interact with Node.JS, youtube-dl is packaged with this app as a node package manager dependency. The youtube-dl binary is downloaded and then called via a child process, let me know if that clears things up for you.

So you need to have the python runtime installed for this to work? Or is that downloaded as well?

I was just thinking I could for instance make a similar JavaFX crossplatform GUI on the JVM, but I'd have no idea how to call the youtube-dl python code. So I'm just curious how Electron solves that problem :)

Re: Show HN: YouTube-DL GUI Powered by Electron

#132

Earlier quoted context omitted.

I have this: a browser extension (and an Android share option), a web server to consume the URLs thus clicked/shared, a database to track state, and a cron job to actually launch the download. It's a bunch of ugly hacks, but I can just right-click or share a video, and have all the rest happen automagically.

I'd love to replicate what you've set up. The web server and from job doesn't sound too difficult, but I'm confused about the browser extension and Android share option. I'd be very grateful if you could elaborate further on that. Thanks.

You have been warned ;) It is horrible - I slapped that together to scratch my itch and been planning to rewrite ever since. Perhaps now is the time. https://github.com/Piskvor/webfetchface

In essence, the core of the whole thing is a single SQLite table, with rows of URL+status (and some metadata).

The web interface lists these, and provides a form to insert more rows. There is no ACL, my instance is only secured by htaccess. (I have specifically chosen to use a web server, as I'm sharing the URLs from multiple devices, but I want to download them over my home link and save to my NAS.)

The cron job reads the table, fetches rows that are status=queued, calls yt-dl to download them, and updates their status accordingly (with some fallbacks and error handling).

There's some extra stuff - like using ffmpeg to make thumbnails - but the basic operation is extremely simple.

(Browser extension and Android sharing option do the exact same thing as the web interface: post the current URL through the web insert form. Those are optional, but allow me to add URLs without extra steps. The browser extension is installed unpacked, through developer options, and has the URL hard-coded. It works both in FF and Chrome. The Android share option is through https://play.google.com/store/apps/details?id=ch.rmy.android... , making a HTTP request directly - I'll add a README.)

Re: Show HN: YouTube-DL GUI Powered by Electron

#133
post #8

Suggestion to author: allow pasting and downloading more than one link at a time, and selecting audio/video + desired formats. Suggestion to everyone else: learn the CLI. Then you can do things like me last night. My wife collected a list of classical music videos she wants to play to our kid, and all I did was: youtube-dl -x --audio-format "mp3" --audio-quality 0 -o "%(title)s.%(ext)s" -a music.txt to get the whole…

Ooh, I didn't know about `mp3splt`! This is super helpful, thanks for posting it. > It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki. All of my bash commands from any terminal get piped into a separate, unified history file, copying some setup I read about in a blog a long time ago. It's an easy, dumb setup that just works. I've been using it for years without any performance…

Too tired to try it and port if necessary yet, but I'd like to ask: does it work on ZSH?

Re: Show HN: YouTube-DL GUI Powered by Electron

#134

Earlier quoted context omitted.

> That would likely break every single smart TV out there, which is probably the only reason why they haven't yet done it. It wouldn't, support for Widevine has been mandatory in order for Google to let TV manufacturers have a YouTube app for about four years now, and if you play back a Google Play film on the YouTube application on your smart TV it's already using Widevine DRM.

But it probably isn't used in the YouTube apps and using it would require pushing an update. Smart TV manufacturers are not famous for pushing updates promptly.

> But it probably isn't used in the YouTube apps and using it would require pushing an update.

It is used in the YouTube apps, for playing back Google Play film purchases and rentals inside YouTube. Google does not allow YouTube to be installed if the YouTube apps cannot call the requisite APIs.

Re: Show HN: YouTube-DL GUI Powered by Electron

#135
post #133

Earlier quoted context omitted.

Ooh, I didn't know about `mp3splt`! This is super helpful, thanks for posting it. > It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki. All of my bash commands from any terminal get piped into a separate, unified history file, copying some setup I read about in a blog a long time ago. It's an easy, dumb setup that just works. I've been using it for years without any performance…

Too tired to try it and port if necessary yet, but I'd like to ask: does it work on ZSH?

I've never used ZSH, so I don't know.

My instinct says that if you'd run into any problems, it would be with this line:

  PROMPT_COMMAND="run_on_prompt_command"
Maybe ZSH has a different API? Again though, I've always just used bash, so you'd have to try it and see.

Re: Show HN: YouTube-DL GUI Powered by Electron

#136

I predict, that once youtube-dl becomes easy-enough to use for the masses, YT will shut it down in one way or the other. The user-facing business model of YT is quite simple: > You get to see great variety of videos, but have to watch ads every now and then. So from their perspective, youtube-dl allows you to steal the content w/o giving anything back to either YT or the creator. To make this fair/sustainable youtube…

What if you're downloading videos from someone who has been demonetized?

This is not just about the content creators. Operating YT as a platform is far from cheap. I bet YT is most concerned about their own bottom-line.

Re: Show HN: YouTube-DL GUI Powered by Electron

#137
post #131

Earlier quoted context omitted.

Electron is a small Chromium browser that can interact with Node.JS, youtube-dl is packaged with this app as a node package manager dependency. The youtube-dl binary is downloaded and then called via a child process, let me know if that clears things up for you.

So you need to have the python runtime installed for this to work? Or is that downloaded as well? I was just thinking I could for instance make a similar JavaFX crossplatform GUI on the JVM, but I'd have no idea how to call the youtube-dl python code. So I'm just curious how Electron solves that problem :)

No you just need the prereqs to run node, the binary comes compiled already

Re: Show HN: YouTube-DL GUI Powered by Electron

#138
post #81

Earlier quoted context omitted.

Why not just create a simple phone number with twilio that they can text a url to and then it fires a script to download that video and upload it to s3 for them? Shouldn’t take more than an hour IMO.

Mainly because I actually like talking to my friends, and I'm often interested in whatever video/music they want me to download for them. I have no desire to automate my interactions with my friends, especially for something that's easy enough for me to do and only takes a minute of my time.

You could just look at the logs to see what kind of stuff they download. And since they know it’s automated they will likely download even more stuff. If you see something interesting then maybe you can start a conversation with them at that point.

Re: Show HN: YouTube-DL GUI Powered by Electron

#139
post #91

Earlier quoted context omitted.

Not everyone is familiar or comfortable with the command line. A lot of my friends don't use youtube-dl for this exact reason. They end up messaging me, asking me to download files for them.

There's already a bunch of websites that do this if they can't use youtube-dl -- why are they messaging you when they can literally go to one of these sites and paste the URL in to get the video?

Name 1 which works flawlessly. No ads. On a side note, is it possible to port this CLI program to Android or web? My mom needs a downloader and the Firefox ext which I used till now , doesn't work all the time.

Re: Show HN: YouTube-DL GUI Powered by Electron

#140
post #91

Earlier quoted context omitted.

There's already a bunch of websites that do this if they can't use youtube-dl -- why are they messaging you when they can literally go to one of these sites and paste the URL in to get the video?

Name 1 which works flawlessly. No ads. On a side note, is it possible to port this CLI program to Android or web? My mom needs a downloader and the Firefox ext which I used till now , doesn't work all the time.

install termux, install youtube-dl, define a "handler"-script, share the link with termux
Post reply on HN