Giter Site home page Giter Site logo

touchtorecord's Introduction

TouchToRecord - Like Vine Instagram Whatsapp Video Recorder

This code just provide a way to record audio and video separately and then merge them both using ffmpeg command, so that we can have pause/record function for user.

Touch/Press android camera surface view to record video using FFmpeg Recorder from JavaCV. Using this I have implemented Vine like touch and hold video recording feature.

It will stop recording the video when user will lift the finger from camera surface view. User can pause and continue video recording after any interval of time. Once user have finished recording the video, click next to play the recorded video.

JavaCv Credits: https://github.com/bytedeco/javacv

LICENSE:

Give Credits and add this repo url to your blog/repo. No License restriction from me but JAVACV license has to be obeyed as I have made this code with help of that repo. Check that at the time you are using this code.

touchtorecord's People

Contributors

sourab-sharma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

touchtorecord's Issues

Can you help me install this sample

I'm a newbie in Android, I'm using android studio and I don't know how to use your project.
Could you please show me how?
This is my Skype ID: khoinguyeniosdev, please help me.
Thank you a lot.

Grow Heap

I run the app and I found Grow heap Exception,how can I fit it ?
And i have a little request,can you support me the JNI file?

Usage

Hi Sourab,

Would you mind add a Wiki page on how to use this Android lib, it's better to provide a demo application to use it.

Thanks,
Carter

Error in TouchToRecord

Hi Sourab,

We got a chance to go through your work in VideoToRecord and it was amazing. You have done a great job 👍

We wanted to try it our self and downloaded the files from Github and configured correctly but somehow we couldn't make it work. We addressed few issues by ourselves but it would be great if you could let us know if you have any solution for the below issues,

"
09-28 17:13:01.334: E/Trace(1396): error opening trace file: No such file or directory (2)
09-28 17:13:01.394: W/dalvikvm(1396): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/javacv/recorder/FFmpegRecorderActivity;
09-28 17:13:01.394: W/dalvikvm(1396): Class init failed in newInstance call (Lcom/javacv/recorder/FFmpegRecorderActivity;)
09-28 17:13:01.394: D/AndroidRuntime(1396): Shutting down VM
09-28 17:13:01.394: W/dalvikvm(1396): threadid=1: thread exiting with uncaught exception (group=0x2bd39930)
09-28 17:13:01.404: E/AndroidRuntime(1396): FATAL EXCEPTION: main
09-28 17:13:01.404: E/AndroidRuntime(1396): java.lang.ExceptionInInitializerError
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.Class.newInstanceImpl(Native Method)
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.Class.newInstance(Class.java:1319)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.os.Handler.dispatchMessage(Handler.java:99)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.os.Looper.loop(Looper.java:137)
09-28 17:13:01.404: E/AndroidRuntime(1396): at android.app.ActivityThread.main(ActivityThread.java:5039)
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.reflect.Method.invokeNative(Native Method)
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.reflect.Method.invoke(Method.java:511)
09-28 17:13:01.404: E/AndroidRuntime(1396): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-28 17:13:01.404: E/AndroidRuntime(1396): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-28 17:13:01.404: E/AndroidRuntime(1396): at dalvik.system.NativeStart.main(Native Method)
09-28 17:13:01.404: E/AndroidRuntime(1396): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load checkneon from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.javacv.recorder-1.apk,libraryPath=/data/app-lib/com.javacv.recorder-1]: findLibrary returned null
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.Runtime.loadLibrary(Runtime.java:365)
09-28 17:13:01.404: E/AndroidRuntime(1396): at java.lang.System.loadLibrary(System.java:535)
09-28 17:13:01.404: E/AndroidRuntime(1396): at com.javacv.recorder.FFmpegRecorderActivity.(FFmpegRecorderActivity.java:147)
09-28 17:13:01.404: E/AndroidRuntime(1396): ... 15 more
"

Your earliest response would be appreciated.

Thanks
Sid

setParameters failed

Hi Sourab,

