All Projects → jxj2118 → Jcamera

jxj2118 / Jcamera

Licence: mit
This is Android CameraActivity,Imitation WeChat Camera Android 仿微信视频拍摄 支持触摸拍摄 长按拍摄

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Jcamera

Media picker
A Flutter Plugin for Selecting and Taking New Photos and Videos.
Stars: ✭ 24 (-42.86%)
Mutual labels:  camera
Picamera
Capture the stream of Images for a Raspberry Pi Camera in GoLang
Stars: ✭ 21 (-50%)
Mutual labels:  camera
Camera calibration api
A simple Python API for single camera calibration using opencv
Stars: ✭ 36 (-14.29%)
Mutual labels:  camera
Docker Picamera
Docker container for streaming a Raspberry Pi's camera via HTTP/MJPG
Stars: ✭ 26 (-38.1%)
Mutual labels:  camera
Portfolio Photo
Jekyll based portfolio using Flickr API.
Stars: ✭ 15 (-64.29%)
Mutual labels:  camera
Qr Code Scanner
Full stable QR code scanner android app.
Stars: ✭ 28 (-33.33%)
Mutual labels:  camera
Multi Threading Camera Stream
Multi-threading camera stream to improve video processing performance
Stars: ✭ 18 (-57.14%)
Mutual labels:  camera
Expo Three Ar
Utilities for using Expo AR with THREE.js
Stars: ✭ 40 (-4.76%)
Mutual labels:  camera
Blender For Unrealengine Addons
I have created this addons for export asset from Blender to Unreal Engine 4
Stars: ✭ 885 (+2007.14%)
Mutual labels:  camera
Meething Ml Camera
Machine-Learning powered Virtual Camera with SVG Animation (alpha)
Stars: ✭ 36 (-14.29%)
Mutual labels:  camera
Android Image Picker
Image Picker for Android 🤖
Stars: ✭ 847 (+1916.67%)
Mutual labels:  camera
Playpixels
Swift Playground Book for learning image processing.
Stars: ✭ 14 (-66.67%)
Mutual labels:  camera
Zxingcamera
Camera for Android,身份证号码识别 (本地,实时)
Stars: ✭ 34 (-19.05%)
Mutual labels:  camera
Camodet
Lightweight Simple CAmera MOtion DETection application.
Stars: ✭ 26 (-38.1%)
Mutual labels:  camera
Pi Webcam
Automation to configure a Raspberry Pi as a USB OTG webcam
Stars: ✭ 990 (+2257.14%)
Mutual labels:  camera
Moodifier
Android Application which will intensify your current mood. 😔 ➡️ 😄
Stars: ✭ 22 (-47.62%)
Mutual labels:  camera
Cdpvideorecord
An video camera,you can have realtime of a beautify,and change camera position,or turn on/off flash.Details see demo.
Stars: ✭ 27 (-35.71%)
Mutual labels:  camera
Sonoff Hack
Custom firmware for Sonoff GK-200MP2B camera
Stars: ✭ 41 (-2.38%)
Mutual labels:  camera
Ros openpose
ROS wrapper for OpenPose
Stars: ✭ 39 (-7.14%)
Mutual labels:  camera
Cordova Plugin Ios Camera Permissions
Cordova / PhoneGap Plugin Permission Settings for NSCameraUsageDescription and NSPhotoLibraryUsageDescription in iOS 11 by adding a declaration to the Info.plist file, see:
Stars: ✭ 34 (-19.05%)
Mutual labels:  camera

JCamera

Platform API

This is Android CameraActivity,Imitation WeChat Camera

Android 仿微信视频拍摄 支持触摸拍摄 长按拍摄,采用camera2,需要API>21 后续考虑支持API>18

解决前置摄像头镜像问题,视频压缩采用了MasayukiSuda 的 https://github.com/MasayukiSuda/Mp4Composer-android ,会在原视频输出后占用600-700ms压缩及旋转视频

支持一步调用 支持AndroidX 本库自身支持6.0+自主动态获取权限 以及 7.0+provider配置

JPG

GIF


视频拍摄
video

图片拍摄
photo

Demo

扫码下载
点击下载

Version

2019-11-25 V1.0.4 com.android.tools.build:gradle:3.4.2 -> 3.5.2 , 修复视频处理前可点击确定的BUG, 修复按钮时长与录制时长不匹配的BUG
2019-9-17 V1.0.2 增加视频质量设置,解决录像未完成销毁Activity崩溃的BUG
2019-8-13 V1.0.1 优化尺寸匹配算法,多摄像头匹配,解决华为设备崩溃
2019-5-30 V1.0.0

Gradle

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.jxj2118:JCamera:v1.0.4'
}

Step 3. Need Open DataBinding (PS. Follow-up consideration remove)

android {
        ...
        dataBinding {
                enabled true
        }
}

Usage

Open CameraActivity

    //如不设置 会默认打开上一次配置的结果
        JCamera.instance
            //.openPreCamera()// 是否打开为前置摄像头
            .allowPhoto(true)// 是否允许拍照 默认允许
            .allowRecord(true)// 是否允许录像 默认允许
            .setMaxRecordTime(3)//最长录像时间 秒
            .setRecordQuality(30)//设置视频质量 1-100 默认30
            .start(this,PHOTO_OR_VIDEO_FOR_CAMERA)//PHOTO_OR_VIDEO_FOR_CAMERA 请求码 回调时可用

Capture Rusult

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
            super.onActivityResult(requestCode, resultCode, data)
            if (resultCode == Activity.RESULT_OK &&  requestCode == PHOTO_OR_VIDEO_FOR_CAMERA){
                data?.let {
                    // JCamera.resultIsImg(data) 返回是否为图片
                    if (JCamera.resultIsImg(data)){
                        // JCamera.getResultPath(data) 获取结果路径
                        text.text = "Image Path:\n${JCamera.getResultPath(data)}"
                    }else{
                        text.text = "Video Path:\n${JCamera.getResultPath(data)}"
                    }
                }
            }
        }

Builder Method

method description
openPreCamera 打开前置摄像头,默认打开上一次打开的摄像头
setMaxRecordTime 最大录制时间,单位 秒
allowRecord 是否允许录像
allowPhoto 是否允许拍照

PS. 所有设置 会默认打开上一次配置的结果

References And Special Thanks to

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].