lucasw / image_to_v4l2loopback

Stream ROS image topics to /dev/video using https://github.com/umlaeute/v4l2loopback
BSD 3-Clause "New" or "Revised" License
18 stars 24 forks source link

Video not starting with Firefox, camera not showing on cameras list on Chrome #5

Open pwhite77 opened 3 years ago

pwhite77 commented 3 years ago

Hi! Tried this package, but with no luck. Firefox recognizes the "video1" device but "getUserMedia" returns an error (and no video is shown). Chrome doesn't even recognize the "video1" device. Do you have any fix? Thanks a lot!

lucasw commented 3 years ago

Does cheese or guvcview work with it?

I haven't tried this in a while and it isn't working for me- I got the Ubuntu 20.04 v4l2loopback to show up in guvcview, but google meet in chrome doesn't recognize it, and for the umlaute/v4l2loopback I had to disable secure boot but that one doesn't even work in guvcview. I'll look a little further to see if I can make it work.

pwhite77 commented 3 years ago

Thanks for your reply! Cheese is not recognising the webcam... So no chances to be able to use this for WebRTC (getUserMedia)? Do you know of other similar packages that may work in my case?

lucasw commented 3 years ago

I think the way to fix this is to decouple the ROS Image parts of it, and just get v4l2loopback working with web browsers with some kind of demo image source (maybe v4l2loopback already has one). Maybe someone has made a tutorial or instructions or stack overflow answer about how to do this, or a forum to get help from (like the issues/discussion section of the official v4l2loopback repo).

Possibly v4l2loopback can work but the image_to_v4l2loopback is configuring it wrong/incompletely, and by finding or making a working non-ROS demo we can figure out the right configuration and fix it here.

Another debug route is to run v4l2-ctl -D -d /dev/video0 (or whichever video it is) on a working browser compatible webcam, then on the v4l2loopback fake device, then look for things missing or different and see if those can be corrected. Real webcams probably have a lot of extra features that aren't necessary for this (or are just a distraction) that I wouldn't want to waste a lot of time chasing down, but looking into what the differences are would be useful.

Or there is something newer and different than the v4l2loopback kernel module that works in linux that a new ros package could be based off of. I imagine a lot of people were interested in sending custom video streams into Zoom and other online video meetings over the past year, but possibly at the same time some of that video meeting software was deliberately trying to screen out 'fake' video sources that didn't look like a real camera? Browsers ought to be more permissive for webrtc though.

I'll look into it more but if you want to do some searching/testing and report back anything promising here that could speed it up.