I'm curenlty trying to use your TouchToRecord which is working perfectly on galaxy S2 4.1.2 this is a great app Congrats.

But with a Galaxy Nexus I have some issues with the setParameters. I've looked all around the web but wasn't able to find any solution that would work. Would you have any idea that could help me please ?

Thank you.

Mehdi

video watermarking

I'd like to know how to add watermark to a video based on this project,please help on this

Image Capture Questions

By the way this project is absolutely amazing, i'm surprised it isn't really popular after the massive bunch of bad camera projects i've tested, not an issue I was just wondering how you would suggest I go about capturing a single frame (to take a picture instead of a video)?

Google Reject My App implement This Library With Reason: OpenSSL's Security Vulnerabilities .

I have implement this library for my app. But when I publish my app to Google Play, they reject it with reason:

This app uses software that contains security vulnerabilities for users. Below is the list of vulnerabilities and the corresponding APK versions that were detected in your recent submission. Please upgrade your app(s) as soon as possible and increment the version number of the upgraded APK.

Vulnerability: OpenSSL
APK Version(s): 1

The vulnerabilities were fixed in OpenSSL versions beginning with 1.0.1h, 1.0.0m, and 0.9.8za. To confirm your OpenSSL version, you can do a grep via:

$ unzip -p YourApp.apk | strings | grep "OpenSSL"

You can find more information and next steps in this Google Help Center article.

I have researched around internet and found warning: OpenSSL using on curl library. Then, can you update OpenSSL and rebuild lib for me?

Please help me fix it!

Thank so much!

App crash while start video recording

Hi sourab

i have tried to use this to my project camera started nicely once i touch camera surface view it got crash

due to some java.nio.BufferOverflowException

Logs i have found in logcat

FATAL EXCEPTION: main
Process: com.sourab.touch.to.record.demo, PID: 3232
java.nio.BufferOverflowException
at java.nio.Buffer.checkPutBounds(Buffer.java:183)
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:356)
at java.nio.ByteBuffer.put(ByteBuffer.java:721)
at com.javacv.recorder.FFmpegRecorderActivity$CameraView.onPreviewFrame(FFmpegRecorderActivity.java:614)
at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1112)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

FFMPEG merge recorded video with external audio

Hi,

Is it possible to execute FFMPEG command for merging recorded video (without sound) with some external audio file?

I've tried to achieve this by forming command like this:

ffmpeg -i /storage/emulated/0/video_input.mp4 -i /storage/emulated/0/audio_input.mp3 -shortest /storage/emulated/0/Android/data/com.example.packagename/video/Vid_1460027568565.mp4

But, as a result I got only this log message "ffmpeg: Exit program called. 1".

Thanks!

Crash when change front camera

Dear sir,

I run your code on my device(Vega R3) that installed with custom rom(Android 5.1.1).
When i click change front camera then app crash at handleSurfaceChanged method.

And Logs are showed:

