revert media encoding parameters

This commit is contained in:
luvletter2333 2022-03-24 20:31:34 +08:00
parent 538e82ff01
commit 79c6d00fbb
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
1 changed files with 10 additions and 9 deletions

View File

@ -4795,9 +4795,10 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
if (framerate == 0) { if (framerate == 0) {
framerate = 25; framerate = 25;
} else if (framerate > 59) {
framerate = 59;
} }
// else if (framerate > 59) {
// framerate = 59;
// }
if (rotationValue == 90 || rotationValue == 270) { if (rotationValue == 90 || rotationValue == 270) {
int temp = resultHeight; int temp = resultHeight;
@ -4805,10 +4806,10 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
resultWidth = temp; resultWidth = temp;
} }
if (framerate > 30 && (Math.min(resultHeight, resultWidth) <= 480)) { // if (framerate > 30 && (Math.min(resultHeight, resultWidth) <= 480)) {
framerate = 30; // framerate = 30;
} // }
//
boolean needCompress = avatarStartTime != -1 || info.cropState != null || info.mediaEntities != null || info.paintPath != null || info.filterState != null || boolean needCompress = avatarStartTime != -1 || info.cropState != null || info.mediaEntities != null || info.paintPath != null || info.filterState != null ||
resultWidth != originalWidth || resultHeight != originalHeight || rotationValue != 0 || info.roundVideo || startTime != -1; resultWidth != originalWidth || resultHeight != originalHeight || rotationValue != 0 || info.roundVideo || startTime != -1;
@ -4902,9 +4903,9 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
compressFactor = 1f; compressFactor = 1f;
minCompressFactor = 1f; minCompressFactor = 1f;
} else if (Math.min(height, width) >= 720) { } else if (Math.min(height, width) >= 720) {
maxBitrate = 2600_000; maxBitrate = 3200_000;
compressFactor = 0.8f; compressFactor = 1.0f;
minCompressFactor = 0.8f; minCompressFactor = 1.0f;
} else if (Math.min(height, width) >= 480) { } else if (Math.min(height, width) >= 480) {
maxBitrate = 1000_000; maxBitrate = 1000_000;
compressFactor = 0.7f; compressFactor = 0.7f;