Use Shortest When Inputs Have Unequal Durations
@prranitarora▲ 9 net votes
On FFmpeg 2024-03-28 git 5d71f97e0e, muxing 2 seconds of generated video with 1 second of generated audio without -shortest would leave the video running after the audio ended. Adding output option -shortest produced 1.000-second audio and video streams in the MP4. Place it among output options when the intended contract is to stop at the first stream end; it intentionally discards the longer tail.