You probably already know that you can use your Raspberry Pi as a media center. You can even install Kodi for offline and online media management. But what if you’re happier to keep Raspbian as your primary operating system?

Well, if you have a mobile device that you don’t mind using to control your media, you can use it to cast videos to your TV. Yes, you can use your Raspberry Pi like a Chromecast. You won’t be able to use the Cast button on Android, but YouTube videos, pictures, audio, and images can be cast to your TV.

Install the Raspicast App

Start by installing Raspicast on your Android device. This is a free app that connects to your Raspberry Pi and sends data to it. As long as your Pi is connected to an HDMI input on your TV or display, you will be able to view media on your phone. You will find Raspicast in the Google Play App Store. Unfortunately, there is no reliable alternative to the iPhone for this.

Download: Raspicast for Android

It’s important to note that both the Android phone and the Raspberry Pi need to be on the same network for this to work. For example, you can’t cast video from your phone to your TV while you’re on the bus. If you’re trying to share a video with someone at home, just email them the link!

Customize Raspbian

After installing the application, turn your attention to the Raspberry Pi. It should already be connected to the TV via HDMI and turned on. We tested this on a Raspberry Pi 3 running Raspbian Stretch. However, you should make sure it works with other Raspberry Pi distributions (although some commands may differ).

Raspberry Pi Chromecast DIY Replacement

Since you need to enable SSH, here is a quick guide. You have three options to enable it:

  1. Through raspi-config . You can run this from the command line using sudo raspi-config then select » Interface Options» > «SSH» and use the arrow keys to confirm with » OK» .
  2. Use raspberry pi configuration tool . On your Raspbian desktop, open Menu > Settings > Raspberry Pi Configuration . On the tab » Interfaces » find SSH and set it to » Included» .
  3. Finally, if you prefer simplicity, you can enable SSH before booting the Pi . Insert a microSD card into your computer, navigate to the boot partition and create a new file. It should be called ssh and not have a file extension. After replacing the SD card and rebooting, SSH should be enabled.

The following can be done using a keyboard connected to your Pi or using SSH. Check out our previous guide on connecting to Raspberry Pi via SSH. .

Now it’s time to run some updates. Start by opening a terminal window on your Pi and running:

sudo apt-get update sudo apt-get upgrade 

These commands will update your Raspberry Pi’s operating system and will also find and install any software updates.

Install and build OpenMax

After installing the updates, we need the necessary packages:

 sudo apt-get install libjpeg9-dev libpng12-dev 

Packages libjpeg9-dev and libpng12-dev needed to create programs that can process JPG and PNG images. This will allow you to stream media to your Raspberry Pi via the Raspicast app on Android!

Now install OpenMax. This tool is the best option to cast video, audio and images from Android device to Raspberry Pi connected to TV. It’s available via GitHub and you can install it by «cloning» the datastore on your Pi:

 git clone 

It shouldn’t take long.

You are almost done; it’s time to build the OpenMax software. Start by switching to the omxiv directory and using the make command.

Raspberry Pi Chromecast DIY Replacement

 cd omxiv make ilclient make 

It will take some time. Once this is done, you will be ready to install:

 sudo make install 

In a few minutes OpenMax will be installed!

Get ready to cast!

Everything you need to stream from your Android device to your Raspberry Pi is now in place. On Android, launch the Raspicast app and in the SSH settings enter the hostname or IP address of your Raspberry Pi. Then enter your Pi’s username and password, then click OK .

Raspberry Pi Chromecast DIY Replacement

To play on Raspberry Pi, you have two options. First, find the content on the Raspicast app and click Play. Also, if you want to stream a YouTube video, please search for the video in the app and click on the «Share» button.

Select here Cast (Raspicast) and the video should automatically play on your TV! Meanwhile, to send videos, music, and photos to your Raspberry Pi display, simply use the Raspicast’s main screen and select Cast . This will open a screen listing all the videos on your Android device.

Raspberry Pi Chromecast DIY Replacement

On one of the four tabs (along with Music, Albums, and Pictures), selecting a media file will cause it to play immediately on your Raspberry Pi.

Need to change the IP address in the app (e.g. lead to a different Pi)? Open the three dots menu and select SSH Settings. Just enter a new IP address and credentials.

Additional Raspicast Options

Also in the Raspicast menu you will find a checkbox for repeat playback currently file. Next on the list audio output can be configured using HDMI (default), local , both or alsa . This will prove useful to anyone using an external audio solution with their Pi.

Raspberry Pi Chromecast DIY Replacement

You should also check the Advanced Options screen. Here you will find options to manage the file queue, control the volume (shifting the audio volume), use HTTP when necessary (default HTTPS), set custom commands, and more.

In the meantime, on the main Raspicast screen, use the Files button to navigate and play media files stored on your Raspberry Pi!

You can also play with Kodi!

Now this has a downside: you can’t run a Raspicast from a Raspberry Pi with OSMC (a popular Kodi distribution). Unfortunately, there is an alternative: the Kore remote control app for Android devices.

Download: Kore, The official remote for Kodi

Normally you will use this to control Kodi remotely, but it can also be converted to a Kodi system including OSMC. Just install the app, configure it with your Raspberry Pi’s IP address, and then go to YouTube. As with Raspicast, click the » Share» on the video you want to capture and select » Play on Kodi» .

Raspberry Pi Chromecast DIY Replacement

This will stream the video to your TV via Kodi immediately!

Other Chromecast Alternatives

The Raspberry Pi isn’t the only alternative to the Chromecast. Perhaps you already have a solution that you didn’t know about, such as a set-top box or Smart TV with YouTube support. In this situation, streaming video from the YouTube app to the TV is usually possible if the receiver is on the same network.

Of course, there are other HDMI streaming solutions, such as Miracast (check out our comparison for details), but if you have a device with the official YouTube app (such as an Apple TV), you’ll probably be able to bring it up.

Ready for your next DIY Pi project? How about building your own Alexa smart speaker with your Raspberry Pi? ?

Похожие записи