Last Updated on April 27, 2023
Set up and configure streamlink
As I’ve outlined, streamlink is a command-line utility that extracts streams from various services and pipes them into a video player of choice. It offers a good range of services via its plugins.
Install streamlink by cloning the project’s repository, and run the installation script, with the following commands:
$ cd streamlink
$ sudo python setup.py install
This installs streamlink to /usr/local/bin/.
Visit the project’s website to learn how to use this command-line software. There’s lots of tweaks available such as enabling caching in your player, multi-threaded streaming. Suffice it to say, say I want to watch BBC One (available only to UK IP addresses only), I type at the command line:
After entering my password for BBC iPlayer, vlc opens up with the live stream. There’s lots of ways of customisation. For example, you can specify which video player to use. It makes sense to use omxplayer or omxplayerGUI as they offer hardware acceleration.
A simple way to automate things is to create some bash aliases. They go in the file ~/.bashrc
Pages in this article:
Page 1 – Video Streaming
Page 2 – Set up Chromium to use omxplayerGUI for video streaming
Page 3 – Set up and configure streamlink
Read all my blog posts about the RPI4.
Raspberry Pi 4 Blog | |
---|---|
Week 36 | Manage your personal collections on the RPI4 |
Week 35 | Survey of terminal emulators |
Week 34 | Search the desktop with the latest version of Recoll |
Week 33 | Personal Information Managers on the RPI4 |
Week 32 | Keep a diary with the RPI4 |
Week 31 | Process complex mathematical functions, plot 2D and 3D graphs with calculators |
Week 30 | Internet radio on this tiny computer. A detailed survey of open source software |
Week 29 | Professionally manage your photo collection with digiKam |
Week 28 | Typeset beautifully with LyX |
Week 27 | Software that teaches young people how to learn basic computing skills and beyond |
Week 26 | Firefox revisited - Raspbian now offers a real alternative to Chromium |
Week 25 | Turn the Raspberry Pi 4 into a low power writing machine |
Week 24 | Keep the kids learning and having fun |
Week 23 | Lots of choices to view images |
Week 22 | Listening to podcasts on the RPI4 |
Week 21 | File management on the RPI4 |
Week 20 | Open Broadcaster Software (OBS Studio) on the RPI4 |
Week 19 | Keep up-to-date with these news aggregators |
Week 18 | Web Browsers Again: Firefox |
Week 17 | Retro gaming on the RPI4 |
Week 16 | Screen capturing with the RPI4 |
Week 15 | Emulate the Amiga, ZX Spectrum, and the Atari ST on the RPI4 |
Week 14 | Choose the right model of the RPI4 for your desktop needs |
Week 13 | Using the RPI4 as a screencaster |
Week 12 | Have fun reading comics on the RPI4 with YACReader, MComix, and more |
Week 11 | Turn the RPI4 into a complete home theater |
Week 10 | Watching locally stored video with VLC, OMXPlayer, and others |
Week 9 | PDF viewing on the RPI4 |
Week 8 | Access the RPI4 remotely running GUI apps |
Week 7 | e-book tools are put under the microscope |
Week 6 | The office suite is the archetypal business software. LibreOffice is tested |
Week 5 | Managing your email box with the RPI4 |
Week 4 | Web surfing on the RPI4 looking at Chromium, Vivaldi, Firefox, and Midori |
Week 3 | Video streaming with Chromium & omxplayerGUI as well as streamlink |
Week 2 | A survey of open source music players on the RPI4 including Tauon Music Box |
Week 1 | An introduction to the world of the RPI4 looking at musikcube and PiPackages |
This blog is written on the RPI4.
in step 3 it is saying .local does not exist. any ideas? also will this work for sports streaming sites with embeded streams such as [link removed]? if not what is the workaround for this?
I ran into the same issue. I am no Linux guru but this seemed to get the job done (or it just did something useless, lol). As you mentioned the .local would come up as non-existent, so I just stepped it down to:
nano /bin/chromium-omxplayerGUI.sh
But then it will tell you that you do not have permissions to write there. Get past this by using the admin privileges with the “sudo” command. So it should now look like this:
sudo nano/bin/chromium-omxplayerGUI.sh
Run through the steps listed above after that then press: Ctrl+X when done editing, agree to it by pressing “y”, and then press “Enter” to exit back to the command line.
To make it executable you have to do the chmod with sudo as well. So it should look like this:
sudo chmod u+x /bin/chromium-omxplayerGUI.sh
The instructions on the blog are amazing, and half the fun of using Linux for me is getting past some of these little road blocks (which are usually due to me missing a step or fat fingering something). I hope this helps for those like me who are just trying to get used to the Linux environment.
P.S. I mainly like to watch Twitch streams and this addition of the omxplayerGUI is freaking AMAZING! Thanks Luke for the “how-to” with this.
So, I’m a little confused as to how to use this — when do I need to use the Play Video button? If I look at a ps listing, or watch “top”, should I see anything besides chromium using a lot of cpu? I’ve started the browser using the new menu entry under Internet, but I’m still seeing video tearing, and rippling during pans.
A little late to the Party. Sorry. I have been using a Pi as home desktop for a while (on the kitchen table). If you have not done a video on using the Pi as a thin client to connect to business networks (or in my case a school) then it’s well worth it.
There are a few other options to consider. I strongly recommend not playing videos in the browser (unless you have / need to). However Smtube works brilliantly with VLC, or if you want subtitles to your youtube or similar I recommend using Youtube-dl and MPV.
I believe there is now a fix for Tearing on Youtube videos. However I apprciate this article was written a little while ago.
[link removed]