Compare commits

..

No commits in common. "4c115c76e6ccc0fd9d8245b21a66f2b70d227f69" and "324a3fa064520a3778eab84abfc042a24f421c1c" have entirely different histories.

View file

@ -355,11 +355,7 @@ function convert( $src, $dest, $options ) {
$fps = $options['fps'];
if ( $options['preset'] ) {
if ( $options['vcodec'] === 'libvpx' || $options['vcodec'] === 'libvpx-vp9' ) {
$preset = [ '-speed', $options['preset'] ];
} else {
$preset = [ '-preset', $options[ 'preset' ] ];
}
} else {
$preset = [];
}
@ -373,16 +369,7 @@ function convert( $src, $dest, $options ) {
$format = [];
}
$vcodec = [
'-vcodec', $options['vcodec']
];
switch ( $options['vcodec'] ) {
case 'libvpx-vp9':
$vcodec[] = '-row-mt';
$vcodec[] = 1;
break;
default:
}
$vcodec = $options['vcodec'];
$tempPrefix = 'pack-vid-passlog' . rand(0,1 << 31);
$passlog = tempnam( '.', $tempPrefix );
@ -392,7 +379,7 @@ function convert( $src, $dest, $options ) {
'-f', 'mp4',
'-fpsmax', $fps,
'-vf', $vf,
], $vcodec, [
'-c:v', $vcodec,
'-b:v', $bitrate,
], $preset, [
'-pass', '1',
@ -407,7 +394,7 @@ function convert( $src, $dest, $options ) {
'-i', $src,
'-vf', $vf,
'-fpsmax', $fps,
], $vcodec, [
'-c:v', $vcodec,
'-b:v', $bitrate,
], $preset, [
'-pass', '2',