OF_ERROR using camera

hey guys, started using OF this week for computer vision, and i am having problems getting a camera to work… this is if i use a usb camera it works, but im using a external video capture card to get image from a security cam… and i gives me this error:

OF_ERROR: GStreamer Plugin: Embedded video playback halted; module video_source reported: Internal data flow error.

if i run VLC or gstreamer-properties the image apears, but in openframeworks i get the error above…

Any idea what the problem may be?

can you add this line to your setup function:

ofSetLogLevel(OF_LOG_VERBOSE);

and post the output.

also what’s the model of your capture card?

its a Dazzle DVC 100.

Here is the result of ofSetLogLevel:

  
  
  
OF_NOTICE: Probing devices with udev...  
OF_NOTICE: Found device 0ac8:c342, getting capabilities...  
OF_NOTICE: Detected v4l2 device: WebCam SCB-1900N  
OF_NOTICE: Driver: uvcvideo, version: 256  
OF_NOTICE: Capabilities: 0x04000001  
OF_NOTICE: Found device 2304:021a, getting capabilities...  
OF_NOTICE: Detected v4l2 device: Pinnacle Dazzle DVC 90/100/101/  
OF_NOTICE: Driver: em28xx, version: 258  
OF_NOTICE: Capabilities: 0x05020041  
OF_VERBOSE: Device: Pinnacle Dazzle DVC 90/100/101/ (/dev/video1)  
  
OF_NOTICE: video/x-raw-bayer 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-rgb 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: ofGstUtils: selected format: 288x230 video/x-raw-bayer framerate: 25/1  
OF_NOTICE: gstreamer pipeline: v4l2src name=video_source device=/dev/video1 ! video/x-raw-bayer,width=288,height=230,framerate=25/1 ! decodebin ! ffvideoscale method=2 ! video/x-raw-rgb, width=320, height=240, depth=24 ! appsink name=sink  caps=video/x-raw-rgb  
OF_VERBOSE: ofVideoGrabber: initied  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (paused)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (void pending)  
OF_VERBOSE: GStreamer: Got stream-status message  
OF_VERBOSE: GStreamer: unhandled message  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (void pending)  
OF_VERBOSE: GStreamer: Got stream-status message  
OF_VERBOSE: GStreamer: unhandled message  
OF_VERBOSE: GStreamer: Got new-clock message  
OF_VERBOSE: GStreamer: unhandled message  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from paused to playing (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from paused to playing (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from null to ready (playing)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (playing)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from paused to playing (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from playing to paused (null)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from paused to ready (null)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to null (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from playing to paused (ready)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to paused (void pending)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to ready (null)  
OF_VERBOSE: GStreamer: Got state-changed message  
OF_VERBOSE: GStreamer: state changed from ready to null (void pending)  
OF_VERBOSE: GStreamer: Got error message  
OF_ERROR: GStreamer Plugin: Embedded video playback halted; module video_source reported: Internal data flow error.  
  
  

I tried to use a dazzle dvc 100 and don’t get it working for me with of.
I had some strange image errors, where some parts of the screen were just green. I think the problem has something to do with the videoformats.
can you try guvcview and/or luvcview if this works with the dazzle?
I got it working with guvcview when I played around with formats, but not very stable.

it seems your camera is reporting bayer as one of the first formats and ofGstUtils doesn’t know very well what do do with it. can you try with this version:

gstUtils.zip

Ok, just tested the ofGstUtils you suplied arturo… but still get an error:

  
  
OF_NOTICE: Probing devices with udev...  
OF_NOTICE: Found device 0ac8:c342, getting capabilities...  
OF_NOTICE: Detected v4l2 device: WebCam SCB-1900N  
OF_NOTICE: Driver: uvcvideo, version: 256  
OF_NOTICE: Capabilities: 0x04000001  
OF_NOTICE: Found device 2304:021a, getting capabilities...  
OF_NOTICE: Detected v4l2 device: Pinnacle Dazzle DVC 90/100/101/  
OF_NOTICE: Driver: em28xx, version: 258  
OF_NOTICE: Capabilities: 0x05020041  
OF_VERBOSE: Device: Pinnacle Dazzle DVC 90/100/101/ (/dev/video1)  
  
OF_NOTICE: video/x-raw-bayer 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-bayer 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_NOTICE: video/x-raw-rgb 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-rgb 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 144 x 115 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 288 x 230 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 576 x 460 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 720 x 576 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 360 x 288 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: video/x-raw-yuv 180 x 144 framerates:  
OF_NOTICE: 25/1   
OF_VERBOSE: already added, skipping  
  
OF_NOTICE: ofGstUtils: selected format: 288x230 video/x-raw-bayer framerate: 25/1  
OF_NOTICE: gstreamer pipeline: v4l2src name=video_source device=/dev/video1 ! video/x-raw-bayer,width=288,height=230,framerate=25/1 ! bayer2rgb ffvideoscale method=2 ! appsink name=sink  caps="video/x-raw-rgb, width=320, height=240, bpp=24"  
OF_ERROR: GStreamer: unable to set pipeline to paused  
  
OF_ERROR: ofVideoGrabber: couldn't init  
  

Can i force another format besides bayer?

benben just tried guvcview and i get a format error.

damn dazzle :x

going to play around with this some more and see where i get.

hey miguel

there’s an error in the files i posted, can you try changing the line 667 in ofGstUtils.cpp:

“bayer2rgb”

to

"bayer2rgb ! "

can you try with a different size. the capture card doesn’t support 320x240 so OF is trying to use the nearest format size and resizing it but the size that it’s trying doesn’t seem very standard.

can you try with:

720 x 576
576 x 460
360 x 288

and see if any of them works?

YEAH!!!

You Rock arturo!!!