Processing can't find the camera - Video Libraries don't work

Thank you for coming up with a workaround to this it’s been driving me nuts.

autovideosrc defaults to yuyv, which is slow at higher resolutions. To get mjpeg, I used this pipeline:

cam = new Capture(this, 1920, 1080, "pipeline: ksvideosrc device-index=0! image/jpeg, width=1920, height=1080, framerate=30/1 ! jpegdec ! videoconvert");

I had to specify my resolution twice so that Processing and gstreamer were on the same page, but it might not be necessary in all cases.

2 Likes