ffmpeg gives error DTS out of order and Non-monotonous DTS in output stream

This is an old thread but one of the dozen threads I read when facing an issue with two similar mp4 files unable to be concatenated. The videos themselves were created by overlaying an audio file on a static image.

After several hours, through ffprobe I identified my audio files had different sampling rates (some were 48KHz and others 44.1 KHz). I had to use the -ar attribute to get them resampled. The video now seems to get concatenated correctly.