This is a something I wanted to do for a long time now, which is turning your Raspberry Pi into a Chromecast alternative. Chromecast is a popular audio and video streaming device that connects directly into your TV’s HDMI port and sending your video or audio to the device is as simple as pressing a cast button .
In this tutorial I will show you how to use raspberry pi as chromecast alternative. It is also worth mentioning that this is not a direct clone to chromecast and that there are limitations. This method does not support the cast button but will stream youtube videos as well as local audio and video files.
Equipment List
Raspberry Pi 3 ► Amazon | Ebay
Software List
Raspbian Pixel ► https://www.raspberrypi.org/downloads/
HaarigerHarald omxiv github ► https://github.com/HaarigerHarald/omxiv
Etcher ► https://etcher.io/
How to use Raspberry Pi as Chromecast
Step 1: Install Raspbian Pixel
First you will need to download Raspbian Pixel, this method does work with other newer OS too such as OSMC and retropie.
Now we will need a piece of software called etcher to write the image onto our SD card and USB Storage device.
Step 2: Check for updates
It is always a good idea to check for updates even if it is a freshly installed OS.
$ sudo apt-get update
$ sudo apt-get upgrade
Step 3: Enable SSH
You can enable SSH by navigating to Preferences > Raspberry Pi Configurations and click Interfaces then select SSH
Step 4: Prerequisites
We are now going to need to grab some software required by the omxiv so it can be compiled.
$ sudo apt-get install libjpeg8-dev libpng12-dev
Step 5: Downloading and compiling the OMXIV for casting
At this point we will need to open up the terminal and type these commands in to download and compile the software.
$ git clone https://github.com/HaarigerHarald/omxiv
$ cd omxiv
$ make ilclient
$ make -j4
$ sudo make install
once everything is compiled you need to retrieve your IP address of your PI
$ ifconfig
Step 6: Download Raspicast on Android
Navigate over to your play store on android and search for “raspicast”
Step 7: Casting to Raspberry Pi
Once everything is downloaded Open the software for the first time and you will be asked for an IP address. At this point you now insert the IP address you got earlier along with the Username and password of your raspberry pi.
Now you can open your youtube app and select a video to cast. Then but clicking the share icon look for the “raspicast”.
Finished!
At this point you should be able to see your video cast on the raspberry pi.
This guide was also mention in the video:
i’m going to try it out, thank you very much for this guide. Max
Pi Chromecast work fine on a Raspberry Pi Zero.
thank you for your feedback!!! just what i needed to know
Hi Don,
Will the android app connect to the raspberry Pi Ad-hoc? I have a strange setup here at my summer place. Normally use my phone as a hotspot due to lack of any high speed internet. Verizon has started throttling my hotspot due to high usage. They dont seem to throttle my phone data itself just the hotspot. I use Foxfi/pdanet but it no longer hides the hotspot usage. If i can connect ad-hoc to the raspberry pi I can at least watch Netflix on tv (no cable here and had bad luck with satellite Tv. Hope you can help.
Tom
yes, i should work in ad-hoc mode. as long as the ip assigned to the pi is reachable by your android.
for the second question, you can mask your usage again if you use “user agent switch” for google chrome and switch your browser to android. they will think the data is coming from your phone. give that a try. and for reference i did the same thing on my “netflix on raspberry pi” tutorial.
I’m on a OSMC O.S. installation, and as I’m trying to install the software package libjpeg8-dev a warning msg is displayed:
Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libjpeg62-turbo-dev
Also the package libpng12-dev is a part of this O.S.
Running the make command this msg is displayed
cp -ru /opt/vc/src/hello_pi/libs/ilclient libs
cp: cannot stat ‘/opt/vc/src/hello_pi/libs/ilclient’: No such file or directory
Makefile:16: recipe for target ‘ilclient’ failed
make: *** [ilclient] Error 1
Pleeeeeeease, what can I do to fix this.
I am getting the same error. Could you fix it?
This only works for Raspberry pi. Lets hope someone makes it for OSMC too. I am also desperatly waiting.
I’m using a Raspberry PI 3 with Raspbian x86 and still get this error… sigh…
Hi you fixed this??
hey i’ve tried doing this to my raspberry pi 2 the videos show up on the screen via hdmi the problem is the videos plays without audio no matter how much i increase volume, I’m very new to this kind of projects any help will be appreciated .
thank you
are you running audio via hdmi? or 3.5mm? you will to to change between the modes depending on what you are using
Hi Don,
Tried the chromecast. What username and password do I enter into raspicast? I tried the usrname and pass under the configuration in Raspian. But still get authentication error when openining Rasoicast
did you enable ssh?
Yes
I am having the same problem
Hello,
I’ve followed your tutorial, and have Raspicast working, sort of.
I was able to cast your tutorial video from the YT app, by sharing it to Raspicast, but when i try to share other videos I get an error stating, “Raspicast can’t stream this sort of stream.”
I’m not sure what it is that it doesn’t like other videos, but will stream yours. Could it be a resolution thing?
I set this up exactly as you directed. When I try to cast, I get a pop up asking for a play stream. Not sure what to do…
I have noticed you don’t monetize your website, don’t
waste your traffic, you can earn additional bucks every month because you’ve got
high quality content. If you want to know how to make extra bucks, search for: Boorfe’s tips best adsense alternative
I have checked your page and i have found some duplicate content, that’s why you
don’t rank high in google, but there is a tool that can help
you to create 100% unique content, search for:
Boorfe’s tips unlimited content
Any way to cast just the video to the pi and have the audio play from my phone?
Hi, thank you for your video.
I am new to linux and have a hard time figuring out how to install raspbian.
how do you pass the sudo commands into raspbian : did you do it from your raspberry pi connected to your tv screen? (which I did but it failed at some point)
Or after uploading raspbian on an SD card, you have it booted on your computer maybe? Or….?
I am using Linux Mint on my computer. Can I configure my raspbian from my laptop? How can I achieve that?
Hi
Just wanted to say, make sure you have username (rspi3 default is -pi) and password (rspi3 default is- raspberry) set on raspicast app or nothing happens and you get no warnings
I often visit your website and have noticed that you don’t
update it often. More frequent updates will give your blog higher authority &
rank in google. I know that writing articles takes a lot of time, but
you can always help yourself with miftolo’s tools which will shorten the time of creating an article to
a few seconds.
Will this not work with Raspberry Pi Model B v1.2?
Hi
I did all like you but when I use the command make -j4 comes:
omx_render.c: In function ‘setOmxDisplayConfig’:
omx_render.c:309:21: error: ‘OMX_DISPLAY_ALPHA_FLAGS_MIX’ undeclared (first use in this function)
dispConfRT.alpha|=OMX_DISPLAY_ALPHA_FLAGS_MIX;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
omx_render.c:309:21: note: each undeclared identifier is reported only once for each function it appears in
Makefile.include:11:
What should i do now?
Julian