processing / processing-video

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

camera capture not working in MJPEG mode #46

Open gsibaldi opened 8 years ago

gsibaldi commented 8 years ago

Hello, I'm trying to work with Processing3 on Windows 10 and an USB camera which can be set to stream in YUV or MJPEG mode. The YUV mode works nicely but MJPEG does not work at all: all camera modes and resolutions are listed in cameras[] array, but when I choose one of the MJPEG modes camera.available() is false and no image data is streaming. This is a huge problem for me because YUV streams have very low frame rates and great latency, MJPEG streams instead can be set to work up to 120 fps and mostly unnoticeable latency. The DirectShow preview utility works normally with all MJPEG streaming modes, the Windows 10 default camera application too, and also Adobe Air AS3 applications I developed in the past are able to get the MJPEG stream. Anyone knows how to solve this? Thank you in advance...

AmnonOwed commented 7 years ago

👍 Just wanted to say +1. I'm using a Logitech C922 webcam on Windows 8 (64 bit) and seeing the same performance issues. The hardware is capable of 30/60 fps at high resolutions, but only with MJPEG. Would be great if this was supported by the processing-video library.

I believe the processing-video library is currently based on GStreamer 0.10, so perhaps at some point the move forward to GStreamer 1.x can be made, allowing much better performance.

AntonioFrog commented 7 years ago

I meet the same problem now, no image data with my camera(MJPEG,120fps)

gell1029 commented 7 years ago

I'm facing the same problem with C922 and Processing 3 on Windows 10 Pro (64bit), although I bought this camera for only this purpose. I really hope that the solution will be found.

codeanticode commented 5 years ago

@gell1029 @AntonioFrog @gsibaldi @AmnonOwed Have you tried the latest beta of the video library? It uses GStreamer 1.x so it should have better support for camera capture.