Raspberry pi camera

hi, I have a raspberry pi 3B+, with processing installed, but I seem to not be able to use my camera module with processing. I’m using the GLvideo library, and just opening the simplecapture example.
As noted I did enable the camera in raspi-config, and added the line bcm2835_v4l2 to /etc/modules.
in terminal I can use the camera like normal with raspistill etc. and even the command ls -al /dev/video* returns 4 instances:

dev/video0
dev/video10
dev/video11
dev/video12

in processing I get a warning in the beginning,

failed to load plugin ‘path-to-library/gstreamer1.0/libgstopengl.so’: libpng12.so.0: cannot open shared object file: no such file or directory.

In that location I can find the libgstopengl.so file, but not the other one.

for devices processing finds

[0] “meal service 16.1”

and after nothing is displayed the following error occurs:

GLVideo: v4l2src0: Internal data stream error.
Debugging information: gstbasesrc.c(2939): got_base_src_loop (): /GstPipeline:Pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not linked (-1)

can anyone please help me with this?
(perhaps @gohai as he made the library right?)

1 Like

hi Whahahahaha


-A-
sorry, look

no help from there,


-B- system? camera?

does the RPI camera work?

Raspberry Pi Documentation - Camera ,
try some cmd from terminal

cat /sys/firmware/devicetree/base/model && echo ''

echo -n 'DEBIAN ' && lsb_release -sc

cat /proc/version | grep -o "Linux version............"

raspistill -v

v4l2-ctl --all

-C- hope you not set the KMS mode?

sudo raspi-config

5 interfacing
P1 camera
YES

7 advanced options
A7 GL Driver
G1 Legacy ( not KMS )

-D- Processing
installed processing version 3.5.3 ?
what library from where?

PDE 3.5.3 / Tools / Add Tools / Library /
GL Video 1.3 Gottfried Haider Hardware accelerated video on the Raspberry Pi & Linux

with a clean install i remember, that the camera should work!
( only video not ( Gstreamer problem ) need update )
( i would need to test on a new setup )

1 Like

hi @kll,

pity of Gohai, but hopeful you and/or others can help :slight_smile:

as mentioned in my original post, I’m using a raspberry pi 3b+, with a new image of raspbian (September update) on it. I installed processing through the terminal (Download - Processing for Pi).
The camera is the raspberry pi camera V1.3 connected to the slot next to the HDMI port and works through terminal like mentioned before.

terminal responses:

Raspberry Pi 3 Model B Plus Rev 1.3

DEBIAN buster

Linux version 4.19.75-v7+

"raspistill" Camera App (commit )
Camera Name ov5647
Width 2592, Height 1944, filename (null)
Using camera 0, sensor mode 0
GPS output Disabled
Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture
Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Closing down
Close down completed, all components disconnected, disabled and destroyed

(image of camera appears on display and takes a photo)

Driver Info:
	Driver name      : bm2835 mmal
	Card type        : mmal service 16.1
	Bus info         : platform:bcm2835-v4l2
	Driver version   : 4.19.75
	Capabilities     : 0x85200005
		Video Capture
		Video Overlay
		Read/Write
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x05200005
		Video Capture
		Video Overlay
		Read/Write
		Streaming
		Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
	Width/Height      : 1024/768
	Pixel Format      : 'JPEG' (JFIF JPEG)
	Field             : None
	Bytes per Line    : 0
	Size Image        : 786432
	Colorspace        : JPEG
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Format Video Overlay:
	Left/Top    : 150/50
	Width/Height: 1024/768
	Field       : None
	Chroma Key  : 0x00000000
	Global Alpha: 0xff
	Clip Count  : 0
	Clip Bitmap : No
Framebuffer Format:
	Capability    : Extern Overlay
			Global Alpha
	Flags         : Overlay Matches Capture/Output Size
	Width         : 1024
	Height        : 768
	Pixel Format  : 'YU12'
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 30.000 (30000/1000)
	Read buffers     : 1

User Controls

                     brightness 0x00980900 (int)    : min=0 max=100 step=1 default=50 value=50 flags=slider
                       contrast 0x00980901 (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                     saturation 0x00980902 (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                    red_balance 0x0098090e (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                   blue_balance 0x0098090f (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
           power_line_frequency 0x00980918 (menu)   : min=0 max=3 default=1 value=1
                      sharpness 0x0098091b (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                  color_effects 0x0098091f (menu)   : min=0 max=15 default=0 value=0
                         rotate 0x00980922 (int)    : min=0 max=360 step=90 default=0 value=0 flags=modify-layout
             color_effects_cbcr 0x0098092a (int)    : min=0 max=65535 step=1 default=32896 value=32896

Codec Controls

             video_bitrate_mode 0x009909ce (menu)   : min=0 max=1 default=0 value=0 flags=update
                  video_bitrate 0x009909cf (int)    : min=25000 max=25000000 step=25000 default=10000000 value=10000000
         repeat_sequence_header 0x009909e2 (bool)   : default=0 value=0
            h264_i_frame_period 0x00990a66 (int)    : min=0 max=2147483647 step=1 default=60 value=60
                     h264_level 0x00990a67 (menu)   : min=0 max=11 default=11 value=11
                   h264_profile 0x00990a6b (menu)   : min=0 max=4 default=4 value=4

Camera Controls

                  auto_exposure 0x009a0901 (menu)   : min=0 max=3 default=0 value=0
         exposure_time_absolute 0x009a0902 (int)    : min=1 max=10000 step=1 default=1000 value=1000
     exposure_dynamic_framerate 0x009a0903 (bool)   : default=0 value=0
             auto_exposure_bias 0x009a0913 (intmenu): min=0 max=24 default=12 value=12
      white_balance_auto_preset 0x009a0914 (menu)   : min=0 max=10 default=1 value=1
            image_stabilization 0x009a0916 (bool)   : default=0 value=0
                iso_sensitivity 0x009a0917 (intmenu): min=0 max=4 default=0 value=0
           iso_sensitivity_auto 0x009a0918 (menu)   : min=0 max=1 default=1 value=1
         exposure_metering_mode 0x009a0919 (menu)   : min=0 max=2 default=0 value=0
                     scene_mode 0x009a091a (menu)   : min=0 max=13 default=0 value=0

JPEG Compression Controls

            compression_quality 0x009d0903 (int)    : min=1 max=100 step=1 default=30 value=30

just checked raspi-config for the kms settings and I hadn’t changed it before, so I assume it was correct? (just selected the legacy just in case).

processing is version 3.5.3 and I installed all libraries through the built-in library manager.

I honestly don’t know what it could be…

1 Like

so actually i have same hardware and system
but again?
did you install library?

  • video 1.0.1
  • GLvideo 1.3 ( ONLY )

( better remove ?both? and do again )
and run what example exacly?

Yes i had both of these Versions of the libraries, but Will reinstall now.
I’m trying the simplecapture example, haven’t tried another (don’t think there is one for video capture?)

alright update time :stuck_out_tongue:
I installed the pre-made image that’s provided on the pi.processing website and started that on my pi.
This somehow made everything work, so I guess I’ll just leave it like this now…

2 Likes

you are right, i just finished a new setup
2019-09-26-raspbian-buster-full.zip
and processing 3.5.3 with GL-Video 1.3
NOT work now for Video AND Camera.


BUT my old system still works ( with my own build repaired also for video )
even i run Raspbian update.


so you did the right thing using the old image
until there is a update from the processing video side.


update: and there is:
i try again,
delete libraries/video & GLvideo
download from
https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4 ,
unzip video-2.0-beta4.zip
as new video lib
play video and see RPI camera ok

also plug in a web cam, change [0] to [1]


as i run here on a 8GB USB stick ( as Master setup )
i deleted from the lib /mac/win32/win64/src and also the zip.
now can burn new uSD cards (using the SD Card Copier Tool )


3 Likes