Chromecast is a device that allows you to seamlessly cast content like audio, video on television over your home network. It is plugged into your Televisions’ HDMI port. You can use Chromecast to cast media from your mobile devices or from your computer to your TV. It is the best and affordable way of casting media on your television using a Chromecast device.
In this article, we will see how to cast video from Ubuntu 20.04 LTS to Chromecast.
Three ways to cast videos from Ubuntu to Chromecast
We can cast videos from Ubuntu to Chromecast devices using the following ways:
- With Mkchromecast on Terminal.
- Using VLC player.
- By using Google Chrome.
Before starting, make sure the Chromecast device and the source device i.e mobile or computer are on the same network.
1. Send a Video stream to Chromecast using Terminal
We can use Terminal to cast local or YouTube videos to Chromecast. For that, we have to install Mkchromecast. Mkchromecast is a program that we can use to cast media (Audio and video) from macOS X or Linux to your Chromecast device. So let’s get started with its installation.
1. First, launch the Terminal by pressing Ctrl+Alt+T and then enter the following command in order to install Mkchromecast:
$ sudo apt install mkchromecast
Wait for a while until the installation is completed.
2. Then, we will need to pair the Chromecast device with Ubuntu. Open up the Terminal and then run the following command:
$ mkchromecast –t
It will list the available devices on the network.
Click on the Chromecast icon in the system tray area in the desktop’s top right corner to search for a media streaming device. Select the name of the device you want to cast to. If there is no device listed, click on Search for media Streaming Devices. You can also configure various settings from here.
3. To cast a local video from Ubuntu to your Chromecast device, open up Terminal application in Ubuntu. Then run the command by using the following syntax to cast a video:
$ mkchromecast --video -i [path/to/video]
Below in the Terminal, you can see the following information:
- IP Information about the streaming media device i.e TV
- Local IP of the Ubuntu.
- Media type
We can also cast YouTube videos directly from the Terminal. For that run the command in Terminal using the following syntax:
$ mkchromecast –y [youtube-URL] --video
However, make note that casting the YouTube video using this way will first download the video in your system and then will cast that downloaded video on your Chromecast.
To stop casting a video at any time, press Ctrl+C.
2. Using VLC player to send Video to Chromecast
We can also cast videos from Ubuntu to Chromecast using the most popular VLC player. The VLC media player has built-in Chromecast support.
1. Launch the VLC player in Ubuntu. Then play any video in VLC player that you want to cast on your streaming media device.
2. From the top menu, click on Playback.
3. Hover the mouse over the Renderer, it will show the list of available Chromecast devices.
4. Select your device. It will start casting the media on your media streaming device.
3. Send Media to Chromecast using Google Chrome
Chrome browser is another way that allows you to cast online videos to Chromecast.
1. Launch Google Chrome in Ubuntu and open any video.
2. Click on three vertical dots on the right corner of the chrome browser to open up the menu.
3. Click on Cast to start casting the video on the Chromecast device.
4. Then on the top right side of the Chrome browser, you will notice Chromecast icon (1), click on it to open a pop-up window.
5. From here, you can select the Casting device (2) and the Source (3) which you want to cast. From the sources drop-down, select the Cast tab option.
Whatever video, you have opened, will be cast to the Chromecast device. If you do not select any source, the Chromecast device will automatically start casting the opened tab by default.
To stop casting a video, close the tab or click on stop casting under the device name as shown in the below image.
That is all for it. You can see that simple is it to cast any video from Ubuntu to a Chromecast device. You can cast any video to Chromecast, whether it is locally saved on your computer, YouTube video, or any other video running on your Chrome browser.
There is one more application that you might want to have a look at, it is called Gnomecast.