B4A Library AndroidVideoCapture - video recorder that is 100% embedded in B4A (6 Jan - new Lib Files in post 48)

mvpmedia

Member
Licensed User
Longtime User
and is there anyway to disable or modify the system tones when setstartstoprecord is triggered??
 

mvpmedia

Member
Licensed User
Longtime User
Here are minor feature requests for the lib. I don't mind donating more and more:

1. You updated the lib to include setorientation(90) but setOrientationHint was still set for 0. This made the videos play back sideways. Can you allow both setorientation and orientationhint to be selected upon Initialize such as (0,0) or (90,90)? If not I would like setOrientationHint(90).

2. Is there anyway to disable or modify the system tones when setstartstoprecord is triggered??

3. Live Video Preview before recording starts.
 

ovasquez

Member
Licensed User
Longtime User
CaptureVideoRecord may be configured as unspecified SupportedOrientations? when I setup this way and change the orientation of the mobile, this generate error java.lang.nullpointer.

sorry for my English
 

Johan Schoeman

Expert
Licensed User
Longtime User
CaptureVideoRecord may be configured as unspecified SupportedOrientations? when I setup this way and change the orientation of the mobile, this generate error java.lang.nullpointer.

sorry for my English
See point (1) in post #1 of this thread - it is meant for use in landscape
 

JS Hart

Member
Licensed User
Longtime User
Is there a way to set the Video recording folder (avc1.VideoFolderName) to a folder that is on a removable SD Card? It seems that it will only allow recording to the internal storage as of now...
 

hears

Active Member
Licensed User
Longtime User
can you share this libary JAVA code ? i try make a same libary now .
 

Johan Schoeman

Expert
Licensed User
Longtime User
can you share this libary JAVA code ? i try make a same libary now .
The Java code is in post #75 of this thread. Something that you can start with
 

biometrics

Active Member
Licensed User
Longtime User
Is it possible to set the video bit and frame rate?

If not through the library maybe with Reflection/JavaObject/inline-Java to mediaRecorder?

In the comments section of the link in post #1 for example:

mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mediaRecorder.setMaxDuration(60000);
mediaRecorder.setVideoSize(720,480);
mediaRecorder.setVideoFrameRate(24);

Btw @Johan Schoeman, I'm in Cape Town
 

Johan Schoeman

Expert
Licensed User
Longtime User
I will revisit this lib as soon as what I have some time available to do so (mostly on weekends). Have not looked at the code of is library in the last (at least) two years.
 

biometrics

Active Member
Licensed User
Longtime User
I will revisit this lib as soon as what I have some time available to do so (mostly on weekends). Have not looked at the code of is library in the last (at least) two years.
Thanks.

Btw I found a minor bug. Even with StopCameraOnMaxSizeDuration = False video recording stops after three seconds. I worked around that by setting MaximimDuration to 24 hours.

One more thing, it beeps when recording starts and stops. Could you make it optional.
 

biometrics

Active Member
Licensed User
Longtime User
Running your sample crashes on the line Activity.LoadLayout("main") on Android 4.0.3 with the following log:

B4X:
Error occurred on line: 38 (Main)
java.lang.RuntimeException: java.lang.NullPointerException
   at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
   at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
   at JHS.AndroidVideoCapture.main._activity_create(main.java:395)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
   at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
   at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
   at JHS.AndroidVideoCapture.main.afterFirstLayout(main.java:104)
   at JHS.AndroidVideoCapture.main.access$000(main.java:17)
   at JHS.AndroidVideoCapture.main$WaitForLayout.run(main.java:82)
   at android.os.Handler.handleCallback(Handler.java:605)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4424)
   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:784)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
   at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
   at android.view.ViewGroup.addViewInner(ViewGroup.java:3336)
   at android.view.ViewGroup.addView(ViewGroup.java:3208)
   at android.view.ViewGroup.addView(ViewGroup.java:3188)
   at videowrapper.videoWrapper.AddToParent(videoWrapper.java:201)
   at videowrapper.videoWrapper.DesignerCreateView(videoWrapper.java:209)
   at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
   at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
   ... 22 more
** Activity (main) Resume **
 

Rusty

Well-Known Member
Licensed User
Longtime User
Using your latest sample, I get: Any ideas/suggestions?
 

marvin944

Member
Licensed User
Longtime User
Is it possible with this library to grab one frame of the live video and save/use it as if it where a picture?
 

Johan Schoeman

Expert
Licensed User
Longtime User
Is it possible with this library to grab one frame of the live video and save/use it as if it where a picture?
The library is almost 8 years old and no longer android-latest-version compliant. Chuck it in the bin. Probably not worth the effort to use it.
 

Justcooldev

Member
Licensed User
Hi, your project is so good !
But how to use the project only with orientation : portrait ?
Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…