02-04 09:22:32.738 195-195/? E/QualcommCamera: Qint android::set_parameters(camera_device_, const char_): E
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setParameters(const android::QCameraParameters&): E
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: ZSL is enabled 0
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: Enable Low Power Mode
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setPowerMode(const android::QCameraParameters&) Low power mode Enabled value = 1
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: ################requested preview size 640 x 480
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVideoSize(const android::QCameraParameters&): requested record size 800x480
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: Preview size is set with 640x480
02-04 09:22:32.738 195-195/? D/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVideoSize(const android::QCameraParameters&): preview dimensions: 640x480
02-04 09:22:32.738 195-195/? D/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVideoSize(const android::QCameraParameters&): video dimensions: 800x480
02-04 09:22:32.738 195-195/? D/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVideoSize(const android::QCameraParameters&): thumbnail dimensions: 480x288
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: ################requested picture size 640 x 480
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: requested jpeg thumbnail size 320 x 240
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setLensshadeValue(const android::QCameraParameters&):LENS SHADING not supported
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_MCE mode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setSharpness(const android::QCameraParameters&):CONTRAST not supported
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setSaturation(const android::QCameraParameters&):MM_CAMERA_PARM_SATURATION not supported
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setSceneMode(const android::QCameraParameters&):Parameter Scenemode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setContrast(const android::QCameraParameters&):CONTRAST not supported
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: Setting preview format to 1, i =0, num=4, hal_format=17
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: SkinToneEnhancement is not supported for this sensor
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setHDR(const android::CameraParameters&)
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: HDR string : hdr-off
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: HDR mCurrentHDR = 0, Value : 0
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: Wavelet Denoise is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: ANTIBANDING mode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: Parameter Redeye Reduction is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setPreviewFpsRange(const android::QCameraParameters&): No change in FpsRange
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_DIS_ENABLE mode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_FULL_LIVESHOT mode is not supported for this sensor
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: int android::QCameraHardwareInterface::getNumOfSnapshots(const android::QCameraParameters&): prop enable/disable = 0
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: number of snapshots = 1
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_AEC_LOCK mode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_ANTISHAKE mode is not supported for this sensor
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVTS(const android::CameraParameters&)
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: VTS string : off
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: VTS Value : 0
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setVEGAEYE(const android::CameraParameters&)
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: KEY_VEGAEYE string : vegaeye-off
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: KEY_VEGAEYEValue : 0
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setFlashApp(const android::CameraParameters&)
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: KEY_FLASH string : (null)
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_OJT mode is not supported for this sensor
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setFlash(const android::QCameraParameters&): E
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setFlash(const android::QCameraParameters&):LED FLASH not supported
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setFocusMode(const android::QCameraParameters&):Could not look up str value
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: Invalid focus mode value: fixed
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: MM_CAMERA_PARM_EXPOSURE_COMPENSATION mode is not supported for this sensor
02-04 09:22:32.738 195-195/? E/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setHighFrameRate(const android::QCameraParameters&): MM_CAMERA_PARM_HFR not supported
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setZSLBurstLookBack(const android::QCameraParameters&): look_back =0
02-04 09:22:32.748 728-1751/system_process W/ActivityManager: Force finishing activity 1 vn.inet.funtime/.activities.FFmpegRecorderActivity
02-04 09:22:32.738 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setZSLBurstInterval(const android::QCameraParameters&): Interval =1
02-04 09:22:32.738 195-195/? D/QCameraHWI_Parm: Param mNoDisplayMode =0
02-04 09:22:32.748 195-195/? I/QCameraHWI_Parm: int android::QCameraHardwareInterface::getISOSpeedValue(), iso_value - 0
02-04 09:22:32.748 195-195/? D/QCameraHWI_Parm: [CE] [1] [setColorExtraction] set pantech-colorextraction value = 0
02-04 09:22:32.748 195-195/? D/QCameraHWI_Parm: [CE] [2] [setColorExtraction] skip, colorExtraction on/off=off
02-04 09:22:32.748 195-195/? I/QCameraHWI_Parm: android::status_t android::QCameraHardwareInterface::setParameters(const android::QCameraParameters&): X
02-04 09:22:32.748 6607-6607/vn.inet.funtime D/AndroidRuntime: Shutting down VM
02-04 09:22:32.748 6607-6607/vn.inet.funtime E/AndroidRuntime: FATAL EXCEPTION: main
Process: vn.inet.funtime, PID: 6607
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1972)
at vn.inet.funtime.activities.FFmpegRecorderActivity.handleSurfaceChanged(FFmpegRecorderActivity.java:921)
at vn.inet.funtime.activities.FFmpegRecorderActivity.access$2100(FFmpegRecorderActivity.java:85)
at vn.inet.funtime.activities.FFmpegRecorderActivity$2.onPostExecute(FFmpegRecorderActivity.java:386)
at vn.inet.funtime.activities.FFmpegRecorderActivity$2.onPostExecute(FFmpegRecorderActivity.java:360)
at android.os.AsyncTask.finish(AsyncTask.java:636)
at android.os.AsyncTask.access$500(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5293)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
02-04 09:22:32.808 728-19847/system_process I/OpenGLRenderer: Initialized EGL, version 1.4
02-04 09:22:32.829 728-7061/system_process W/DropBoxManagerService: Dropping: data_app_crash (1338 > 0 bytes)
02-04 09:22:33.259 728-755/system_process W/ActivityManager: Activity pause timeout for ActivityRecord{1c1a98d2 u0 vn.inet.funtime/.activities.FFmpegRecorderActivity t294 f}
02-04 09:22:42.758 728-755/system_process W/ActivityManager: Launch timeout has expired, giving up wake lock!

