-
Notifications
You must be signed in to change notification settings - Fork 1
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
Windows version of libuvc #1
Comments
@alexivaner: sorry, no. Doesn't seem like Conan supports libuvc for Windows, presumably because libuvc itself seems to have issues compiling/running on Windows.
If the Conan recipe is improved, a new version of these bindings could be generated/packaged. |
Thank you for your reply. I am a little bit wondering, what is the difference between this library and the other one uvc-control? is that the libuvc part? Because I saw you also active in the management of uvc-control and uvcc. My problem so far is I tried to control the PTZ camera with uvc-control, I could manage it when I replace the original driver with WinUSB but I couldn't get the camera streaming. Then if I switch back to the original driver, I could only get the camera stream and when trying to control the motor of PTZ, it said LIBUSB_PARAMETER_INVALID. This is why I tried to use this library that use libuvc as a backend. It will really help if you could give me some clue regarding this problem. Another workaround, I tested uvc-control at MacOS using libusb, but everything seems to be okay, both camera stream and ptz control works. Only in Windows, I could not manage both of them works. |
Also yesterday I downloaded the compiled version of libuvc for windows from this repo: The compiled version could be downloaded from this link: But since I am not a C++ guy, I have no idea how to use this compiled version. Maybe, could it help for this libuvc in js? Thanks. Sorry for troubling you with so many questions. |
@alexivaner wrote:
Here's what I would say regarding the libraries I've worked with: C/C++:
Javascript/Typescript:
Generated C/C++ library Node.js Foreign Function Interface (FFI) wrapper packages:
Note that I am also not a C/C++ programmer, which is why I use Node.js wrappers.
WinUSB replaces the operating system USB (and therefore also UVC) driver for the camera. This way
Did you mean Most cameras seem to have this "problem", which may not actually be the fault of the camera. Am not a USB/UVC standards expert, so guessing a bit here. Your camera is most likely following the UVC standard specification, which I think says that all camera control transfers (such as PTZ changes) should be sent to the camera's video control interface. If the camera is already used for video streaming, it cannot be claimed for control transfers. Some cameras work despite another application already streaming video, but only if you send the camera control transfers to the device rather than the interface. This is probably intentional by the camera manufacturer, so they can ship their own camera control software, but am unsure if it is part of the standard. This workaround is used in There is a chance that changing the USB device configuration may offer both streaming and controls, but am unsure if the operating system driver would allow this, and if so, how it would react to the change.
Using
The operating system's UVC driver in macOS (and Linux) works differently. Again, I can't personally confirm usage on Windows. |
@alexivaner wrote:
The FFI code in Luckily it seems that the dependencies To get Windows support in The best would of course to fix Windows support in Oh, and because of a bug in |
Wow, thank you so much for your really detailed answer.
About this one, I tried using AMCap, both video streaming and motor control works well when I used the original driver, so I hope is there any possibility to modify the library so it is also compatible with this original driver? Maybe the buffer send is somehow different that caused invalid parameter error
I am using Aver PTZ330 camera. Thank you so much for your great works, it helps a lot of people though. It is not that easy to create all of those libraries.
If I have time, I would try this one, thank you so much for your detailed explanation. |
@alexivaner wrote:
Nit: that is not the AMCap website, it's a spam website trying to make money off of the hard work of independent developers. The credit should go to Noël Danjou who created AMCap. See also the AMCap FAQ.
It looks like Windows-specific software indeed, which is what I suspected. To both stream video and control the camera result I would not rely on This is out of my comfort zone, but have a look at documentation such as Audio/Video Capture in Microsoft Media Foundation for some UVC video streaming code. Unsure about control transfers for camera settings, but it should be in there somewhere, and perhaps it's possible to modify if even though another application is streaming video.
Cool camera! Would be nice to get it working properly.
Let me know your findings! It'd be great if
You're welcome =) |
Do you have the windows version of libuvc? I tried to run display-detail example but have the following error. Glad if you could help. Thank you so much.
The text was updated successfully, but these errors were encountered: