0
我用下面的代码从相机捕捉视频。我如何将它转换为Base64字符串?如何将拍摄视频从相机转换为字符串android?
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
// create a file to save the video
fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
// set the image file name
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
// set the video image quality to high
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
// start the Video Capture Intent
startActivityForResult(intent, CAPTURE_VIDEO_ACTIVITY_REQUEST_CODE);
为什么你想视频转换为字符串?你试图用什么来实现? –
上传到服务器 – radwa
根据你的视频大小,你甚至可能会遇到OutOfMemoryError,我的建议是跳过转换 – Nilabja