-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UVC #4
Comments
Unfortunately there is no online document for now. The basic UVC work flow is as follow:
|
Thank you for the detailed answer ! |
Close this issue. Feel free to reopen if you have questions. |
Are there anymore complete examples for this yet? I used the above code to get to the point where I can set parameters, but my device doesn't stream. |
@bSquaredOlea There is no complete example project yet. For the stream, it actually depends on your hardware and host controller driver, since the ISO transfer is quite different to bulk and interrupt transfer. If your HCD is not ready for ISO transfer there is no stream. |
You can try the steps to build a video example that enumerates and start streaming on a USB 2.0 high speed webcam (tested with "Microsoft LifeCam Studio(TM)"): Get MIMXRT1060 Examples
Modifications in
|
@bSquaredOlea : does the sample code help? |
Thanks for your responses. I was able to get to a point where I started a
transaction, but never got any video data from the device (I could get meta
data from the device though). However, we are moving in a different
direction now.
Thanks,
Ben
…On Tue, Feb 8, 2022 at 12:13 AM yuxin-azrtos ***@***.***> wrote:
@bSquaredOlea <https://github.com/bSquaredOlea> : does the sample code
help?
—
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWZZBYBAHZJQA6BUBLRXRLLU2CYAZANCNFSM4U6EMFVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@bSquaredOlea Thanks for sharing the progress. |
Hi, we can collect stream video through ethernet port to the PC. Is there a recommended PC side application that can collect from the Ethernet port and display the video? thanks! |
No for the raw video stream. |
Hi @xiaocq2001 , thanks for the comment. What about mpeg format? we can output mpeg format to PC. |
@xianghui-renesas, I'm not sure directly forwarded USB Video stream can be recognized by webcamiod, maybe you can try. I think the video stream must be rearrange/packaged by some web streaming protocol to allow PC application to play. |
Hi @xiaocq2001, thanks! I had a quick try with webcamiod and found they are primarily looking for the USB Video streaming device and is unaware of the host video packet format. |
Yes. That's the framerate. |
Hi @xiaocq2001, thanks! how is an input of 333333 converted 30fps, what is the unit of this argument in the API? thanks! |
Please refer to [Universal Serial Bus Device Class Definition for Video Devices: |
Thanks @xiaocq2001 for the reference information. We are trying to stream the video to PC through UDP port. The PC end application we are trying to use is VLC: |
Unfortunately, there is no H264 format demo for now, maybe you can trace some existing H264 camera for reference also there is H264 format spec on usb.org (Universal Serial Bus Device Class Definition for Video Devices: H.264 Payload). General for USB bandwidth: done through changing different alternate settings. |
Thanks @xiaocq2001 , could you explain how the color channel encoding is defined in the USBX host video stack? If we collect image using uncompressed format, what is the format of data in the video buffer collected? |
Checking uncompressed format spec in https://usb.org/sites/default/files/USB_Video_Class_1_5.zip. The supported pixel coding is as follow: The format is reported by GUID: The each payload is composed by a header and actual data, the header is like: You can refer to the spec for more details. |
Hi @xiaocq2001 , is there any application of uvc host running on stm32h7 target ?? |
Hi @xiaocq2001 , does the usbx video host stack support still image collection? Do you have an example code if it is supported. |
@xianghui-renesas , still image collection is not supported currently. |
Hi @xiaocq2001, I tried to piece together the packets collected in the MCU to display them using a feature in our e2studio IDE and found the packets are out of order in the packet buffers. I have 96 packet buffers. If the MCU is not providing the buffer fast enough for the frame rate, will the MCU start to skip packet? Do you have experience with this? thanks! |
Hi @xiaocq2001, your example so far uses stream-based protocol, does the stack support frame-based protocol, do you have an example for the frame-based implementation? I think it may be easier to look at the raw image from the MCU buffer with frame-based implementation. |
@xianghui-renesas , do you mean to see how a video frame is detected in USB packets? For motion jpeg, if you check the spec about payload header for each USB packet, there is EOF bit to indicate a frame end. |
Hi @xiaocq2001 ,@yuxin-azrtos,
I really appriciate your help on this. Thanks |
@Mahesh-dev-avula I think the application is fine for multitransactions per microframe. Maybe you can check if multiple transactions per microframe is supported by your host controller, or the host controller driver needs modification to support it. |
@xiaocq2001 , Thanks |
For isochronous request, it's supposed to support request list input, that is, the requests are linked by its In current EHCI implementation, single buffer is used for multiple transactions, max 3072 (3 * 1024) bytes can be transferred in the request buffer. |
@xiaocq2001 ,
Any suggestion on this to resolve the issue. Thanks |
I'm not checking xHCI spec in detail, but I see following may relates to the high bandwidth multiple transactions support:
From description TRB Transfer Length can be 3072. |
@xiaocq2001 , I really appriciating your help. thanks Mahesh |
Hi @xiaocq2001 is there any update on when/if still image collection & H264 payload will be supported? |
For still image you can extract YUV frame from isochronous video stream. |
Is it possible with the help of this stack to implement interaction with Webcamera through UVC ? If so, how?
The text was updated successfully, but these errors were encountered: