Ask Your Question

VideoCapture object throws “assertion 'G_IS_OBJECT (object)' failed” on Cygwin

asked 2018-01-16 15:31:18 -0500

Problem: VideoCapture cannot read avi file and throws error with the Opencv downloaded from Cygwin. I also tried to build Opencv source on my machine for compatibility reason but it failed with undefined function error(linker problem. I tried several way to fix it but failed. I guess it might be related to compatibility with Cygwin)

stack overflow link:

edit retag flag offensive close merge delete


"Opencv downloaded from Cygwin" -- entirely unsupported from opencv, don't use that !

berak gravatar imageberak ( 2018-01-17 03:28:20 -0500 )edit

or do you know any possible error that has this error msg?: (a:6228): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

kmes40505 gravatar imagekmes40505 ( 2018-01-17 16:29:25 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2019-06-10 13:05:00 -0500

I got this error before I installed Cygwin's gstreamer and some plugins such as the "good" and "nice" codecs -- it seems they should have been automatically installed as dependencies. Now I can use VideoCapture() to acquire an MJPEG stream from an IP camera however I have not succeeded with an avi file. The important part of a long error message is "error: (-2) GStreamer: your gstreamer installation is missing a required plugin" which I think is for lack of an MPEG4 decoder. It is not worth it to me to spend a lot of time on this since OpenCV in native Windows fills my needs.

edit flag offensive delete link more


Cygwin OpenCV 3.4.1 media input is nearly non-functional for me. For a simple, cv2.imshow() python loop, my results are: - VideoCapture(0): fails to open laptop webcam. - VideoCapture(file-name): gstreamer plugin missing exception for all encodings except mpeg2. - VideoCapture(URL): gstreamer unable to start pipeline error -2 for mjpeg axis camera steam.

I have installed every gstreamer en/decoder package available. The same python app works in all cases on Linux.

Is this intended to work or is the fact that Cygiwn OCV has not advanced beyond 3.4 an indication of loss of interest?

leftwing gravatar imageleftwing ( 2020-03-23 13:24:01 -0500 )edit

Question Tools

1 follower


Asked: 2018-01-16 15:31:18 -0500

Seen: 564 times

Last updated: Jun 10 '19