Compare commits

..

No commits in common. "5546481191fa4a466f739320f6c328a94c068e39" and "114a105d1c18485dc13c0e83a302fbb2b4d5d3c9" have entirely different histories.

View file

@ -108,13 +108,10 @@ function convert( $src, $dest, $options ) {
}
$mbits = 1000 * 1000;
if ( $bitrate < $mbits ) {
$frameWidth = 640;
$frameHeight = 360;
} elseif ( $bitrate < 2 * $mbits ) {
if ( $bitrate < 2 * $mbits ) {
$frameWidth = 854;
$frameHeight = 480;
} elseif ( $bitrate < 4 * $mbits ) {
} else if ( $bitrate <= 4 * $mbits ) {
$frameWidth = 1280;
$frameHeight = 720;
} else {
@ -145,13 +142,10 @@ function convert( $src, $dest, $options ) {
}
$vf = implode( ',', $filters );
$fps = 30;
run( 'ffmpeg',
array_merge( [
'-i', $src,
'-f', 'mp4',
'-r', $fps,
'-vf', $vf,
'-c:v', 'libx264',
'-b:v', $bitrate,
@ -166,7 +160,6 @@ function convert( $src, $dest, $options ) {
array_merge( [
'-i', $src,
'-vf', $vf,
'-r', $fps,
'-c:v', 'libx264',
'-b:v', $bitrate,
'-preset', 'veryslow',