Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Connecting to your chromecast
- Find your chromecast's IP or hostname, and make sure you can reach it from any of these ways:
- - `ping chromecast.home` (if this works, use `chromecast.home` as its hostname)
- - or just `nmap -p8008,8009 192.168.1.0/24` or whatever network you're on, and find the device with both ports opened
- # Casting videos
- A first test which should fail: grab a random video file and run
- `cvlc --sout="#chromecast{ip=<your_chromecast_ip>}" <your_file.mkv>`
- If it works on the first try, great. But you might get a "gnutls client error: [..] The certificate issuer is unknown".
- # Trusting your chromecast's certificate
- You need to grab its self-signed certificate and add it to your trusted certificate store:
- `openssl s_client -showcerts -connect <your_chromecast_ip> </dev/null 2>&1 | openssl x509 | sudo tee /etc/ssl/certs/chromecast.crt`
- Re-run the same `cvlc` command. It should work, but if you get a "gnutls client error: [..] The name in the certificate does not match the expected" then go on.
- # Talking to your chromecast using the hostname
- The Common Name (CN) in your chromecast's certificate is its unique id. One (sad) way to allow a TLS connection to it is the following dirty trick: map its GUID to its IP in your `/etc/hosts` file, as if it were a hostname...
- `GUID=$(cat /etc/ssl/certs/chromecast.crt | openssl x509 -noout -subject | sed -e 's/ //g' -Ee 's/subject=cn=//I')`
- `echo "<your_chromecast_ip> ${GUID}" | sudo tee -a /etc/hosts`
- That's it, re-run the `cvlc` command one last time, and it should work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement