Thank you for coming here. I have three video clips (the first is 3 seconds, the second is 20 seconds, the third is 2 seconds), I connect them using the following command:
ffmpeg -i opening.mp4 -i middle.mp4 -i ending.mp4 -filter_complex "[0:v] [1:v] [2:v] concat=n=3:v=1 [v]" -map "[v]" output.mp4
Since all three videos do not have audio tracks, I do not need to include [a]. And then the day came when I needed it. I have an audio track, duration of 35 seconds(which is much larger than the output.mp4 video) and I need this audio to be connected to the whole video. 1) Do I need to crop the audio to the length that is obtained by merging all three videos? 2) Is it possible to do this with one command, or i need first have to concatetate all together with my command, and then merge video and audio track?