VPU & GPU

YouTube-DL OMXPlayer

Install Required Tools

OMXPlayer

Ctrl + Alt + T

raspberrypi:$ sudo -s raspberrypi:# apt-get update && apt-get install omxplayer raspberrypi:# exit

YouTube-DL

raspberrypi:$ sudo -s raspberrypi:# curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl raspberrypi:# chmod a+rx /usr/local/bin/youtube-dl raspberrypi:# exit

Start Watching YouTube

Ctrl + Alt + T

raspberrypi:$ sudo youtube-dl -g -f 22 "YOUTUBE-URL"

youtube-dl -g -f 22 (720p)

youtube-dl -g -f 18 (360p)

raspberrypi:$ omxplayer -b "COPIED LINK"

Video DownloadHelper

Do you want to lean more about methods for how to watch YouTube on Raspberry Pi? If you have any thoughts or questions do not hesitate to post in the comment section below.

This is one of the frequently asked questions and probably most wanted feature by first time users ofsingle-board computer, so I decided to write a brief article explaining how to watch YouTube and potentially any other online videos around the web, this method is fully supporting () hardware acceleration.Well, the method that I recommend to use is very simple and it should work on Raspbian and Ubuntu, it involves two great command line software programs:The "youtube-dl" tool will allow you to grab the direct link of a video oneasily from your browser without downloading it, while "omxplayer" is used to play that video smoothly in real-time fully hardware accelerated which means it barely uses like 1% of the CPU power.As far as I can tell, you should have "omxplayer" installed by default if you are already using the officialrecommended by the Raspberry Pi foundation oras well. However, if you by any chance missing that software, I guess it won't hurt if I include instructions for installing it just in case.Again, this software should already be installed by default on the official Linux distributions. If it got deleted, here's how you can re-install it, open a terminal by clicking on your keyboard () then input this into the command line:This one shouldn't be installed by default, to install it simply just issue these commands into the terminal:Okay, now you should be ready to enjoy watching videos, just open your favorite browser on " youtube.com " then enter into the search bar whatever you desire, while you're on the results page look for the video that you want, and do not click on the link but otherwise just right click on the title and select "Copy link address" then open the terminal once again ():You can choose the quality of the video by changing the number after the "-f" which is currently set to (22) for 720p HD:This will give you a video stream link, copy it. Then type this again into the same terminal window to run "omxplayer" and play the video on your screen:You can use and pair "omxplayer" with any other method to play online videos as well for different sites and not only YouTube, for example if you are usingwhich is currently the default application on Raspbian as a part of PIXEL Desktop Environment, there is an add-on called () which gives you the link of any video embedded in your browser session.