How to Make Your Own Chromecast Using a Raspberry Pi

Google Chromecast is one of the most popular streaming devices on the market, but if you have a Raspberry Pi in a drawer and not using it at all, you should know that you can create your own Chromecast using a Raspberry Pi easily and quickly, and in this article we are going to teach you how to do it .

The Raspberry Pi is originally a development board, but it is also a mini PC that you can give multiple uses to, including streaming content from a smartphone to television, doing exactly the same thing a Chromecast does. Do you want to know how to do it? Well read on and you will see how simple it is.

Make Chromecast Using a Raspberry Pi

Necessary materials

In order to complete this tutorial you will need the following:

  • A Raspberry Pi with the Raspbian operating system.
  • Power cable for the Raspberry, and an HDMI cable to connect it to the TV.
  • A USB keyboard to connect it to the Raspberry (only necessary to configure it).
  • Internet connection, either by cable or with a WiFi adapter.
  • An Android smartphone.

Raspberry-Pi-4-carcasa-1

Likewise, you will need to download the free Raspicast application to your smartphone.

Set up the Raspberry Pi

Next we are going to indicate the previous steps you need to carry out in the configuration of the Raspberry Pi, so that it can work with Raspicast and you can broadcast the contents of the smartphone on it.

Install required repositories and applications

First of all, we must have the GIT and and Make packages, which normally come already included in Raspbian but it doesn’t hurt to make sure that they do. To do this, you have to run the following command:

sudo apt-get install git make -y

We must also have OMXPlayer installed, which we can install with the following command:

sudo apt-get install omxplayer -y

OMXPlayer can only process audio and video content but not static images, so we will also need to install the OpenMax package, a GPU-accelerated image viewer designed specifically for the Raspberry Pi. To do this, we must execute the following commands:

cd ~
git clone https://github.com/HaarigerHarald/omxiv.git
sudo apt-get install libjpeg8-dev libpng12-dev
cd ~ / omxiv
make ilclient
make
sudo make install

With this, we will already have OpenMax Image Viewer installed and working on the Raspberry Pi.

Enable SSH

The next step is to enable SSH connections, since it is the method that Raspicast uses to connect the Raspberry to the smartphone application. You can do this by command line or by the Raspbian UI, and in this case we are going to use the graphical interface.

In the toolbar, select the Raspberry Pi icon and navigate to Preferences -> Raspberry Pi Settings.

Preferencias Raspian

Now you must select the “Interfaces” tab, search for SSH and mark it as enabled.

After doing so, click OK to close it, it returns to the console, because there is a previous step to do. In terminal, run the following command:

hostname -I

This will give you the IP address of the device, which you should write down because we will use it in the next step. Once this is done, it is necessary to restart the Raspberry Pi for the changes we have made to take effect (specifically enabling SSH).

Use the Raspberry Pi as if it were a Chromecast

Now that we have the Raspberry Pi ready, we can start using it as a Chromecast. Logically you must connect the Raspberry to the television and turn it on, to immediately open the Raspicast application on the smartphone that must be connected to the same network as the Raspberry Pi.

Raspicast will ask you to configure an SSH server. In Hostname or IP, you must enter the IP of the Raspberry that you should have noted in the previous step. It will also ask you for a username and password, which are the ones you have configured in Raspbian. If you don’t know them, the default user you use is “pi” and the password is “raspberry” . The rest of the options can be left by default.

Configurar Raspicast

Now simply click on “Cast” and you can now stream the content you want from the smartphone to the TV using the Raspberry Pi.