News for hackers. Stuff that matters.
Re:Youtube-dl: Command-line program to download videos by StavrosK on Wednesday July 04, 2018 @09:13PM (#17460312)
The most useful part of youtube-dl is that it works with mpv, so you just pass a URL on the command line and MPV just plays the video in it.

I have two monitors, so I put a button on my Firefox toolbar to launch MPV with the current URL, and configured MPV to start fullscreen on the second monitor immediately and quit when done. It's made my video-watching experience on the web an order of magnitude better.

Re:Youtube-dl: Command-line program to download videos by milkmiruku on Wednesday July 04, 2018 @10:22PM (#17460512)
I set this up recently (the 'Play with MPV' method) after noting that viewing YouTube in the browser had a far greater CPU usage than watching the same in mpv.

I've also given gtk-youtube-viewer a spin but it doesn't do "new videos of your subscriptions" (though it's command=line equivalent 'youtube-viewer -SV' does). Any recommendations out there for similar YouTube frontends?

Also, at least in the UK, youtube-dl can access BBC iPlayer content without the login required on the web.

Re:Youtube-dl: Command-line program to download videos by meribold on Thursday July 05, 2018 @05:49AM (#17461980)
You can use a feed reader. I have Newsboat set up with a feed that shows all my YouTube subscriptions and a macro that opens the URL from the selected item in mpv.
Re:Youtube-dl: Command-line program to download videos by majewsky on Thursday July 05, 2018 @04:04AM (#17461616)
I use a shell wrapper for mpv that takes the URL from the clipboard when no arguments are given:

  mpv() {
    if [ $# -eq 0 ]; then
      env mpv "$(xsel -b)"
    else
      env mpv "$@"
    fi
  }
Re:Youtube-dl: Command-line program to download videos by Mashimo on Thursday July 05, 2018 @05:36AM (#17461937)
What if you have "&& rm -rf /" in your clipboard and forget about it?
Re:Youtube-dl: Command-line program to download videos by fjarlq on Thursday July 05, 2018 @06:51AM (#17462222)

  $ mpv "&& rm -rf /"
  Playing: && rm -rf /
  [file] Cannot open file '&& rm -rf /': No such file or directory
  Failed to open && rm -rf /.
Re:Youtube-dl: Command-line program to download videos by atomi on Thursday July 05, 2018 @03:33PM (#17466115)
Since the cat's out of the bag. You can also just use a ClipIt action.
Re:Youtube-dl: Command-line program to download videos by muxator on Thursday July 05, 2018 @08:47AM (#17462787)
Sincere curiosity: is there any advantage over playing full screen via a browser?

I'm a heavy youtube-dl user and command line addicted myself, but cannot imagine an advantage in using youtube-dl for live-playing a video, when using the browser seems to give the same experience.

Re:Youtube-dl: Command-line program to download videos by StavrosK on Thursday July 05, 2018 @08:53AM (#17462832)
Yes, I would have to detach the browser window, move it to the other screen (which is inconvenient because it has to go through a third screen), drop it, fullscreen it, press play, and when it's done close the window.

Much more involved than a single click that never even has to open a new tab.

Re:Youtube-dl: Command-line program to download videos by lozf on Thursday July 05, 2018 @09:49AM (#17463223)
Depends what's being watched, but quite often with content like How-To's, conference talks, and lectures etc I take advantage of having speed control on a keypress ('[' or ']' = +/- 10%), left arrow to skip back a few seconds, backspace to drop to normal speed if I miss something, 's' for screenshot of an interesting graph or chart etc... At other times I might make more use of ',' and '.' to step back and forth one frame at a time or '4' to increase the brightness.

Using key presses to navigate through and control media like this feels vaguely reminiscent of the first few times you really grok the power of editing a huge file with some well articulated vim or emacs commands. Also mpv seems less resource intensive whilst the browser has a lot of tabs open.

Re:Youtube-dl: Command-line program to download videos by swebs on Thursday July 05, 2018 @10:47AM (#17463643)
Videos are horribly choppy when I try to view them fullscreen in a browser. It's like playing a game without V-sync on. The same videos work flawlessly in MPV. Firefox in Ubuntu 18.04 with a Nvidia 750ti and proprietary drivers. YMMV.
Re:Youtube-dl: Command-line program to download videos by Daycrawler2 on Thursday July 05, 2018 @10:34AM (#17463541)
`youtube-dl -g` will output the final URL it has resolved, which you can then pipe to any video player that supports streaming from an URL.
Re:Youtube-dl: Command-line program to download videos by JackCh on Wednesday July 04, 2018 @11:26PM (#17460676)
If you hold down shift, you can drag-and-drop youtube links into a running mpv instance to add those links to the current playlist.
Re:Youtube-dl: Command-line program to download videos by efiecho on Wednesday July 04, 2018 @11:08PM (#17460610)
> I have two monitors, so I put a button on my Firefox toolbar to launch MPV with the current URL, and configured MPV to start fullscreen on the second monitor immediately and quit when done. It's made my video-watching experience on the web an order of magnitude better.

How did you do that? I would really like to have that setup also.

Re:Youtube-dl: Command-line program to download videos by StavrosK on Thursday July 05, 2018 @05:41AM (#17461956)
I used this extension:

https://addons.mozilla.org/en-US/firefox/addon/open-with/

mpv can easily be configured to open full screen on a specific screen.

Re:Youtube-dl: Command-line program to download videos by urmish on Friday July 06, 2018 @11:16AM (#17472086)
So adding that button requires downloading and installing a file, and it has some references to [email protected]. I am not a web programmer but that doesn't seem right. The open with mpv browser extension, seems cleaner. https://addons.mozilla.org/en-US/firefox/addon/send-to-mpv-p...
Re:Youtube-dl: Command-line program to download videos by StavrosK on Friday July 06, 2018 @11:22AM (#17472145)
Yeah, it didn't look good. The extension you posted downloads and installs the native client on its own, which is worse. However, you can't really do this any better, as the apps are sandboxed and not allowed to launch external programs.

I've audited the script for the extension I posted and it looks good, I've posted mine here: https://www.pastery.net/dyeamx/

Re:Youtube-dl: Command-line program to download videos by urmish on Friday July 06, 2018 @11:29AM (#17472201)
yes. Seems you're right.
Re:Youtube-dl: Command-line program to download videos by efiecho on Thursday July 05, 2018 @06:16AM (#17462077)
Thanks, I will take a look at that extension.

After reading the documentation for mpv I found the options --screen=<default|0-32> and --fs-screen=<all|current|0-32> these are used for selecting a specific screen.

Re:Youtube-dl: Command-line program to download videos by StavrosK on Thursday July 05, 2018 @07:00AM (#17462272)
Here's my config, now that I'm at the computer:

https://www.pastery.net/vurryk/

Re:Youtube-dl: Command-line program to download videos by ekianjo on Wednesday July 04, 2018 @09:25PM (#17460341)
yup. you can a quick macro in qtebrowser as well. It gets rid of ads nicely too.
Re:Youtube-dl: Command-line program to download videos by gkya on Thursday July 05, 2018 @08:05AM (#17462578)
I was using Qutebrowser since some months because I had some problems with how Firefox causing data loss, but I had to go back to Firefox recently because Qutebrowser is too slow and memory-consuming w/ many tabs open, even if suspended (i.e. >= 10 or 15 tabs for me). Firefox 61 now consumes way less memory and no idle CPU at all thanks to a strict Ublock Origin policy (basically no JS or >=1Mb images if you're not a snowflake; I had similar blocking in Qutebrowser too). Is this something you experience too, or maybe caused by my setup?