• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

recording using MediaRecorder API-output file size 0 bytes. please help

AndroiDev

Lurker
Jun 9, 2010
8
0
I've tried recording video using MediaRecorder API but the file that gets saved each time is of 0 bytes.
I use the MediaRecorder recorder = new MediaRecorder(); ad then recorder.setVideoSource . . .recorder.prepare() to generate the preview and when the user clicks record, i say recorder.start() but the file recorded is of 0 bytes. And after some time, recorder.stop() -on user click that is.
What can cause such a problem? Please help. This is quite urgent and I would be very grateful for any help. I have a deadline.
 
I've tried recording video using MediaRecorder API but the file that gets saved each time is of 0 bytes.
I use the MediaRecorder recorder = new MediaRecorder(); ad then recorder.setVideoSource . . .recorder.prepare() to generate the preview and when the user clicks record, i say recorder.start() but the file recorded is of 0 bytes. And after some time, recorder.stop() -on user click that is.
What can cause such a problem? Please help. This is quite urgent and I would be very grateful for any help. I have a deadline.

i also receive zero file even with no header, if any one fix this issue please help up
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones