work around sometimes prob with 2-pass encoding

using mp4 muxer in place of null and not playign audio games seems to help
This commit is contained in:
Brooke Vibber 2023-01-15 12:06:24 -08:00
parent 3d89f8409c
commit 114a105d1c

View file

@ -142,18 +142,20 @@ function convert( $src, $dest, $options ) {
} }
$vf = implode( ',', $filters ); $vf = implode( ',', $filters );
run( 'ffmpeg', [ run( 'ffmpeg',
array_merge( [
'-i', $src, '-i', $src,
'-f', 'null', '-f', 'mp4',
'-vf', $vf, '-vf', $vf,
'-c:v', 'libx264', '-c:v', 'libx264',
'-b:v', $bitrate, '-b:v', $bitrate,
'-preset', 'veryslow', '-preset', 'veryslow',
'-pass', '1', '-pass', '1',
'-g', $keyframeInt, '-g', $keyframeInt,
'-an', ], $audio, [
'-y', '/dev/null' '-y', '/dev/null'
] ); ] )
);
run( 'ffmpeg', run( 'ffmpeg',
array_merge( [ array_merge( [
'-i', $src, '-i', $src,