I'm trying to concatenate videos with the command:

ffmpeg -f concat -i input.txt -y ProductionVideo.mp4

Where input.txt has files listed as

file 'vid1.mp4'
file 'vid2.mp4'
file 'vid3.mp4'

While FFmpeg is executing I sometimes get a message: "More than 1,0000 frames duplicated" which in turn when playing the end result video duplicates that frame for anywhere between 1 and 6 minutes and I get this message in my terminal

[00007fa5cd001d10] main decoder error: buffer deadlock prevented
[h264 @ 0x7fa5cd298000] get_buffer() failed
[h264 @ 0x7fa5cd298000] thread_get_buffer() failed
[h264 @ 0x7fa5cd298000] decode_slice_header error
[h264 @ 0x7fa5cd298000] no frame!
[h264 @ 0x7fa5cd366f80] get_buffer() failed
[h264 @ 0x7fa5cd366f80] thread_get_buffer() failed
[h264 @ 0x7fa5cd366f80] decode_slice_header error
[h264 @ 0x7fa5cd366f80] no frame!

At fist I thought that I eneded to re-encode the videos in the same encoder but that didn't resolve the issue.

I have no issues playing the videos

1 Answer 1


To avoid frame duplication you can use -fflags +genpts -r 30 to generate new timestamps and set a common framerate for all videos and fps_mode vfr to control syncronization:

ffmpeg -fflags +genpts -r 30 -f concat -i input.txt -y -fps_mode vfr ProductionVideo.mp4

My suspiscion is that you are having frames with duplicate timestamps since you are joining several different vídeos that have all their own timestamp and changing the video. VFR stands for Variable Frame Rate.

  • Issue persists. Although now I'm getting this alongside previous error: [00007fb1a8c15ea0] main decoder error: buffer deadlock prevented. I even re-encoded all videos to h264 encoder before concatinating them Commented Feb 17 at 22:42
  • @ZombieSpale please try the updated answer. Commented Feb 17 at 23:09
  • I don't know how but video works fine but audo is all scrambled between videos. For example audio from video3 overlaps video from video1 Commented Feb 17 at 23:32
  • You don't need -fflags +genpts -r 30
    – Gyan
    Commented Feb 18 at 4:31
  • 1
    try to use -shortest to see if the problem with extra video time disappears.... Commented Feb 18 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .