MainActivity: fix issue with non even video height

This commit is contained in:
dece 2021-03-17 18:07:17 +01:00
parent 5c4990bd29
commit 8b64425a45

View file

@ -201,7 +201,7 @@ class MainActivity : AppCompatActivity() {
val command = (
"-i $videoPath -i $audioPath"
+ " -filter_complex amix=duration=longest"
+ " -c:v libx264 -crf 26 -vf scale=$width:-1 -pix_fmt yuv420p"
+ " -c:v libx264 -crf 26 -vf scale=$width:trunc(ow/a/2)*2 -pix_fmt yuv420p"
+ " $durationOpt -y $outputPath"
)
Log.d(TAG, "Calling FFmpeg with command: $command")