ffmpeg: Non-monotonous DTS in output stream 0:0 – Video Generation Series (Part 2) [ERROR]

This error occured when I used ffmpeg to concatenate different videos that I generated:

ffmpeg -f concat -safe 0 -i list.txt -c copy final_video.avi -y
BTW, if you want to run ffmpeg or any other command inside a python script (a very reasonable idea), use subprocess:

command = "ffmpeg -f concat -safe 0 -i list.txt -c copy final_video.avi -y"
subprocess.Popen(command.split(), stdout=subprocess.PIPE)

As a result – the videos got smashed together – some frames even never appeared.

Read More »