Reputation: 129
I am using below code to capture using Camera of the handset. But I don't know how to set the bit rate. Please suggest how to set bit rate
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
// set video quality
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 30);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
startActivityForResult(intent, CAMERA_CAPTURE_VIDEO_REQUEST_CODE);
There is no paramter like MediaStore.EXTRA_BITRATE
So what do I do to control bit rate ??
Upvotes: 1
Views: 1901
Reputation: 6114
Here is a better example to record a video using MediaRecorder class. Also inorder to set the Bitrate you can use
setVideoEncodingBitRate(int bitRate)
. which sets the video encoding bit rate for recording. Call this method before prepare().
For further info, refer this.
Upvotes: 2