I'm looking for a program that will simulate ChromeCast on my Pi 3. I successfully installed PiCAST but I'm not seeing a new device where I can stream to on chrome on my mac or on android.
Is PiCAST supposed to simulate ChromeCast or is it just a program that looks like ChromeCast but can only be controlled by sending the to-be-streamed media within the URL?
If the latter is true, then is there another program that I can use to simulate ChromeCast on Pi 3 pretty much like shairpoint-sync simulates AirPlay?
- 161
- 1
- 8
2 Answers
I am using simple HTTP protocol to connect to my RPi. So, if you can have the IP of your PI, it will work.
On RPi, am running this python service. I am planning to add more security to this later. But for now, in a mini setup, this works. I have even developed an android application around it(find it in my blog series for YOUPICAST).
from flask import Flask
import os
from threading import Thread
app=Flask(__name__)
def run(cmdStr):
os.system(cmdStr)
@app.route('/yt/')
def PlayNow(url):
pid = os.system('$(pidof omxplayer)')
if pid > 0:
os.system('killall omxplayer.bin')
modUrl = 'https://youtube.com/watch?v='+url
cmdStr = 'omxplayer -o hdmi `youtube-dl -g -f 18 %s` --blank' % (modUrl)
threads = Thread(target=run,args=(cmdStr,))
threads.daemon = True
threads.start()
return 'Added : Url - ' + url
@app.route('/kill')
def Kill():
pid = os.system('$(pidof omxplayer)')
if pid > 0:
os.system('killall omxplayer.bin')
return 'Killed'
if __name__ == '__main__':
app.run(host='0.0.0.0')
Let me know if you need more details.
- 121
- 3
PiCAST uses a completely custom protocol incompatible with devices which actually support Google Chromecast.
Furthermore , just like Apple Google is always modifying the protocol which has completely broken projects like leapcast already. If your device supports MiraCast , try using the "Miraclecast" project , it used to work on Raspberries and is based on a purportedly vendor-neutral standard.
- 6,244
- 1
- 16
- 35