I just saw the video about Chromecast and I am interested in knowing how can I enable this on my Ubuntu PC. My TV has an HDMI port.
The documentation from Google indicates that the Google Cast extension is not supported in Linux, but it actually does work.
To get this working in Ubuntu:
Make sure you are running either Chromium or Chrome version 28 or higher. Earlier versions will get a "This application is not supported on this computer. Installation has been disabled." error. The 'chromium-browser' package in Ubuntu 13.04 works fine.
Make sure iptables is configured to allow the UPnP/SSDP traffic used by the Google Cast browser extension to discover the ChromeCast device.
The browser will send a multicast UDP packet from the local IP and an ephemeral (random) port to 18.104.22.168 port 1900. The ChromeCast device will respond with a unicast UDP packet from the ChromeCast device's IP and another ephemeral port to the source IP/port of the multicast packet. Note that this is slightly different than most other UPnP devices, which will usually respond with a unicast UDP packet from port 1900 instead of an ephemeral port.
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPTrule WILL NOT match the response packet, as iptables does not currently have a conntrack helper that supports SSDP. In addition, the
iptables -A INPUT -p udp --sport 1900 -j ACCEPTrule typically used for UPnP/SSDP will not work since the replies from the ChromeCast device do not come from port 1900.
Therefore, you will need to add a rule to accept UDP packets on all ephemeral ports. The ephemeral port range for the initial multicast packet should be 32768-61000 (Verify with
cat /proc/sys/net/ipv4/ip_local_port_range), so the following rule should work (note it inserts at the top of the input rules):
iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT
After the ChromeCast device has been discovered (each time the browser starts), the browser will control it using TCP (HTTP) connections to port 8008, which should not require any special iptables rules.
Install the Google Cast browser extension in either Chromium or Chrome. Note that an app/extension called ChromeCast is available, but this is not what you want.
If you have not yet set up your ChromeCast device, follow the instructions that come with the device to set it up.
Once your device is configured, you should be able to simply click the Cast button in Chromium to Cast your current tab.
This answer no longer works because the extension has been discontinued; this answer is, however, being left as-is for historical reasons.
It looks as if all you need is the browser Chrome or Chromium and the extension below: https://chrome.google.com/webstore/detail/google-cast/boadgeojelhgndaghljhdicfkmllpafd
This project is in active development. From version >= 0.4.6 Chromecast is supported in addition to DLNA.
From Ubuntu >=16.10 pulseaudio-dlna is in the Universe repository.
For older versions the ppa ppa:qos/pulseaudio-dlna needs to be added first:
sudo apt-add-repository ppa:qos/pulseaudio-dlna sudo apt-get update
We can then install pulseaudio-dlna it with:
sudo apt-get install pulseaudio-dlna
It then can be run from a terminal or script with
It will add all DLNA and Chromecast client(s) available in the local network as an audio output device to select from the sound settings menu.
We can then stream the audio from any media player (or browser) to our Chromecast client.
For all options see the project's documentation at GIT.
I'm running Ubuntu 14.04 on my PC & Android 4.3 on my Phone.
First you need to plug the Chromecast in and change the TV source to that HDMI port.
Next install the Phone app from here on play store
Then use the Phone app to connect the Chromecast to your wifi and then it will update and reboot.
After that, go to your Ubuntu PC and open Chromium and install this app from the Chrome web store The Chrome-cast device is now listed. It's that simple.
For video file playback : Go to File > Open File locate the video and open. The Chromium browser has a media player built in. Then you can stream it. Remember to go "full screen" (press F11) :) That's it.
Here are the codecs that work in Chromium : http://www.chromium.org/audio-video
There are other projects like VLC or XBMC that are working on Chromecast compatability, so it won't be long until we can stream everything. If you use Steam you can install VLC or XBMC and stream from one Steam box to another already.
I just got my chromecast device. It can stream YouTube and tabs from Chrome. Because Netflix is not available on Ubuntu you cannot stream movies from Ubuntu. Tab streaming gives you a lot of cool features. I already tried: streaming photos from Flickr, streaming videos from Vimeo, streaming music from SoundCloud or Google Music (I connected it to Receiver, so experience is awesome).
I did not see any issues with music streaming, but in video you can see some dropped frames (but not really, I watched some imdb.com trailers and overall it was fine).
I could not make Chrome with Chromecast play avi files from my local PC. It allows to stream it, but I see black screen on TV (I guess this is not supported).
And I did not do anything special to install Chromecast plugin on Chrome, it just works.
You need Google Cast server app on the Ubuntu based PC or your NAS.
Chromecast device is new...
The question is: "Does this app exist yet?" It is a new opportunity for Linux developers.
More info on the Google developers page
I just recently managed to get my chromecast working with Chrome in Ubuntu, quite simply, I added the device with my mobile phone, and it magically appeared in Chrome in Ubuntu.
Simply click the Chrome Tools menu in the top right corner of your Chrome browser window. Then click Cast… More detail from google support
This was tested using Ubuntu 18.04+
There are several ways of sharing and streaming using either Chromecast or Chromecasr Ultras:
- Using Google Chrome with the Videostream App)
- Using SMPlayer or VLC, both of which have the option to Stream to Chromecast
- Using Youtube (In Google Chrome):
This helps a lot when you are managing multiple rooms, kids, NetFlix accounts and more. Do note that if Chromecast is not detected, 99% of the time is the network configuration. You can find a lot of helpful advice at the Chromecast Help Page or going to the Troubleshooting Guide.
You can also share your desktop by using the Cast option in Google Chrome:
And after selecting any of the Chromecasts you would see something like this:
sudo apt install mkchromecast mkchromecast --video -i "~/Videos/Example.mkv"
- Official FAQ
- How To Cast Video from Ubuntu to a Chromecast - OMG! Ubuntu!
- Issue on 16.04 Need