processing / processing-video

GStreamer-based video library for Processing
274 stars 130 forks source link

120fps camera on Windows - error #201

Closed kkirklewski closed 1 year ago

kkirklewski commented 2 years ago

I try to run 120fps camera in Processing 4.08b on Windows 10, but I get an error saying:

BaseSrc: [ksvideosrc0] : Internal data stream error.

I use basic "GettingStartedCapture" example from the new Video 2.1 library, with the setting below. I work on 144hz screen (if that matters).

cam = new Capture(this, 320, 240, "Arducam OV9281 USB Camera", 120);

The same sketch+setting works fine on MacBook M1 Pro, Processing 4.08b for Intel, 120fps display.

Link to the camera: https://www.arducam.com/product/arducam-120fps-global-shutter-usb-camera-board-1mp-720p-ov9281-uvc-webcam-module-with-low-distortion-m12-lens-without-microphones-for-computer-laptop-android-device-and-raspberry-pi/

My insights:

I would really appreciate some help from more skilled programmer.

codeanticode commented 1 year ago

@kkirklewski It could be the case that the GStreamer capture plugin on Windows (ksvideosrc) does not fully support all the specs of your camera. The corresponding capture plugin on Mac (avfvideosrc) is completely separate, and sounds like it offers better support for the Arducam device. One thing you can try is to launch a capture pipeline like this:

cam = new Capture(this, 640, 480, "pipeline:ksvideosrc device-index=0 ! video/x-raw, width=640, height=480, framerate=30/1"); 

trying different values for framerate, including 120/1, maybe that works better. But I don't thing we can do much from the video library itself (GStreamer has to include better support for this camera on Windows).