Please help me check bugs.

Thanks!

FFMPEG adding command

Hi,

I was wondering if it is possible for you to build an function, where people can add there own command for example to put an filter, or watermark over the video. I also looked into this code, https://github.com/GitHubber15614/TouchToRecord, but this setup is totally different then you've right know. The way you use ffmpeg now is much better than than the code in the link.

It would be great if you could build or maybe could say how to build a functionality were i could add an functionality to add my own commands (In this type (String [] ). If you can make this function but not want to make this public. I suggest to make it private only for me i will pay you than for this option.

Please let me know what your thoughts and possiblities are!

Thanks in advance,

Yilzer

Missing imports

Hi,

Thank you very much, this is a great project.
But I have noticed that some imports are missing:

import com.sourab.videorecorder.interfaces.Interfaces;
import com.sourab.videorecorder.util.CustomUtil;

Can you tell mi if there is some special configuration that needs to be set?

How to cut last recorded frames

it great library , i using this i getting trouble to cutting video , i want to do like instagram as they have features to cut last recorded fragment , can any body help me ? or can suggest me a library which function like instagram

What for is FFmpegFrameRecorder

Hello sourab,

thanks for developing such an amazing piece of code. I have one question about FFmpegFrameRecorder class. Is there any reason for having that one in demo project directly? Because there is already one in com.googlecode.javacv package in javacv.jar file.

Thank you for response,
bakua

Focus when using camera to take photo.

Hi.
First, Thanks very much.
Your example help me complete my task.
But now i want to take a photo on this tutorial. Camera record cannot focus when take photo.
Please help me create focus.
Thanks alot.
P/s : Sorry about my english.

Moov Atom - Urgent

Hi, amazing work.

I implemented touch-to-record to our firms application but getting stream is really slow.
How can I move moov atom to beginning of the MPEG-4 files.
No experience on FFmpeg and this is situation is really urgent.

Best regards.

BufferOverflowException

java.nio.BufferOverflowException at com.javacv.recorder.FFmpegRecorderActivity$CameraView.onPreviewFrame(FFmpegRecorderActivity.java:614)

Setting targetSdkVersion 24, app crashes.

App works perfectly for targetSdkVersion 19 but when we change it to 24 it crashes.

Exception:

Process: com.sourab.videorecorder, PID: 11480
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avcodec
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at org.bytedeco.javacpp.Loader.load(Loader.java:381)
at org.bytedeco.javacpp.avcodec$AVPacket.(avcodec.java:1650)
at com.sourab.videorecorder.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:182)
at com.sourab.videorecorder.FFmpegRecorderActivity.initVideoRecorder(FFmpegRecorderActivity.java:404)
at com.sourab.videorecorder.FFmpegRecorderActivity.access$1700(FFmpegRecorderActivity.java:68)
at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:314)
at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:308)
at android.os.AsyncTask$2.call(AsyncTask.java:295)

I Can't seem to play Videos taken by the library using VideoView from url

