ffmpeg – concatenating list of mp4 getting Error parsing the packet header and other errors

I have a number of mp4s that were in some cases converted to mp4 from other formats using ffmpeg.
Now I want to concatenate these files into one.
I decided to use the concat list method

ffmpeg -f concat -safe 0  -i list.txt -c copy out.mp4

which ended up giving me the

Non-monotonous DTS in output stream previous current changing to This may result in incorrect timestamps in the output file

error.
So then I tried

ffmpeg -safe 0 -f concat -segment_time_metadata 1 -i list.txt -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 out.mp4

and I got a bunch of errors

aist#0:1/opus @ 0x12f6109b0] [dec:opus @ 0x12f66f4f0] Error submitting packet to decoder: Invalid data found when processing input
[opus @ 0x12f6702a0] Error parsing the packet header.

And the video is choppy, bits cut off, and the audio sounds like cheerios being eaten.

I’m not an expert in this area, obviously so I am at a loss to fix it. I would expect that there was a setting to say – take the formatting of the first video in this set and apply it to all the others, convert audio to audio etc. But don’t cut off the time.

Read more here: Source link