robotpy / robotpy-cscore

Moved to https://github.com/robotpy/mostrobotpy
Other
17 stars 12 forks source link

getting invalid jpeg on ubuntu 18 #72

Open oriagranat9 opened 5 years ago

oriagranat9 commented 5 years ago

while using the quick camera server example on ubuntu 18 im getting a warning: WARNING:cscore:USB Camera 0: invalid JPEG image received from camera

the server opens and i can browse to the website but i dont get any image

auscompgeek commented 5 years ago

It is likely that the camera you are using does not support the MJPEG format, which CSCore uses by default. Please check the video modes the camera supports (which are listed at the bottom of the webpage of the camera server).

oriagranat9 commented 5 years ago

Is there any way to use other formats with cscore

auscompgeek commented 5 years ago
virtuald commented 5 years ago

What kind of camera is it?

prensing commented 4 years ago

My guess, given oriagranat9 other bugs is this is a PS Eye camera. AFAIK, it does not support MJPEG, only YUYV.

You can select YUYV with

PS Eye camera needs to have its pixelformat set

    camera.setPixelFormat(cscore.VideoMode.PixelFormat.kYUYV)
auscompgeek commented 4 years ago

I'm tempted to call this an upstream documentation bug.