Record video from a USB camera

Challenge all Android video over usb experts! I spent weeks trying to figure out what I need to do to display and record the video stream from an external video camera connected to USB. It's simple enough using the device’s built-in camera, but doing it via USB seems to be a big problem.

I saw several YouTube videos for people who managed to connect a USB Video Class (UVC) camera to display the video stream, but as far as I can understand, this seems to require a root device and a custom ROM, which I want to avoid.

I read somewhere that there is a fundamental problem with USB to Android (something about transferring ISOChronous?), Which makes it very difficult (impossible?) To read and write video via USB. But I also read somewhere else that later versions of Android (4.1+) solved this problem, although I cannot confirm this.

Does anyone in the SO community know if I can do this without rooting or creating a custom ROM? Or am I asking for too much Android here?

If it is possible to do this without switching to the native (JNI / NDK), this will be ideal. If there is a forum or tutorial that covers this that someone knows about, that would be great, but any information would be greatly appreciated.

Thanks in advance for your help!

+4
source share

Source: https://habr.com/ru/post/1502408/


All Articles