# Android-UVC-Camera **Repository Path**: xzf_prettyy/Android-UVC-Camera ## Basic Information - **Project Name**: Android-UVC-Camera - **Description**: No description available - **Primary Language**: Unknown - **License**: LGPL-2.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-02-10 - **Last Updated**: 2025-08-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Android-UVC-Camera Still under development.... [Get it on F-Droid](https://f-droid.org/packages/humer.uvc_camera/) [Get it on Google Play](https://play.google.com/store/apps/details?id=humer.uvc_camera) This is a Android Studio Project. It connects to a usb camera from your Android Device. (OTG cabel or OTG Hub needed) (It works with Micro Usb and Usb Type C devices) # This Project was built to perform an Isochronous Video Stream from all Android Devices (Above 4.0.4 Ice Cream Sandwich)(Mediathek Devices too). The app connects to USB Cameras via variable, different input values for the camera driver creation. In most cases you won't need to set up your own camera driver, because other apps may do this for you automatically, but for some Android devices it could help to watch videos from Usb Cameras. (Some OTG cabels doesn't work --> I'll found one which is an extern powered more Port USB-C OTG cable and doesn't work ...) (An non working OTG cable doesn't show the right interfaces and endpoints of you camera: --> When you click on 'List Up The Camera' Button) License ------- Copyright 2019 Peter Stoiber This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Please contact the author if you need another license. This Repository is provided "as is", without warranties of any kind. Since Android 9 Usb Cameras on Android needs several other permissions and at least the SdkVersion 30 to run sucessfully --> https://issuetracker.google.com/issues/145082934 Explaination: Before you start with entering the Camera values, your Android device have to detect the Camera: So you click the Button and then the Button . The app will ask you for granting the permissions. ![alt text](https://github.com/Peter-St/Android-UVC-Camera/blob/master/app/src/main/res/drawable/findcam.png?raw=true) In the Picture above a camera was found and the Permissions to the Camera are granted. If no Camera is detected, you can nott use this app. (except of the WebRTC function). Next you have read out the camera Interfaces, to see if your camera is UVC complient. So you click the Button: : ![alt text](https://github.com/Peter-St/Android-UVC-Camera/blob/master/app/src/main/res/drawable/listdev.png?raw=true) Here you can see a sucessful return of an UVC compliant camera. The first Interface is always the ControlInterface and the second is always the Stream Interface. This Controlinterface (1st) has only 1 Endpoint. The StreamInterface could have more than one Endpoints (depends on the supported resolution of the camera). Here the Endpoint of the StreamInterface has a maxPacketSize of 3072 bytes (You need such a value later). (It could be, that your camera has an audio output, or Sd-Card output too, than see more than 2 Interfaces for your device). If those two Buttons work correctly, you can start to set up the UVC values: Click the Button to start the camera setup. You have two pissibilies: The and the Method. The method is in beta stadium for now, so if this button fails, you choose the method next time! The automatic method should find working camera values for its own, but this values may not be optimal for video transmission. To choose the right values for your own, you click on the Button. Manual Method Explained: First you choose you Maximal Packet Size: You Camera may supports more Values for the MaxPacketSize, so you can test out each of them, which works best. If your phone uses a Mediathek Chipset you may choose the smallest value, but normaly you choose the highest value! Click on and proceed to the Packets Per Request selection: The Values you select builds the size of the Stream. This means if you select higher Values (such as 32 or more ..) you stream gets bigger, but there may could result error from your device or the camera because of a too large amount of data. For the start you select 1 for this Value. (This would be definitly to less, but you can raise it later) .. Next Sceen shows the ActiveUrbs (actice Usb Request Blocks) --> This is also a value which represents the size of the camera stream. One Block of the activeUrbs is exactly the maxPacketSize x packetsPerRequest. You can select 1 for the start (You will have to raise it later ..) Then the Setup Method will ask you for the Camera Format, which your camera supports. If there is only one format, you click on , if there were more, you select one (does not matter which one) (eventually MJpeg if present) and click on . Next you have to select you Camera Resolution, which you camera supports with the Format (perhaps your camera supports other resolutions, with the other Format ...). Select something ... and click on Then you have to select the Frame Interval, which your camera supports. You can click on a Value (maybe the lowest on displayed on the screen, because it is better for the setup. You can save your Entries now: Click on to save this values (you do not need to run the method again, if you have finished the setup and found some working values ... If you click on in the next screen --> an automatic name will be taken from the camera to save the file. You can also enter a unique name or enter the value, which is displayed on the bottom, to choose an existing file. ![alt text](https://github.com/Peter-St/Android-UVC-Camera/blob/master/app/src/main/res/drawable/setup_complete.png?raw=true) The picture shows the output of the sucessful setup: Now you want to know, if your Camera works with your selected Values. So you start the comunication with your camera by clicking on the Button <-Controltransfer-Testrun-> and then you select the first entry