Add GStreamer to Home Assistant OS

For some reason gstreamer is not included in the HAOS image. As mentioned in ticket #36540 when one tries to use it as media player you end up with the following error:

ERROR (MainThread) [homeassistant.components.hassio] Platform error media_player.gstreamer - No module named 'gi'

Having GStreamer enabled would be extremely helpful to easily get sound in and out of instances running in virtual machines, and to integrate with Snapcast. For example you can setup a hidden snapcast source with the tcp server sink, and mix it with real sources using the meta source to have TTS play over any currently playing media without having to determine or change the source.

Here’s the relevant Snapcast config:


# Internal
source = tcp://0.0.0.0:4953?name=SnapcastTCP&mode=server&codec=null
source = librespot:///usr/local/bin/librespot?name=Spotify-Internal[...]
source = pipe:///var/run/mpd/snapfifo?name=MPD-Internal&codec=null

# External
source = meta://SnapcastTCP/MPD-Internal?name=MusicPlayerDaemon
source = meta://SnapcastTCP/Spotify-Internal?name=Spotify

Hey there,

although this post is a bit ancient by now, I just wanted to emphasize how awesome it would be to have Gstreamer embedded in HAOS.

The GitHub issue mentioned above was unfortunately closed recently, but there’s another one which also offers a “hotfix”.

I’d really appreciate it if someone could check in on this issue and probably get it working, because I lack the grasp of how HA works.

Thanks in advance!
Linus :slight_smile: