Hi, This is my problem, I don't have any errors. V4L2 API says that when you ask for a Width and Heigth, the driver will give you the max ones below the values you asked for. Meaning if you ask for 817x616, it will set 800x600 without returning any errors.
My DMESG (no pb, I have got my "/dev/video0"): usb 1-2: new full speed USB device using ohci_hcd and address 3 usb 1-2: configuration #1 chosen from 1 choice uvcvideo: Found UVC 1.00 device <unnamed> (046d:0991) input: UVC Camera (046d:0991) as /devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2:1.0/input/input9 An extract of my code, taken from the web (Capture.c): CLEAR (fmt); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (fd, VIDIOC_G_FMT, &fmt)) errno_exit ("VIDIOC_G_FMT"); fmt.fmt.pix.width = WB_FRAME_WIDTH; // 800 fmt.fmt.pix.height = WB_FRAME_HEIGHT; // 600 fmt.fmt.pix.pixelformat = WB_COLOR_FORMAT; // YUYV which is perfect for me fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; // Note VIDIOC_S_FMT may change width and height // So I check the *new* values fprintf (stderr, "width: %d\n" "height: %d\n", fmt.fmt.pix.width, fmt.fmt.pix.height); It prints 176 by 144! What am I doing wrong? (later, I check the buffer size allocated via MMAP: 50688 => 176 x 144 x 2) Any ideas? Where could be the problem? Regards, Cédric Lescop On Wed, March 18, 2009 13:52, Laurent Pinchart wrote: > Hi, > > > On Monday 16 March 2009 14:43:35 lesc...@esiee.fr wrote: > >> Hello everyone, >> >> >> I'm using this webcam to do some streaming and image analysis. >> When using Logitech's driver under MS Window, it works fine. I've access >> to all resolutions with the RGB24 format. > > The camera doesn't support the RGB24 format natively. Transcoding has to > be done in software. libv4l2 can help you there. > >> The problem is when running under Linux. I'm using uvcvideo driver via >> V4L2 but I can't make it work properly. >> The resolution gets stuck to 176x144 >> and the format is YUYV. >> >> Normally, the webcam is supposed to support a 1600x1200 resolution, how >> can I set it up correctly? > > You should be able to use higher resolutions. Can you describe your > problem in details, including the steps performed and the error messages > being printed ? > >> Thank you in advance, >> >> >> xioctl (fd, VIDIOC_ENUM_FMT, &fdq) >> >> returns me 2 formats only: MJPEG and YUYV. YUYV is fine for me but I >> can't reach 1600x1200, or 800x600 or even not 320x240!!!! > > Best regards, > > > Laurent Pinchart > > > _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel