Pseye on the pi

edited March 2017 in Raspberry PI

Hi, I'm trying to use a pseye as webcam on my raspberry 2.

I have installed a lot of stuff (gstreamer-plugin-good, ...) and all stuff I found on the net as the gohai glvideo. Now I don't have any errors but only a black screen.

I'm blocked, please help -.

Tagged:

Answers

  • The GL Video library comes with its own version of GStreamer. No use in installing extra packages.

    What's your output of ls -al /dev/video*?

    Next step would be to try the capture examples with the regular Video library (using the host system's GStreamer 0.10), as well as the GL Video library.

  • I'have got /dev/video0 and all example video even only reading give me a black screen

  • @matthieu That's with both Video libraries, right?

    I could imagine that the Pi's USB bandwidth might not be sufficient for the camera - the Pi isn't exactly known for being a great USB host, unfortunately. You could try forcing a low resolution, and see if this changes things - in the GL Video's SimpleCapture example you'd e.g. change the constructor to read

    video = new GLCapture(this, devices[0], 320, 240, 25);
    

    What you could also try is to install some other program that make use of attached webcams, and check if it works there (e.g. apt-get install cheese).

  • edited March 2017

    pseye run good with cheese, Now with this resolution I've got this error

    GLVideo: v4l2src0: Internal data stream error. Debugging information: gtsbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline0/Gstv4l2Src:v4l2src0

  • How about with the regular Video library and this resolution?

  • @matthieu Also, in GLVideo, could you add the line GLVideo.enableDebug() right after size, and upload the output that will appear in the console?

  • edited March 2017
    Devices:
    [0] "USB Camera-B4.04.27.1"
    0:00:01.470492251  1020 0x6112bf80 WARN                 basesrc gstbasesrc.c:2950:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
    0:00:01.470661939  1020 0x6112bf80 WARN                 basesrc gstbasesrc.c:2950:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
    GLVideo: v4l2src0: Internal data stream error.
    Debugging information: gstbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    
  • @matthieu That's odd, I would have expected enableDebug() to be a little bit more verbose...

    Can you make sure the GLVideo.enableDebug() is done before you create the capture device with GLCapture(this, ...)? Can you you also try with GLVideo.enableDebug(4)? This should print even more.

    Thanks.

  • edited March 2017

    Ok enableDebug is before the initialization and I've got this very verbose error.

  • edited March 2017
    0:00:00.001215831  1180 0x65c11c00 INFO                GST_INIT gst.c:510:init_pre: Initializing GStreamer Core Library version 1.10.1
    0:00:00.001570622  1180 0x65c11c00 INFO                GST_INIT gst.c:511:init_pre: Using library installed in /usr/local/lib
    0:00:00.001672914  1180 0x65c11c00 INFO                GST_INIT gst.c:522:init_pre: Linux plexus21 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l
    0:00:00.006937541  1180 0x65c11c00 INFO                GST_INIT gstmessage.c:126:_priv_gst_message_initialize: init messages
    0:00:00.020425435  1180 0x65c11c00 INFO                GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
    0:00:00.024134647  1180 0x65c11c00 INFO      GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
    0:00:00.025777457  1180 0x65c11c00 INFO      GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.025901415  1180 0x65c11c00 INFO      GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.025969592  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1738:ensure_current_registry: reading registry cache: /home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/registry
    0:00:00.192681191  1180 0x65c11c00 INFO            GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/registry in 0.166520 seconds
    0:00:00.193079628  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1594:scan_and_update_registry: Validating plugins from registry cache: /home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/registry
    0:00:00.196197331  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1343:gst_registry_scan_path_level:<registry0> cached info for /home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/libgstvideo4linux2.so is stale
    0:00:00.217947451  1180 0x65c11c00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/libgstvideo4linux2.so" loaded
    0:00:00.221365727  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1705:scan_and_update_registry: Registry cache changed. Writing new registry cache
    0:00:00.221450883  1180 0x65c11c00 INFO            GST_REGISTRY gstregistrybinary.c:368:priv_gst_registry_binary_write_cache: Building binary registry cache image
    0:00:00.391502685  1180 0x65c11c00 INFO            GST_REGISTRY gstregistrybinary.c:400:priv_gst_registry_binary_write_cache: Writing binary registry cache
    0:00:03.942054095  1180 0x65c11c00 INFO            GST_REGISTRY gstregistrybinary.c:261:gst_registry_binary_cache_finish: Wrote binary registry cache
    0:00:03.942755240  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1714:scan_and_update_registry: Registry cache written successfully
    0:00:03.943063104  1180 0x65c11c00 INFO            GST_REGISTRY gstregistry.c:1773:ensure_current_registry: registry reading and updating done, result = 1
    0:00:03.943356072  1180 0x65c11c00 INFO                GST_INIT gst.c:720:init_post: GLib runtime version: 2.42.1
    0:00:03.943628728  1180 0x65c11c00 INFO                GST_INIT gst.c:722:init_post: GLib headers version: 2.42.1
    0:00:03.943882686  1180 0x65c11c00 INFO                GST_INIT gst.c:723:init_post: initialized GStreamer successfully
    0:00:03.947418930  1180 0x65c11c00 INFO    GST_DEVICE_PROVIDER_FACTORY gstdeviceproviderfactory.c:272:gst_device_provider_factory_get: getting device provider "v4l2deviceprovider"
    0:00:03.950284134  1180 0x65c11c00 INFO                    v4l2 v4l2_calls.c:592:gst_v4l2_open:<v4l2deviceprovider0> Opened device 'USB Camera-B4.04.27.1' (/dev/video0) successfully
    0:00:03.951209028  1180 0x65c11c00 INFO                    v4l2 gstv4l2object.c:1150:gst_v4l2_object_fill_format_list:<v4l2deviceprovider0> got 1 format(s):
    0:00:03.951586684  1180 0x65c11c00 INFO                    v4l2 gstv4l2object.c:1156:gst_v4l2_object_fill_format_list:<v4l2deviceprovider0>   YUYV
    0:00:03.952412672  1180 0x65c11c00 INFO                    v4l2 gstv4l2object.c:3914:gst_v4l2_object_get_caps:<v4l2deviceprovider0> probed caps: video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction){ 60/1, 50/1, 40/1, 30/1, 15/1 }; video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction){ 187/1, 150/1, 137/1, 125/1, 100/1, 75/1, 60/1, 50/1, 37/1, 30/1 }
    
  • There is also a second part but I don't manage to send a simple .txt file

  • Can you upload the file to pastebin or similar, and send a link?

    Does it work when you do

    video = new GLCapture(this, devices[0], 640, 480, 30);
    
  • edited March 2017

    Same bug, here is the link pastebin.com/HxGr8QSU

  • @matthieu Is this the complete output? Asking because I am not seeing the "Internal data stream error" in it, and everything looks plausible / fine up until the end of what is in the file.

  • Note: you can also capture the output by running the example from within a terminal and redirecting the output to a file like this:

    processing-java --sketch=/home/pi/sketchbook/libraries/glvideo/examples/SimpleCapture --run >/home/pi/out.txt 2>&1
    

    After some 30 seconds or so, you can terminate the execution with Ctrl+c.

  • Sorry for the late, I was over busy. I have installed ubuntu mate on the pi, new processing and the pseye library. Now i've got this error : libUsbException: USB error 6: error LibUsb.claimInterface: Ressources busy

  • When I tried upload to pi from another computer I've got this error : libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/004: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. org.usb4java.LibUsbException: USB error 3: Unable to open USB device: Access denied (insufficient permissions)

  • @matthieu I haven't used Ubuntu Mate, and this is no environment we can support. Sorry. Perhaps the community behind this distribution can help?

Sign In or Register to comment.