Kaxemer
Kaxemer

Reputation: 45

Merging two audio files over a silent track

I'm using FFMPEG and I want to use a silent track as a template. I want to take two audio streams from a WEBM file and concatenate them together, but the second audio has a delayed start. I want an audio silence between them. How would I do that?

This is what I currently have:

ffmpeg -i W1.webm -itsoffset 10 -i  W2.webm -f lavfi -t 600 -i anullsrc=cl=stereo -filter_complex '[0:1][1:1][2:1] amerge=inputs=3' output.webm

Furthermore, I want to end the output at the end of the second audio stream.

Upvotes: 1

Views: 269

Answers (1)

Gyan
Gyan

Reputation: 92938

No need to use amerge; the concat filter will work.

ffmpeg -i W1.webm -i  W2.webm -filter_complex '[1:a]adelay=10s|10s[a1];[0:a][a1]concat=n=2:v=0:a=1' -ac 2 output.webm

Use ffmpeg 4.2 or newer.

Upvotes: 0

Related Questions