When I started trying Gstreamer with Python on Windows 10, it took me quite some time to set up the dev environment. So this might help others on the way.
The most convenient approach is through MSYS2. Here are the steps:
export PATH="/mingw64/bin:$PATH"
export XDG_DATA_DIRS="/mingw64/share/:$XDG_DATA_DIRS"
More...
The most convenient approach is through MSYS2. Here are the steps:
- Download and install MSYS2: https://www.msys2.org
- Install Python, GStreamer, tools, plugins, and PyGObject
- Open MSYS2 UCRT64 terminal
- Update MSYS2 pacman -Syu. After this, the terminal may close; you need to open it again.
- Install gcc pacman -S mingw-w64-ucrt-x86_64-gcc
- Install Python, GStreamer, tools, plugins, and PyGObject
pacman -S mingw-w64-x86_64-python3 mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-devtools mingw-w64-x86_64-gst-plugins-{base,good,bad,ugly} mingw-w64-x86_64-python3-gobject - Add the following paths to ~/.bashrc
export PATH="/mingw64/bin:$PATH"
export XDG_DATA_DIRS="/mingw64/share/:$XDG_DATA_DIRS"
- Apply bashrc: source ~/.bashrc
- Test: run this on the terminal python -c "import gi; gi.require_version('Gst', '1.0'); from gi.repository import Gst; print(Gst.version_string())"
More...