How to Cast Audio and Video from Linux to Chromecast

chromecast It is becoming the most used device to transmit to our TV what is being reproduced on our computer, mobile or even in the browser. Linux users do not have a native functionality that allows us cast Linux audio and video to Chromecast, so we must opt ​​for applications like mkchromecast, which allows us to easily transmit the content that we want to view on our television using this device.

What is the Chromecast?

It is an HDMI device similar to a USB drive that is connected to the TV in order to capture the signal from the multimedia devices that are connected in the Wi-Fi network. With this tool we can view the multimedia content that is sent from our computers, mobile phones and even the web browser.

What is mkchromecast?

It is an open source tool, written in Python and what do you use  node.js, ffmpego avconv to get the audio and video from Linux to Chromecast.

mkchromecast send multimedia to our Chromecast without losing audio and video quality, it is also compatible with multiple streams, high-quality audio resolution 24-bit / 96kHz, direct streaming from YouTube, among other features present in modern Chromecast models. Linux to Chromecast

The tool is equipped with an excellent usage panel, which is displayed in our inbox. Similarly, the installation of mkchromecast it's straightforward on almost all Linux distros.

How to install and use mkchromecast?

In any Linux distro we can install mkchromecast directly from its source code hosted on Github, for this we must perform the following steps:

  • Clone the official repository of the tool, or, failing that, download the stable version of the application from here!.
$ git clone https://github.com/muammar/mkchromecast.git
  • We go to the newly cloned folder and proceed to execute pip install with the file requirements.txt which contains all the necessary dependencies for the tool to work properly (in some cases the tool must be run with sudo):
$ cd mkchromecast/
$ pip install -r requirements.txt

Debia, Ubuntu and derivative users can install the tool directly from the official repositories, just run the following command from the console:

sudo apt-get install mkchromecast

For their part, Arch Linux users and derivatives can use the package available in the AUR repository

yaourt -S mkchromecast-git

We can visualize the behavior and use of this application in detail in the following gif distributed by the development team. We can also see the official usage tutorials from here.

mkchromecast

Cast from Youtube to Chromecast

Particularly something that I like about this application is that we can directly transmit a YouTube video from the console to our chromecast, for this we must execute the following command:

python mkchromecast.py -y https://www.youtube.com/watch\?v\=NVvAJhZVBT

Without a doubt, a tool that will allow us to send our multimedia from Linux to Chromecast in an easy, fast way and without losing quality.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

14 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel said

    I use this tool a lot for chromecast, it allows several improvements over this one. you can send any video file

    https://github.com/xat/castnow

    1.    Muammar said

      Castnow is only for sending video files, but not for sending audio in real time.

  2.   Anonymous said

    Great @Lagarto, thanks.

  3.   Carlos Moreno said

    Multimedia is invariable in the plural. You should never say "multimedia."
    https://es.m.wiktionary.org/wiki/multimedia

    1.    lizard said

      Thank you very much for your clarification dear, I have corrected and increased my word thanks to your consideration

  4.   Kevin said

    I've been looking for something similar for days. Thank you !!

  5.   Senhor Paquito said

    Interesting. I will try it, without a doubt.

    The question is how to configure the Firewall. For Chrome, for example, I have not managed to configure it and it only sends content (from YouTube or whatever) with the firewall disabled.

    Does anyone know how to configure it?

      1.    Mr. Paquito said

        Hello Muanmar.

        Indeed, I use Ubuntu (sorry, but I did not realize it to say so) and, from now on, I can also use the Chromecast without having to disable the Firewall.

        Many thanks!!!

      2.    Mr. Paquito said

        Hello Muanmar

        I answer again, to tell you that after opening port 5000, I rebooted just in case, opened Chrome and got to see the Chromecast, that's why I thought the port was valid at the system level and that any application could send content to Chromecast once open.

        But the next time I tried it it no longer connected. It seems that that first time the firewall took a little longer to start up, and that's why it worked the first time.

        So I understand that port 5000 is only for mkchromecast, right?

        1.    Muammar said

          Yes, I'm sorry. I think I read wrong. But in theory, there should be no problem having the firewall and using chrome. I have not tested, because I use Debian. And yes, port 5000 is needed only for mkchromecast.

          1.    Mr. Paquito said

            It is understood.

            Thank you, Muammar.

  6.   Mr. Paquito said

    Hello everyone.

    Regarding the installation of mkchromecast from the official Ubuntu repositories, it should be noted that the package is not in the Ubuntu 16.04 repositories. From what I have seen, it seems that it is only available as of Ubuntu 16.10.

    Greetings.

  7.   Daniela said

    and in gentoo distros ??
    I cannot find the solution to nonexistence on my Sabayon Linux.