Pause & Resume with Android MediaRecorder (API level < 24)

I could solve this problem using mp4parser library. Thanks much to author of this library 🙂 Add below dependency in your gradle file: compile ‘com.googlecode.mp4parser:isoparser:1.0.2’ The solution is to stop recorder when user pause and start again on resume as already mentioned in many other answers in stackoverflow. Store all the audio/video files generated in … Read more

CamcorderProfile.QUALITY_HIGH resolution produces green flickering video

I came across this question trying to solve the same problem. A solution is given over on xda developer http://forum.xda-developers.com/showthread.php?t=1104970&page=8. It seems that you need to set an obscure parameter “cam_mode” for high definition recording to work: camera = Camera.open(); Camera.Parameters param = camera.getParameters(); param.set( “cam_mode”, 1 ); camera.setParameters( param ); In mediarecorder, you can … Read more

MediaRecorder and VideoSource.SURFACE, stop failed: -1007 (a serious Android bug)

I guess there is no solution so the answer: MediaRecorder/Android is buggy or Mobile companies didn’t care of all Android features while developing their devices Update MediaCodec is also buggy with canvas mSurface = mMediaCodec.createInputSurface(); mSurface.lockHardwareCanvas() It works on much more devices with MediaCodec but still some devices may fail to record video correctly using … Read more

How can I add predefined length to audio recorded from MediaRecorder in Chrome?

This is a chrome bug. FF does expose the duration of the recorded media, and if you do set the currentTimeof the recorded media to more than its actual duration, then the property is available in chrome… var recorder, chunks = [], ctx = new AudioContext(), aud = document.getElementById(‘aud’); function exportAudio() { var blob = … Read more