百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AndroidUSBCamera

> 编程语言
开源

基于 Android 平台的灵活且实用的 UVC 摄像头引擎,支持多路摄像头!

2.7K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 Android 平台的灵活且实用的 UVC 摄像头引擎,支持多路摄像头!

AUSBC 

 Flexible and useful UVC camera engine on Android platform, you can use it to simply open your uvc camera (supporting multi-road cameras) without any system permissions . The only thing you should do is that confirming your Android device must support OTG function. So, welcom to use AUSBC3.0 and welcom to star & fork & issues!

 @ Example showing

Feature

  • Support opening multi-road camera;
  • Support opening uvc camera on Android 4.4+;
  • Support previewing 480p、720p、1080p,etc;
  • Support adding effects with OpenGL ES 2.0;
  • Support capture photo(.jpg)、viedo(.mp4/.h264/yuv) and audio(pcm/mp3/aac)
  • Support rotating camera view;
  • Support offscreen rendering;
  • Support recording media along with acquiring YUV/RGBA/PCM/H.264/AAC stream, you can push it to your media server;
  • Support acquiring all resolutions and usb devices, etc;
  • Support acquiring system or device mic(UAC) audio data;
  • Support armeabi-v7a, arm64-v8a, x86 & x86_64;

Usages

 AUSBC 3.0 was refactored by kotlin and It is simpler to use and more feature-rich. So, I highly recommend you to use the current version and let's build it together.

  • Get AUSBC

 First, add it in your root build.gradle or settings.gradle at the end of repositories:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

 Second, add the dependency in your app.gradle , latest tag is :

dependencies {
    implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:latest_tag'
}
  • Simply usage

  As for how to use this module correctly, just making your Fragment or Activity implement CameraFragment or CameraActivity.

…

 The most important is that you should override getRootView()/getCameraViewContainer()/ getCameraView() at least which means fragment's root view 、texture or surface view and it's container。Of course, the same as CameraActivity and now you can see the uvc camera preview。

  • Advanced usage

 If you want some custom configurations, you can do like this in your DemoFragment:

…

 Of course, you can also capture a jpg image or a mp4 video or a mp3 audio file and update resolution or different uvc camera and acquring the stream of H264/AAC/YUV/PCM by calling those method:

…

 Or, camera configuration:

setZoom(0)
setSharpness(0)
setHue(0)
setSaturation(0)
setContrast(0)
setGamma(0)
setGain(0)
setAutoWhiteBalance(true)
setAutoFocus(true)
// send custom command to camera
sendCameraCommand(command)

 For more advanced features, you can even add some filters to your camera.This library providers some default filters, sush as EffectBlackWhite、EffectSoul and EffectZoom, and more filters will be added in the future.Of coure, you can also relize your own filters by extending AbstractEffect. For example:

// First, extending AbstractEffect
class EffectBlackWhite(ctx: Context) : AbstractEffect(ctx) {

    override fun getId(): Int = ID

    override fun getClassifyId(): Int = CameraEffect.CLASSIFY_ID_FILTER

    override fun getVertexSourceId(): Int = R.raw.base_vertex

    override fun getFragmentSourceId(): Int = R.raw.effect_blackw_fragment

    companion object {
        const val ID = 100
    }
}

// Second, adding or updating or removing filter
addRenderEffect(effect)
removeRenderEffect(effect)
updateRenderEffect(classifyId, effect)

 At last, If you want to realize streaming, maybe IPusher and AusbcPusher can help you.

  • open multi-road camera

 If you want to open multi-road camera, you can make your Fragment or Activity extend MultiCameraFragment or MultiCameraActivity.Just do like this and more details please look up DemoMultiCameraFragment:

…
  • Debug online

 If you want to debug the project online or modify something, those steps you should do:

 First, modifying the Settings.gradle file and making those to module.

include ':app'

// For debug online
include ':libausbc'
include ':libuvc'
include ':libnative'
include ':libuvccommon'

 Second, let app.gradle dependenced on ':libausbc' .

dependencies {

    // For debug online
    implementation project(':libausbc')

    // demo
    //implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:latest_tag'
}

@ 中文文档

Demo

 AUSBC.apk

Version

Update details

Q & A

FAQ

Homepage & Help

1. JUEJIN

2. CSDN(Update stopped)

 If you have any question or fun ideas, please issues to me.
 Of course, you can also send me a 微信 "laojiang299" or a EMAIL "[email protected]".

 So, do not forget to send logs from location Android/data/com.jiangdg.ausbc/files and collect logcat information by executing command adb shell logcat -v threadtime > usbcamera.log

Thanks

saki4510t/UVCCamera

License

Copyright 2017-2023 Jiangdongguo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Support opening multi-road camera;
  • •Support opening uvc camera on Android 4.4+;
  • •Support previewing 480p、720p、1080p,etc;
  • •Support adding effects with OpenGL ES 2.0;
  • •Support capture photo(.jpg)、viedo(.mp4/.h264/yuv) and audio(pcm/mp3/aac)
  • •Support rotating camera view;
  • •Support offscreen rendering;
  • •Support recording media along with acquiring YUV/RGBA/PCM/H.264/AAC stream, you can push it to your media server;
  • •Support acquiring all resolutions and usb devices, etc;
  • •Support acquiring system or device mic(UAC) audio data;

> 标签

Cusbcamerauvccamera

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言