DIY Chromecast alternative using Raspberry Pi
In this tutorial, we will learn about how to use Raspberry Pi as a Chromecast alternative. This is not exactly the Chromecast, but it will stream Audio, Video and Image files directly from your smartphone using an Android application called Raspicast. There are some functionalities that the Raspicast software can’t do but Chromecast can run.
What is Chromecast?
Chromecast is a streaming media adapter from Google that allows a user to play online content such as videos and music on a TV. The adapter is a dongle that plugs into the TV HDMI port; a cable connects to a USB port to power the device. A mobile app makes it possible to essentially use a smartphone, tablet or computer as a TV remote.
What you need:
Setting up the Raspbian
1. Before setting up the Raspberry Pi as a Chromecast like a device, we have to update the Raspberry Pi using the following commands:
sudo apt-get update
sudo apt-get upgrade
2. We have to make sure that OMXPlayer is installed in Raspberry Pi because OMXPlayer can easily handle audio and video processing. Another reason for this player is that it is specially designed for the Raspberry Pi GPU.
Write the following command to install OMXPlayer:
sudo apt-get install omxplayer –y
3. With OMXPlayer we can easily handle audio and video files but we need something for handling images. For images, we will use the OpenMax Image Viewer.
Run the following command to install the OpenMAX Image Viewer:
git clone https://github.com/HaarigerHarald/omxiv.git
4. Now we need some packages which contain the libraries for PNG and JPEG format files. We need libjpeg8-dev and libpng12-dev packages. To install these packages write the following command:
sudo apt-get install libjpeg8-dev libpng12-dev
5. We can now finally proceed to compile and install the OpenMAX Image viewer. First change into the directory where we can clone our code by using the command:
6. The final step is to compile the code using make software and then install it using the following commands:
sudo make install
7. The last thing we need is a Raspberry Pi IP address. Run the following command to check the IP address of Raspberry Pi
Download and run Raspicast
• Raspberry Pi is now set up, now we need to download Raspicast (hyperlink this) Application. Go to Google Play Store and search the Raspicast app.
• After everything is setup, open the Raspicast App and click on the three dots on the top right corner, then write the IP address of Raspberry Pi.
Then enter the username and password of your Raspberry Pi. The default username and password is ‘pi’ and ’raspberry’
Now you can open your Youtube and select a video to cast. You can also cast Pictures, Music and Video files from your phone or tablet.