Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[camera] change mediaRecorder.setVideoEncodingBitRate for better video quality #1107

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private void prepareMediaRecorder(String outputFilePath) throws IOException {
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mediaRecorder.setVideoEncodingBitRate(1024 * 1000);
mediaRecorder.setVideoEncodingBitRate(3000000);
mediaRecorder.setAudioSamplingRate(16000);
mediaRecorder.setVideoFrameRate(27);
mediaRecorder.setVideoSize(videoSize.getWidth(), videoSize.getHeight());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if using existing profiles would be a better option:
mediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_480P));
What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented a solution using CamcorderProfiles and matching quality between Android and iOS. Comments and suggestions are welcome.
#1403

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's indeed the way to go!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any update in this case?

Expand Down