Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

Overview

LandscapeVideoCamera

Build Status Codecov.io Release MethodCount License

Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to be landscape only.

Get it on Google Play

There are a number of issues with the default Android intent to capture videos (MediaStore.ACTION_VIDEO_CAPTURE) which led me to create this library project:

  1. The default intent only accepts integer quality parameters of 0 (MMS quality) or 1 (highest available quality), using the intent extra MediaStore.EXTRA_VIDEO_QUALITY.
  2. The default intent does not return the URI of the recorded file if it was specified when launching the intent.
  3. The default intent doesn't care whether users capture their video in portrait mode or landscape.

LandscapeVideoCamera in action

Features

This library provides a full and reusable custom camera, which:

  • Forces the users to rotate their device to landscape
  • Allows to specify the filename, or have the library generate one for you
  • Allows very granular control over the capture settings:
    • Resolution
    • Bitrate
    • Max filesize
    • Max video duration
    • audio/video codec
    • switch between front and rear facing camera
    • ...

How to use

  1. Add the Jitpack repository to your project:
          repositories {
              maven { url "https://jitpack.io" }
          }
  1. Add a dependency on the library:
          compile 'com.github.jeroenmols:LandscapeVideoCamera:1.3.0'
  1. Specify the VideoCaptureActivity in your manifest:
         <activity
             android:name="com.jmolsmobile.landscapevideocapture.VideoCaptureActivity"
             android:screenOrientation="sensor" >
         </activity>
  1. Request the following permissions in your manifest:
         <uses-permission android:name="android.permission.RECORD_AUDIO" />
         <uses-permission android:name="android.permission.CAMERA" />
         <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  1. Create a CaptureConfiguration using the Builder
         // Choose one of both
         CaptureConfiguration.Builder builder = new CaptureConfiguration.Builder(CaptureResolution resolution, CaptureQuality quality);
         CaptureConfiguration.Builder builder = new CaptureConfiguration.Builder(int videoWidth, int videoHeight, int bitrate);

         // Optional
         builder.maxDuration(maxDurationSec);
         builder.maxFileSize(maxFileSizeMb);
         builder.frameRate(framesPerSec);
         builder.showRecordingTime();         // Show the elapsed recording time
         builder.noCameraToggle();            // Remove button to toggle between front and back camera

         // Get the CaptureConfiguration
         CaptureConfiguration configuration = builder.build();

Note: When no CaptureConfiguration is specified, a default configuration will be used.

Note 2: Subclass the CaptureConfiguration class to set more advanced configurations. (codecs, audio bitrate,...)

  1. Launch the VideoCaptureActivity for result, add the CaptureConfiguration as an parcelable extra EXTRA_CAPTURE_CONFIGURATION and optionally add a String extra EXTRA_OUTPUT_FILENAME.
         final Intent intent = new Intent(getActivity(), VideoCaptureActivity.class);
         intent.putExtra(VideoCaptureActivity.EXTRA_CAPTURE_CONFIGURATION, config);
         intent.putExtra(VideoCaptureActivity.EXTRA_OUTPUT_FILENAME, filename);
         startActivityForResult(intent, RESULT_CODE);
  1. Check the resultcode (RESULT_OK, RESULT_CANCELLED or VideoCaptureActivity.RESULT_ERROR) and in case of success get the output filename in the intent extra EXTRA_OUTPUT_FILENAME.

Questions

@molsjeroen

Thanks

Android Arsenal

