[SOLVED] Paulo,
You were damn right!!!! It was a question of USB port. I tried again on an USB 2.0 port, here is my new results: { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' } { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 800, height = 600 } Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 960, height = 720 } Time interval between frame: 1/10, 1/5, { discrete: width = 1600, height = 1200 } Time interval between frame: 1/5, Exactly what I needed :) I might post a new message, to know if it is possible to configure or to hack the driver to get high resolution with high FPS or if it is a hardware problem?! Thank you very much again, Best Regards, Cédric Lescop On Thu, March 19, 2009 21:33, Paulo Assis wrote: > Cédric, > I think I failed to see the obvious. > > > Make sure your camera is connected to a USB2 hub. > Logitech cameras (and maybe all uvc devices) cut down available > resolutions when pluged to a slower USB1 pipe. > > > Best regards, > Paulo > > > 2009/3/19 <lesc...@esiee.fr> > > >> Paulo, >> >> >> >> Here what I have from "luvcview -L": >> >> >> luvcview version 0.2.1 Video driver: x11 >> A window manager is available >> video /dev/video0 /dev/video0 does not support read i/o >> { pixelformat = 'MJPG', description = 'MJPEG' } >> { discrete: width = 160, height = 120 } >> Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, >> { discrete: width = 176, height = 144 } >> Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, >> { discrete: width = 320, height = 240 } >> Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, >> { discrete: width = 352, height = 288 } >> Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, >> { discrete: width = 640, height = 480 } >> Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, >> { discrete: width = 800, height = 600 } >> Time interval between frame: 1/15, 1/10, 1/5, >> { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' } >> { discrete: width = 160, height = 120 } >> Time interval between frame: 1/15, 1/10, 1/5, >> { discrete: width = 176, height = 144 } >> Time interval between frame: 1/15, 1/10, 1/5, >> >> >> >> Does it mean I can't make it work under Linux? I know the webcam can go >> till 1600x1200 under MS Window with Logitech owner's drivers... Is >> there anything I could modify or configure to work it out? >> >> >> Regards, >> >> >> >> Cédric Lescop >> >> >> >> >> >> On Thu, March 19, 2009 16:03, Paulo Assis wrote: >> >>> Cédric, >>> Have you tried listing the device formats: >>> use "luvcview -L" or "guvcview --verbose" any of these commands should >>> print a list of available formats for your device >>> >>> Best regards, >>> Paulo >>> >>> >>> >>> lesc...@esiee.fr escreveu: >>>> Hi Paulo, >>>> >>>> >>>> >>>> >>>> I inserted you code into mine. I set: >>>> formatIn = V4L2_PIX_FMT_YUYV width = 640 height = 480 fps = 30 >>>> >>>> The result is: >>>> "Requested Format unavailable: get width 176 height 144" >>>> >>>> >>>> >>>> Like I usually got :( >>>> Thank you for trying to help me anyway, >>>> >>>> >>>> >>>> >>>> Cédric Lescop >>>> >>>> >>>> >>>> >>>> >>>> On Thu, March 19, 2009 10:25, Paulo Assis wrote: >>>> >>>> >>>> >>>>> Cédric Hi, >>>>> Could you pleaser try the following function, you will have to >>>>> make the necessary adaptations to your code. >>>>> >>>>> >>>>> int set_format(int fd, int formatIn, int width, int height, int >>>>> fps) { >>>>> struct v4l2_format fmt; struct v4l2_streamparm streamparm; int >>>>> ret=0; >>>>> >>>>> // set format >>>>> fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fmt.fmt.pix.width = width; >>>>> fmt.fmt.pix.height = height; fmt.fmt.pix.pixelformat = formatIn; >>>>> fmt.fmt.pix.field = V4L2_FIELD_ANY; >>>>> >>>>> ret = ioctl(fd, VIDIOC_S_FMT, &fmt); if (ret < 0) { >>>>> fprintf(stderr, "VIDIOC_S_FORMAT - Unable to set format\n"); >>>>> return (-1); } if ((fmt.fmt.pix.width != width) || >>>>> (fmt.fmt.pix.height != height)) { >>>>> fprintf(stderr, "Requested Format unavailable: get width %d height >>>>> %d >>>>> \n", >>>>> fmt.fmt.pix.width, fmt.fmt.pix.height); return(-2); } >>>>> >>>>> >>>>> streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; >>>>> streamparm.parm.capture.timeperframe.numerator = 1; >>>>> streamparm.parm.capture.timeperframe.denominator = fps; ret = >>>>> ioctl(fd,VIDIOC_S_PARM, &streamparm); if (ret < 0) { >>>>> fprintf(stderr, "VIDIOC_S_PARM error\n"); return (-3); } >>>>> return (0); } >>>>> >>>>> >>>>> Best regards, >>>>> Paulo >>>>> >>>>> >>>>> >>>>> >>>>> lesc...@esiee.fr escreveu: >>>>> >>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Linux-uvc-devel mailing list >>>>> Linux-uvc-devel@lists.berlios.de >>>>> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>> >>> >> >> >> > _______________________________________________ > Linux-uvc-devel mailing list > Linux-uvc-devel@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel > > _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel