How to set video recording time limit and compress it to 2MB in android? -


i new android, trying develope application record video 10 seconds. code.

 public void startrecordingvideo() {     if (getpackagemanager().hassystemfeature(packagemanager.feature_camera_front)) {         intent intent = new intent(mediastore.action_video_capture);          mediafile = new file(                 environment.getexternalstoragedirectory().getabsolutepath() + "/video.mp4");          videouri = uri.fromfile(mediafile);          intent.putextra(mediastore.extra_video_quality, 1);         intent.putextra(mediastore.extra_duration_limit, 10);          intent.putextra(mediastore.extra_output, videouri);         startactivityforresult(intent, video_capture);     } else {         toast.maketext(this, "no camera on device", toast.length_long).show();     } } 

i set in possible ways, not able achieve target. after attaining this, need compress video 2mb, haven't start working on because stuck in capturing video. kindly me. in advance.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -