Build gstreamer plugins (good,bad,ugly) for windows

Hello dear community! I am struglin the 2nd day with building plugins for windows.
Here is my command string for VS Native Tools Command Prompt (i use MSVC 2022):

meson setup build  ^
 --default-library=shared ^
 -Dauto_features=disabled ^
 -Dbase=enabled ^
 -Dgood=enabled ^
 -Dbad=enabled ^
 -Dugly=enabled ^
 -Dlibav=enabled ^
 -Dprefix=C:/gstreamer/install

after i call: ninja -C build install ,
My question is where to find good,bad,base,ugly plugins? They are missing in install dir…

I am using this branch for buildding process: GitHub - GStreamer/gstreamer at 1.26

Thank you!!!

If you pass -Dauto-features=disabled, you need to enable each plugin one by one.. For example, if you want the the audioconvert plugin, you’d need to add -Dgst-plugins-base:audioconvert=enabled, etc

1 Like

Thank you very much! Could you please tell me where to find all this correct full plugin names i should pass to meson setup build? And wich one i really need to get: good,bad,ugly,base libs for windows environment? Hope you give me a hand!!!

My final goal is to run the following video pipeline with OpenCV:

  std::string pipeline =
      "udpsrc port=52356 caps=\"application/x-rtp, payload=97, encoding-name=H265\" ! "
      "rtph265depay ! h265parse ! avdec_h265 ! videoconvert ! appsink";

  cv::VideoCapture cap(pipeline, cv::CAP_GSTREAMER);
  if (!cap.isOpened()) {
      std::cerr << "Error: Cannot open video stream using GStreamer pipeline!" << std::endl;
      return -1;
  }

You can see the full list of options by running meson configure. In this pipelkine, you also want to add a rtpjitterbuffer so it should be something like: "udpsrc port=52356 caps=\"application/x-rtp, payload=97, encoding-name=H265\" ! rtpjitterbuffer ! rtph265depay ! h265parse ! avdec_h265 ! videoconvert ! appsink
You want at least -Dgst-plugins-good:rtp=enabled -Dgst-plugins-good:rtpmanager=enabled -Dgst-plugins-base:udp=enabled -Dgst-plugins-base:app=enabled -Dlibav=enabled -Dgst-plugins-base:videoconvert=enabled and I’m sure I’m missing some.
You can use the factories tracer on a full GStreamer build to see exactly what gets used.

1 Like

Ok! Great!!! Let you know the results. Thank you

Here is my sdp file:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
m=video 52356 RTP/AVP 97
a=rtpmap:97 H265/90000

Here is ffmpeg command to play the live stream (it works):
ffmpeg -protocol_whitelist file,udp,rtp -i sdp.sdp -f sdl2 -

Here is my final setup:

 meson setup build ^
 --default-library=shared ^
 --prefix=C:/gstreamer/install ^
 -Dauto_features=disabled ^
 -Dgst-plugins-good:rtp=enabled ^
 -Dgst-plugins-good:udp=enabled ^
 -Dgst-plugins-bad:videoparsers=enabled ^
 -Dgst-plugins-base:videoconvertscale=enabled ^
 -Dgst-plugins-base:app=enabled ^
 -Dgst-plugins-good:rtpmanager=enabled ^
 -Dlibav=enabled ^
 -Dgst-plugins-base:videoconvert=enabled ^
 -Dgst-plugins-bad:sdp=enabled

This is a branch i cloned the sorce from:
https://gitlab.freedesktop.org/gstreamer/gstreamer

This is a stream pipeline:
"udpsrc port=52356 caps=\"application/x-rtp, payload=97, encoding-name=H265\" ! rtpjitterbuffer ! rtph265depay ! h265parse ! avdec_h265 ! videoconvert ! appsink"

What am i doing wrong? How to make the stream work with sdp file?