How to record a video with low frame rate in Android? -


i'm working on project needs create gif image recording video , convert video gif. this, follow 2 steps:

  1. convert video list of images.
  2. convert list of images gif.

the question is: how can record video length 10 seconds , frame count 20 frame. mediarecorder.setvideoframerate(framecount) doesn't work reasons.

        mediarecorder.setcamera(gifcamera.c);           mediarecorder.setaudiosource(mediarecorder.audiosource.camcorder);         mediarecorder.setvideosource(mediarecorder.videosource.camera);         // mediarecorder.setoutputformat(mediarecorder.outputformat.mpeg_4);          mediarecorder.setprofile(camcorderprofile                 .get(camcorderprofile.quality_high));         mediarecorder.setoutputfile(appconst.video_path);         camera.size bestsize = gifcamera.getbestsize();         system.out.println(bestsize.width);         system.out.println(bestsize.height);         mediarecorder.setvideosize(bestsize.width, bestsize.height);         mediarecorder.setvideoframerate(30);          mediarecorder.setpreviewdisplay(mycamerasurfaceview.getholder()                 .getsurface());          try {             mediarecorder.prepare();         } catch (illegalstateexception e) {             releasemediarecorder();             return false; 

thanks attention , sorry bad english.

this more of alternative answer why wouldn't try taking photo every 0.5 second instead of recording video, if want 2 frame/s ?


Comments