From 114a105d1c18485dc13c0e83a302fbb2b4d5d3c9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 15 Jan 2023 12:06:24 -0800 Subject: [PATCH] work around sometimes prob with 2-pass encoding using mp4 muxer in place of null and not playign audio games seems to help --- pack-vid | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pack-vid b/pack-vid index b3af956..43a3e11 100755 --- a/pack-vid +++ b/pack-vid @@ -142,18 +142,20 @@ function convert( $src, $dest, $options ) { } $vf = implode( ',', $filters ); - run( 'ffmpeg', [ - '-i', $src, - '-f', 'null', - '-vf', $vf, - '-c:v', 'libx264', - '-b:v', $bitrate, - '-preset', 'veryslow', - '-pass', '1', - '-g', $keyframeInt, - '-an', - '-y', '/dev/null' - ] ); + run( 'ffmpeg', + array_merge( [ + '-i', $src, + '-f', 'mp4', + '-vf', $vf, + '-c:v', 'libx264', + '-b:v', $bitrate, + '-preset', 'veryslow', + '-pass', '1', + '-g', $keyframeInt, + ], $audio, [ + '-y', '/dev/null' + ] ) + ); run( 'ffmpeg', array_merge( [ '-i', $src,