Open Felix-N opened 3 years ago
I can very well believe that, this sounds like a bug in that we shouldn't crash. That being said, I also don't expect that opening multiple times the same webcam will work.
Sounds about right.
I was trying to get in images from 2 different webcams. Though right now it appears that I've to do that with an 'externalvideosource'
Do you have more documentation on how to do that available?
Ah. I would still have expected that forcing 2 instances of WebcamSource
to use 2 different physical devices would work. Do you have more info about that crash? Is that in the Unity editor, or in a standalone build? Which platform/arch? Do you have a callstack? It feels like that feature should work. I was talking about opening the same physical device twice, which is more complicated.
For ExternalVideoSource
, you have to feed video frames via a callback. So you need to manage capturing those frames from the 2 webcams by yourself, and converting to I420 or ARGB if needed. The approach depends on what API you use (Unity, Win32, UWP, other...) and will likely be platform-dependent (except Unity) but I have never tried it.
The editor crashes on play when I duplicate a webcamsource. I have not tried much further yet - currently I'm using 2 Basler cameras via a genicam interface (an area im quite new to). Does the mrwebrtc provide a way to give them more information? I have not found any documentation on this, but in OBS i can configure the video on the 'webcam' and select there the specific camera.
That said I'd like to do a screenshare too - my understanding is that there the ExternalVideoSource is again the way to go?
If the project has more than one webcamsource it crashes on play.