voxl-streamer client repetitive connect/disconnect
-
@wilkinsaf Also, were you able to get the ordering information for these cameras? If they aren't too expensive I would like to order at least one of them to test against.
-
Yes, let me try one at a time now.
Here are the two cameras![0_1640728100493_PXL_20211228_214717072.jpg](Uploading 100%)
-
Good news, I was able to get voxl-uvc-server to spin up with one usb camera connected.
However, I am getting this issue from voxl-streamer
Seems like I need to figure out the frame size and set the correct one. Let me play around with that now
-
@Eric-Katzfey Doesn't look to be frame size as the "sizes" seem non-deterministic
-
@wilkinsaf Great, that's some progress! What about if you try the other camera? Not sure why the frame length is different. For a given resolution and frame format that number should be a constant. (e.g. 640 x 480 x 2).
-
Good suggestion. Let me try that.
Check out the length when uvc server fires upGot frame callback! frame_format = 3, width = 640, height = 480, length = 613376, ptr = 0
interesting
-
@wilkinsaf You can try modifying this line in voxl-uvc-server: https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-uvc-server/-/blob/dev/src/main.c#L83
Make it read:
.size_bytes = 614400, \
Then rebuild it and try again.
-
@Eric-Katzfey Sounds good.
The other camera is giving me this error
The one I compiled could not find the device at all
-
@wilkinsaf Perhaps you are working on
master
branch? The latest and greatest (The one you should be using) is thedev
branch. -
@wilkinsaf Thanks! I'm going to order them so that I can have them as part of our normal USB UVC camera test suite.
-
@Eric-Katzfey Thanks Eric!
I switched to dev branch (slightly embarrassing as you told me to switch to dev) and pull
voxl:~/voxl-uvc-server(dev)$ git pull origin dev From https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-uvc-server * branch dev -> FETCH_HEAD Already up-to-date.
I made sure to install the correct libuvc ipk
voxl:~$ opkg install libuvc_1.0.2_202112182223.ipk Collected errors: * opkg_prepare_file_for_install: Refusing to load file 'libuvc_1.0.2_202112182223.ipk' as it matches the installed version of libuvc (1.0.2).
I then built the voxl-uvc-server, ran Makefile, and tried to run
-
@wilkinsaf Okay, interesting. Let's go back to the original camera with the incorrect size. Can you add the patch I suggested and see if you can make that camera work?
-
@Eric-Katzfey ope, almost forgot. Yes, let me do that now
-
For some reason now it is still struggling to find any device. I tried both cameras
-
I know that it is there as ffmpeg picks up on it
-
@wilkinsaf Unfortunately, it's hard to debug this without actually having the camera in my test setup. I've never seen a camera stop being detected like that. I did order the cameras but won't have them in my possession until the 9th of January.
-
@Eric-Katzfey My apologies. I thought I sent a response to this.
Totally get it. Debugging over a message board is really hard. I believe my associate is getting some of the cameras to your offices sooner than the 9th.
I have been continuing to try different things on our end.
-
@wilkinsaf I have both of the cameras now. I have updated libuvc to version 1.0.3 (http://voxl-packages.modalai.com/dev/) and voxl-uvc-server to version 0.0.6 (http://voxl-packages.modalai.com/dev/). The voxl-uvc-server update isn't really necessary but I cleaned up a little bit of the debug logic. There was a check that was failing in libuvc for the Blue Robotics camera (USB 32e4:9422, "H264 USB Camera") so I removed that check and then it started working. So far it has been reliable. The other camera (USB 337b:090c, "HBVCAM 5M-AF") was coming up without these changes. However, it isn't reliable. Sometimes uvc_open will fail, other times it will pass. If it passes then sometimes it will successfully start streaming and other times it will think it was successful but gets no frames. Not sure why it is having these issues so need to debug more.
-
@Eric-Katzfey Awesome!
Thank you Eric. Will try that out and report back
-
@wilkinsaf A new version of voxl-uvc-server was just posted here: http://voxl-packages.modalai.com/dev/. Documentation has been updated accordingly: https://docs.modalai.com/voxl-uvc-server/. Seems to be working pretty well with your cameras but one of them will fail occasionally. The program will fail and you can try again when that happens. Still not sure why it isn't reliable on all cameras.