Live data from Hacker News

Show HN: YouTube-DL GUI Powered by Electron

github.com

61–70 of 142 posts

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

#61
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-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 ; )

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

#62
post #26

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

mps-youtube is quite nice: 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/Troubleshoot...)

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

#63
post #16
post #9

For 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 downlo…

Most solutions I've seen to this require some kind of external daemon to be running that takes care of launching ytdl for you (since most web browsers don't allow extensions to run arbitrary commands.) Firefox _does_ have support for running this daemon-like-thing for you using Native messaging[0] though. youtube-dl-firefox-addon[1] seems to employ this, so perhaps give that one a try? [0] https://developer.mozilla.o…

Just my 2 cents:

I've been using a combination of firefox/chrome with youtube-dl/mpv+youtube-dl for a while

This comes very handy for playing high quality youtube videos on low end machines or downloading audio+/-video directly from youtube.

On the pre-webextension era of firefox/chrome , "open with" addon was the perfect fit.

Now, a special native messaging app needs to be installed to launch mpv/youtube-dl

"Open with" addon solved this by a python script (that obviously required installing python, and few other steps)

I decided to create a new tool to make this step easier and faster on windows: owclauncher[1]

Basically a lightweight native messaging host for "open with" addon: it is not running on the background, and only started (and immediatly terminated) by the browser when passing a command to any other program

You can check and compile the source code or the .bat windows installer/uninstaller

[1] https://github.com/mbooga/owclauncher

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

#64
post #59
post #27

Earlier quoted context omitted.

First thought on this project: hey, why electron yt-dl works perfectly from the command line, I type the programm, paste the url. Second thought: might be nice for selecting from the myriad of options. Well...

You've just summed up the gui/command line dichotomy. It's something we could do better at bridging the gap between. Tbh things like this, a gui front end for a terminal app seem the best way forward. I don't know why they aren't used a lot more in open source, it just seems to match up so much better to the open source model of a random person developing a project and no one taking over when that person loses intere…

You can't script this GUI. You can't use Cron with an interactive GUI. You can't parse stdin/out/err.

Each have their pros and cons. I'd say what makes most sense is a library with frontends (CLI, TUI, GUI, (web)socket, etc)

In this case I wouldn't need a GUI with Electron. All I would need is a Firefox extension for youtube-dl (or the hypothetical library). Why keep reinventing wheel? Hence library.

One annoying thing with CLI is defaults. You might wanna set defaults (in CLI often used in an alias). So I end up managing a large alias list but what if I use more than 1 shell depending on machine? What if the machine does not use Git to sync such files?

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

#65
post #59
post #27

Earlier quoted context omitted.

First thought on this project: hey, why electron yt-dl works perfectly from the command line, I type the programm, paste the url. Second thought: might be nice for selecting from the myriad of options. Well...

You've just summed up the gui/command line dichotomy. It's something we could do better at bridging the gap between. Tbh things like this, a gui front end for a terminal app seem the best way forward. I don't know why they aren't used a lot more in open source, it just seems to match up so much better to the open source model of a random person developing a project and no one taking over when that person loses intere…

> the front ends are the sexy bits

For a lot of people this isn't true.

I think for web developers, making guis is fun (why this is done in electron). For a lot of non web developers, making the actual tool is the fun part. Having to then fiddle around with some gui feels less like programming and more like a chore.

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

#66
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 problems, and if I ever get any, I can just archive the current text file and start over with a fresh one.

Having access to past commands is really handy and has saved my butt multiple times.

  log_bash_persistent_history()
  {
      [[
          $(history 1) =~ ^\ *[0-9]+\ +([^\ ]+\ [^\ ]+)\ +(.*)$
      ]]
      local date_part="${BASH_REMATCH[1]}"
      local command_part="${BASH_REMATCH[2]}"
      if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ]
      then
          echo $date_part "|" "$command_part" >> ~/.persistent_history
          export PERSISTENT_HISTORY_LAST="$command_part"
      fi
  }

  # Stuff to do on PROMPT_COMMAND
  run_on_prompt_command()
  {
      log_bash_persistent_history
  }

  PROMPT_COMMAND="run_on_prompt_command"
  HISTTIMEFORMAT="%d/%m/%y %T "
  alias phgrep='cat ~/.persistent_history|grep --color'
  alias hgrep='history|grep --color'

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

#67
post #65
post #59

Earlier quoted context omitted.

You've just summed up the gui/command line dichotomy. It's something we could do better at bridging the gap between. Tbh things like this, a gui front end for a terminal app seem the best way forward. I don't know why they aren't used a lot more in open source, it just seems to match up so much better to the open source model of a random person developing a project and no one taking over when that person loses intere…

> the front ends are the sexy bits For a lot of people this isn't true. I think for web developers, making guis is fun (why this is done in electron). For a lot of non web developers, making the actual tool is the fun part. Having to then fiddle around with some gui feels less like programming and more like a chore.

Ok, can we agree that back end and front end appeal to different kinds of people, and the lifespans of front end and backend are different.

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

#68
post #49

Earlier quoted context omitted.

Yup. 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".

I did something like this a couple of months ago. I wrote a simple firefox extension which adds a button near the url bar which calls youtube-dl to download the current URL on a predefined folder. It needs an intermediate "helper" which is registered via the Windows registry (just make a key for it). All the helper does though is just call youtube-dl. It sounds complicated but i had never written any firefox addon at…

On firefox/chrome/opera for windows, you can do this easily with "open with" addon +/- owclauncher

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

#69
post #64
post #59

Earlier quoted context omitted.

You've just summed up the gui/command line dichotomy. It's something we could do better at bridging the gap between. Tbh things like this, a gui front end for a terminal app seem the best way forward. I don't know why they aren't used a lot more in open source, it just seems to match up so much better to the open source model of a random person developing a project and no one taking over when that person loses intere…

You can't script this GUI. You can't use Cron with an interactive GUI. You can't parse stdin/out/err. Each have their pros and cons. I'd say what makes most sense is a library with frontends (CLI, TUI, GUI, (web)socket, etc) In this case I wouldn't need a GUI with Electron. All I would need is a Firefox extension for youtube-dl (or the hypothetical library). Why keep reinventing wheel? Hence library. One annoying thi…

"You can't script this GUI. You can't use Cron with an interactive GUI. You can't parse stdin/out/err"

No but you can script the underlying youtube-dl so with the gui front end you get the best of both worlds.

Re defaults, that isn't an inherent shortcoming of terminal apps. Theres no reason why 'youtube-dl url' shouldn't just do the 'right thing'. I agree it's a common problem though.

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

#70
post #14

Earlier quoted context omitted.

Yup. 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".

I'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 ?

There is much direct and easier way to pass a link or the current page's URL to an external program using "open with" browser addon + owclauncher (https ://github.com/mbooga/owclauncher)
Post reply on HN