i'm working on project needs create gif image recording video , convert video gif. this, follow 2 steps:
- convert video list of images.
- 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
Post a Comment