don't scale up

This commit is contained in:
Brooke Vibber 2023-02-27 12:53:11 -08:00
parent f5a2a9faf0
commit d07f3b7ce1

View file

@ -124,13 +124,13 @@ function convert( $src, $dest, $options ) {
}
$mbits = 1000 * 1000;
if ( $bitrate < $mbits ) {
if ( $bitrate < $mbits || $height < 480 ) {
$frameWidth = 640;
$frameHeight = 360;
} elseif ( $bitrate < 2 * $mbits ) {
} elseif ( $bitrate < 2 * $mbits || $height < 720) {
$frameWidth = 854;
$frameHeight = 480;
} elseif ( $bitrate < 4 * $mbits ) {
} elseif ( $bitrate < 4 * $mbits || $height < 1080) {
$frameWidth = 1280;
$frameHeight = 720;
} else {