0
votes

Can we reset all the values that hold in mediaRecorder while recording video? I've tried just using mediaRecorder.reset() while recording video. But it won't work. I don't know is it possible or not. If it is possible please any references will appreciate.

I've read this and also google developers, mediaRecorder in developers. But any of references didn't mention my issue.

EDIT :

What I want is while recording a video set mediaRecorder.reset() and mediaRecorder.start(). The problem occurs when I'm doing this. I need to chunk of video clips while recording the same video. Need those process in parallel. While I'm trying to stop and restart the camera capturing methods it will miss many frames. Bcoz handling camera is somewhat cost for the processor. I tried this and it occurs some errors that telling session configuration failed. Now I'm stuck in here. Need help!

Thank you for your valuable time.

1
What are you trying to accomplish by doing this?Eddy Talvala
I'll edit my problem @EddyTalvalauser8646027

1 Answers

0
votes

Edit in response to clarifications:

Ok, so you want to split the video file into multiple separate files.

You'll need to use the lower-level APIs (MediaCodec, MediaMuxer) to implement this yourself; the higher-level MediaRecorder does not support this without losing frames.

Original:

So you're trying to pause the video recording temporarily.

Unfortunately, there's no support for this before API level 24, which added MediaRecorder.pause(). You can't call MediaRecorder.reset() mid-video and have it work.

All you can really do is to record the full video and then post-process it to crop sections you don't want.