की अवधि प्राप्त करने का कोई तरीका है, मैं वीडियो रिकॉर्ड करने की कोशिश कर रहा हूं और रिकॉर्डिंग पर कुछ सेकंड दिखाना चाहता हूं।क्या चल रहे रिक्रोडिंग
मुझे यह कैसे करना चाहिए?
सार्वजनिक शून्य startRecording (देखें v) {
flipCamera.setVisibility(View.GONE);
captureImage.setVisibility(View.GONE);
String deviceMan = android.os.Build.MANUFACTURER;
this.mediaRecorder = new MediaRecorder();
this.mediaRecorder.setCamera(this.camera);
camera.unlock();
this.mediaRecorder.setCamera(camera);
this.mediaRecorder.setOrientationHint(90);
this.mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
this.mediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
CamcorderProfile camcorderProfile_HQ = CamcorderProfile
.get(CamcorderProfile.QUALITY_480P);
this.mediaRecorder.setProfile(camcorderProfile_HQ);
this.mediaRecorder.setOutputFile(this.initFile().getAbsolutePath());
this.mediaRecorder.setMaxDuration(60000); // Set max duration 60 sec.
this.mediaRecorder.setMaxFileSize(5000000);
this.mediaRecorder.setPreviewDisplay(this.cameraPreview.getHolder()
.getSurface());
this.mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
try {
this.mediaRecorder.prepare();
// start the actual recording
// throws IllegalStateException if not prepared
this.mediaRecorder.start();
Toast.makeText(this, R.string.recording, Toast.LENGTH_SHORT).show();
this.toggleButtons(true);
} catch (Exception e) {
Log.wtf(TAG, "Failed to prepare MediaRecorder", e);
Toast.makeText(this, R.string.cannot_record, Toast.LENGTH_SHORT)
.show();
this.releaseMediaRecorder();
}
}
मैं काफी इसलिए Android के लिए कृपया अगर किसी भी एक मदद कर सकते हैं नया हूँ।
हे @Nana Ghartey अपने समाधान काम करता है .. लेकिन बात यह है .. हर बार जब मैं एक रिकॉर्ड वीडियो समय जोड़ा जाता है। उदाहरण के लिए, मैंने 5 सेकंड के लिए पहला वीडियो और 3 सेकंड के लिए दूसरा वीडियो रिकॉर्ड किया है, फिर यह 00:00 - 00:05 दिखाता है कि पहले वीडियो और 00:00 - 00:08 के लिए दूसरे वीडियो के लिए इसे 00:00 दिखाना चाहिए - 00:05 दूसरे वीडियो के लिए और 00:00 - 00:03 दूसरे वीडियो के लिए। क्या आप कृपया मेरी मदद कर सकते हैं। हर मदद की सराहना की जाती है। अग्रिम धन्यवाद;) :) – MashukKhan
प्रत्येक वीडियो चरण दर्ज होने के बाद बस टाइमर को रोकें/शुरू करें –