Android-意图以最低质量录制视频 [英] Android - intent to record video on lowest quality

查看:435
本文介绍了Android-意图以最低质量录制视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,用户可以不受时间限制地拍照和录像,因此我需要以最低的质量进行录制.

I have a project where the user can take pictures and videos without limitation of time, so i need to record with the lowest quality.

这是我的代码:

  Intent takeVideoIntent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
         takeVideoIntent.putExtra(android.provider.MediaStore.EXTRA_VIDEO_QUALITY, 0);

            if (takeVideoIntent.resolveActivity(getPackageManager()) != null) {
            startActivityForResult(takeVideoIntent, REQUEST_VIDEO_CAPTURE);
            }

在(MediaStore.EXTRA_VIDEO_QUALITY,0);)中,我的画质很差

in (MediaStore.EXTRA_VIDEO_QUALITY, 0);) i made low quality

但是问题仍然是每秒以2.5MB的速度录制视频

But the problem is still recording video at 2.5MB per second

因此,经过研究,我找到了一种通过MediaRecorder保存较低质量的方法 但是我发现的任何方法都是通过SurfaceView

So after research, I found a way to save a lower quality via MediaRecorder but any ways I found were through SurfaceView

我需要使这个项目的意图通过android传递给原始的录像机

and i need to this project make intent are pass to original camera recorder via android

保存低质量视频的最佳方法是什么?

What is the best way to save a low-quality video?

推荐答案

您知道通过Android界面保存低画质的最佳方法是什么吗?比我的代码还要多?

did you know what is best way to save a low quality through interface of Android? more than my code?

鉴于您坚持必须使用第三方视频捕获应用程序,因此您拥有的一切都将与您获得的一样好.

What you have is as good as you are going to get, given that you are insisting that you must use a third-party video capture app.

ACTION_VIDEO_CAPTURE应用程序的开发人员将决定比特率.这些开发人员不必遵守EXTRA_VIDEO_QUALITY,即使这样做,对"low"的解释也可能与您的不同.而且,由于设备上预装了无数相机应用程序,因此您的体验会因设备而异.

It is up to the developers of the ACTION_VIDEO_CAPTURE apps as to what the bitrate will be. Those developers do not have to honor EXTRA_VIDEO_QUALITY, and even if they do, their interpretation of "low" may differ from yours. And, since there are countless pre-installed camera apps on devices, the behavior your experience will vary from device to device.

这篇关于Android-意图以最低质量录制视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