Ask Your Question
0

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

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

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: https://stackoverflow.com/questions/4...

edit retag flag offensive close merge delete

Comments

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

berak gravatar imageberak ( 2018-01-17 03:28:20 -0600 )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 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

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

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

Comments

Cygwin OpenCV 3.4.1 media input is nearly non-functional for me. For a simple VideoCapture.read(), 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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 893 times

Last updated: Jun 10 '19