Android - intent to record video on lowest quality

馋奶兔 提交于 2019-12-24 14:21:12

问题


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.

This is my code:

  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);
            }

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

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

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

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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/23690272/android-intent-to-record-video-on-lowest-quality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!