revert media encoding parameters

This commit is contained in:
luvletter2333 2022-03-24 20:31:34 +08:00 committed by NextAlone
parent 48cbc537b4
commit a3d871ab76
No known key found for this signature in database
GPG Key ID: DBA7B0AEF8C1CD2C

View File

@ -4799,9 +4799,10 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
if (framerate == 0) {
framerate = 25;
} else if (framerate > 59) {
framerate = 59;
}
// else if (framerate > 59) {
// framerate = 59;
// }
if (rotationValue == 90 || rotationValue == 270) {
int temp = resultHeight;
@ -4809,10 +4810,10 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
resultWidth = temp;
}
if (framerate > 30 && (Math.min(resultHeight, resultWidth) <= 480)) {
framerate = 30;
}
// if (framerate > 30 && (Math.min(resultHeight, resultWidth) <= 480)) {
// framerate = 30;
// }
//
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;
@ -4906,9 +4907,9 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
compressFactor = 1f;
minCompressFactor = 1f;
} else if (Math.min(height, width) >= 720) {
maxBitrate = 2600_000;
compressFactor = 0.8f;
minCompressFactor = 0.8f;
maxBitrate = 3200_000;
compressFactor = 1.0f;
minCompressFactor = 1.0f;
} else if (Math.min(height, width) >= 480) {
maxBitrate = 1000_000;
compressFactor = 0.7f;