How to capture a video in android? -


i trying capture video in android, unable capture it. though code creating 3gp file not able play back. have issues encoding?

mediarecorder videorecorder; sfilepath = ssdpath + "/" + system.currenttimemillis() + ".3gp"; string ssdpath = environment.getexternalstoragedirectory().getpath(); string sfilepath="";  if (videorecorder == null) {    videorecorder = new mediarecorder(); }  videorecorder.setvideosource( mediarecorder.videosource.camera); videorecorder.setoutputformat( mediarecorder.outputformat.three_gpp); videorecorder.setvideosize(640, 480); videorecorder.setvideoframerate(30); videorecorder.setvideoencoder( mediarecorder.videoencoder.h264); videorecorder.setoutputfile(sfilepath); try {  videorecorder.prepare(); } catch (illegalstateexception e) {   e.printstacktrace(); } catch (ioexception e) {    e.printstacktrace(); } videorecorder.start(); 

thy find opensource project, named spydroid, or check sipdroid. examples.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -