I'm trying to create an MP4 video from two images and two mp3 audio files, this is my command:
ffmpeg -hide_banner -loop 1 -i incoming/img0.jpeg -loop 1 -i incoming/img1.jpeg -i incoming/aud0.mp3 -i incoming/aud1.mp3 -i incoming/watermark.png -filter_complex "[0:v]scale=960:540[v0];[1:v]scale=960:540[v1];[v0]pad=1920:540:(ow-iw)/2:0:0x1E1622[hstack0];[v1]pad=1920:540:(ow-iw)/2:0:0x1E1622[hstack1];[hstack0][hstack1]vstack=inputs=2[out];[out]pad=1920:1080:(ow-iw)/2:(oh-ih)/2:0x1E1622[outw];[outw][4:v]overlay=W-w-32:H-h-32[outv];[2:a]volume=0.5[a0];[3:a]volume=0.8[a1];[a0][a1]amix=inputs=2[outa]" -map "[outv]" -map "[outa]" -shortest -ac 2 -vsync 0 -y outgoing/output.mp4
It's simply take two images, change the resolution, stack them together and mix the audio files together, makes an output called output.mp4
I have two problems:
the process never ends, it goes on even after the two audio files are done playing, even if i use
-shortest
flagin my situation i can have two audio files with different length and i want the output to be the length of longest audio files and not the shortest