Ask Your Question
0

g_object_set: assertion 'G_IS_OBJECT (object)' failed

asked 2017-03-06 07:38:08 -0600

Julius gravatar image

Hello, I am using OpenCV (2.4.11) on Windows (Cygwin). I want to open a video file but I get this error message:

GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

Editing images works great, so my installation in general should be fine. Maybe I am missing a Codec? My code looks like this:

VideoCapture cap(argv[1]);
if(cap.grab()){
    cout<<"success"<<endl;
}


./test.exe video.avi

I already searched for a solution, but I didn't found any useful ideas... Thank you for your help!

edit retag flag offensive close merge delete

Comments

did you somehow build with gstreamer ?

(where else should such an error come from ?)

berak gravatar imageberak ( 2017-03-06 07:41:35 -0600 )edit

You are right, I am using gstreamer. I installed some additional plugins and now I get an other error:

GStreamer Plugin: Embedded video playback halted; module avidemux0 reported: Could not demultiplex stream.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /usr/src/ports/opencv/opencv-2.4.11-1.x86_64/src/opencv-2.4.11/modules/highgui/src/cap_gstreamer.cpp, line 773

Webm Format is working fine...The error message is still cryptic to me :/

Julius gravatar imageJulius ( 2017-03-06 08:01:27 -0600 )edit

maybe you can try this overload , and see, if ffmpeg or dshow canhandle your video

berak gravatar imageberak ( 2017-03-06 09:14:58 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-06-08 16:21:57 -0600

I landed here because I had the same problem. I installed binaries for libgstreamer plus the "good" and "nice" plugins using the Cygwin installer. I also installed the libopencv-devel 3.4.1, libopencv3.4, and opencv binaries. I was able compile and run a simple C++ video viewer and a simple Python video viewer. Of course, an X server was also needed.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-06 07:38:08 -0600

Seen: 6,011 times

Last updated: Mar 06 '17