Media Recorder with Google Vision API

Solution 1: From Android Lollipop, a MediaProjection API was introduced which in conjunction with MediaRecorder can be used to save a SurfaceView to a video file. This example shows how to output a SurfaceView to a video file. Solution 2: Alternatively, you can use one of the neat Encoder classes provided in the Grafika repository. … 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