thibauts / node-castv2

An implementation of the Chromecast CASTV2 protocol
MIT License
765 stars 99 forks source link

Would it be possible to run a Server in a Raspberry Pi? #45

Open sanbor opened 6 years ago

sanbor commented 6 years ago

I wonder if it would be possible to setup a Raspberry Pi as a Chromecast server and send stuff to it from the mobile phone, etc.

danopia commented 6 years ago

My understanding of the Cast protocol is that Google holds the encryption keys necessary to host a Cast. Nearly anyone can create apps that send stuff to a Chromecast, but only Google and friends are able to make the Chromecast itself

Onfire7 commented 6 years ago

TECHNICALLY, yes it should be possible. Checking that a Chromecast is valid is not actually mandatory for a Chromecast app. So it can probably be done, but it would only work with apps that don't check that it's a legit Chromecast, which is basically only going to be ones you create...

How hard it would be to actually implement a fake Chromecast might be another story though, I'm not sure there is enough info available to do it without a stupid amount of reverse engineering...

LukasBombach commented 5 years ago

I hate google

LukasBombach commented 5 years ago

For the record, I tried this project an I can stream YouTube from my phone to my Mac:

https://github.com/vbaicu/mMusicCast

LukasBombach commented 5 years ago

So it seems possible

ssieb commented 5 years ago

According to what I read on that project, it only emulates a V1 chromecast, so it won't be recognized by many (most?) devices. It depends on what you want to do with it.

LukasBombach commented 5 years ago

That's in fact true, it responds to the DIAL protocol

LukasBombach commented 5 years ago

Also, what I found is that you still need to know the URLs of each chromecast app to support it. For instance, youtube's chrome app runs at https://www.youtube.com/tv , if you want to support spotify on your emulated chromecast you'd need to know their url for their chromecast app

gsedej commented 5 years ago

Thanks for suggestion. The solution does work with pre-installed chromium on raspbian, but it's very slow. The even 320p is not fluid, specially when controls are present.

I suspect the system (raspberry/raspbian + chromium) can't use HW decoding (omxplayer-like) for website videos. I did notice "h264ify" is also preinstalled in chromium.