core: gstreamer integration does not work on Home Assistant Core

The problem

See this previous issue for more data:

When adding a gstreamer media player to the config the following error occurs: [homeassistant.components.hassio] Platform error media_player.gstreamer - No module named ‘gi’

What version of Home Assistant Core has the issue?

2022.6.0

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

gstreamer

Link to integration documentation on our website

https://www.home-assistant.io/integrations/gstreamer

Diagnostics information

No response

Example YAML snippet

media_player:
  - platform: gstreamer
    pipeline: "audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapcast_gstreamer"

Anything in the logs that might be useful for us?

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

Additional information

Seems that there are some missing components needed for this integration missing from Core, which prevents the integration from working out of the box.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 5
  • Comments: 24 (1 by maintainers)

Most upvoted comments

  1. Get access to the HA container:
docker exec -it homeassistant bash
  1. Install dependencies:
apk add gstreamer gstreamer-dev gstreamer-tools pkgconfig build-base cairo-dev cairo cairo-tools gobject-introspection-dev gst-plugins-good gst-plugins-bad gst-plugins-ugly  
  1. Install python packages:
pip install PyGObject
pip install pgi

After executing those commands, everything was working fine! I would really appreciate if any dev would implement those dependencies into the project.

I have the same problem. Why is there an integration, which obiously does not work in the official supported Installation HA-OS ???

apk add gstreamer gst-plugins-good gst-plugins-bad gst-plugins-ugly gobject-introspection-dev pkgconfig build-base

bad and ugly are, strictly speaking, not mandatory but will provide lots of commonly used plugins (especially bad).

same problem here!

Hello there,

this problem is still present! Due to the fact that the dependencies listed above are missing from HA Operating System, one is currently forced to manually install them after every core update!

Since I’m not too familiar with the technology behind HA I’d really appreciate someone with a better grasp to check in on this issue!

As for now, this integration is completely broken without manual intervention (see my comment above) and even results in preventing HA from restarting, due to faulty configuration.

Kind regards Linus

not stale.