The Chromecast device is a "receiver device [that] runs a scaled-down Chrome browser with a receiver application". Can I download and install this receiver app on a chrome browser for example on my Windows notebook?
-
4Since this isn't a programming question, Stack Overflow is not the place for this. However, the answer to your question is no. – Will Eddins Jul 24 '13 at 17:46
-
1At first view this isn't a programming question, but if it is possible to download this app I would like to look how to integrate this in my software. Then it becomes a programming question. – Manuel A Jul 24 '13 at 17:50
-
2If you're wanting to make an application that uses the Chromecast API to beam content to Chromecast, you'll likely have to wait for the API (and devices) to be out for people to understand the content restriction. Chromecast is a device, sold by Google, that can be communicated with through the Chromecast API, so the question as you've stated, "Can I build my own device?", has the answer "No". – Will Eddins Jul 24 '13 at 18:15
3 Answers
I have implemented a complete chromecast v2 receiver, called YouMap ChromeCast Receiver, available in Google play store and Amazon store, xda-developer thread here: http://forum.xda-developers.com/android-tv/chromecast/app-youmap-chromecast-receiver-android-t3161851
The current Chromecast protocol is a completely different one from the original DIAL based protocol. Right now, only YouTube still uses the old protocol, which chromecast maintains its backward compatibility.
The discovery is mDNS, exactly same as Apple TV bonjour protocol.
The most difficult part is device authentication, the sender and the receiver perform handshakes by exchanging keys and certificates in a way extremely difficult to crack. AppleTV does the same using FairPlay encryption.
The next difficult part is the mirroring protocol, which is also very complicated, need to deal with packet splits, packet retransmissions. Overall, chromecast mirroring protocol is well designed, better than miracast, better than AirPlay mirroring (I have also implemented both of them, so I know what I am talking about).
When I get chances, will write more here.

- 468
- 6
- 16

- 1,083
- 10
- 15
-
It seems that hardware DRM is used (widevine?) to authenticate cast receivers. I believe this means if we want to emulate a receiver, we at least need a legitimate sacrificial device we can proxy auth flow with? – deed02392 Oct 23 '17 at 12:26
-
2@huisinro I'm trying to do a cast receiver, and I'm in the part I've the communication with chrome device and deviceauth starts, but I don't know wich certificate I should use. Can you guide me? I've seen other apps out there (like Reflector 3 and Airserver) that are currently working without any issues :/ – forlayo Oct 18 '18 at 18:08
The chromecast device works using the DIAL protocol. It is completely possible to emulate this protocol using some simple code to listen on the multicast group for discovery and then handle the HTTP requests to launch applications. It is then the launched application that communicates with the casting device, I believe using the RAMP protocol.
Luckily for us the applications that the chromecast device uses are mostly web applications meaning our device emulator just needs to launch a web browser and point it to a specific url when it receives an application request.
For example the youtube app, after device discovery and establishing where the applications are located (part of DIAL). Will send a HTTP POST request containing a pairing key to /<apps url>/YouTube
. All the emulating device needs to do now is open https://www.youtube.com/tv?<pairing key>
in a browser window. From here, I believe, communication for controlling the youtube app is not sent through the casting device but through the open tabs on the casting device and the emulator.
This is my understanding of how the chromecast device works and specifically the youtube app from looking at https://github.com/dz0ny/leapcast which is a python emulator that has youtube and google music working.

- 169,610
- 28
- 168
- 175

- 6,066
- 2
- 35
- 52
-
8Note that this the answer there is no longer current: the V2 Chromecast uses [mDNS currently](https://github.com/jloutsenhizer/CR-Cast/wiki/Chromecast-Implementation-Documentation-WIP), and I believe [protobuf](https://github.com/google/protobuf). The rest is of the flow remains more or less the same indeed. Unfortunately, development to get V2 working on the linked Leapcast (which still works great for youtube) seems to have stalled. – Wrikken Nov 23 '14 at 12:16
-
1That's right, recently after some packet capturing I have found at least these protocols taking some part in the negotiation: - UDP/IGMP membership to 239.255.255.250. - UDP/SSDP m-search to 239.255.255.250, including TCP/XML response. - UDP/uPnP response unicast from ChromeCast to PC. - UDP/MDNS question to 224.0.0.251, including multicast response from ChromeCast. – JCM Dec 13 '17 at 17:52
-
Google is in progress of open sourcing some part of the chrome cast.
https://code.google.com/p/chromium/codesearch#chromium/src/chromecast/
https://code.google.com/p/chromium/issues/list?q=label:Chromecast
So theoretically you can build a similar device.

- 1,374
- 1
- 15
- 31
-
2Unfortunately, the first part (open sourcing) does not imply the second (so theoretically you can build a similar device) because the Chromecast ecosystem is protected by encryption that is owned and controlled by Google – mjaggard Jan 17 '18 at 12:59
-
As it turns out, they effectively only open sourced the UI for the device. So if you have a "Cast Device" you can build your own "Cast Receiver" for it, but the software running on the "Device" is not open source. – mscottnelson Oct 27 '20 at 16:46