I believe it to be a codec issue, yet i have tested with other videos from the internet with same codec and they worked fine :( Please help.

This is the Log:

09-07 12:24:04.509 5094-5094/com.sourab.videorecorder D/MediaPlayer: setDataSource IOException happend :
java.io.FileNotFoundException: No content provider: DOMAIN/VIDEO_FILE_NAMEmp4
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1117)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:970)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:897)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1112)
at android.widget.VideoView.openVideo(VideoView.java:376)
at android.widget.VideoView.access$2100(VideoView.java:73)
at android.widget.VideoView$7.surfaceCreated(VideoView.java:657)
at android.view.SurfaceView.updateWindow(SurfaceView.java:688)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:200)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1018)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2301)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1300)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7017)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
at android.view.Choreographer.doCallbacks(Choreographer.java:590)
at android.view.Choreographer.doFrame(Choreographer.java:560)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6897)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder D/MediaPlayer: Couldn't open file on client side, trying server side
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder V/MediaPlayer: setVideoSurfaceTexture
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder V/MediaPlayer-JNI: setAudioStreamType: 3
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder V/MediaPlayer: MediaPlayer::setAudioStreamType
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder V/MediaPlayer: setVideoSurfaceTexture
09-07 12:24:04.509 5094-5094/com.sourab.videorecorder V/MediaPlayer: prepareAsync
09-07 12:24:08.239 5094-5581/com.sourab.videorecorder V/MediaPlayer: message received msg=100, ext1=1, ext2=-2147483648
09-07 12:24:08.239 5094-5581/com.sourab.videorecorder E/MediaPlayer: error (1, -2147483648)
09-07 12:24:08.239 5094-5581/com.sourab.videorecorder V/MediaPlayer: callback application
09-07 12:24:08.239 5094-5581/com.sourab.videorecorder V/MediaPlayer: back from callback
09-07 12:24:08.249 5094-5103/com.sourab.videorecorder V/MediaPlayer: message received msg=100, ext1=1, ext2=-2147483648
09-07 12:24:08.249 5094-5103/com.sourab.videorecorder E/MediaPlayer: error (1, -2147483648)
09-07 12:24:08.249 5094-5103/com.sourab.videorecorder V/MediaPlayer: callback application
09-07 12:24:08.249 5094-5103/com.sourab.videorecorder V/MediaPlayer: back from callback
09-07 12:24:08.309 5094-5094/com.sourab.videorecorder E/MediaPlayer: Error (1,-2147483648)
09-07 12:24:08.349 5094-5094/com.sourab.videorecorder E/MediaPlayer: Error (1,-2147483648)

save a recording in portrait mode has a rotation problem

I am trying to record a video in portrait mode with the front camera. I have removed screenOrientation="landscape" from FFmpegRecorderActivity in manifest.xml and removed margins from camera layout.

Preview and recording is working but the resulting file is falsely rotated. Front camera footage is rotated 90 degrees clockwise, back camera footage is rotated 90 degrees counterclockwise. I couldn't find the reason for this. Any suggestions?

Different recording speeds

Is it possible to record video at different fps? For example I would like to record video at 120fps.

Thank you!

Application rejection due to OpenSSL

I tried to upload application on Play Store but the app got rejected and I got mail from Google Play with following issue:

img

Mail is regarding openssl outdate. And i found that your library is having .so files which are using openssl. so can you please update those library?
What should i do?
please suggest me answers...

libencoding.so: text relocations

Hi,

On app start, and on preview screen, I receive dialog with next text:

Detected problems with app native libraries (please consult log for detail):
libencoding.so: text relocations

Samsung Galaxy S6 with Android 7.0

screenshot_20170419-114127

Thanks

Video Focus

The recorded video is not focused. Tried with latest devices.

Especially not picking texts.

Also how to increase the video quality/resolution?

Change Preview Size

Hello,
can someone help me i want to change the preview size. I want the surfaceview in fullscreen.
Thanks in advanced

recording is cropped from bottom

what we see during recording on screen is cropped from bottom when saved. the resulting video does not match the preview on screen.

I guess the original library (https://github.com/qdrzwd/VideoRecorder) that you have based on does not have this issue. I correct. It also has the same issue.

1.image is the preview where we can see the monitor logo (hp), while during playback (2. image) we can't

ss_during_recording
ss_during_video_playback

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.