安卓:修改录制的视频质量 [英] Android: Modifying recorded video quality

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

问题描述

我用MediaRecorder录制视频。目前尚不清楚对我来说,我应该使用来改变图像的质量,假设视频的大小保持恒定什么参数。例如,我想总是创建一个640x480的MP4视频。我可以调整哪些参数来增加或减少的质量呢?

I'm using MediaRecorder to record a video. It isn't clear to me what parameters I should be using to change the quality of the image, assuming the size of the video remains constant. For example, I want to always create a 640x480 mp4 video. What parameters can I adjust to increase or decrease the quality?

推荐答案

您可以尝试使用

recorder.setVideoSize(640, 480);
recorder.setVideoFrameRate(16); //might be auto-determined due to lighting
recorder.setVideoEncodingBitRate(3000000);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);// MPEG_4_SP
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

 CamcorderProfile cpHigh = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
 recorder.setProfile(cpHigh);

有关设置高品质,低质量参数见<一href="http://www.andgps.com/20110410/camcorderprofile-$p$pdefined-camcorder-profile-settings-for-camcorder-applications"相对=nofollow>这里

For setting high quality and low quality parameter see here

这篇关于安卓:修改录制的视频质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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