ffmpeg: concat Results in "Buffer queue overflow" and Short Audio I have this video file that at one point introduces an async of ~1 second. So I tried to make it work by duplicating a short segment at that point as it's silent there:

$ ffmpeg -i DFW.mp4.mkv -filter_complex '
[0:a] aselect=n=3:e=lt(t\,18*60+42.100)+gt(t\,18*60+41)*2 [as] [ae] [am];
[am] asplit [am1] [am2];
[as]  asetpts=PTS-STARTPTS [as];
[am1] asetpts=PTS-STARTPTS [am1];
[am2] asetpts=PTS-STARTPTS [am2];
[ae]  asetpts=PTS-STARTPTS [ae];
[as] [am1] [am2] [ae] concat=n=4:a=1:v=0 [a]' -map 0:v -map '[a]' -c:v copy DFW-1.mp4


In other words I have


as the start until 18:41.000
ae the end from 18:42.100
am the middle section between 18:41.000 and 18:42.100, which should be repeated once


The segmentation works, the concatenated audible part sounds good. However, ae turns out to only be ~5 seconds short and ffmpeg starts to print spammy "Buffer queue overflow, dropping"-lines. The entire video is 1h30 long leaving me with plenty of silence until the end.

In other words the video and audio are fine until about 18:48.000 and the remaining 1h11 of the video has no audio.

Why is ffmpeg doing that and how can I fix it?

I also tried to include a silence audio segment instead as plan B, but failed.
Assuming there are no timestamp discontinuities in the audio, a simple atrim and a null segment should work.

ffmpeg -i DFW.mp4.mkv -filter_complex '
[0:a]asplit[a][b];
[a]atrim=0:1122.1[pre];
[b]atrim=1122.1,asetpts=PTS-STARTPTS[post];
anullsrc,atrim=0:1.1[seg];
[pre][seg][post]concat=n=3:a=1:v=0[a]' -map 0:v -map '[a]' -c:v copy DFW-1.mp4