This is a program to cast your macOS audio, or Linux audio to your Google Cast devices or Sonos speakers. It can also cast video files.
It is written for Python3, and it can stream via node.js
, parec
(Linux),
ffmpeg
, or avconv
. Mkchromecast is capable of using lossy and lossless
audio formats provided that ffmpeg
, avconv
(Linux), or parec
(Linux) are installed. It also supports Multi-room group
playback, and
24-bit/96kHz high audio resolution.
Additionally, a system tray menu is available.
By default, Mkchromecast streams with node.js
(or parec
in Linux)
together with mp3
audio coding format at a sample rate of 44100Hz
and
average bitrate of 192k
. These defaults can be changed using the
--sample-rate
and -b
flags. It is useful to modify these parameters when
your wireless router is not very powerful, or in the case you don't want to
degrade the sound quality. For more information visit the
wiki, and the
FAQ.
You can optionally install ffmpeg
or avconv
(the latter only supported in Linux,
more information
here).
Linux users also can configure ALSA to capture
audio. Note that sometimes
the lag between playing a song and hearing may be up to 8 seconds for certain
backends.
To have an idea of using Mkchromecast from console check this gif.
Mkchromecast provides a beta system tray menu. It requires you to
install PyQt5
. For more information check the
Requirements and
Install sections.
This is what the system tray menu looks like:
Check these images:
If you have Sonos speakers, you can play whatever you are listening to in your
computer with Mkchromecast. To add Sonos support, install the soco
python
module:
pip3 install soco
If you want to contribute, help me improving this application by reporting issues, creating pull requests, or you may also buy me some pizza :).
In order to use Mkchromecast you need the following software to stream with
node.js
:
- Python3.
- pychromecast.
- psutil.
- mutagen.
- BlackHole
- PyQt5 (optional if you want to use the system tray menu).
For more control, you need ffmpeg
as backend. In that case install the
following:
- flask (optional).
- ffmpeg (optional).
- youtube-dl (option if you plan to cast youtube URLs or supported websites).