Raspberry Pi As Chromecast Alternative (Raspicast)

256,014

681

49

Introduction: Raspberry Pi As Chromecast Alternative (Raspicast)

In this Instructables, I will show you how to use raspberry pi 3 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 directly from your smartphone using an Android application. And I believe this application is only for android devices.

So, actually what is Chromecast?

Chromecast is a streaming media adapter from Google that allows users to play online content such as videos and music on a digital television.
The adapter is a dongle that plugs into the TV's 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, laptop or desktop computer as a TV remote. Once the streaming begins, it's not necessary to keep the app open, and the device can be used for other purposes. Chromecast can stream content from an increasing number of sources including Netflix, Hulu Plus, YouTube, Google Play music and movies and the Chrome browser.

Step 1: Hardware Required

  • Raspberry Pi 3 (All model will work, but then it will require a USB Wifi dongle).
  • Raspberry Pi Case.
  • Heatsinks for Raspberry Pi.
  • Micro SD card for storage.
  • Micro Usb charger and Cable

  • HDMI cable

  • SD card reader to load Raspbian onto the SD card

  • Mouse And Keyboard

Step 2: Assembling the Case and Adding Heatsink to the Board

Here Heatsink in not mandatory, but while watching full 1080p videos for long time makes the cpu warm much. So it's better to add these.

The case which I've is used is easy to assemble and work with.

Step 3: Download and Install Raspbian Onto SD Card

Download Raspbian operating system for the Pi here.

Now carefully follow the instructions to install it onto the SD card (Mac and Windows) here.

Step 4: Getting Started

Plug the mouse and keyboard dongle. Power through the micro USB cable and connect HDMI cable to a Screen.

After booting up, connect to a WiFi network.

Step 5: Enable SSH

You can enable SSH by navigating to Preferences > Raspberry Pi Configurations and click Interfaces then select SSH

Step 6: Essential for Software

We need to grab some software required by the omxiv so it can be compiled.

Now click on the black terminal icon on the top bar of the Raspbian desktop to open the Terminal.

Type,

$ sudo apt-get install libjpeg8-dev libpng12-dev

Step 7: Download and Compile the OMXIV for Casting

In terminal and type these commands in to download and compile the software, one by one

$ git clone https://github.com/HaarigerHarald/omxiv
$ cd omxiv $ make ilclient $ make -j4 $ sudo make install

Step 8: Download Raspicast on Android

Download and install Raspicast from Playstore. Download

Step 9: Retrieve Your IP Address of Your PI

Once everything is compiled discover your Pi's IP address so that you can connect to it over the network. To do this, click on the black terminal icon on the top bar of the Raspbian desktop to open the Terminal.

Type "ifconfig" and then find the wireless IP address ("inet addr") under "wlan0" that will look something like 192.168.43.252 and make a note of it. Note it is not "192.168.43.252", there should be a different address under "wlan0".

Make sure your raspberry pi and phone are connected to same WiFi network.

$ ifconfig

Step 10: Casting Your Content to Raspberry Pi

After everything is downloaded Open the software and click on the three dots on the top right corner, then you will be asked for an Hostname or IP address. At this point you now insert the IP address you got earlier along with the Username and password on your raspberry pi.

The default username will be "pi". Leave port to 22 as itself

Now you can open your YouTube app and select a video to cast. Then but clicking the share icon look for the “raspicast”.

You can also cast Pictures, Music and Videos which or on your Device directly to target destination.

Raspberry Pi Contest 2017

Runner Up in the
Raspberry Pi Contest 2017

Remote Control Contest 2017

Third Prize in the
Remote Control Contest 2017

Epilog Challenge 9

Participated in the
Epilog Challenge 9

