SMOLNET PORTAL home about changes

How I cast Youtube videos to the TV


DATE: 2020-07-15
AUTHOR: John L. Godlee


I've seen other people using a Chromecast and an Android phone to play Youtube videos on their TV. I wanted to do the same thing but instead I wanted to use my laptop. It turns out this is pretty difficult without using Google Chrome. I have since come up with a system which works reasonably well.

I use Qutebrowser[1] as my web browser. I configured qutebrowser to pipe videos to VLC[2] using this keybinding in my ~/.qutebrowser/config.py:

1: https://qutebrowser.org/ (https://qutebrowser.org)
2: https://www.videolan.org/vlc (https://www.videolan.org)


config.bind(',m', 'hint --rapid links spawn open -a VLC.app {hint-url}')


This allows me to press ,m while on a youtube page which displays thumbnails for videos, then select a video, which opens VLC and plays the video. This gets rid of any adverts.

To pipe the video to my Chromecast I can use the menu bar in VLC to select "Playback" -> "Renderer", then my Chromecast, which is listed as an option if both are on the same local network.

To adjust the volume on the chromecast I use go-cast[3] from the terminal:

3: https://github.com/barnybug/go-cast (https://github.com)


cast -name "CHROMECAST NAME" volume 0.6
Response: 20 (Success), text/gemini
Original URLgemini://republic.circumlunar.space/users/johngodlee/post...
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8