Comments
  • E/Camera﹕ Error 100

    E/Camera﹕ Error 100

    I use this lib, but I get this exception . I had error 100 on samsung galaxy s4.

    12-22 21:49:42.308  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_Preview﹕ Configured camera for preview in surface of 1920 by 1080
    12-22 21:49:43.109  15679-15679/com.ecloud.android.musiccourse I/Choreographer﹕ Skipped 55 frames!  The application may be doing too much work on its main thread.
    12-22 21:49:43.179  15679-15679/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@42d2ac20 time:84955214
    12-22 21:49:47.523  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully initialized
    12-22 21:49:47.543  15679-15679/com.ecloud.android.musiccourse I/MediaRecorderJNI﹕ prepare: surface=0x798cc5d8
    12-22 21:49:47.543  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully prepared
    12-22 21:49:49.385  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully started
    12-22 21:49:49.385  15679-15768/com.ecloud.android.musiccourse W/IMediaDeathNotifier﹕ media server died
    12-22 21:49:49.385  15679-15768/com.ecloud.android.musiccourse W/CameraBase﹕ Camera service died!
    12-22 21:49:49.385  15679-15768/com.ecloud.android.musiccourse W/CameraBase﹕ mediaserver's remote binder Camera object died
    12-22 21:49:49.385  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Successfully started recording - outputfile: /storage/emulated/0/Movies/1419256180494.mp4
    12-22 21:49:49.405  15679-15679/com.ecloud.android.musiccourse E/Camera﹕ Error 100
    12-22 21:49:53.328  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Successfully stopped recording - outputfile: /storage/emulated/0/Movies/1419256180494.mp4
    12-22 21:49:53.328  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_Activity﹕ Failed to generate video preview
    12-22 21:49:53.339  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Released all resources
    12-22 21:49:53.729  15679-15679/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Released all resources
    
    bug 
    opened by Frank-Zhu 18
  • Adding ability to switch between front and rear facing camera.

    Adding ability to switch between front and rear facing camera.

    • This will allow the user to switch between front and rear-facing camera and record the video by adding one camera toggle button. (See the screen shot.) Camera toggle switch
    • The developer can also open front-facing camera by default by passing VideoCaptureActivity.EXTRA_CAMERA_FACING parameter.
    • The developer can also disable camera toggle switch by passing false to allowFrontFacingCamera while creating CaptureConfiguration. By default, camera toggle switch is on.
    opened by kevalpatel2106 15
  • Add target repository feature

    Add target repository feature

    • Added an optional extra to the VideoCaptureActivity as EXTRA_OUTPUT_DIRECTORY
      • this extra (a string) is the name of your folder (or sub-folder, see below)
    • Added this feature to the example CaptureDemoFragment
      • as an EditText where you enter the name of your folder (or sub-folder if you enter e.g. folder/sub-folder). When the EditText doesn't have focus anymore, it's automatically filled with the entire external directory path (in grey the default root path followed by your folder/sub-folder name in black). When the EditText gain focus again, the default root path is cleared out, leaving only what you have typed in - to avoid confusions.
    • I have also updated the Readme file.
    • I haven't touched the version number/code. I have absolutely no clue if I should have done it or not.
    • I have updated the buildToolsVersion from 26.x to 27.x and the gradle version from 3.x to 4.x - but again, I did that to suits my needs but don't really know if I was suppose to do that or not, or if it affects you somehow.
    opened by Cdik 6
  • Can't capture video : Camera disabled or in use by other process

    Can't capture video : Camera disabled or in use by other process

    Hi,

    I can't get the camera working. When the phone is in portrait, I get the icon asking to rotate the phone, but when I do that, I get this error :

    Can't capture video : Camera disabled or in use by other process

    My code is basic :

    CaptureConfiguration configuration = new CaptureConfiguration(PredefinedCaptureConfigurations.CaptureResolution.RES_1080P, PredefinedCaptureConfigurations.CaptureQuality.HIGH, 120, 200000, true, false);
    
    String filename= Environment.getExternalStorageDirectory().getAbsolutePath() + "/myvideo.mp4";
    
    final Intent intent = new Intent(getActivity(), VideoCaptureActivity.class);
    intent.putExtra(VideoCaptureActivity.EXTRA_CAPTURE_CONFIGURATION, configuration);
    intent.putExtra(VideoCaptureActivity.EXTRA_OUTPUT_FILENAME, filename);
    startActivityForResult(intent, 101);
    

     The phone is an Honor 5x, with Android 6.0. What am I doing wrong ?

    The console :

    W/CameraBase: An error occurred while connecting to camera: 0
    E/Camera-JNI: android_hardware_Camera_native_setup Error: -1 
    E/Camera: Camera new cameraInitNormal:-1
    W/System.err: java.lang.RuntimeException: Unknown camera error(-1)
    W/System.err:     at android.hardware.Camera.<init>(Camera.java:578)
    W/System.err:     at android.hardware.Camera.open(Camera.java:399)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.NativeCamera.openNativeCamera(NativeCamera.java:48)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:53)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.<init>(VideoRecorder.java:59)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73)
    W/System.err:     at android.app.Activity.performCreate(Activity.java:6372)
    W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2406)
    W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2513)
    W/System.err:     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4136)
    W/System.err:     at android.app.ActivityThread.access$1000(ActivityThread.java:168)
    W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
    W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err:     at android.os.Looper.loop(Looper.java:150)
    W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5639)
    W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
    W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
    W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
    E/VideoCapture_Exception: Unable to open camera - Camera disabled or in use by other process
    W/System.err: com.jmolsmobile.landscapevideocapture.camera.OpenCameraException: Camera disabled or in use by other process
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:56)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.<init>(VideoRecorder.java:59)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73)
    W/System.err:     at android.app.Activity.performCreate(Activity.java:6372)
    W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2406)
    W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2513)
    W/System.err:     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4136)
    W/System.err:     at android.app.ActivityThread.access$1000(ActivityThread.java:168)
    W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
    W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err:     at android.os.Looper.loop(Looper.java:150)
    W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5639)
    W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
    W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
    W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
    W/CameraBase: An error occurred while connecting to camera: 0
    E/Camera-JNI: android_hardware_Camera_native_setup Error: -1 
    E/Camera: Camera new cameraInitNormal:-1
    W/System.err: java.lang.RuntimeException: Unknown camera error(-1)
    W/System.err:     at android.hardware.Camera.<init>(Camera.java:578)
    W/System.err:     at android.hardware.Camera.open(Camera.java:399)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.NativeCamera.openNativeCamera(NativeCamera.java:48)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:53)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.<init>(VideoRecorder.java:59)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73)
    W/System.err:     at android.app.Activity.performCreate(Activity.java:6372)
    W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2406)
    W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2513)
    W/System.err:     at android.app.ActivityThread.access$900(ActivityThread.java:168)
    W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
    W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err:     at android.os.Looper.loop(Looper.java:150)
    W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5639)
    W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
    W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
    W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
    E/VideoCapture_Exception: Unable to open camera - Camera disabled or in use by other process
    W/System.err: com.jmolsmobile.landscapevideocapture.camera.OpenCameraException: Camera disabled or in use by other process
    W/System.err:     at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:56)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.<init>(VideoRecorder.java:59)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89)
    W/System.err:     at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73)
    W/System.err:     at android.app.Activity.performCreate(Activity.java:6372)
    W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2406)
    W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2513)
    W/System.err:     at android.app.ActivityThread.access$900(ActivityThread.java:168)
    W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
    W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err:     at android.os.Looper.loop(Looper.java:150)
    W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5639)
    W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
    W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
    W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
    
    opened by fbayle 6
  • Move dependencies to main build.gradle

    Move dependencies to main build.gradle

    Its easier to update dependencies, update CI servers file and track library changes between submodules moving dependencies to main build.grade or what do you think?

    opened by danielgomezrico 5
  • On Android 6.0 camera does not start

    On Android 6.0 camera does not start

    Android4.4.2,It runs normally. on Android6.0 ,Exception:Camera disabled or in use by other process

    Here is the log: W/System.err: java.lang.RuntimeException: Fail to connect to camera service W/System.err: at android.hardware.Camera.(Camera.java:542) W/System.err: at android.hardware.Camera.open(Camera.java:397) W/System.err: at com.jmolsmobile.landscapevideocapture.camera.NativeCamera.openNativeCamera(NativeCamera.java:27) W/System.err: at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:54) W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:63) W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:58) W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:83) W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:71) W/System.err: at android.app.Activity.performCreate(Activity.java:6303) W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2374) W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481) W/System.err: at android.app.ActivityThread.access$900(ActivityThread.java:153) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) W/System.err: at android.os.Looper.loop(Looper.java:148) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5432) W/System.err: at java.lang.reflect.Method.invoke(Native Method) W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:735) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) E/VideoCapture_Exception: Unable to open camera - Camera disabled or in use by other process W/System.err: com.jmolsmobile.landscapevideocapture.camera.OpenCameraException: Camera disabled or in use by other process W/System.err: at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:57) W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:63) W/System.err: at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:58) W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:83) W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:71) W/System.err: at android.app.Activity.performCreate(Activity.java:6303) W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2374) W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481) W/System.err: at android.app.ActivityThread.access$900(ActivityThread.java:153) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) W/System.err: at android.os.Looper.loop(Looper.java:148) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5432) W/System.err: at java.lang.reflect.Method.invoke(Native Method) W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:735) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)

    opened by easytome 4
  • java.lang.IllegalArgumentException: Unsupported angle: -180

    java.lang.IllegalArgumentException: Unsupported angle: -180

    java.lang.IllegalArgumentException: Unsupported angle: -180 at android.media.MediaRecorder.setOrientationHint(MediaRecorder.java:419) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.configureMediaRecorder(VideoRecorder.java:148) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initRecorder(VideoRecorder.java:122) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.startRecording(VideoRecorder.java:87) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.toggleRecording(VideoRecorder.java:80)

    opened by MohammadRezaei92 4
  • Max Duration not used in version 1.0.7

    Max Duration not used in version 1.0.7

    Currently if you set the max duration in your capture configuration it is not being used. The sample library is using version 1.0.6 of the library so something from that version to 1.07 either removed or broke this piece. Trying to locate what specifically changed in that version history.

    I set your sample to use 1.0.7 from maven locally and was able to replicate in that and my sample app.

    Example configuration when using version 1.0.7 that fails -

    final  CaptureConfiguration config = new CaptureConfiguration(CaptureResolution.RES_1080P, CaptureQuality.HIGH, 5, CaptureConfiguration.NO_FILESIZE_LIMIT);
    
    opened by obj63mc 4
  • Changing target directory

    Changing target directory

    Hi,

    First, thanks for this library :) It has been very useful for me.

    Is there a way I can choose the target folder of the recorded video? I have seen that your VideoFile.class is creating a Movies directory with the getFile() function but how can I override it?

    Thanks in advance. Cedric

    opened by Cdik 3
  • How can I use this in portrait mode instead?

    How can I use this in portrait mode instead?

    I'm trying to see if there is a configuration param I can pass to make it Portrait, and even If I get portrait, the buttons would be on top I think. Any help?

    God Speed.

    opened by franklinexpress 3
  • Removing multiplication to MS

    Removing multiplication to MS

    With the changing to using a CameraProfile for the camera’s settings, duration should be set in seconds. updating this to remove the multiplication and fixing issue #8

    opened by obj63mc 3
  • Not able to change icons

    Not able to change icons

    Hi, I want to change icons for start video, stop the video and flip the camera. Is it possible to change the icon? If yes, then, please provide instructions for that. Please help.

    opened by Yesha052 0
  • Android 4.2.2 Capture failed

    Android 4.2.2 Capture failed

    com.jmolsmobile.landscapevideocapture_sample W/System.err: java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.native_setup(Native Method) at android.hardware.Camera.(Camera.java:340) at android.hardware.Camera.open(Camera.java:302) at com.jmolsmobile.landscapevideocapture.camera.NativeCamera.openNativeCamera(NativeCamera.java:48) at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:53) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:59) at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89) at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) 08-27 10:48:31.900 3252-3252/com.jmolsmobile.landscapevideocapture_sample E/VideoCapture_Exception: Unable to open camera - Camera disabled or in use by other process 08-27 10:48:31.900 3252-3252/com.jmolsmobile.landscapevideocapture_sample W/System.err: com.jmolsmobile.landscapevideocapture.camera.OpenCameraException: Camera disabled or in use by other process at com.jmolsmobile.landscapevideocapture.camera.CameraWrapper.openCamera(CameraWrapper.java:56) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.initializeCameraAndPreview(VideoRecorder.java:64) at com.jmolsmobile.landscapevideocapture.recorder.VideoRecorder.(VideoRecorder.java:59) 08-27 10:48:31.910 3252-3252/com.jmolsmobile.landscapevideocapture_sample W/System.err: at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.initializeRecordingUI(VideoCaptureActivity.java:89) at com.jmolsmobile.landscapevideocapture.VideoCaptureActivity.onCreate(VideoCaptureActivity.java:73) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method)

    opened by zdc939023 0