Be the First to Share

    Recommendations

    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest
    • For the Home Contest

      For the Home Contest

    49 Comments

    0
    coolperson
    coolperson

    11 months ago on Step 4

    all of the terminal commands output errors now.

    1
    aliou36
    aliou36

    Question 1 year ago on Step 7

    bonjour savez-vous comment faire ilclient et -j4 a l'etape 7 svp?

    0
    MikołajM5
    MikołajM5

    2 years ago

    lipa netflix i hbo nie działają jak przy normalnym chromecast

    0
    vimanyu
    vimanyu

    2 years ago

    I'm getting the below error while running `make -j4`:

    ```
    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: recipe for target 'omx_render.o' failed
    make: *** [omx_render.o] Error 1
    make: *** Waiting for unfinished jobs....
    ```
    I took a look at `omx_render.c` and find that the variable `OMX_DISPLAY_ALPHA_FLAGS_MIX` is actually undeclared. I'm not sure how it worked for everyone else.

    0
    knabekaize
    knabekaize

    2 years ago

    Hi! Am use this one as iptv player.But after few minutes of work omxiv is closed on any chanel for unknown reason.It seems as stop button pressed on phone.Raspberry Pi 3 works well and wifi connection too.I don''t know why it's so.

    0
    foxint
    foxint

    Question 2 years ago on Step 10

    Love it thanks for making this available. I downloaded Raspicast and an android emulator (Nox) and it works sort of. I have found lots of instructions as to how to download, but ZERO abotu how to use it. On Windows not phone, I cannot find any of my audio or video files. I am expecting the usual windows explorer tree to find the location of the movies and audio. Can you help???

    Raspicast.PNG
    0
    polkdub
    polkdub

    4 years ago

    Great Post!!! Thanks.

    Do you think it can work on a Raspberry pi running archlinux?

    0
    VikasP54
    VikasP54

    4 years ago

    Does it cast from other app like Voot, Hotstar etc?. I was able to cast youtube as well as local videos but not from these apps. I have not installed omxiv as well as any supporting library. May be they are present by default in latest Stretch

    0
    sanderdenhollander12
    sanderdenhollander12

    Reply 2 years ago

    Probably these are not supported, but just try a couple videos or whatever by sharing it via RaspiCast.

    0
    JavedH
    JavedH

    4 years ago

    I installed the software as directed but when I try to cast a video from my cell phone, it asks for an ip address. What ip to enter?

    Thanks,

    0
    sanderdenhollander12
    sanderdenhollander12

    Reply 2 years ago

    Do ifconfig in the terminal, and enter the inet IP-Address in the app.

    0
    TechnicalJohn
    TechnicalJohn

    Reply 4 years ago

    Review step #9 carefully, your answer is there.

    2
    bhoirrushi9028
    bhoirrushi9028

    Question 3 years ago

    Hi
    When i type command
    Make -j4
    Then i get error of display
    Can you give me solution on this

    0
    sanderdenhollander12
    sanderdenhollander12

    Answer 2 years ago

    Can you copy-paste the error message you get?

    0
    Pawanmandli
    Pawanmandli

    3 years ago

    Can it be used in raspberry pi zero

    0
    sanderdenhollander12
    sanderdenhollander12

    Reply 2 years ago

    Yes, if your raspberry pi zero has Wi-Fi built-in or you can connect a Wi-Fi dongle.

    0
    mfonseca2
    mfonseca2

    5 years ago

    great tutorial, simple instructions! ..however, it seems that the pi is not responding to any cast from raspicast. omxiv is installed and running, I have rebooted it, and I have the correct ip/usr/pwd combo. Can anyone else double-check that a step isn't missing, or am I just this dumb?

    0
    sanderdenhollander12
    sanderdenhollander12

    Reply 2 years ago

    1. Check if you are connected to the same network
    2. Check if SSH is enabled, by doing sudo raspi-config , interfacing options (5), SSH (P2) and then yes if you are asked if you want to enable SSH.
    3. Check if you have the right password, if you didn't change the username. If you didn't change your password, it should be raspberry, but if you don't know your password anymore, change it by doing sudo raspi-config , and then the first option.

    0
    bobburudinesh
    bobburudinesh

    Reply 2 years ago

    Can I cast from ios devices using this software