Skip to content

Instantly share code, notes, and snippets.

View christianll9's full-sized avatar
Working from home

Christian christianll9

Working from home
  • University of Hildesheim
  • Germany
View GitHub Profile
christianll9 /
Last active November 13, 2021 10:08
How to stream permanently from a YouTube channel with a Raspberry Pi


This tutorial explains, how you can program your Pi so that it automatically tries to connect to a specific YouTube live stream link at startup and always tries to reconnect if the connection is lost. My personal use case was for my grandpa to watch a live stream of his local church without the need to understand YouTube/internet. If you want a permanent stream of a specific channel, use the following link format:<channel-id>/live (ID can be found with online tools like YouTube Channel ID Finder). This Gist should also work with other streaming services, if they are supported by Streamlink.


  1. Install a useful OS. This tutorial assumes the Raspberry Pi OS (32-bit).
  2. Setup an internet connection.
  3. Install the latest stable version of Streamlink. Older versions have problems with the more recent YouTube API. For the instal
christianll9 /
Last active June 18, 2021 08:01 — forked from why-not/
Automatically Shutting Down Google Cloud VM (when idle AND no one is logged in via SSH)
# BASED on
# This is how the cron file should look like.
# PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sn$
# * * * * * /home/script/ > /tmp/user_error.log
## Watchout, for some reason cron files seem to require an extra new line at the end,
## consult this SO:
## Also take care to setup a PATH variable for the cron explicitly. It doesn't see