Combine two audio files with silence in between with ffmpeg
ffmpeg -i one.wav -i two.wav -filter_complex '[0:a]apad=pad_dur=3[a0]; [a0][1:a]concat=n=2:v=0:a=1[out]' -map '[out]' out.wav
- Input: one.wav, two.wav
- ‘[0:a]apad=paddur=3[a0]’: audio from file 0 (one.wav) should be padded to 3 seconds, call the result a0
- ‘[a0][1:a]concat=n=2:v=0:a=1[out]’: a0 (padded one.wav) and audio from file 1 (two.wav) should be concatenated, that’s two input sources, input a result with 0 video and 1 audio stream, call that out
- map ‘[out]’ to only keep the output (concatenated) stream