Skip to content

Instantly share code, notes, and snippets.

@sbennett33
Last active September 30, 2021 19:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbennett33/8bf8ad7260cb34ece85005b6183ab114 to your computer and use it in GitHub Desktop.
Save sbennett33/8bf8ad7260cb34ece85005b6183ab114 to your computer and use it in GitHub Desktop.
Newsboat + mpv + youtube-dl

Install Tools

Install Newsboat:

$> brew install newsboat

Install mpv:

$> brew install mpv

Install youtube-dl:

$> brew install youtube-dl

Configure Newsboat

Create a config file

$> touch ~/.newsboat/config

Update the config file to set your default browser and create a macro to open the current RSS article in mpv. The following example uses Safari for the default browser

browser "open -a safari '%u'"
macro m set browser "/usr/local/bin/mpv %u"; open-in-browser ; set browser "open -a safari '%u'"

Subscribe to some YouTube channels

You'll need the channel IDs of the YouTube channels you want to subscribe to. The easiest way to find the channel ID is to go to a video from that channel and the click on the link back to the channel from that video. The URL should now be in the format https://www.youtube.com/channel/UCC-UOdK8-mIjxBQm_ot1T-Q where UCC-UOdK8-mIjxBQm_ot1T-Q is the channel ID.

Once you have the channel ID, you want to subscribe to it in Newsboat.

$> touch ~/.newsboat/urls

Open the urls file and add the URL of the feed for that channel ID. Here's an example using the channel ID from above.

# Comments are allowed so I use them to keep track of what each feed is since it's not always clear from the URL
# Cracking The Cryptic
https://www.youtube.com/feeds/videos.xml?channel_id=UCC-UOdK8-mIjxBQm_ot1T-Q

Add a separate entry for each channel you want to follow and update the channel ID as appropriate.

Watch your videos

Now, when you launch Newsboat you should see a list of all your RSS feeds. You'll probably need to hit R to refresh them all.

Scroll down to a channel you are interested in and hit ENTER.

Scroll through the list of videos to find one that looks interesting and hit ENTER.

Once you've selected a video hit ,m to launch the macro we created earlier to launch that video using mpv. mpv should launch and begin playing your video.

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment