Processing on Raspberry pi 4 very slow?

i try newest setup:
2019-09-26-raspbian-buster-full.zip
incl latest release of video lib:
https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4 !

and see 25FPS for 640*480 from my RPI cam v1 (rev 1.3 )

2 Likes

That was my issue, I got good fps for a low resolution screen but it got unusable when in fullscreen. Right now I am trying the GL Video library instead of IP Capture to see whether it handles video better. I haven’t been able to get it running though, I tried the example sketch “PixelArrayCapture” of the library and got this error message:

(java:10870): GStreamer-WARNING **: 10:34:05.771: Failed to load plugin '/home/pi/sketchbook/libraries/glvideo/library/linux-armv6hf/gstreamer-1.0/libgstopengl.so': libpng12.so.0: cannot open shared object file: No such file or directory
GLVideo requires the P2D or P3D renderer.

(java:10870): GLib-CRITICAL **: 10:34:06.001: g_error_free: assertion 'error != NULL' failed
RuntimeException: Could not load GStreamer

It looks like some sort of dependency issue? I have checked and the file does exist in that directory.

Any help would be appreciated!

2 Likes

if you have a new setup the

  • video

AND

  • GLvideo

( both from contribution manager ) not work anymore.

pls. load the new video lib as i link above.

if you have a older system ( as the raspbian zip i used above )
GLvideo works for the capture but for the
video need a repair, i did by a own build might read here

but best is just do a new setup / new processing install /
and video lib from
https://github.com/processing/processing-video/releases ,


all only tested on RPI3B+ hardware

3 Likes

I am using the latest Raspbian Buster release. Sorry I am kind of a noob at this, how do I proceed to install the new video library?

Thanks!

1 Like

did you download the file
https://github.com/processing/processing-video/releases/download/r6-v2.0-beta4/video-2.0-beta4.zip

and unzip it to /home/pi/sketchbook/libraries/video


i did it on a clean install, so no idea what you have to delete first
( it is very big and most of it you not need / ( /mac, /winxx, /src ) can delete later after testing )

1 Like

I unzipped the file in the libraries directory. I tried the “Reverse” example and got this error:

0:00:01.097548975 e[334m24339e[00m 0x93071b50 e[31;01mERROR  e[00m e[00m                 omx gstomx.c:1154:gst_omx_component_set_parameter:<omxh264dec-omxh264dec0>e[00m Set video_decode parameter at index 0x02000001: Bad parameter (0x80001005)
0:00:01.098285066 e[334m24339e[00m 0x93071b50 e[31;01mERROR  e[00m e[00m                 omx gstomx.c:1333:gst_omx_port_update_port_definition:<omxh264dec-omxh264dec0>e[00m Updated video_decode port 130 definition: Bad parameter (0x80001005)

And trying the GL Video example again, I’m geting the same error message as before.

1 Like

old video and GLvideo ( from contribution manager )
are not compiled for that new system, delete them.

new unzip
video

RPI cam and video work,
but the reverse ? is stuck at beginning?
try speed example…

but as i say, i not have your hardware

1 Like

I can’t try the capture examples because I am getting the stream over the network. So i just delete the video and gl video libraries? Then unzip the new video library into the same directory?

1 Like

so give me the code ( with public link ) i could try it?


yes, same as you had it from contribution manager
/libraries/video/…

if i show you a tree picture
terminal: tree -d
i would only confuse you as i changed my sketchbook path (preferences)
to same style as it is on windows:
Documents/Processing/libraries/video

2 Likes

hello,
i’ve got a raspberry pi4 too (4 giga) and testing some basic sketches and i noticed too a really really bad performance for processing. Not involving video capture but even simple moving ellipse around.
This is really sad because the main reason i’ve got the rasp is for processing installations.

1 Like

Have you tried enabling fake kms? However one thing I found doesn’t work for me on PI4 is video capture.

2 Likes

yes, without any improvements. I even set graphic memory to 256, but maybe is not enough.

1 Like

As a straight 1-1 comparison, the install on the pi4 I just got was much more unstable and slower then on the pi3. The other issue is that it appears i2c is broken, as my program crashes whenever I call anything i2c related.

I feel like I remember reading somewhere that the person who ported processing to the Pi stopped working on the project, which is a shame. I hope someone else can take up the mantle, as I love processing and I would really love the extra performance of the Pi 4 for my applications.

1 Like

There really is no reason why processing should be slower on PI4, in fact in my experience with PiCrate it is substantially faster. However I have not tried to install vanilla processing on my PI4. In my most recent release I use the jdk11 version installed by Buster, I use Fake KMS. Anyone wishing to work on vanilla processing for the PI should probably clone processing4, but try and work with the Buster installed jdk11 (32 bit hard float etc), rather than bundle the jdk in the vanilla processing way. That way they can take advantage of improvements/developments from PI side, it seems PI4 still has a few rough edges, but it is much improved since I got mine last year.

1 Like

Recently Video Capture is working for me (presumably after some Buster updates) with PiCrate using latest beta release of processing video library (but there are still some rough edges with video library).

1 Like

@ITman496 Regarding I2C is this interesting?

That is interesting! I’ll admit I’m a bit of a noob when it comes to all this stuff, so do you have a guide on how to set up processing on the pi 4 in a way that runs nicely and uses the correct version of java? I was relying on the preconfigured image for the pi3 to use it for my project, which relies on the hardware io libraries. I’m hoping like heck that an equivalent all nice wrapped up setup gets made for the pi 4!

@ITman496 Vanilla Processing is wedded to the idea of using a built in jdk, so unless you do bit a of work you are stuck with it (previously it was quite easy to substitute the jdk see http://cagewebdev.com/raspberry-pi-running-processing-on-your-raspi/) but that may not work now. The official processing release for the PI was very much tailored to RaspberryPI3B+ and Stretch OS.

Ah, understood. I’m not sure how you achieved it, and so I suppose I will be like many, and waiting for an official pi 4 release. Hopefully it doesn’t take too long!

Same problem when fullscreen! My code is a very simple video playback when triggered by an IR sensor. I wasn’t even using HD videos to test. Ridiculously slow and low fps even on my friend’s Pi 400, not to mention the 1GB Pi 3 that I initially tested on. I’m using Processing 3.