client-sdk-android icon indicating copy to clipboard operation
client-sdk-android copied to clipboard

USB camera not listing

Open anishmenon opened this issue 3 years ago • 6 comments

How we can read the External camera now it only reads the front and back camera see an app that reads all external cameras

https://play.google.com/store/apps/details?id=com.shenyaocn.android.usbcamera

anishmenon avatar Feb 11 '22 16:02 anishmenon

Specify a LocalVideoTrackOptions.deviceId when creating a LocalVideoTrack.

DeviceIds can be found through Camera2Enumerator.deviceNames if Camera2 is supported on the device, or Camera1Enumerator.deviceNames if Camera2 isn't supported (check with Camera2Enumerator.isSupported(context)).

davidliu avatar Feb 11 '22 16:02 davidliu

can u revert an example

var videoTrackCaptureDefaults: LocalVideoTrackOptions = LocalVideoTrackOptions()

i can see below name on other app debugging
'/dev/video63'

var videoTrackCaptureDefaults: LocalVideoTrackOptions = LocalVideoTrackOptions(deviceId = "/dev/video63")

but its not working

anishmenon avatar Feb 11 '22 17:02 anishmenon

Again, get the device name through the process I mentioned in the previous comment.

davidliu avatar Feb 11 '22 18:02 davidliu

Camera1Enumerator Camera2Enumerator

are basically throw front camera and back cameras it won't list USB / external

anishmenon avatar Feb 11 '22 18:02 anishmenon

https://github.com/libuvc/libuvc this library will be able to throw all connected USB video devices

anishmenon avatar Feb 11 '22 19:02 anishmenon

Hmm I think this may be out of scope currently, if the phone doesn't support discovering the USB camera through Camera2.

You can use libuvc/other 3rd party libraries to create your own org.webrtc.VideoCapturer and VideoTrack to support this feature.

davidliu avatar Feb 25 '22 07:02 davidliu

Closing as not planned.

davidliu avatar Oct 21 '22 11:10 davidliu