Sam Tyler

Using Newsbeuter and VLC for YouTube Videos

Posted on 22/06/2017

Newsbeuter is a terminal based RSS reader that I use every day to read news feeds. It is entirely keyboard navigable and more responsive than any web-based feed reader that I have used. Since YouTube channels provide an RSS feed and VLC Media Player can open YouTube videos directly from their URLs, it is possible to subscribe to channels in Newsbeuter and set them to open in VLC. Here's how:

Configuring Newsbeuter

I like to have a separate configuration and cache file for videos; create ytcache.db, yturls, and ytconfig in ~/.newsbeuter.

Create an alias for loading Newsbeuter using these files. Place the following file in ~/.bashrc (or equivalent for shells other than bash):

alias ytbeuter="newsbeuter -u $HOME/.newsbeuter/yturls -c $HOME/.newsbeuter/ytcache.db -C $HOME/.newsbeuter/ytconfig"

Add the following line to ~/.newsbeuter/ytconfig:

browser vlc

This tells Newsbeuter to open links in VLC. This file is also the place for any other configuration options you want.

Importing your YouTube subscriptions

YouTube frequently change their user interface so these instructions may become outdated quickly. At the time of writing, you can get an OPML export of your subscriptions this way:

  1. Sign in to YouTube in a browser
  2. Go to Subscription Manager
  3. Scroll to the bottom of the page to the "Export to RSS readers" section and click "Export subscriptions". This will download an OPML file called subscription_manager

Once you have the file, import it into Newsbeuter:

ytbeuter -i path/to/subscription_manager

Adding more subscriptions

Google don't want you to watch YouTube videos without going to the website so they don't make it easy, but it is possible to get an RSS feed for any YouTube channel:

  1. Navigate to the channel's front page
  2. View the source of the page
  3. Search for a <link rel="canonical">. The href attribute will end in the channel's ID.
  4. Add the ID to

To subscribe, place that URL on a new line in ~/.newsbeuter/yturls.

Alternatively, just subscribe to the channel in YouTube and re-import your subscriptions.

Using Newsbeuter

Start your YouTube specialised Newsbeuter with ytbeuter. You will see a list of your channels and the number of new videos.

Newsbeuter index screen

Navigate using the arrow keys and press enter to view a channel. Press q to return to the main screen. The channel screen shows a list of that channel's videos and highlights the new ones.

Newsbeuter channel screen

Highlight a video and press O (shift + o) to open it in VLC. VLC will start and automatically figure out the stream location from the video's URL. You can see more complex instructions for Newsbeuter by reading its manual.

That's it.