# Missing plugin on MSYS2 GStreamer (Windows)

**URL:** <https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145>\
**Category:** General Discussion\
**Created:** [November 3, 2022, 12:49pm UTC](https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145 "2022-11-03T12:49:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![salihozdemir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/salihozdemir/32/10459_2.png) [@salihozdemir](https://discuss.bluerobotics.com/u/salihozdemir)\
**Post date:** [November 3, 2022, 12:49pm UTC](https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145/1 "2022-11-03T12:49:13Z")

</div>

Hi there,

I installed GStreamer using MSYS2 by following [this tutorial](https://gist.github.com/velovix/8cbb9bb7fe86a08fb5aa7909b2950259).

I installed the necessary plugins on the tutorial and tried to run the following code (which is also in the tutorial):

```auto
from threading import Thread
from time import sleep

import gi

gi.require_version("Gst", "1.0")

from gi.repository import Gst, GLib

Gst.init()

main_loop = GLib.MainLoop()
thread = Thread(target=main_loop.run)
thread.start()

pipeline = Gst.parse_launch("udpsrc port=5600 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96 ! rtph264depay ! avdec_h264 ! appsink")
pipeline.set_state(Gst.State.PLAYING)

try:
    while True:
        sleep(0.1)
except KeyboardInterrupt:
    pass

pipeline.set_state(Gst.State.NULL)
main_loop.quit()

```

But I get the following error:

```auto
gi.repository.GLib.GError: gst_parse_error: no element "avdec_h264"

```

I had this issue before and I remember solving it by installing `gst-libav` and some other similar GStreamer packages.

I tried to install every possible package that I can think of in MSYS like:

```auto
pacman -S mingw-w64-x86_64-gst-libav

```

But none of them solved my issue. Maybe there are some other problems other than missing packages but maybe I’m just simply missing a package. I don’t know.

Any kind of help is highly appreciated. Thanks everyone in advance.

---

<div class="post-metadata">

**Author:** ![salihozdemir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/salihozdemir/32/10459_2.png) [@salihozdemir](https://discuss.bluerobotics.com/u/salihozdemir)\
**Post date:** [November 6, 2022, 5:27pm UTC](https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145/2 "2022-11-06T17:27:02Z")

</div>

@EliotBR Hello Eliot,

I got no replies since the opening of this topic.

I started to wonder if I opened the topic in the wrong place, so I just wanted to ask if you can check and move the topic to it’s correct place (maybe somewhere more “general”) if necessary. Of course, I can just reopen it if you can suggest a better place.

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 7, 2022, 11:47am UTC](https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145/3 "2022-11-07T11:47:56Z")

</div>

Hi @salihozdemir,

We did not write that tutorial, so you may be better served by contacting the tutorial author, or searching online for your error traceback.

From a brief look, you seem to be installing libraries for a Windows 10, 64-bit Intel-x86 computer. Does that match the device you’re running on? If you’re using a different system (e.g. Windows 11, or 32-bit Windows 10, or on an ARM chip instead of Intel) then the instructions there may not apply.

From a search of your error message it seems [someone (on StackOverflow) has previously had a similar error](https://stackoverflow.com/questions/71370361/not-able-to-solved-the-av-h264-gstreamer-issue), but it was not resolved.

We have our own [OpenCV/gstreamer tutorial](https://www.ardusub.com/developers/opencv.html), but it is targeted at Linux environments. You may wish to consider trying Ubuntu on your computer via WSL2 - Windows can often be a bit extra challenging for software development.

> [@salihozdemir](#):
>
> I got no replies since the opening of this topic.

From looking at the timestamps, you created the topic at ~11pm my time on Thursday evening, then I didn’t have time to respond to this post on my Friday, and today is Monday, when I have responded.

I expect others on the forum have not provided responses because the topic is quite niche, and is reasonably unrelated to what most of the community here has expertise in.

I have however also moved your post to the “General Discussion” category, because Gstreamer is not a Blue Robotics software, and your problem is unrelated to the ArduSub autopilot firmware which Blue Robotics helps to develop 🙂

---

<div class="post-metadata">

**Author:** ![salihozdemir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/salihozdemir/32/10459_2.png) [@salihozdemir](https://discuss.bluerobotics.com/u/salihozdemir)\
**Post date:** [November 8, 2022, 11:36am UTC](https://discuss.bluerobotics.com/t/missing-plugin-on-msys2-gstreamer-windows/13145/4 "2022-11-08T11:36:13Z")

</div>

Hello Eliot.

> [@EliotBR](#):
>
> I have however also moved your post to the “General Discussion” category

Thank you for that.

I was frustrated with this problem for the last couple of days. I figured it out this morning, and just I like I guessed, it was so simple.

I told you that instead of building OpenCV with GStreamer, I had decided to go with MSYS2.

I am not sure of this analysis but I think that my environment variables (which I added after installing regular GStreamer for Windows for my previous attempt) was causing the problem. After removing GStreamer bin and lib folders from environment variables, I had no more missing GStreamer plugin errors.

Even though I had a different python interpreter inside MSYS2 environment, it was still using those environment variables I had and it was trying to use the GStreamer in the Windows, not in the MSYS2 environment.

So the tutorial had no problem and it was my fault. 😅 Problem is solved.

Thank you again for your efforts.
