ofVideoGrabber in Debian only shows first frame

I’m having the same problem @AskBre had before (see this link), though I’m running Debian instead of Arch, which according to @arturo would have fixed the problem . When accessing my webcam, the LED turns on and I see myself in the application, but the video doesn’t update. It never goes beyond the first frame.

When I exit videoGrabberExample using ctrl+c, I get the following error:
GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed

I tried installing several gstreamer0.10 packages to fix this, but no luck.
I’m running of_v0.8.4_linux64_release on Debian Jessie with kernel 3.16.0-4-amd64. I’ve installed all dependencies using the install_dependencies.sh script, and some extra gstreamer0.10 packages to see if I could get it to work.

Does anyone has an idea how to fix this?

Running with the debug level set to verbose shows the following output (slightly edited to remove some repetition):

> make run

checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
[notice ] The current log level is verbose
[verbose] ofGstUtils: gstreamer inited
[notice ] probing devices with udev...
[notice ] found device 5986:0268, getting capabilities...
[notice ] detected v4l2 device: Integrated Camera
[notice ] driver: uvcvideo, version: 200711
[notice ] capabilities: 0x84000001
[verbose] ofGstVideoGrabber: listDevices(): device 0: /dev/video0: Integrated Camera
0: Integrated Camera
[verbose] ofGstVideoGrabber: get_device_data(): device: Integrated Camera(/dev/video0)
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YUY21280x720 videoformat: 4 framerates: 
[verbose] 10/1 
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YUY2960x540 videoformat: 4 framerates: 
[verbose] 15/1 
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YUY2848x480 videoformat: 4 framerates: 
[verbose] 20/1 
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YUY2640x480 videoformat: 4 framerates: 
[verbose] 30/1 
[verbose] 15/1 

< REPEATED 6 TIMES > 

[verbose] ofGstVideoGrabber: add_video_format(): more similar framerate replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): image/jpeg 960x540 videoformat: 0 framerates: 
[verbose] 30/1 
[verbose] 15/1 

< REPEATED A BUNCH OF TIMES WITH DIFFERENT RESOLUTIONS (including some insane ones like I4201280x720) >

[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): rgb format with same framerate as other format, replacing existing format
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Integrated Camera
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 30/1
[verbose] ofThread: - name: Thread 1 - Started Thread.
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=30/1    ! appsink name=ofappsink caps="video/x-raw, format=RGB, width=640, height=480"
[verbose] ofGstUtils: startPipeline(): attaching callbacks
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from null to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from null to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from null to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): pipeline1 state changed from null to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from ready to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got stream-status message from src
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from src
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from ready to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): pipeline1 state changed from ready to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got stream-status message from src
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from src
[verbose] ofGstUtils: gstHandleMessage(): got new-clock message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): got stream-start message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from paused to playing (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from paused to playing (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from ready to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got async-done message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): async done
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from paused to playing (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): pipeline1 state changed from paused to playing (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got eos message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): end of the stream
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from playing to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from playing to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from playing to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): pipeline1 state changed from playing to paused (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from paused to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from paused to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got stream-status message from src
[verbose] ofGstUtils: gstHandleMessage(): unhandled message from src
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from paused to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from pipeline1
[verbose] ofGstUtils: gstHandleMessage(): pipeline1 state changed from paused to ready (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from ofappsink
[verbose] ofGstUtils: gstHandleMessage(): ofappsink state changed from ready to null (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from capsfilter0
[verbose] ofGstUtils: gstHandleMessage(): capsfilter0 state changed from ready to null (void pending)
[verbose] ofGstUtils: gstHandleMessage(): got state-changed message from video_source
[verbose] ofGstUtils: gstHandleMessage(): video_source state changed from ready to null (void pending)

(videoGrabberExample:19946): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed

This will be fixed in 0.9 and it’s already working fine in the nightly builds

Great, I can confirm it’s fixed in the current nightly. Sorry, should have tried those first.
Thank you.

I understand this has been solved for the nightly build.

However, I wanted to throw in my experience. I had a similar problem with my webcam under Ubuntu only grabbing the first frame. It still can’t handle full fps (30), but this setup seems to get it to work.

Most important is to set the fps to 1/2 what your webcam viewer says it can handle, mine is camorama webcam viewer
ofApp.cpp:

#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){

    ofSetLogLevel(OF_LOG_VERBOSE);

	camWidth 		= 1920;	// try to grab at this size.
	camHeight 		= 1080;

    //we can now get back a list of devices.
	vector<ofVideoDevice> devices = vidGrabber.listDevices();

    for(int i = 0; i < devices.size(); i++){
		cout << devices[i].id << ": " << devices[i].deviceName;
        if( devices[i].bAvailable ){
            cout << endl;
        }else{
            cout << " - unavailable " << endl;
        }
	}

	vidGrabber.setDeviceID(0);
	vidGrabber.setPixelFormat(OF_PIXELS_RGB);
	vidGrabber.setDesiredFrameRate(15);
	vidGrabber.setVerbose(true);
	vidGrabber.setUseTexture(false);
	vidGrabber.initGrabber(camWidth,camHeight);
	ofSetVerticalSync(true);

}


//--------------------------------------------------------------
void ofApp::update(){    
	vidGrabber.update();
}

//--------------------------------------------------------------
void ofApp::draw(){
	ofSetHexColor(0xffffff);
	vidGrabber.draw(0,0);

	ofSetHexColor(0xffffff);
    char reportStr[1024];
    sprintf(reportStr, "FPS: %3.2f", ofGetFrameRate() );
    ofDrawBitmapString(reportStr, ofGetWidth()-100, ofGetHeight() - 25);
}


//--------------------------------------------------------------
void ofApp::keyPressed  (int key){
   
}

//--------------------------------------------------------------
void ofApp::keyReleased(int key){

}

//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){

}