News for hackers. Stuff that matters.
Re:Show HN: Tube – Minimalist YouTube by RodgerTheGreat on Friday April 13, 2018 @03:42PM (#16833281)
For some time I've been tinkering with a script which manages my own fine-grained youtube subscription preferences, periodically scrapes various pages for metadata, and then as necessary extracts videos by using the youtube-dl utility. The end result is a directory on my machine which always has a few interesting videos to watch, ad-free, tracking-free, network connection free, using my favorite full-featured video playback tools.

I think others seeking a minimalist youtube experience might enjoy youtube-dl: https://rg3.github.io/youtube-dl/

Re:Show HN: Tube – Minimalist YouTube by enz on Saturday April 14, 2018 @08:16AM (#16837007)
You don't need to scrap the page, YouTube provides the RSS stream for each channel: `https://www.youtube.com/feeds/videos.xml?channel_id=[ID]`. The RSS contains the "normal" link of each video, so you can invoke youtube-dl or mpv on it.
Re:Show HN: Tube – Minimalist YouTube by latexr on Saturday April 14, 2018 @09:43AM (#16837280)
> You don't need to scrap the page

They do if they are scraping playlists.

Youtube assumes that when creators make a playlist, they’ll add videos to the top. As such, the RSS for a playlist[1] always returns just the top 15 results. But a lot of creators — typically the ones that take greater care into organising their playlists, such as Crash Course[2] — add videos to the bottom of their playlists. Those RSS feeds will be stuck at the same 15 items forever, and your only option is to scrape the page.

[1]: https://www.youtube.com/feeds/videos.xml?playlist_id={playli...

[2]: https://www.youtube.com/user/crashcourse

Re:Show HN: Tube – Minimalist YouTube by zaarn on Monday April 16, 2018 @05:16AM (#16847687)
You can use youtube-dl's archiving feature for that.

I use it regularly on my fairly large music playlist and it goes through all 20 pages just fine despite adding stuff on the bottom occasionally (I sorted it by creation date)

Re:Show HN: Tube – Minimalist YouTube by chriswarbo on Friday April 13, 2018 @05:51PM (#16834196)
youtube-dl is really cool, and supports loads of sites as well as just youtube.

VLC can also play youtube URLs directly, although buffering can be annoying.

There's also a Python package called "whitey" which provides an ncurses interface for searching youtube, and sending videos to e.g. mplayer or youtube-dl.

If you want to "subscribe" without needing an account, every youtube channel provides an RSS feed (look in the <head> of the page source).

Re:Show HN: Tube – Minimalist YouTube by iamdave on Friday April 13, 2018 @08:27PM (#16835087)
VLC can also play youtube URLs directly

I legitimately did not know this, thanks for the knowledge share! Can it follow playlist s of videos?

There's a few video game streamers whose commentary and remarks are so funny and well written I find myself listening to them more like a podcast than watching the video, so I'm often queuing up playlists and having the background noise while doing house chores and the like

Re:Show HN: Tube – Minimalist YouTube by vatueil on Friday April 13, 2018 @09:37PM (#16835320)
VLC can't play YouTube playlists natively, but there's a VLC add-on that supports doing so: https://addons.videolan.org/content/show.php/+Youtube+playli...

Also, mpv can use youtube-dl if both are installed to play YouTube playlists, e.g.:

    mpv https://www.youtube.com/playlist?list=PLhyKYa0YJ_5DfJnFBZwz8xd37MA6I16oJ  
Note that you need to pass it the link to the playlist itself and not a video in the playlist: https://github.com/mpv-player/mpv/wiki/FAQ#How_can_I_play_Yo...
Re:Show HN: Tube – Minimalist YouTube by iamdave on Saturday April 14, 2018 @02:34AM (#16836195)
Excellent, thanks!
Re:Show HN: Tube – Minimalist YouTube by foobazzy on Saturday April 14, 2018 @11:04AM (#16837597)
Well, if you're on Mac and if you want to forgo the playback speed controls (like for, music) I can also recommend Vox earlier versions (2.8.26)[0]

It is an audio player with the youtube-list-as-playlist feature. In my experience, it generally delivers a better sound quality of the same videos than youtube. Copy the url (make sure it's /?list=<id>). Hit Cmd + U, paste, <Enter>. Then optionally download the extension for using keyboard buttons[1] and control playback from there.

Or you can always use `youtube-dl -ix /?list=` then open the resulting files with .opus extension with your favorite player.

[0]: https://vox.rocks/mac-music-player/old-versions [1]: https://vox.rocks/mac-music-player/control-extension-downloa... Disclaimers: No commercial interests. Just a happy user.

Re:Show HN: Tube – Minimalist YouTube by dsnuh on Friday April 13, 2018 @09:40PM (#16835330)
>youtube-dl is really cool, and supports loads of sites as well as just youtube.

Agreed, here's a list of sites it supports: https://github.com/rg3/youtube-dl/blob/master/docs/supported...

Re:Show HN: Tube – Minimalist YouTube by doomrobo on Friday April 13, 2018 @05:54PM (#16834216)
Not sure how much you'd benefit from it, given that you've already got a good setup, but I just made a website called HookRSSTube[0] that essentially proxies YouTube RSS feeds and replaces the video playback with HookTube[1] instead.

I'd love to know if you have any comments or suggestions.

[0] https://hookrsstube.com

[1] https://hooktube.com

Re:Show HN: Tube – Minimalist YouTube by craftyguy on Friday April 13, 2018 @07:58PM (#16834947)
+1 for hooktube! I now use a greasemonkey script to auto-redirect all youtube.com links to hooktube instead.
Re:Show HN: Tube – Minimalist YouTube by ehPReth on Friday April 13, 2018 @09:55PM (#16835380)
Do you have a way to ensure you get the highest quality?

I do similar with cron but often get videos as they're still processing (and thus only at lower qualities). One issue is the channels I 'subscribe' to don't always output at the same resolution and frame rate.. so I can't do a simple 'is video 4k60' test.

Re:Show HN: Tube – Minimalist YouTube by rcthompson on Saturday April 14, 2018 @03:24AM (#16836313)
I don't think there's any way to know what qualities are currently being prepared. Your best bet might be to just figure out what time that creator typically uploads, and make sure your script doesn't run during that time and for several hours afterward, to give YouTube the time it needs to prepare the high-quality ones.
Re:Show HN: Tube – Minimalist YouTube by wingerlang on Saturday April 14, 2018 @05:59AM (#16836680)
Could you look at the upload date and wait a certain amount until the processing is more likely to be done?
Re:Show HN: Tube – Minimalist YouTube by rcthompson on Saturday April 14, 2018 @09:48AM (#16837296)
That's an excellent idea. You can work out a reasonable amount of time to allow YouTube to do the video processing, and then use youtube-dl's "--datebefore" option to only download videos that are at least that old. You'll have to manually compute the date and time for X hours in the past, I suppose.
Re:Show HN: Tube – Minimalist YouTube by ehPReth on Saturday April 14, 2018 @12:41PM (#16838097)
Thanks for the hint wrt --datebefore. I'll give it a go :)
Re:Show HN: Tube – Minimalist YouTube by ehPReth on Saturday April 14, 2018 @12:41PM (#16838091)
Ah! That could work indeed. Thanks :)
Re:Show HN: Tube – Minimalist YouTube by nsuser3 on Saturday April 14, 2018 @11:51AM (#16837824)
After it has finished processing, youtube-dl will (by default) download the best format anyway.
Re:Show HN: Tube – Minimalist YouTube by rcthompson on Saturday April 14, 2018 @02:31AM (#16836190)
I actually have a script running on a cron job on my personal server that does approximately this. It downloads into a Syncthing folder that automatically syncs to whatever devices I might want to watch videos on. The difference is I just have a set of playlists for it to download, so I'm relying on the YouTube creators to organize their videos into appropriate playlists, which means it's not exactly "fine-grained". It's basically an 80% solution, and for the remaining 20%, I just invoke youtube-dl manually.
Re:Show HN: Tube – Minimalist YouTube by iggg on Saturday April 14, 2018 @06:29AM (#16836748)
Uploads is a playlist.
Re:Show HN: Tube – Minimalist YouTube by rcthompson on Saturday April 14, 2018 @09:35AM (#16837266)
For the few YouTube channels where I actually want to watch every single video uploaded by the creator, I do use this. For the rest, I have to hope that they create playlists for the subset of their videos that I am interested in. Many creators are actually quite diligent about organizing their uploads into playlists.
Re:Show HN: Tube – Minimalist YouTube by striking on Friday April 13, 2018 @04:13PM (#16833519)
Could you release some part of that script too? It sounds really interesting.
Re:Show HN: Tube – Minimalist YouTube by arca_vorago on Saturday April 14, 2018 @04:48AM (#16836533)
If you like youtube-dl you should check out mps-youtube (https://github.com/mps-youtube/mps-youtube) which has the ability to use youtuble-dl as the backend I'm pretty sure (i prefer to use the native one personally)

It's also gpl vs youtube-dl's public domain.

I'm sure eventually I'll figure out a way to just do it in emacs. (I'm mostly joking... kinda... maybe.)

Re:Show HN: Tube – Minimalist YouTube by app4soft on Saturday April 14, 2018 @08:51AM (#16837087)
> (i prefer to use the native one personally)

Then you should try - SMTube[0].

SMTube allow use "mpv + youtube-dl" for play videos.[1]

[0] http://www.smtube.org/

[1] https://blog.smplayer.info/how-to-download-videos-with-the-n...

Re:Show HN: Tube – Minimalist YouTube by app4soft on Saturday April 14, 2018 @05:15AM (#16836598)
> mps-youtube

Funny that state[0] on PyPi[1] is [downloads|no longer available]

[0] https://img.shields.io/pypi/dm/mps-youtube.svg

[1] https://pypi.python.org/pypi/mps-youtube

Re:Show HN: Tube – Minimalist YouTube by akx on Saturday April 14, 2018 @06:04AM (#16836689)
PyPI no longer tracks download counts on its own. Instead, they pipe access logs to Google BigTable, so you can BigQuery the heck out of them.
Re:Show HN: Tube – Minimalist YouTube by lozf on Friday April 13, 2018 @05:40PM (#16834128)
I've been a youtube-dl fan for a long time -- it was essential whilst traveling a few years ago with suboptimal 3G bandwidth... these days I usually just paste the URL in to a terminal after typing `mpv` for a minimal experience but still with all the control you might want for playback speed, brightness, screenshots, & skipping around etc. Those who prefer a GUI could use SMplayer.
Re:Show HN: Tube – Minimalist YouTube by spapas82 on Saturday April 14, 2018 @04:31AM (#16836496)
For anybody interested I've written a tutorial for youtube-dl: https://spapas.github.io/2018/03/06/easy-youtube-mp3-downloa...
Re:Show HN: Tube – Minimalist YouTube by nishparadox on Saturday April 14, 2018 @05:13AM (#16836597)
I have a project that kinda acts as music assistant: "Search and play any song from terminal"

The project is somewhat inactive right now due to personal priorities. http://github.com/NISH1001/playx

Re:Show HN: Tube – Minimalist YouTube by goda90 on Friday April 13, 2018 @05:46PM (#16834160)
How well does youtube-dl deal with video playback being restricted to play only from youtube.com? For instance this Tube site can't really play most music videos.
Re:Show HN: Tube – Minimalist YouTube by seba_dos1 on Friday April 13, 2018 @06:20PM (#16834384)
Well.
Re:Show HN: Tube – Minimalist YouTube by dredmorbius on Wednesday April 18, 2018 @08:59AM (#16866985)
See also mps-youtube, a Python utility installable via pip.
Re:Show HN: Tube – Minimalist YouTube by endisukaj on Sunday April 15, 2018 @06:09AM (#16842054)
> ad-free

You don't want the people who make the content you enjoy to earn a living doing that?