Skip to content

Module: YouTube

Ant edited this page Jul 4, 2026 · 15 revisions

Allows you to browse and watch the latest videos from a curated list of YouTube channels.

Contributors: anthonycaccese

Features

Browse

  • Lists videos via YouTube RSS feeds from your curated list of channels
  • Subscriptions View: Browse the latest videos from all of your curated channels in a reverse chronological list
  • Channels View: Select a channel to view its latest videos
  • Save to Watch Later: Save videos to watch later. This is local to 240-MP (on device only), not associated to any account and the list can be cleared in settings at any time.
  • View Watch History: Displays a list of recently watch videos via the module. This is local to 240-MP (on device only), not associated to any account and the list can be cleared in settings at any time.
  • Choose if Shorts are displayed while browsing (default is On / can be toggled in Settings > YouTube)

Playback

  • Playback is handled via mpv + yt-dl (please keep yt-dl to reduce the chance of errors)
  • Resume Playback: Resume from your last playback position or restart from the beginning
  • Set Playback Resolution: 480p (default and good for the RaspberryPi), 720p and 1080p

Settings

Option Values Info
Enabled On/Off Sets if the module should display in the main module list when you start 240-MP.
Playback Resolution 480p (Default), 720p, 1080p Set the resolution of the video to request for playback. I recommend to keep this on 480p for the Raspberry Pi on a CRT for best performance
Resume Playback Ask/Always 'Ask' will present you with an option to restart playback or resume and 'Always' will resume without asking
Display Shorts On/Off Choose if YouTube shorts should display while browsing Subscriptions and Channels
Delete Watch Later -- Removes your Watch Later list from youtube_watch_later.json
Delete History -- Removes your Watch History from youtube_history.json

To Enable

  1. Make sure the latest version of yt-dlp is installed (mpv requires this to resolve YouTube URLs at playback time):
    • On Raspberry Pi:
      • first run the following (this will install the latest direct from yt-dlp and place it directly in your path)
      • sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
      • then run
      • sudo chmod a+rx /usr/local/bin/yt-dlp
    • On macOS: brew install yt-dlp
  2. Create a youtube_subscriptions.txt file in the 240-MP data directory
    • On Raspberry Pi: ~/.local/share/240-MP/youtube_subscriptions.txt
    • On macOS: ~/Library/Application Support/240-MP/youtube_subscriptions.txt
  3. And add the channel ID's you'd like to be able to view (one channel ID per line) into that file.
    • Blank lines and lines starting with # are ignored
    • Example:
    UC-2YHgc363EdcusLIBbgxzg
    UCgRaK4A7yi4ZELCLUjdP_pg
    UC3IYhdamzjvEJ9CwkQa4RAw
    
  4. Then go to Settings > YouTube and set Enabled to On

Adding Channels

There are a few ways to get the IDs for the channels you'd like to add to youtube_subscriptions.txt

Option 1: Google Takeout

If you'd like to use the same channel list that you have on your youtube account then you can use google takeout to generate an export of those IDs that can just be copied into youtube_subscriptions.txt

Steps

  1. Go to takeout.google.com (while signed in to your account)
  2. Under Create a new export > Select data to include first press the Deselect All button
    • We're doing this to make this export focused only on your YouTube channel list
    • You should see 0 of X selected above the button after you press it (where X matches the total number of services you have)
  3. Scroll down until you see YouTube and YouTube Music and check the box for it
  4. Click on the button that says All YouTube data included to open a modal and then press the Deselect All button at the top of the modal
  5. Scroll down until you see Subscriptions, check that checkbox and then press the Ok button to close the modal
    • The All YouTube data included button should have changed to say 1 type selected.
  6. Press the Next Step button to go to the "Choose file type, frequency & destination" step
  7. Choose how you'd prefer to get the export, the frequency you'd like and then press the Create export button
    • I usually use send download link via email and export once
  8. You'll get an email shortly with the file to download and in that export you'll get a subscriptions.csv file
  9. Copy the IDs from the first column of the CSV into youtube_subscriptions.txt and save it.
    • Please be sure to remove the header row called "Channel Id" if you copied it by accident
  10. When you open the YouTube module it will now have the same channels as your main YouTube account.
    • If you get any errors check that you only copied the first column of IDs from the google takeout subscriptions.csv export, that the youtube_subscriptions.txt is named correctly and its in the correct location (see details above)

Option 2: URL or page source

Often you can find the ID of a channel directly in its URL in the format youtube.com/channel/<ID> However if the URL shows an @handle URL instead then you can view page source and search for "channelId"

Clone this wiki locally