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
Video UVC 1.5 check list #1142
Comments
Hi @hathach :) I tried UVC last night and found errors in the example descriptor. For one the UUID of the format is wrong (can be seen in |
@me-no-dev yeah, I saw my Linux machine complaining about the format as well. haven't tried to find the cause just yet. Please let me know if you could figure out why.
|
The UUID thing is easy. For example this line should become (swap some bytes). Same for the rest. //#define TUD_VIDEO_GUID_YUY2 0x59,0x55,0x59,0x32,0x00,0x00,0x10,0x00,0x00,0x80,0x71,0x9B,0x38,0x00,0xAA,0x00
#define TUD_VIDEO_GUID_YUY2 0x59,0x55,0x59,0x32,0x00,0x00,0x10,0x00,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71 |
@me-no-dev |
This message is here. I guess the message indicates no input terminal connects with the streaming interface on the chain. The configuration descriptor of I have looked into Linux kernel drivers and found the followings. |
Are the video descriptor macros going to be moved to usbd.h in the future? |
@xmos-jmccarthy yes, in the future, there will be an UVC template for most common used descriptors. Too bad, I haven't spent much time on UVC recently. |
The commit #1118 works well for ESP32S2/S3 with dcd_dwc2 driver on Windows10 , but seems not work on Linux (libuvc). |
ok, I think this is the right place to give some feedback as I have just published a project using the UVC implementation: An rp2040-based Game Boy adapter that captures the bus communication between the Game Boy and a game cartridge, runs it through an emulator and outputs the gameplay footage video via USB. (More infos: blog article with details, source on github). So, first of all, thanks a lot for implementing this! Due to the bandwidth limitation of isochronous transfer on a full speed device I output 160x144 (Game Boy's native resolution) at 29fps in NV12 format - as a compromise between bandwidth and compatibility. And it works almost everywhere:
So, thanks again for offering UVC! |
Update: However, I still have problems on a MacBook with M2 chip. Here the image is green and distorted and by comparing the raw data on the USB bus (which looks correct) with the data that actually reaches ffmpeg on the system, it seems like the system/driver/avfoundation/whatever strips out every other block of 160 bytes. I have no idea why it should do so and the number 160 only matches the width of the resolution I use and nothing else. But since I use NV12 format and it literally removes every second block of 160 bytes, this also cannot be attributed to a misguided interlacing algorithm. So, with the same device working on the Intel MacBook and the arbitraty removal of data from within individual USB frames, I currently suspect a bug for the Apple silicon devices. Since other webcams work, it is also probably related to the less common NV12 format. |
@Staacks that is a brilliant project, thank you for sharing. Regarding the issue with macos, feel free to post/file more issue/discussion or anything you find while troubleshooting. I am sure to help whenever possible. |
Hello guys, I was wondering if with this uvc features, could a pico 2040 connect to a webcam and stream via web? |
Is your feature request related to a problem? Please describe
UVC is added by #1118 This issue is used to keep track of current status of video class driver on each DCD ports. Once it is all passed, we could close this.
How to test
run examples/device/video_capture
Linux/macOS
use webcamoid
Windows
from #1118 (comment)
Input a file path to save captured video stream.
Capture -> Stop Capture
The text was updated successfully, but these errors were encountered: