Android: Modifying recorded video quality

前端 未结 3 1771
轮回少年
轮回少年 2021-01-13 17:03

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 remain

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-13 17:50

    You have to increase video encoding bit rate to increase the video quality using setVideoEncodingBitRate() in MediaRecorder.

    mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
    

    mRecorder.setVideoEncodingBitRate(4000000);`

提交回复
热议问题