<div dir="ltr"><div>Hey one more update just so no one wastes time trying to explain something when I already think I may have figured it out.</div><div><br></div><div>I found that the pacman package included with mingw ucrt64 is missing the libgstpython.dll file that it should have.</div><div>So I went about building the dll following the instructions at <a href="https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html?gi-language=python">https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html?gi-language=python</a></div><div>Once done I was able to load my python plugins under an msys2 shell. I've included the steps I used at the end of this mail for anyone who might run into the same issue later.</div><div>I'm not sure why they don't package the dll with the gst-python package like is done with arch64 but I think it might be because the path to the python.exe is dependent on the type of mingw that is used and also the mingw installation folder.<br></div><div>hopefully I can find some way to make it play nice with pyinstaller even though I suspect it's going to be looking for the python executable at a constant path, which may mean I need to always install to the same folder.</div><div><br></div><div>Peter</div><div><br></div><div>steps used to build libgstpython.dll</div><div><br></div><div> - pacman -S git mingw-w64-ucrt-x86_64-meson-python mingw-w64-ucrt-x86_64-cc mingw-w64-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-pygobject-devel mingw-w64-ucrt-x86_64-python<br> - git clone <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer.git">https://gitlab.freedesktop.org/gstreamer/gstreamer.git</a><br> - cd gstreamer<br> - git checkout 1.22.5<br> - cd subprojects/gst-python/<br> - meson build<br> - cd build<br> - ninja<br> - cp plugin/libgstpython.dll /ucrt64/lib/gstreamer-1.0/libgstpython.dll</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 28, 2023 at 5:10 PM Peter <<a href="mailto:peterswanston@gmail.com">peterswanston@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>I wanted to provide an update as I've managed to figure out a solution to the immediate part of issue 1) the solution is discussed on this page.</div><div><a href="https://stackoverflow.com/questions/76458520/create-an-executable-from-a-python-and-pygtk-script-under-windows" target="_blank">https://stackoverflow.com/questions/76458520/create-an-executable-from-a-python-and-pygtk-script-under-windows</a></div><div>"<a href="http://chcp.com" target="_blank">chcp.com</a> 65001"</div><div>I am able to play a video using the example <a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=python" target="_blank">https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=python</a> while under a msys2 shell now.<br></div><div><br></div><div>I am still stuck with the second question regarding what package is equivalent to gstreamer1.0-python3-plugin-loader
on pacman for msys2.</div><div><br></div><div>Peter<br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 28, 2023 at 3:01 PM Peter <<a href="mailto:peterswanston@gmail.com" target="_blank">peterswanston@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<br>
<br>
I am attempting to port a python linux application that uses PyGObject to interact with gstreamer over to windows.<br>
It also makes use of the python3 plugin loader included with the debian package gstreamer1.0-python3-plugin-loader.<br>
I am running into 2 problems.<br>
<br>
1) I am unable to get gstreamer to successfully run from within a msys2 console window.<br>
I have tried very basic things like "gst-inspect-1.0" but it crashes with an error.<br>
I originally attempted to use the pacman packges included with mingw64
msys2 "mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-devtools
mingw-w64-x86_64-gst-plugins-base" but got a popup error "Unspecified
fatal error encountered, aborting".<br>
So I then uninstalled those pacman packages and installed the MingW x86_64 runtime installer from the gstreamer website "<a rel="noreferrer" href="https://gstreamer.freedesktop.org/data/pkg/windows/1.22.5/mingw/gstreamer-1.0-mingw-x86_64-1.22.5.msi" target="_blank">https://gstreamer.freedesktop.org/data/pkg/windows/1.22.5/mingw/gstreamer-1.0-mingw-x86_64-1.22.5.msi</a>.".<br>
I still get the exact same error though whenever I try to launch the
program from either MSYS2, MSYS2 MingW64, MSYS2 ucrt64 (all three
different shells).<br>
When I run the command from a command prompt "cmd.exe" it runs fine though.<br>
<br>
I'm not sure but is there a way to get gstreamer to run within an msys2 shell context on windows?<br>
it seems like the only way to use PyGObject is from within an msys2
shell unless I'm mistaken so I'm not sure if this means it's not
possible to interact with gstreamer or PyGObject or not.<br>
<br>
2) Assuming it is possible to interact with gstreamer using PyGObject on
windows under msys2 (or otherwise if possible). Is there some
equivalent to the debian package of gstreamer1.0-python3-plugin-loader
for arch? or whatever packages are used by msys2 to install gstreamer?
Perhaps it is included within one of the other packages and not broken
out into it's own package?<br>
<br>
It seems like perhaps I need to port my python application to c++ if I hope to get it running on windows.<br>
<br>
Thanks for any assistance,<br>
<br>
Peter</div>
</blockquote></div>
</blockquote></div>