How to disable putting black frames between concatenated media with ffmpeg?
This can happen if the "streams do not have exactly the same length". You have to specify the range to include for the items in concat.txt. Try specifying the duration or outpoint or in point:

https://ffmpeg.org/ffmpeg-formats.html#concat


  The duration of each file is used to adjust the timestamps of the next file: if the duration is incorrect (because it was computed using the bit-rate or because the file is truncated, for example), it can cause artifacts. The duration directive can be used to override the duration stored in each file.