A cross-platform GUI for YouTube-dl
github.com
github.com
Personally, I’m partial to the command line and to a lesser extent, TUIs, but I certainly understand building with whatever is most convenient and/or fun to the dev…especially on a personal project!
I don’t understand what you care for other people’s personal projects. Not everyone knows your favorite language.
I chose js a la electron because I needed a nice gui I could style and add user friendly interactions with minimal work to amongst several other reasons, the aim was to have a nice way to browse my archive and track what goes in, not create new work. If I just wanted videos I could easily have done this with a script, a browser extension or any of the zillion ytdl variants available. By just scaffolding a new project I had already met a lot of requirements, easily embeddable iframes, no external video player, instant search (fusejs) and the list goes on. This is also my first electron project and first time using it so go figure, heh.
Also funnily enough the first quick draft of this was in python using qt and lived in my taskbar tray which served a simple html page and ran in the background but it wasn't fun to use and required a lot more work rather than just mindlessly pulling down packages to use in a fun side project.
Chrome - https://chrome.google.com/webstore/detail/unhook-remove-yout...
FF - https://addons.mozilla.org/en-US/firefox/addon/youtube-recom...
And there's nothing wrong with that. Like the dozens of PoC codebases I have lying around my PC that no one will (or needs to) ever see.
I built my own to browse large video collections: Video Hub App https://videohubapp.com/
MIT open source: https://github.com/whyboris/Video-Hub-App
Autogenerated based on the args, but configurable and the widgets and menus can be defined in JSON.
Idea would be to define UI structure that outputs (and executes) essentially a string (command) to run.
I think that's the wrong goal. The goal should be really simple definitions and ok quality apps. Simple JSON (or XML, don't care).
{ control: checkbox, flag: c, label: "Compile" }I think a better approach is to figure out how to make Electron more performant in the various OSes.
I haven't gotten into the internals of Electron, so I'm not the one to reflect on the approach, but seeing some of the improvements that MSFT made with Edge over Chrome in memory usage gives me hope that this is achievable, even if it doesn't happen immediately.
Back in the 1990's we faced a similar thing, where web "apps" were ugly and slow, and not as powerful as the desktop apps that many corporations had developed in C++ or VB or Delphi. Today of course, the situation is much different, and we use web apps all the time. I really truly believe that Electron (or perhaps a successor - like how VS Code superseded Atom) will not go away, and in the future we will be much happier with it.
And when's the last time you loaded an app with the Java VM on the desktop, unless it was Eclipse and you were about to use it to write more Java?
<section name="Options"><checkbox flag="c" label="Compile" /></section>
It shouldn't be a hassle at all to convert a man page to a UI that speeds up actions and avoids common errors.Anyway, this idea is free, so feel free to take it and do whatever, even full HTML (:
The suggestion was a simplified subset of HTML.
I built a GUI-builder ages ago (in Python, compiling to Python which calls Tkinter to build the GUI). Here's a sample of what the UI-definition language looked like: https://github.com/cabalamat/parrot/blob/master/simple2.par
I'm definitely biased being a web dev but JSON is just so widely used and supported... seems ideal for small bits of config like this.
Yes it could. But writing the UI descriptions would be harder in JSON than in my bespoke language.
My goal in writing the tool was to maker UI descriptions as easy to write as possible. If I hadn't cared about that I wouldn't simply continued to hard-code them in Tkinter.
> I'm definitely biased being a web dev but JSON is just so widely used and supported
JSON didn't exist when I originally wrote this. If i was doing it today, it's entirely possible I would use JSON as a data interchange format.
For example, this:
menu "File" {
menuItem @New "New"
menuItem @Open "Open..."
menuItem @Save "Save"
menuItem @SaveAs "Save as..."
menuItem @Exit "Exit"
}
Might become something like this: {'widget': 'menu', 'text': 'File', 'contents': [
{'widget': 'menuItem', 'id': 'New', 'text': 'New'},
{'widget': 'menuItem', 'id': 'Open', 'text': 'Open...'},
{'widget': 'menuItem', 'id': 'Save', 'text': 'Save'},
{'widget': 'menuItem', 'id': 'SaveAs', 'text': 'Save as...'},
{'widget': 'menuItem', 'id': 'Exit', 'text': 'Exit'}
]
}
Which would turn writing a UI from something that's a pleasure to something that's a chore. People who would deliberately write software that's a chore for others to use ought not IMO be writing software that will be used by other people.What you want for something like a GUI specification is a DSL designed for the task (e.g. QML), or a suitable general purpose language like HCL or YAML.
Except in comparison with XML :-)
The best language to write a program in is a Turing-complete programming language specially designed for that task, not some cobbled together UI-definition language with ad hoc add-ons to processing.
Like it or not, the whole low code movement is about this.
Let's say your GUI has several input boxes. You want to validate those boxes. You need something Turing-complete to do this, because if it isn't Turing complete and the tool is used by lots of people, someone's GUI will require it.
> the whole low code movement is about this
That's OK provided you accept that it limits what can be done.
And yet, most people wear mass-produced clothes.
Each type of wood is used for aging different spirits. Oak is most common in whiskey and wine making. Sometimes the barrels are even smoked near a fire to impart a unique flavor into the alcohol that will be held in the barrel. A used barrel is very desirable and can go for higher prices on the open market than even a quality new barrel. This price parity is due to the unique flavor that can be impacted by using a used wine barrel for whiskey, used whiskey barrel for wine, or some other unique alternation of barrel contents.
Barrels that are hundreds of years old, and thick with aged bacteria are used for making traditional Japanese soy sauce. These special family heirloom barrels will be used for many generations before they are eventually retired. [4]
[1] https://youtu.be/ccoHCSKMf-E
[2] https://youtu.be/GE7QA1chUzw
MIT open source: https://github.com/whyboris/Video-Hub-App
The only “gotcha” is sometimes downloads fail and if you don’t know to check the logs (in the top menu) then that can get confusing for new users, but usually it’s something simple like you need to update the YouTube-dl core (also just done via the menu) or you chose a download format/resolution not supported for that video.
A sincere half is that technical users can't quite understand what less-technical users would appreciate.
The tongue in cheek half of "why not just..." will always smell a bit like the infamous comment discussing how DropBox doesn't provide value, since anyone could set the same kindof thing up themselves.
youtube-dl is a 10 year old project. Where are all the great qt gui-s for it?
Now tell me where the swipe-from-the-left and swipe-from-the-right and pull-down-from-the-top and long-press and double-tap and trippple-tap and pinch vertically and pinch horizontally and triple-finger tap for "modern" apps are documented?
For example - re-encoding a movie file. I'm 100% sure it's much faster for me to type "<windows> hand <enter>" to start Handbrake, click open, paste the path to the file to the file dialog, and click convert, than figure out how to use ffmpeg command line.
But youtube-dl, the subject of this post, is another matter. Using it is a simple matter of `$ youtube-dl <url-to-video>`, the former which is bash-completed after two characters and the latter which is a paste. Surely that's quicker than any GUI.
Everybody has things they are interested in and want to spend time on. But not everyone can do all of them.
This is really a valid question (not just for youtube-dl but for chat apps as well)... I guess the answer is : Qt being LGPL and the abundance of front-end webdevs
I think the main reason is abundance of frontend devs and quick to start using Electron.
It's like someone posts a phone video of a new rare animal species and you comment "A DSLR camera makes infinitely better video, it's much better suited for the job, we keep normalising bad mobile phone videos, people should use the right tool and carry a DSLR around".
If it lets somebody accomplish something productive they wouldn't have had the time/expertise to do otherwise, then it's the best possible use of computing resources there could be.
Computing resources are a means to an end. Not an end.
That’s an even worse path to tread on.
I get the hate at bad Electron apps but it’s also an unfair punching bag, IMHO. I would rather an app like this exist than not. And as a Mac user, I’d rather a good Electron app than some wxWidgets mess that still struggles with HiDPI in the year 2021, when every Mac I’ve owned since 2012 has had a high resolution display.
Qt is does indeed not use platform controls, but it is still a huge distance away of the insanity that is Electron.
Highdpi is also a solved problem on a lot of platforms already, and only really a problem in the first place if you use absolute pixel offsets or coordinates instead of extents, spacers and other automatic geometry tools.
But alas, it's just electron. I guess they'll continue to use Newpipe on their phones, which has been working very well.
Edit: I just realised that my comment is a bit on the meaner side. While I absolutely detest the current trend of Electron apps I also realise that the ecosystem doesn't have any good options. QT can be okay if done right, but C++ is neither ideal nor approachable for Application development, especially for hobbyists.
https://github.com/user234683/youtube-local
It supports downloading all the raw formats (the video only ones, audio only ones, and the 360p & 720p integrated formats). More meant for watching than downloading, but some more advanced downloading features, such as merging audio+video with ffmpeg to get more downloadable qualities and auto-downloading options for playlists are planned.
If I had just a bit more time I might try to contribute. In fact, I might actually see if I can help with the replacement of the engine and then let the dev decide on how to implement some of the extra features.
There was a GUI for youtube-dl I liked but never could get to work called Get-It (https://github.com/Kevin-De-Koninck/Get-It), and with many people switching to the actively-maintained fork yt-dlp, I decided to try using that as a base for making a clone with the latter as a backend.
I don't know Swift at all but thought I'd try it out to see if I could, and it seems to work for the most part on my end. I also cleaned up random errors I found in the code (like a rogue youtube link to a Grand Theft Auto 5 video?) and made things a bit more consistent, or at least I'd like to think so. Changed the UI and added a toggle to block sponsorships from videos as well, but not totally sure if that works all that well yet.
I'd love if anyone would try it out and report any issues they run into, it's been fun trying to fix it up!
The last update added the ability to use yt-dlp instead of the mainline yt-dl
I think it is windows only though
Hope it gets fixed, good job!
"Download multiple videos/playlists/channels in one go"
If it were my own project and I had a few different views/features to show off in screenshots I might alternate them (assuming there were some differences, or light/dark themes). But I definitely wouldn't show three copies of the same thing to somehow emphasise 'works on Linux, Mac, and Windows, seelookproof'.
As the old saying goes, assumptions make fools out of you and me. If we are to assume anything, I always start with worst case scenario and work my way up to “everything’s fine” rather than start here. If I don’t see it running on macOS, I assume:
- it’s untested and may not work properly
- it doesn’t follow standard macOS UI conventions like drag and drop, which is much more pervasive in macOS than other OS and, when it comes to files, can work quite differently
- it doesn’t support operations like having files dropped on its Dock tile
- it doesn’t support the global menu bar and thus its keyboard shortcuts (if any) aren’t able to be configured via standard means — this is often important for accessibility
- it doesn’t support macOS’ built-in accessibility features, so can’t be read by VoiceOver or show large text via Hover Text
Once you go beyond the superficial, you realise that design is more than just how it looks but how it works — functionality, usability, etc.
All I want is the mildest proof that, at the very least, it has been tested to run on macOS. At that stage, I might put the effort in to check that those other aspects are also covered.
It isn’t my job to find that out; it’s the developer/vendor’s job to prove it so that I’m not wasting my time.
> But I definitely wouldn’t show three copies of the same thing
Of course you wouldn’t, why would you — that’s not even what I wanted to see. I’m only interested in seeing it working properly on my platform.
Most websites will show the platform-specific screenshot rather than all three screenshots. For example, check out https://code.visualtudio.com — on an Apple device, it shows the Mac version; on a Windows device, it shows the Windows version; I’m not sure if it shows something else on Linux, it may do.
Also, the dev is looking at subbing youtube-dlp for youtube-dl, as it is more frequently updated and supported.
A part of me actually wishes for utilities like this GUI app and the underlying youtube-dl to stay a tad under the radar, only to avoid getting them blocked somehow by the powers-that-be...i know that is selfish because at the same time i do like for as many folks as possible to have access to all the cool tools (after all i love to spread the gospel of open source software)...but, man, youtube-dl (and by extension, anything else built on top of it) has been such an awesomely amazing thing that i never want it to go away or get blocked, etc. Sorry if that sounds mean; don't mean to be. :-)
EDIT: apparently luck plays a part. I stopped the download halfway. Then downloaded anew, and got 80 kb/s. Then canceled and restarted again, and then got 5 Mb/s...
A minor bug though: the "Open file" button is disabled, the "Show in folder" button just doesn't work. At least on my Office PC running Windows 10.
However, once I installed it, it ran really well. Interface is smooth and nice.
They all seems to be active to different degree(last commit is 2mth, 2w, 2d ago)? and not merging backing to each other?
Are you planning to support all options?
Ctrl-W, bye