13 ms·
Show HN: YouTube-DL GUI Powered by Electron
- Lievelingsduif 7y agoWhy not just use Youtube-dlg? Does everything it needs to and doesn't require you to use electron.
- zapzupnz 7y agoNot to mention youtube-dlg has a nicer, more powerful UI.
- mayeaux 7y agoI tried to install it but I couldn't install WxPython3 via SourceForge so I couldn't get the deps to work. Plus the maintainer of that app doesn't care much for supporting OS X and Linux (basically tells people to just go use Windows) so I wanted to use Electron where I can package an app for all platforms.
- geokon 7y agoI'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?
- mayeaux 7y agoElectron 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.
- geokon 7y agoSo 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 :)
- trishmapow2 7y agoYep seems like dlg also has config options (flags passed to youtube-dl) unlike this app. As a sidenote I didn't know what you were referring to initially because the executable is named youtube-dl-gui...
- djsumdog 7y agoI hadn't heard of youtube-dlg. I tried to install it and it looks like it's still Python2 :(
- favorited 7y agoSide note: as a daily user, youtube-dl is such a fantastic piece of software. It's one of those tools which, once you have it, you wonder how you lived before.
- mayeaux 7y agoAgreed! But sometimes going to the CLI everytime is annoying which is in part why I wanted to build a GUI for it :)
- superkuh 7y agoEspecially once youtube switched to not serving the formats they used to and using newfangled codecs not supported by my old computers. youtube-dl is my only way to view youtube videos on most of my computers. Luckily it's easier to get ffmpeg builds that support transcoding from new codecs than it is to get youtube videos to play.
- TeMPOraL 7y agoSuggestion 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 list turned into neat and nicely-named MP3s (like "Mozart - Eine Kleine Nachtmusik, K 525 Allegro.mp3"). Followed by: mp3splt -r *.mp3 to trim the silence from both ends. I do batch downloads like these rarely, roughly once a year (though I expect it to happen more frequently in the near future). Because of that, I had both of the above commands stored in my snippets.org file. It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki. It beats reinventing the commands a year down the line, or even trying to remember what tools did you use for that off job. To preempt comments saying CLI is too hard for regular people: no, it isn't; they can learn[0], especially if you make them interested by e.g. showing them how to do batch jobs. But for the sake of the resistant, maybe the author of this GUI will upgrade it with option for batch downloads and format selection. -- [0] - https://digitalsuperpowers.com/ https://digitalsuperpowers.com/ is a nice book I read and can recommend. No affiliation, just curiosity, because the author is a regular HNer.
- icemelt8 7y ago> To preempt comments saying CLI is too hard for regular people: no, it isn't; It is.
- Double_a_92 7y agoI wish the installation was easier. It is reasonable to explain someone to write "youtube-dl -x <link>" to download music from youtube... But having them installing ffmpeg and python, manually copying some exe to a safe place, and adding that as a enviroment variable really cuts the interest off.
- r3bl 7y agoThat's because you're using Windows, which is really, really not designed with scripts in mind. Point to Ubuntu in the Microsoft Store. Python is preinstalled. You may need to install Python's package manager (I'm not sure does it come preinstalled) with "sudo apt install python3-pip". Install it from Python's package manager with "pip3 install youtube-dl". You could technically skip Python's package manager by just doing "sudo apt install youtube-dl", but updates are slow there, and you really don't want slow updates with this tool ("pip3 install --upgrade youtube-dl"). I'd argue that three commands are way easier to explain than installing two binaries and clicking around far too many times, especially because youtube-dl needs to be updated on a regular basis in order to work properly.
- Quequau 7y agoFor me I think the best UI for YT-DL would be in the context menu in Firefox. This is where I am most often when I see stuff I want to use it on and while I always already have a terminal window open, it would be nice not to have to switch windows. I already have a few different configs and aliases for getting stuff in the forms I really want. All I need is an even easier way to pass the URL in and trigger the download. Being able to right click and get there would please slack me to no end.
- TeMPOraL 7y agoYup. Me too! Did someone make something like this? The alternative I'm considering is a script for my WM that essentially does "CTRL+L, delay 500ms, CTRL+C, append to a rolling 'to yt-download' list file".
- rakoo 7y agoI'm always weary about having timers in a script, because it often turns out to not be the correct amount. What about something like: - bookmark url in a specific "YouTube-dl" folder - watch tht folder from a daemon - when the folder changes, do the stuff automatically I'm sure there's a way to read bookmarks from outside the browser ?
- TeMPOraL 7y agoI don't like timers either, but that seems to me the most direct way of exfiltrating the URL of the tab I'm currently looking at. Unfortunately, browsers aren't exactly interoperable. Bookmarks don't seem that easy to exfil either. Firefox for instance (just checked) stores bookmarks, along with browsing and download history, in an sqlite database, that it keeps locked, so sqlite3 won't read from it. Maybe there's a way to force-read that database, but I haven't figured it out yet. Here's an alternative idea I might actually go for: a systemd service[0] on my NAS in my home LAN that accepts links over the net and feeds them to youtube-dl. It could maintain a database of links already downloaded to avoid unnecessary redownloads. Then I could use an extension to simply send requests to an URL in my LAN. My perfect UI would actually have this integrated with the Like button on YouTube. Click Like, it schedules a download. This is because there's plenty of videos that I wanted to get back to after few years, only to discover them gone (account banned, video removed, copyright bullshit, etc.). -- [0] - Or something. There must be something in systemd that can be used to listen on a port, feed requests from it to a script, and reply with the output?
- bspammer 7y agoI know this is quite selfish but the more accessible youtube-dl is, the more likely Google is to see it as a business threat, and the more likely they are to add some sort of content DRM. Just something to think about
- illuminati1911 7y agoYou are right and there is nothing selfish about this. Better few than none.
- Udo 7y agoI agree, ideally youtube-dl would remain obscure, but YT has been on to it for a long time. It's somewhat of an arms race right now. I have to update youtube-dl every few weeks or it will simply stop working. I would not be entirely suprised if Youtube one day just requires actual browser DRM to work at all. That would likely break every single smart TV out there, which is probably the only reason why they haven't yet done it. However, as they progress further on their path away from amateur content towards corporate-only content, I'd say there is a decent chance they'll pull that switch eventually. And die shortly after, of course.
- TeMPOraL 7y agoWhich also sounds like a good reason to make copies of everything interesting on YouTube now, while we still can.
- Udo 7y agoIndeed. I'd go further and say that it's generally a good idea to make backups of all the cloud stuff you're using. The assumption that it'll always be there is fundamentally flawed. While there might well be outliers, companies who keep content archived for virtually ever, most platforms will go away at some point. Personally I think Youtube is a likely candidate for this. They may very well just remove all "legacy" content one day. They have absolutely no idea what to do with the platform, except offer it to music companies to feast on. They're at war with the majority of their content creators, I'd be very surprised if they didn't go for the nuclear option at some point - maybe after a large legal scandal...
- jokoon 7y agoI often had to update YouTube dl in the last months. I hope YouTube is not coming up with a solution.
- josteink 7y agoSkimming the code I see main.js hasn’t got a single semicolon. If you want to invite others to contribute, you may consider adopting a more widely employed js code-style. This seems to be written in a very personal, opinionated and unconventional way.
- hombre_fatal 7y agoMight as well die on the hill of tabs vs spaces or single-quotes vs double-quotes or trailing commas or space after function name. More useful advice would be: use Prettier and ship a .prettierrc so people can trivially transform their contributions into code consistent with the rest of the project.
- lukey_q 7y agoWriting personal projects in a personal way seems just fine to me :) Looking at that file it's very obvious what's happening after just a cursory glance. I'd much prefer code that's very easy to understand without semicolons than the opposite.
- tom_ 7y agoThat file is a copy of a stock one from the quickstart guide: https://github.com/electron/electron/blob/master/docs/tutorial/first-app.md https://github.com/electron/electron/blob/master/docs/tutori...
- mayeaux 7y agoEven though people have downvoted you, personally I agree with you, I haven't added any semicolons to main.js though because that file was automatically created in the original project I forked, if I ever have to edit it I will add the semicolons as I'm there but I haven't touched that file yet.
- mwilcox 7y agoThis seems harder to use than the command line tool
- VvR-Ox 7y agoLooks really interesting, thank you for sharing! How does it compare to jDownloader (jdownloader.org)? It can analyze the clipboard - when I paste a YT link it asks me if I only want the video or the whole playlist. I can choose from formats and I can choose to only download audio if I'm not interested in the video or want to save some space. It has a reconnect feature for the router to reset to get a new IP and much more really cool things.
- dmos62 7y agoI use youtube-dl regularly, through mpv. What I'd really like, is a minimal youtube search, in-terminal or a minimal gui. Then I wouldn't need a browser to use youtube at all; I dislike having to rev up a 1000mb browser just to find a video and copy its address. Actually, now that I think about it, I can't remember if I've tried a text browser, might be bearable, though images of videos are sometimes helpful.
- lightbulbjim 7y agoHave you tried Minitube?
- icebraining 7y agomps-youtube is quite nice: https://github.com/mps-youtube/mps-youtube https://github.com/mps-youtube/mps-youtube (note that by default it only shows music videos, but it's easy to change: https://github.com/mps-youtube/mps-youtube/wiki/Troubleshooting#search-results-not-relevant-or-differ-from-youtube-website https://github.com/mps-youtube/mps-youtube/wiki/Troubleshoot...)
- reshie 7y agoyourube-viewer thats for search download or stream and can sign in many as well as many other function. it is terminal only no images.
- severine 7y ago> What I'd really like, is a minimal youtube search, in-terminal or a minimal gui It exists! It's called SMTube but don't let the name confuse you, as it works with a lot of media players, including mpv: https://www.smtube.org/en/index https://www.smtube.org/en/index
- mellosouls 7y agoSuggestion to author: as this is presumably intended to be a user-friendly front-end, consider providing installers. I just tried installing on windows following the README and gave up after fixing npm proxy issues and encountering multiple other errors afterwards. I could fix it, but I don't have the time to investigate. Anybody who can fix it, likely won't need a front end like this.
- Xunxi 7y agoTry https://github.com/MrS0m30n3/youtube-dl-gui/blob/master/README.md https://github.com/MrS0m30n3/youtube-dl-gui/blob/master/READ...
- mellosouls 7y agoThanks, I already have that; my suggestion was for the repository in the OP.
- mayeaux 7y agoYup I plan to add installers for each platform, I just finished this yesterday and wanted to share it with people so I fired it off. Happy to work through the errors you ran into if you want to open an issue on GH but yes, installers will be coming pretty quick thanks!
- bravura 7y agoCould I paste a bunch of URLs and it would create a queue?
- cm2187 7y agoIf you have a bunch of urls, paste them in NimbleText, a fantastic utility to combine a list with a pattern, and create a bunch of command lines (syntax is trivial: "youtube-dl $0") Use chocolatey to install youtube-dl CLI as a self-contained executable.
- mayeaux 7y agoAt the moment no but it does handle downloading playlists/channels correctly.
- paulcarroty 7y agoExtended search with previews will be great and playback in external player will be great features to add. But anyway, Youtube brakes API too often and maintaining any of YT apps is very painful.
- mayeaux 7y agoI'm going to add functionality that makes it such that the latest version of youtube-dl is always installed, so as long as youtube-dl works the app should work too.
- heinrichhartman 7y agoI 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-dl user would either (A) have to tolerate advertisements in the downloaded video, or (B) pay a fee for each downloaded video. I'd prefer for youtube-dl to stays small enough, that we can continue to freeload a little longer ; )
- theandrewbailey 7y agoWhat if you're downloading videos from someone who has been demonetized?
- heinrichhartman 7y agoThis 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.
- joshstrange 7y agoI used a modified version of this [0] (modified [1]) running on my home NAS and an iOS Shortcut to easily be able to "share" any webpage that has a video on it to a Siri shortcut that makes an API call back to that docker service. It will automatically download it for me and drop it wherever I have specified. I can then process those files later. It's a great way for me to grab a video I want while I'm on my phone. It can even handle queuing of videos so I can share multiple in a row if I want. I've found it quite useful. It's no replacement for the CLI but it's better than copying the url, opening my ssh client, connecting back, navigating to the right spot, running youtube-dl, waiting for it to finish (this is the worst part), then closing my ssh app, and moving on with my life. [0] https://github.com/hyeonsangjeon/youtube-dl-nas https://github.com/hyeonsangjeon/youtube-dl-nas [1] https://github.com/joshstrange/youtube-dl-nas/tree/https-fix https://github.com/joshstrange/youtube-dl-nas/tree/https-fix
- aiddun 7y agoI've had a good experience with youtube-dl-interactive. It's a CLI tool that allows you to choose the quality/format from a menu without having to first list and choose from every possible quality permutation.
- exabrial 7y agowuff... first rule of youtube-dl is you don't talk about youtube-dl!!! But nice work. I just hope it doesn't bring the ire of Google