?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print


출처 : https://thepi.io/how-to-use-your-raspberry-pi-as-a-chromecast-alternative/


How to use your Raspberry Pi as a Chromecast alternative


Google’s Chromecast is one of the most popular audio and video streaming devices out there. The small device plugs into an HDMI port and is controlled by a computer or mobile device. Casting is as simple as tapping a button in supported apps. But Chromecast isn’t your only option for this sort of functionality – you can do something similar with the Raspberry Pi.

In this tutorial, I’m going to show you how you can use your Raspberry Pi as a Chromecast alternative. It’s worth a mention that this will make your Raspberry Pi be exactly that: an alternative to, not a carbon copy of, Google’s device. This alternative doesn’t support Google’s Cast button, but it does support streaming YouTube videos as well as local audio, images, and videos from your smart device to your TV. Here’s how to use your Raspberry Pi as a Chromecast alternative.

 

How to use your Raspberry Pi as a Chromecast alternative

For this project, we’ll need to have a couple of programs installed on the Raspberry Pi (OMXPlayer and OpenMax image viewer for the Raspberry Pi) and one installed on the device you want to cast from (Raspicast). The audio and video content that you stream from your smart device to your Raspberry Pi and your TV will be played using OMXPlayer, and the image content will be displayed using OpenMax image viewer for the Raspberry Pi.

Raspbian comes with OMXPlayer already installed, so that’s the operating system we’ll use in this tutorial (if you don’t yet have Raspbian installed, The Pi can help). We will have to install a couple of libraries and a program called OpenMax image viewer for the Raspberry Pi.

 

Step 1: Check for updates

It’s always wise to start with checking for the latest Raspbian updates by running these commands in Terminal:

sudo apt-get update
sudo apt-get upgrade

 

Step 2: Enable SSH

In order for this project to work, we have to have SSH enabled on the Raspberry Pi. There are a couple of ways to enable SSH: using the GUI or Terminal. We’ll cover both below.

Using the GUI

Navigate to Preferences > Raspberry Pi Configuration and click Interfaces. While there, select SSH: Enabled.

Using the GUI

 

Using Terminal

Run the following command in Terminal:

sudo raspi-config

Then navigate to Advanced Options and select SSH. You’re asked whether you’d like the SSH server to be enabled. Select Yes. After that, you can exit the config.

Using Terminal

Using Terminal

 

Step 3: Clone the OpenMax image viewer for the Raspberry Pi repository

We want to use our Chromecast alternative to cast images, so we’ll need to have OpenMax image viewer for the Raspberry Pi installed. The program’s repository resides on GitHub. Let’s clone the repository to our Raspberry Pi. Open Terminal and run the following command:

git clone https://github.com/HaarigerHarald/omxiv

Alright, let’s move on.

 

Step 4: Install the necessary packages

Cloning the image viewer’s repository isn’t enough: we still have to build and install the program. In order to build the image viewer, we’ll need to have some additional packages installed. Here is the command that we have to run next:

sudo apt-get install libjpeg8-dev libpng12-dev

These packages (libjpeg8-dev and libpng-12-dev) contain the development headers needed to build programs that use the libjpeg and libpng libraries. Libjpeg and libpng are C libraries for handling JPEG and PNG images, respectively.

 

Step 5: Build and install

We’re now ready for building and installing the OpenMax image viewer. These short commands are all we need:

cd omxiv
make ilclient
make
sudo make install

Now that we the image viewer installed, we won’t be needing the Pi for a short while.

 

Step 6: Download and install Raspicast

On your Android device, launch the Google Play Store and search for Raspicast. Raspicast is the app that lets us stream content from our smart devices to our Raspberry Pis and our TVs. After you’ve installed Raspicast, you’ll need to modify some settings.

Raspicast needs to know your Raspberry Pi’s IP address and credentials in order to work properly. Hop back onto your Pi and run this command in Terminal:

hostname -I

The command will return your Raspberry Pi’s private IP address. Write that down and continue with Raspicast’s settings dialog. If you haven’t changed your credentials, your username is pi and your password is raspberry.

Once you’re ready with the settings, Raspicast should be able to connect to your Pi, and you should be able to stream content from your mobile device to the big screen. Just tap Cast on Raspicast’s home screen and choose the content that you want to be casted. If you want to cast YouTube videos, you can do so within the YouTube app: choose a video, tap the share button, and select Raspicast from the list of choices.




Dreamy의 코드 스크랩

내가 모으고 내가 보는

List of Articles
번호 분류 제목 날짜 조회 수 추천 수
506 C 힙 정렬 Heap Sort file 2005.08.10 38291 0
505 Pi 회로부품 메모 1 secret 2019.08.09 1 0
504 JAVA 현재시간 구하기 2015.10.21 7807 0
503 MFC 현재디렉토리의 파일리스트들을 알아오는 클래스 CFindFile 2008.05.07 62557 0
502 MFC 현재 실행된 어플리케이션의 디렉토리 적용하기 2008.05.07 40032 0
501 일반 프리미어 프로 Premier Pro secret 2022.02.04 0 0
500 MFC 프로젝트 Resource에서 파일로 저장하는 방법 2010.11.01 34736 0
499 LINUX 프로세스를 이름으로 단번에 종료하기 2017.06.07 8635 0
498 MFC 폴더가 존재하는 지 확인하고, 없으면 만드는 함수 2010.02.01 58471 0
497 Pi 포토커플러 Photo Coupler 특징, 종류, 출력, 구조, 동작 원리, 파라미터 2019.01.03 26187 0
496 LINUX 패치 파일 만들기와 적용하기 (patch, diff) 2 2012.10.22 35888 0
495 MFC 파일 읽기 전용 해제 및 설정 2009.09.11 54272 0
494 PHP 파일 데이터 저장하고 불러오기(파일 입출력) 2015.09.30 8464 0
493 Pi 파이썬 코드를 이용한 파이카메라 제어 2018.04.24 10403 0
492 C# 트레이 아이콘 만들기 2013.08.05 13158 0
목록
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 34 Next ›
/ 34

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5