[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Problem with Camera


I've noticed a number of cameras don't work with the v4l2 backend on linux...

However the opencv backend seems to work with more cameras.

apt-get install python-opencv

Then do:

import os
os.environ['PYGAME_CAMERA'] = 'opencv'

before initialising the camera module.

Or set it with your shell...
export PYGAME_CAMERA=opencv


On Fri, Aug 7, 2009 at 11:25 PM, Nirav Patel <olpc@xxxxxxxxxxxxxx> wrote:
Unfortunately, it seems your camera only outputs JPEG frames, which
are not currently supported by the camera module.  This support might
show up in the future.


On Fri, Aug 7, 2009 at 2:02 PM, Rafael Pinto<kurama.youko.br@gmail.com> wrote:
> Hi!
> I'm trying to use the Capture class in this tutorial:
> http://www.pygame.org/docs/tut/camera/CameraIntro.html (with PyGame
> 1.91)
> But the start() method is giving me this error: "SystemError:
> ioctl(VIDIOC_S_FMT) failure: no supported formats". It seems to relate
> to the pixel format used by the camera.
> My webcam is a Microdia/Sonix 0c45:612c SN9C110, and it works fine
> with gstreamer and cheese (but not with camorama and mplayer).
> Anyone knows some workaround for this? Thanks!
> --
> Rafael C.P.
>  http://www.inf.ufrgs.br/~rcpinto