I have been working with the MediaRecorder API for a while, I thought that all the problems were behind me, but I think that I was wrong.
I use the MediaRecorder API to write video to a file. When I use setProfile with high quality, I get good quality, but when I try to set the parameters manually (as in the code below), the quality is poor (because for some reason the bitrate is cut off). I want to get 720p with 1fps.
I keep getting the following warning: WARN / AuthorDriver (268): The video encoding encoding rate is set to 480000 bps
The code I run is:
m_MediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); m_MediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); m_MediaRecorder.setVideoSize(1280, 720); m_MediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); m_MediaRecorder.setVideoFrameRate(1); m_MediaRecorder.setVideoEncodingBitRate(8000000);
Any idea? Many thanks.
source share