How to disable putting black frames between concatenated media with ffmpeg? I am using the concat demuxer in ffmpeg. I use the following command:

ffmpeg -f concat -i concat.txt -c copy out.mkv


and it works, except that it adds short gaps of black frames in between the concatenated files (there are three of them). How do I make it stop? If it helps, the audio is cut at those points, too.

I know that a parameter for this exists, but I can't find the original question anywhere.

Thanks in advance.
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.