Endless video

I am creating an application that will contain a 60 second buffer of recorded video. Video recording should last a long time (24-48 hours). I have no problem recording, but it seems like after a few hours I’m losing touch with mine Cameraor Surface.

I set the maximum duration: MediaRecorder.setMaxDuration(10 * 1000)so that the record is split into 10 second segments.

Each time I restart my recording, I enlarge the output file so that 6 files are reused. The goal is to constantly keep a 60 second history.

If I stop recording after 1-2 hours, the video playback will be great. However, if I allow him to work for 3-4 hours and stop recording, the video shows only a black output with sound. In other words, he seemed to lose touch with the camera or surface , but continued to record sound .

Can anyone explain this behavior?

If nothing else, is there a better way to record X second segments of the video?

FYI: I use tracking lock so that the screen / processor stays on.

+5
source share
1 answer

- . , , , , .

-, , . , , . , , , .

:

, , Demo API : CameraPreview - .

. , , CameraPreview .

+2

All Articles