Stream2Chromecast: Cast your videos from the terminal to your Chromecast

Stream2Chromecast

Without a doubt Chromecats is an excellent device that allows us to enjoy our multimedia content, this device allows us to turn any television into a smartv. The use of our device depends on each person and their imagination.

There are many applications that allow us to send content to our Chromecast, for example, from our smartphone the most popular apps are Netflix, Spotify, Google Play Music, Angry birds and many more.

This time I will tell you a little about this great application written in python and that its creator shares it with the community since initially it was only a personal project. The application it's called Stream2Chromecast.

Stream2Chromecast is a tool that is used through a command line, which allows us to transcode various video formats not compatible with our Chromecast device while they are being played on it, so all this is done in real time.

Stream2Chromecast Features:

  • Allows you to stream audio and video to a Chromecast device.
  • Allows you to stream online videos by just placing the URL of it, the file must be streamable and a format compatible with Chromecast, since it cannot be transcoded.
  • It allows us to transcode any format not supported by the Chromecast in real time (using FFmpeg or Libav), so we avoid having to convert the videos manually.
  • Provides basic control commands: pause, star, stop playback volume down and volume up (currently this only works when not transcoding)
  • Allows you to specify a device when multiple Chromecasts are connected on the same network;
  • Supports passing custom transcoder parameters to ffmpeg or avconv (thanks to this, you can set the quality, add subtitles, even though Stream2Chromecast doesn't support it directly, etc.).
  • Supports specification of port to use for media streaming.
  • It can play audio files even though it does not display metadata.  

How to install Stream2Chromecast on Linux?

As I mentioned a few moments ago, this tool is built on python, so for its installation we can do it in the following ways:

For Ubuntu 16.04 14.04 and derivatives we can use the following repository:

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt update

sudo apt install stream2chromecast

Now for Debian and other distributions that support deb packages, we can download the .deb package and install it, we just have to download it from the following link.

After downloading, we just have to install it with our preferred package manager or with the following command from the terminal:

sudo dpkg -i stream2chromecast*.deb

And for the other distributions we must download the code from its git, the link is the next.

Finally, Stream2Chromecast requires two important dependencies to be able to function:

FFmpeg

Python 2

Finally and without forgetting to mention, it is by logic and of utmost importance that your Chromecast and your computer are connected to the same network.

Once the installation is done, we can use this application to start sending content to our Chromecast device.

stream2chromecast use

How to use Stream2Chromecast to cast content to Chromecast?

As I mentioned, this tool works under the command line, so the use of the terminal is essential, if you installed the deb package or used the repository the use of the commands is as follows:

stream2chromecast

More without instead yes you downloaded the code from git, the nomenclature changes and also you should always position yourself on the Stream2Chromecast folder always to be able to use it.

The command to use it will be the following:

stream2chromecast.py

For, play a video we just have to execute the following command

stream2chromecast /ruta/al/video.mp4

We must indicate in the command the ip address of our Chromecast or the name you use.

stream2chromecast -devicename CHROMECAST_IP_ADDRESS "/ruta/al/video.mp4"
stream2chromecast -devicename CHROMECAST_NAME "/ruta/al/video.mp4"

Also as commented within the characteristics, we can enable transconditioning for video formats that it does not support our device for this we must add the following parameter.

stream2chromecast -devicename CHROMECAST_IP_ADDRESS -transcode "/ruta/al/video.avi"

For, add subtitles to the video, we do it with this other parameter:

stream2chromecast -devicename CHROMECAST_IP_ADDRESS -transcodeopts '-vf subtitles="/ruta/al/subtitulo.srt"' -transcode "/ruta/al/video.avi"

On the other hand, we can also submit content online:

stream2chromecast -playurl URL

For, stop playback just press ctrl + c about the terminal.

Finally, the commands for the controls are as follows:

stream2chromecast -pause

stream2chromecast -continue

stream2chromecast -stop

stream2chromecast.py -setvol 

stream2chromecast.py -volup

stream2chromecast.py -voldown

stream2chromecast.py -mute 

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

Be the first to comment

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  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.