ofGstVideoUtils not loaded error opencvExample

Hey all,

So I’ve referenced all over the forums here pertaining to this issue, but nothing fruitful of a solution. Yes, I have tested the video grabber example with my webcam and all is peachy. I’m not sure why I am receiving the continuous error:

[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded

1 Like

the opencvExample uses a video by default not the camera, it could be that you are missing the codecs? have you installed them with the install_codecs.sh script

eek, I had not. That step was missing from the main arm page. I had just ran that script in the directory:

  
cd /home/pi/openFrameworks/scripts/linux/debian_armv6l  

Everything had been up to date, though. I still receive the error.

ah if you are on the raspberry i think there’s a problem with the format of the opencv example, try converting it to something else

Hey Arturo,

What do you mean by converting it to something else, exactly?

I am using a webcam instead of the stock video (which I uncommented to enable) and still have the issue.

by something else i was meaning some other format like h264 or anything that gstreamer would open but if you are getting the same error with the camera it might be something else, not sure what though.

you can enable gstreamer debug traces to get more detail of what’s going on with:

export GST_DEBUG=3

then run your application, you can use different levels of verbosity then check the output to see if you find what might be going on

hey Arturo,

I am a bit confused with the error message I am receiving. it appears that the reference to the video USB device is incorrect, but im not sure how to access this.

0:00:00.530796508  6183   0x602f40 ERROR           GST_PIPELINE ./grammar.y:622:gst_parse_perform_link: could not link video_source to ofappsink
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=320,height=240,framerate=125/1    ! appsink name=ofappsink caps="video/x-raw, format=RGB, width=320, height=240"
[ error ] ofGstUtils: setPipelineWithSink(): couldn't create pipeline: could not link video_source to ofappsink

what camera are you using? it seems like it’s trying to open it at 125fps, some cameras report higher framerates than they can achieve and then fail when creating the pipeline.

try setting a lower fps with setDesiredFramerate() before initGrabber and see if that helps

Thanks for the help, Arturo.

i’ve implemented your suggestion (I am using the ps3 eye camera that i know has a resoluton of 640x480 @ 60fps), but with same results. Here is the output:

[notice ] ofGstVideoGrabber: initGrabber(): selected device: USB Camera-B4.09.24.1
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 320x240 video/x-raw RGB framerate: 125/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=320,height=240,framerate=125/1  ! videoscale method=2   ! appsink name=ofappsink caps="video/x-raw, format=RGB, width=160, height=120"
[ error ] ofGstUtils: setPipelineWithSink(): couldn't create pipeline: could not link video_source to videoscale0

attempted multiple lower resolutions and framerates with dismay.

heres a line from my script:

 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.setVerbose(true);
   setDesiredFramerate(30); 
 
vidGrabber.initGrabber(320,240);
    vidGrabber.setDeviceID(0);
    
    ofSetVerticalSync(true);

this: setDesiredFramerate(30); should be vidGrabber.setDesiredFramerate(30);

1 Like

Sorry for flooding this post; I had attached that function to the object I created for the videograbber class accidently didnt type it. same results, though.

edit: I should have just looked to confirm in documentation. The capitalization was off :confused:

setDesiredFrameRate(30);

I just tried the opencvExample with a PS3eye and got the same errors but this change worked for me

#ifdef _USE_LIVE_VIDEO
		vidGrabber.listDevices();
        vidGrabber.setVerbose(true);
		vidGrabber.setDesiredFrameRate(30); 
        vidGrabber.initGrabber(320,240);

Just something to watchout for - I did have to restart the RPi once/replug-in the camera. USB cameras (and other devices) on the RPi can be finnicky. I used to have to use a powered USB hub for the PS3eye to even work but recently I have been able to get by without one. Your camera was showing up though so maybe the code change above will be enough.

1 Like

Hey jvcleave,

I was able to compile with arturos suggestion. I had to clean the make file and recompile, which led to my issues (from what I understood).