Can libmediasoupclient support USB cambera?

libmediasoupclient
Thank you all!
recently, i met a problem. in a robot scenraio , i wish to use an android-based machine with a usb-camera to connect the mediasoup server. However, the app can not recognise the USB_camera. I know I NEED add LIBUVC . BUT i am not clear that how can i GET the push the video to mediasoup after i attain the usb_Camera picture.

Hi @fengfeng,

libmediasoupclient consumes media tracks provided by the application using it. It’s in the application’s hand retrieving such media. Media stream tracks need to conform with the libwebrtc interface so that’s the way where you need to look at.

Sorry I can’t be more specific.

Thank you !!!

Sorry to bother u again.
Now I have succeed in attaining the USB camera video frame data (byte[] as the picture shown) , but how can I use the libmediasoupclient to connect the sendtransport. mediastreamtrack interface with the byte[]?

Thank u again! hope your reply!

Sorry to bother u again.
Now I have succeed in attaining the USB camera video frame data (byte[] as the picture shown) , but how can I use the libmediasoupclient to connect the sendtransport. mediastreamtrack interface with the byte[]?

Thank u again! hope your reply!

This is not how libmediasoupclient works. You need to call sendTransport->Produce() with a libwebrtc MediaStreamTrack instance representing your audio/video source. We don’t provide support about libwebrtc, but there is whether you have to look at.

Hi All

I’m using the below

can u guide were to call this code to make usb camera as source .

Thanks.

PeerConnectionUtils in droid/lib has the camera code where the cam is selected through the Camera2Enumerator. You can put something in there that instead gets access to the USB cam and feeds the track through that. It’s not that straightforward though, but there are libraries for proper USB cam access that can be utilized.

Dear author, I also encountered this problem, please do you solve it