Search code examples
androidandroid-mediarecorder

MediaRecorder fails on stop and file isn't playable when using surface video source


MediaRecorder fails on stop and file isn't playable and its size is only 70-110 kb when using mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);

when I stop video recording I get next error

MediaRecorder: stop failed: -1007

I tested that this issue happens on Marshmallow 6.0.1 device

but it works fine for Nougat device

seems the same issue but with no answer here MediaRecorder stop failed Android

UPDATE I rebooted my Marshmallow 6.0.1 device (Xiaomi Redmi 4 Prime/Pro) and it works now...


Solution

  • I rebooted my Marshmallow 6.0.1 device (Xiaomi Redmi 4 Prime/Pro) and it works now

    But it can stop working again very soon...

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