5

everyone! I have a question. I need some video recorder (library project) which offer the possibility to set programmatically the maximum output file size and resolution of recording video. I know that native android video recorder allows to set max output file size, but it allows to set only two type of quality(best and worst). I need at least three different video resolutions. So maybe someone know library which can help me to solve my problem?

Also good to have: -zoom; -autofocus; -flash;

Thanks!

Vito
  • 1,414
  • 1
  • 13
  • 22

4 Answers4

4

The best libraries which I found:

Vito
  • 1,414
  • 1
  • 13
  • 22
  • Thats nice, Let me look at it. Do you have apk for this library? Any link to download? – Rethinavel Oct 24 '14 at 08:05
  • No, sorry, I have not. Earlier I downloaded source code and build projects with Eclipse. For example CWAC lib has demo project (https://github.com/commonsguy/cwac-camera/tree/master/demo). – Vito Oct 24 '14 at 08:09
  • And open camera apk, seems like there is link for download (http://sourceforge.net/projects/opencamera/files/v_1_20/OpenCamera.apk/download) – Vito Oct 24 '14 at 08:10
  • Open camera is open source and licenced? – Dhrupal May 03 '17 at 11:08
3

To anyone reading this recently, CWAC-Camera mentioned on accepted answer is discontinued, then the author re-attempted for a better version, which is found here. And the demo is here.

I also found Material Camera that is under the Apache License v2.0. Here is the sample project.

There is also ragnraok/RxCamera, based on android.hardware.camera although it is said to be still in very early stage, plus the android reference link says android.hardware.camera2 is the recommended API now.

Ekin
  • 1,957
  • 2
  • 31
  • 45
1

The best libraries which I found: FFmpegVideoRecorder The library provides a way to record multiple videos using MediaRecorder and merge them together using FFmpeg Recorder from JavaCV. It is designed to allow maximum customization of the video encoding and recording.

It has built in activities for easy recording and previewing. But it also exposes basic components that can be used to customize your own UI and logic.

General Features Able to record multiple clips and combine them into one video Camera preview image is scaled, cropped, and padded to exactly how it will be recorded Can generate a thumbnail image for the video Can set recording parameters such as:

  1. video codec
  2. List item
  3. video width
  4. video height
  5. List item
  6. video frame ....etc
  • This library is not working. Followed steps from GitHub. Getting this error: FFmpegRecorderActivity: Error opening camera java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference. Is ffmpeg video recorder working fine for you? – Arjun Aug 25 '19 at 06:10
  • 1
    @Arjun you are Access the Camera multiple time you will access the camera in FFmpagRecoderActivity one time then this Error will be remove . yes its working fine. – zeshan musawar Aug 26 '19 at 03:31
  • Thank you @zeshan for replying. I didn't access the camera multiple times. I've posted the code I've used here https://stackoverflow.com/questions/57652268/ffmpeg-video-recorder-issue Could you please have a look at the code. I tried but getting the same error again. When I click on show error info from Logs it opens files in libraries and shows error in them. I'm unable to understand where the code is going wrong. I would really be grateful if you could help me with this. If possible could you share the snippet of how you're recording the video else visit the link mentioned above – Arjun Aug 26 '19 at 05:40
0

To anyone reading this recently, The author mentioned he plans to DISCONTINUE the project cwac-cam2.. Here: https://github.com/commonsguy/cwac-cam2/issues/336

Aetherna
  • 241
  • 2
  • 9