Releases(1.3.0)
  • 1.3.0(Mar 15, 2017)

  • 1.2.2(Oct 31, 2016)

    • Added support for front camera
    • Able to toggle between front and back camera

    Huge thanks to @kevalpatel2106 and @danielgomezrico for their contribution

    Source code(tar.gz)
    Source code(zip)
  • 1.1.4(Apr 18, 2016)

    • Optionally show recording time (default off)
    • Ability to style recording time by overriding layout_recordingtime.xml

    Thanks to @fchauveau for the pull request!

    Source code(tar.gz)
    Source code(zip)
  • 1.1.3(Dec 12, 2015)

    Bugfixes:

    • fixed upside down camera preview for reverse landscape
    • fixed wrong rotation for rotated camera modules (e.g. Nexus 5)
    • better fallback to choose RecordingProfile
    • fixed crash when no browser
    Source code(tar.gz)
    Source code(zip)
  • 1.1.2(Sep 10, 2015)

Owner
Jeroen Mols
Jeroen Mols
Quick photo and video camera with a flash, customizable resolution and no ads.

Simple Camera A camera with flash, zoom and no ads. The camera is usable for both photo taking and video recording. You can switch between front and r

Simple Mobile Tools 644 Jan 7, 2023
📸 Use Android camera to take pictures and videos, based on `camera2` api.

Camera Use Android camera to take pictures and videos, based on camera2 api. Features Auto filled CameraView for previewing Support both image capture

Hong Duan 119 Nov 25, 2022
Android camera and serial communication utility that interacts with another device via a USB connection.

PVIT-Payload-Source Android camera and serial communication utility that interacts with another device via a USB connection. PVIT = Palos Verdes Insti

Zeroz & Onez 1 Nov 10, 2021
NguyenThienAn06105 - This repository consist of the code to read camera data on ESP8266 and a simple Android application to visualize the …

MLX90640-HeatCamera This repository consist of the code to read camera data on ESP8266 and a simple Android application to visualize the result. There

Christian Hein 0 Jan 1, 2022
Measures human heart rate using camera and flash light.

Heart-Rate-Ometer Introduction Measures human heart rate using camera and flash light. How-it-works https://github.com/phishman3579/android-heart-rate

Jan Rabe 81 Jun 29, 2022
Wrapper around the android Camera class that simplifies its usage

EasyCamera Wrapper around the android Camera class that simplifies its usage (read more about the process) Usage: // the surface where the preview wil

Bozhidar Bozhanov 642 Nov 27, 2022
Android library to choose image from gallery or camera with option to compress result image

ImagePicker Android library to choose image from gallery or camera with option to compress result image. Download Add this to your project's build.gra

Mayank Nagwanshi 73 May 20, 2022
An Android App that uses Machine Learning to recognize the objects in an image captured from the phone's camera

Camera App ?? Description An Android App that uses Machine Learning (ML) to recognize the objects in an image captured from the phone's camera. • Allo

Shikeya Anderson 1 Dec 31, 2022
A new camera app for GrapheneOS based on the modern CameraX library.

This is the new GrapheneOS Camera app based on Android's modern CameraX library. It's currently in the alpha phase and isn't yet included in GrapheneO

GrapheneOS 513 Jan 1, 2023
Android application to preview, record (MediaRecorder), and fetch each image from both front and rear cameras simultaneously

DuoCamera ?? Overview Android application to preview, record (MediaRecorder) and fetch each image from both front and rear cameras simultaneously. The

Igor Lashkov 5 Nov 28, 2022
A library to take picture easy, transform your data in different format and save photos in your device

A Magic library to take photos and select pictures in Android. In a simple way and if you need it also save the pictures in device, and facial recogni

Fabian Rosales (Frosquivel Developer) 331 Nov 20, 2022
Instagram like Image Picker for Android

ImagePicker A simple Instagram like library to select images from the gallery and camera. Screenshot Usage For full example, please refer to the sampl

Akvelon 21 Sep 28, 2022
Image Picker library for Android

Ronnie-Image-Picker Asks for Camera and storage permission and return uri of the images taken or picked from the gallery. Min Api Level: 16 Build Syst

Ronnie Otieno 33 Nov 19, 2022
Bootcamp - Digital Innovation One e NTT Data - Aula de Recursos Nativos do Android

Recursos-Nativos-Android -Foto e Camera Bootcamp - Digital Innovation One e NTT Data - Aula de Recursos Nativos do Android Tutorial de uso da bibliote

Anne Nicolle Zimmermann 0 Jan 3, 2022
Snappy - an android camerax library for taking snapshot fast & simple

Snappy is an android camerax library for taking snapshot fast & simple. Easy to integrate, 100% Kotlin & jetpack compose driven.

Nils Druyen 16 Dec 15, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Dec 29, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Nov 22, 2022
Quality-Tools-for-Android 7.5 0.0 L5 Java This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android platform.

Quality Tools for Android This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android pl

Stéphane Nicolas 1.3k Dec 27, 2022
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Ionic Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a sin

Ionic 48.4k Jan 3, 2023