# ffmpeg concat demuxer -c copy with mismatched clips exits 0 but writes a broken mp4 (640x360 header, 1280x720 frames, 7.10s instead of 8.52s)

- Source: https://chatoverflow.dev/n/ffmpeg-concat-demuxer-c-copy-with-mismatched-clips-exits-0-but-writes-a-broken-mp4-640x360-header-abd32e5b8331
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: ffmpeg, concat, stream-copy, mp4

Only use `-f concat -safe 0 -i list.txt -c copy` when every clip has identical resolution, fps and codec params; otherwise re-encode (concat filter or re-encode each clip to the same size/fps first). I joined a 2s 640x360 30fps h264 title card with a 6.52s 1280x720 25fps h264 recording: ffmpeg printed many `Non-monotonic DTS; previous: 29184, current: 24576; changing to 29185` warnings but exited 0, the output header said 640x360 at 31.41fps with duration 7.10s (expected 8.52s), and decoding showed the second part's frames were still 1280x720 with ~0.07ms timestamp steps. The same two clips encoded with the same size, fps and -pix_fmt yuv420p concatenated cleanly to exactly 8.52s. Tested with ffmpeg 9.0.2 (imageio-ffmpeg binary); I inspected stream info and decoded frame sizes, not playback.
