On Tue, Aug 31, 2010 at 4:31 PM, <linux-uvc-devel-requ...@lists.berlios.de>wrote:
> Send Linux-uvc-devel mailing list submissions to > linux-uvc-devel@lists.berlios.de > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel > or, via email, send a message with subject or body 'help' to > linux-uvc-devel-requ...@lists.berlios.de > > You can reach the person managing the list at > linux-uvc-devel-ow...@lists.berlios.de > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Linux-uvc-devel digest..." > > > Today's Topics: > > 1. Re: Running multiple webcams on the same hub (Martin) > 2. [UVC] [Linux-UVC] put_unaligned_le32 (Palmax Maverick) > 3. Interlaced UVC camera? (Andrew Leech) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 30 Aug 2010 12:30:48 +0100 > From: Martin <m_uvc...@ml1.co.uk> > To: linux-uvc-devel@lists.berlios.de > Subject: Re: [Linux-uvc-devel] Running multiple webcams on the same > hub > Message-ID: <4c7b9668.6020...@ml1.co.uk> > Content-Type: text/plain; charset=ISO-8859-1 > > On 27/08/10 15:14, Martin wrote: > > The problem: > > > > From reading around this list and elsewhere, it appears that you simply > > cannot run more than one webcam video stream per USB root hub. > > > > When enabled for video streaming, the webcam reserves the full > > isochronous bandwidth needed to stream data at the selected resolution > > and framerate, regardless... > > Kindly, a direct reply suggested: > > #### > ...the only way I've managed to get multiple cameras working was by > using the mjpeg format. I've got this way working 3 cameras at 10fps > 640x480 resolution on same root usb hub - and it looked like I might be > able to get a fourth one. I would suggest you start by checking the > specs for your cameras - if they are supposed to support mjpeg. > > Don't know how you are trying to get them working on mjpeg, but I used > the command: > > ffmpeg -vcodec mjpeg -f video4linux2 -r 10 -s 640x480 -i /dev/video0 > ouputfile.ext > > The '-vcodec mjpeg' has to go in front of the '-i' option in order to > request the stream in mjpeg format from the camera - after the '-i' it > will merely convert the stream to mjpeg. > #### > > Tried that and a few variations... Although the mjpeg streaming is > accepted, there is no output. I've had the same non-result with other > applications I've tried for getting a mjpeg stream from the WV060 webcam > and the uvcvideo driver. > > > > *A possible solution* ? > > > > Instead, could the UVC driver 'simulate' a reduced framerate by instead > > using the "STILL_IMAGE_FRAME" mode of the webcam and grab for itself a > > set number of images per second? Or even only when polled by a read from > > the user application? > > > > On *nix, "everything is a file"... Could the uvc driver accept reading > > of /dev/videoX by the command "cp" so that still image data is copied, > > formatted for a jpg or png? > > > > Could the "quirks" setting be abused to set the image grab rate? Or some > > other neater method? > > That still looks to be the best solution. The webcam is supposed to > support still image capture, but how do I do that?! Is there a nice > little snippet of C code that I can compile to grab a still image to a > jpg or png? > > > A gruesome work-around that does work is to use old USB 1.1 hubs to > force the WC060 to a lower data rate. You can then have many webcams > connected to your system! However... > > The WC060 reduces the maximum resolution to 640x480 rather than reduce > the framerate. Quite a waste for the 1600x1200 that it supports; > > The USB 1.1 hubs must be plugged directly into the USB 2.0 root hub for > a USB 1.1 root hub to be allocated (or for the UVC driver to work?); > > Use "lsusb -t" and "lsusb -v" to see what is happening. > > > The USB 1.1 hubs that I picked up for very cheap correctly announce > themselves as USB 1.1 but have a product name of "USB hub 2.0". Very > Marketing-esq nasty! > > eg: > > Bus 003 Device 002: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / > D-Link DUB-H4 USB 2.0 Hub > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 9 Hub > bDeviceSubClass 0 Unused > bDeviceProtocol 0 Full speed (or root) hub > bMaxPacketSize0 8 > idVendor 0x05e3 Genesys Logic, Inc. > idProduct 0x0606 USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub > bcdDevice 7.02 > iManufacturer 1 ALCOR > iProduct 2 USB Hub 2.0 > > > Note: "Full speed" = USB 1.1 and "High speed" = USB 2.0 ... Hence, > despite the confusing "2.0" in the descriptors, it is actually USB 1.1. > > > > Is the UVC driver still being developed? Are there features support yet > to be added? > > Or is all this a problem of the user-side application software? > > > Regards, > Martin > > > > > Further details: > > > > I'm trying to use two webcams simultaneously: > > > > iManufacturer 1 Sweex > > iProduct 2 WC060 Series HD Webcam > > > > > > On separate hubs, they work fine. On the same hub, the second one to > > start shows the error: > > > > "Error starting stream VIDIOC_STREAMON: No space left on device". > > > > I've only got the one root hub on the system I want to use for the two > > webcams! > > > > > > Their descriptors show: > > > > bFrameIntervalType 2 > > dwFrameInterval( 0) 2000000 > > dwFrameInterval( 1) 4000000 > > > > > > Can I tweak the UVC driver to preferentially choose the slower frame > > rate available? > > > > Aside: The MJPG format doesn't seem to work, nor are any compression > > settings visible... > > > > > > Given a few hints or a patch, I can hack the kernel module to test :-) > > > > This is running on Gentoo, kernel 2.6.34 using the in-kernel uvc module. > > > > Any comment/ideas welcomed. > > > > Regards, > > Martin > > > > > > > > > > From lsusb -v (excerpt): > > > > VideoStreaming Interface Descriptor: > > bLength 34 > > bDescriptorType 36 > > bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) > > bFrameIndex 9 > > bmCapabilities 0x00 > > Still image unsupported > > wWidth 1600 > > wHeight 1200 > > dwMinBitRate 768000 > > dwMaxBitRate 196608000 > > dwMaxVideoFrameBufferSize 3840000 > > dwDefaultFrameInterval 2000000 > > bFrameIntervalType 2 > > dwFrameInterval( 0) 2000000 > > dwFrameInterval( 1) 4000000 > > VideoStreaming Interface Descriptor: > > bLength 42 > > bDescriptorType 36 > > bDescriptorSubtype 3 (STILL_IMAGE_FRAME) > > bEndpointAddress 0 > > bNumImageSizePatterns 9 > > wWidth( 0) 640 > > wHeight( 0) 480 > > wWidth( 1) 352 > > wHeight( 1) 288 > > wWidth( 2) 320 > > wHeight( 2) 240 > > wWidth( 3) 176 > > wHeight( 3) 144 > > wWidth( 4) 160 > > wHeight( 4) 120 > > wWidth( 5) 800 > > wHeight( 5) 600 > > wWidth( 6) 1280 > > wHeight( 6) 960 > > wWidth( 7) 1280 > > wHeight( 7) 1024 > > wWidth( 8) 1600 > > wHeight( 8) 1200 > > bNumCompressionPatterns 9 > > > > ------------------------------ > > Message: 2 > Date: Mon, 30 Aug 2010 19:53:13 +0200 > From: Palmax Maverick <pal...@gmail.com> > To: Developers of UVC <linux-uvc-devel@lists.berlios.de> > Subject: [Linux-uvc-devel] [UVC] [Linux-UVC] put_unaligned_le32 > Message-ID: > > <aanlkti=52te1z7ozpm+pq000q8-zvvhj2_j973kuu...@mail.gmail.com<52te1z7ozpm%2bpq000q8-zvvhj2_j973kuu...@mail.gmail.com> > > > Content-Type: text/plain; charset=UTF-8 > > Hello, > > > I'm trying to understand uvc_set_video_ctrl ( > http://lxr.linux.no/linux+v2.6.35/drivers/media/video/uvc/uvc_video.c#L209 > ), that its a function for sending and receiving controls. > > I don't know why do you use put_unaligned_le32 for dwMaxVideoFrameSize > and dwMaxPayloadTransferSize (these parameters are explained at the > table 4-47 of UVC especification pdf). > > > Thanks for your help > Palmax > > > ------------------------------ > > Message: 3 > Date: Tue, 31 Aug 2010 16:31:12 +1000 > From: "Andrew Leech" <coronasen...@gmail.com> > To: <linux-uvc-devel@lists.berlios.de> > Subject: [Linux-uvc-devel] Interlaced UVC camera? > Message-ID: <000701cb48d6$1e432830$5ac978...@gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > I?m trying to develop a UVC video grabber device, which captures interlaced > PAL video. My hardware (custom firmware on LPC3131 with a TVP5147 analog > frontend) is working to the point of streaming video but I can?t get the > computer to deinterlace the picture. The desired frame specs are a > resolution of 768x576 @ 25fps, YUY2 16Bit. The video I?m streaming > currently > is each field separately, ie half frames at double the frame rate of > 768x288 > @ 50fps. The way I read the UVC specs this should be a supported standard > (One field per sample). > I can?t seem to get the computer to think so however, it just shows the > half > height double rate frames. Is one field per sample format supported in the > UVC driver, and if so how you to inform the driver of the format correctly. > > I?ve included my descriptors in the hope someone might see something there > that?s askew, but I feel I?ve tried a lot of different things there with no > positive results. One thing I noticed, it?s reporting 2 fields per frame in > the interlaced flags, whereas bit 1 set should read as One field per frame > according to the spec, so lsusb is reporting wrong?..? a minor bug. UVCview > in windows reports it right for what it?s worth. On the flip side, lsusb > seems to report bmVideoStandards correctly unlike UVCview, which gets those > flags offset. > > I?m guessing that the interleaved line format is more common for > interlaced, > but that would require full frames worth of ram in my hardware which I just > don?t have (I?ve got 96KB total ram where a half frame requires ~430KB ). > > I?ve been working on this for over a week and am really at a loss, any help > would be very much appreciated. > > Thanks, > Andrew Leech > > Device Descriptor: > ? bLength??????????????? ???????????????????????????? 18 > ? bDescriptorType???????? ?????????????????? 1 > ? bcdUSB?????????????? ?????????????????????????????? 2.00 > ? bDeviceClass????????? ????????????????????????? 239 Miscellaneous Device > ? bDeviceSubClass???????? ?????????????????? 2 ? > ? bDeviceProtocol???????? ??????????????????? 1 Interface Association > ? bMaxPacketSize0??????? ????????????????? 64 > ? idVendor?????????? ??????????????????????????????? 0x14e3 > ??idProduct????????? ??????????????????????????????? 0x8000 > ??bcdDevice??????????? ???????????????????????????? 1.00 > ? iManufacturer?????????? ????????????????????? 1 > ??iProduct??????????????? ???????????????????????????? 2 > ??iSerial????????????? ??????????????????????????????????? 3 > ??bNumConfigurations????? ????????????? 1 > ? Configuration Descriptor: > ??? bLength???????????????? ????????????????????????? 9 > ??? bDescriptorType???????? ???????????????? 2 > ??? wTotalLength????????? ????????????????????? 191 > ??? bNumInterfaces????????? ???????????????? 2 > ??? bConfigurationValue???? ???????????? 1 > ??? iConfiguration????????? ???????????????????? 0 > ????bmAttributes???????? ??????????????????????? 0xc0 > ????? ????????????????????????????????????????????????????????? Self > Powered > ??? MaxPower????????????? ??????????????????????? 100mA > ??? Interface Association: > ????? bLength???????????????? ??????????????????????? 8 > ????? bDescriptorType??????? ??????????????? 11 > ????? bFirstInterface???????? ?????????????????? 0 > ????? bInterfaceCount???????? ?????????????? 2 > ??? ??bFunctionClass???????? ?????????????????? 14 Video > ????? bFunctionSubClass?????? ???????????? 3 Video Interface Collection > ????? bFunctionProtocol?????? ????????????? 0 > ??????iFunction?????????????? ??????????????????????? 2 > ????Interface Descriptor: > ????? bLength???????????????? ??????????????????????? 9 > ????? bDescriptorType???????? ?????????????? 4 > ????? bInterfaceNumber??????? ??????????? 0 > ????? bAlternateSetting?????? ?????????????? 0 > ????? bNumEndpoints?????????? ????????????? 1 > ????? bInterfaceClass??????? ?????????????????? 14 Video > ????? bInterfaceSubClass????? ???????????? 1 Video Control > ????? bInterfaceProtocol????? ????????????? 0 > ??????iInterface????????????? ??????????????????????? 2 > ??????VideoControl Interface Descriptor: > ??????? bLength??????????????? ?????????????????????? 13 > ??????? bDescriptorType??????? ????????????? 36 > ??????? bDescriptorSubtype????? ???????? 1 (HEADER) > ??????? bcdUVC?????????????? ???????????????????????? 1.10 > ??????? wTotalLength?????????? ???????????????? 51 > ??????? dwClockFrequency?? ????????????? 480.000000MHz > ??????? bInCollection?????????? ????????????????? 1 > ??????? baInterfaceNr( 0)?????? ????????????? 1 > ????? VideoControl Interface Descriptor: > ??????? bLength??????????????? ?????????????????????? 17 > ??????? bDescriptorType??????? ????????????? 36 > ??????? bDescriptorSubtype????? ???????? 2 (INPUT_TERMINAL) > ?? ?????bTerminalID???????????? ????????????????? 1 > ??????? wTerminalType????? ?????????????????? 0x0201 Camera Sensor > ??????? bAssocTerminal????????? ????????????? 0 > ??????? iTerminal?????????????? ????????????????????? 0 > ????????wObjectiveFocalLengthMin????? 0 > ??????? wObjectiveFocalLengthMax????? 0 > ??????? wOcularFocalLength??????????? ?? 0 > ??????? bControlSize????????????????? ??????????? 2 > ??????? bmControls?????????? ???????????????????? 0x0000000f > ???????? ? Scanning Mode > ???????? Auto-Exposure Mode > Auto-Exposure Priority > ????????????????????????????????????????????????????????? > Exposure > Time (Absolute) > ????? VideoControl Interface Descriptor: > ??????? bLength???????????????? ????????????????????? 9 > ??????? bDescriptorType??????? ????????????? 36 > ??????? bDescriptorSubtype????? ???????? 3 (OUTPUT_TERMINAL) > ??????? bTerminalID???????????? ????????????????? 3 > ??????? wTerminalType????? ?????????????????? 0x0101 USB Streaming > ??????? bAssocTerminal????????? ????????????? 0 > ??????? bSourceID?????????????? ??????????????????? 5 > ??????? iTerminal?????????????? ????????????????????? 0 > ??????VideoControl Interface Descriptor: > ??????? bLength??????????????? ?????????????????????? 12 > ??????? bDescriptorType??????? ????????????? 36 > ??????? bDescriptorSubtype????? ???????? 5 (PROCESSING_UNIT) > ??????? bUnitID???????????????? ?????????????????????? 5 > ??????? bSourceID?????????????? ??????????????????? 1 > ??????? wMaxMultiplier????????? ????????????? 0 > ??????? bControlSize??????????? ????????????????? 2 > ??????? bmControls???? ?????????????????????????? 0x00000001 > ????????? Brightness > ??????? iProcessing???????????? ??????????????????? 0 > ????????bmVideoStandards???? ??????????? 0x 4 > ??????? ??????????????????????? ? PAL - 625/50 > ????? Endpoint Descriptor: > ??????? bLength???????????????? ????????????????????? 7 > ??????? bDescriptorType???????? ???????????? 5 > ??????? bEndpointAddress???? ???????????? 0x81? EP 1 IN > ??????? bmAttributes??????????? ???????????????? 3 > ????????? Transfer Type ???????????????????????? Interrupt > ????????? Synch Type?????????????? ??????????????? None > ????????? Usage Type?????????????? ?????????????? Data > ??????? wMaxPacketSize???? ???????????????? 0x0008? 1x 8 bytes > ??????? bInterval?????????????? ?????????????????????? 8 > ??? Interface Descriptor: > ????? bLength???????????????? ??????????????????????? 9 > ????? bDescriptorType???????? ?????????????? 4 > ????? bInterfaceNumber??????? ??????????? 1 > ????? bAlternateSetting?????? ?????????????? 0 > ????? bNumEndpoints?????????? ????????????? 0 > ????? bInterfaceClass??????? ?????????????????? 14 Video > ????? bInterfaceSubClass????? ???????????? 2 Video Streaming > ????? bInterfaceProtocol????? ????????????? 0 > ??????iInterface????????????? ??????????????????????? 0 > ??????VideoStreaming Interface Descriptor: > ??????? bLength??????????????????????????? ?????????? 14 > ??????? bDescriptorType??????????????????? ? 36 > ??????? bDescriptorSubtype????????????? ?1 (INPUT_HEADER) > ??????? bNumFormats???????????? ????????????? 1 > ??????? wTotalLength?????????????????????? ???? 71 > ??????? bEndPointAddress???????? ???????? 131 > ??????? bmInfo????????????????????????????? ?????????? 0 > ??????? bTerminalLink?????????????????????? ???? 3 > ??????? bStillCaptureMethod?????????? ? 1 > ??????? bTriggerSupport???????????????????? ? 1 > ??????? bTriggerUsage?????????????????????? ??? 0 > ??????? bControlSize??????????????????????? ????? 1 > ??????? bmaControls( 0)??????????????????? ?? 27 > ????? VideoStreaming Interface Descriptor: > ??????? bLength??????????????????????????? ?????????? 27 > ??????? bDescriptorType??????????????????? ? 36 > ??????? bDescriptorSubtype??????????? ?? 4 (FORMAT_UNCOMPRESSED) > ??????? bFormatIndex??????????????????????? ?? 1 > ??????? bNumFrameDescriptors???? ? 1 > ??????? guidFormat {59555932-0000-1000-8000-00aa00389b71} > ??????? bBitsPerPixel????????????????????? ?????? 16 > ??????? bDefaultFrameIndex?????? ?????? 1 > ??????? bAspectRatioX?????????????????????? ?? 4 > ??????? bAspectRatioY?????????????????????? ??? 3 > ??????? bmInterlaceFlags???????????????? ??? 0x67 > ??????? ??Interlaced stream or variable: Yes > ????????? Fields per frame: ?????????????????? 2 fields > ????????? Field 1 first: ????????????????????????????? Yes > ????????? Field pattern: ????????????????????????? Regular pattern of > fields 1 and 2 > ????????? bCopyProtect????????????????????? ??? 0 > ????? VideoStreaming Interface Descriptor: > ??????? bLength??????????????????????????? ?????????? 30 > ??????? bDescriptorType??????????????????? ? 36 > ??????? bDescriptorSubtype???????? ????? 5 (FRAME_UNCOMPRESSED) > ??????? bFrameIndex???????????????????????? ??? 1 > ??????? bmCapabilities?????????????????? ?????? 0x03 > ?????? Still image supported > ????????? Fixed frame-rate > ??????? wWidth??????????????????????????? ??????????? 768 > ??????? wHeight?????????????????????????? ??????????? 288 > ??????? dwMinBitRate??????????????? ?????????? 174489600 > ??????? dwMaxBitRate??????????????? ????????? 174489600 > ????? ??dwMaxVideoFrameBufferSize????? 436224 > ??????? dwDefaultFrameInterval ???? 200000 > ??????? bFrameIntervalType??????? ?????? 1 > ??????? dwFrameInterval( 0)??????????? ? 200000 > ????? VideoStreaming Interface Descriptor: > ??????? bLength???????????????????????????? ????????? 6 > ?? ?????bDescriptorType??????????????????? ? 36 > ??????? bDescriptorSubtype????????? ???? 13 (COLORFORMAT) > ??????? bColorPrimaries????????????????? ????? 1 (BT.709,sRGB) > ??????? bTransferCharacteristics??? ?? 1 (BT.709) > ??????? bMatrixCoefficients??????????? ??? 4 (SMPTE 170M (BT.601)) > ??? Interface Descriptor: > ????? bLength???????????????? ??????????????????????? 9 > ????? bDescriptorType???????? ?????????????? 4 > ????? bInterfaceNumber??????? ??????????? 1 > ????? bAlternateSetting?????? ?????????????? 1 > ????? bNumEndpoints?????????? ????????????? 1 > ????? bInterfaceClass??????? ?????????????????? 14 Video > ????? bInterfaceSubClass????? ???????????? 2 Video Streaming > ????? bInterfaceProtocol????? ????????????? 0 > ??????iInterface????????????? ??????????????????????? 0 > ??????Endpoint Descriptor: > ??????? bLength???????????????? ????????????????????? 7 > ??????? bDescriptorType???????? ???????????? 5 > ??????? bEndpointAddress???? ???????????? 0x83? EP 3 IN > ??????? bmAttributes??????????? ???????????????? 5 > ????????? Transfer Type??????????? ????????????? Isochronous > ????????? Synch Type?????????????? ??????????????? Asynchronous > ????????? Usage Type?????????????? ?????????????? Data > ??????? wMaxPacketSize???? ???????????????? 0x1404? 3x 1028 bytes > ??????? bInterval????????? ??????????????????????????? 1 > > > > ------------------------------ > > _______________________________________________ > Linux-uvc-devel mailing list > Linux-uvc-devel@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel > > > End of Linux-uvc-devel Digest, Vol 50, Issue 24 > *********************************************** >
_______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel