Non-monotonous DTS in output stream 0:0 means timestamps went backwards, usually from joining unlike clips with -c copy. Re-encode the join with the concat filter, which ReelSDK runs at $0.02 per compute minute.

Non-monotonous DTS in output stream 0:0

We reproduced it on five ffmpeg versions, 4.4 to 8.1, by joining a 30 fps and a 25 fps clip; the concat filter fixed it, locally and on ReelSDK. With -c copy, every version exited with code 0 and turned 10 seconds of clips into about 8 seconds of video.

ErrorsUpdated

ffmpeg 6.0, concat demuxer with -c copy, 45 warnings, exit code 0
[mp4 @ 0x26d66b80] Non-monotonous DTS in output stream 0:0; previous: 75592, current: 63304; changing to 75593. This may result in incorrect timestamps in the output file.
[mp4 @ 0x26d66b80] Non-monotonous DTS in output stream 0:0; previous: 75593, current: 63816; changing to 75594. This may result in incorrect timestamps in the output file.
[mp4 @ 0x26d66b80] Non-monotonous DTS in output stream 0:1; previous: 240640, current: 220500; changing to 240641. This may result in incorrect timestamps in the output file.
frame=  275 fps=0.0 q=-1.0 Lsize=    4731kB time=00:00:09.20 bitrate=4211.7kbits/s speed=53.7x
video:4563kB audio:157kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.227935%

Source: ffmpeg concat demuxer docs, checked November 2026.

Where it shows up

A warning while you join clips without re-encoding

You join files with the concat demuxer and -c copy, and the files were not made with the same settings. Our test: ffmpeg -f concat -i list.txt -c copy out.mp4 on two 5-second vertical clips, the first at 30 fps with 48 kHz audio, the second at 25 fps with 44.1 kHz audio.

ffmpeg 4.4 and 6.0 print Non-monotonous DTS in output stream 0:0 for video and 0:1 for audio. ffmpeg 7.0 and later print the same numbers as [vost#0:0/copy @ 0x...] Non-monotonic DTS; previous: 75592, current: 63304; changing to 75593. It is a warning, not an error: the run ends with exit code 0 and a file that looks fine until you check its length.

Why it happens

-c copy cannot fix timestamps that disagree

Every packet carries a decode timestamp (DTS), and the MP4 muxer needs them to rise within each stream. The concat demuxer starts each file where the previous one ended, and its docs require that all files have the same streams: same codecs, same time base. With -c copy nothing is decoded, so packets from unlike files arrive with timestamps behind the last one written.

ffmpeg then bumps each late packet to previous + 1, which is the changing to 75593 in the message. Packets squeezed one tick apart shorten the stream: our two 5-second clips came out as about 8 seconds of video against 9 seconds of audio.

Causes and fixes

What differs between the clips, and what to do

What differs between the clips, and what to do
Clips differ inWhat we sawFix
Frame rate (25 vs 30 fps)26 warnings: 25 video, 1 audiofps=30 on each input, then concat
Sample rate (44.1 vs 48 kHz)20 warnings, all audioaresample=48000 on each input
Both45 warnings, about 8 s of video instead of 10 sThe concat filter graph on this page
Nothing1 audio warning, one tick movedSafe to ignore

Source: ffmpeg concat demuxer docs, checked November 2026.

The local fix

Join with the concat filter and one set of settings

Decode both clips and make them alike before joining: fps=30 and setsar=1 on each video, aresample=48000 on each audio, then the concat filter. That ran with no warnings and gave the full 10 seconds at 30 fps.

If you would rather keep -c copy, re-encode the odd clip to match the others first. Expect one harmless audio warning even then: with both clips matched we still got one, because the first clip's audio runs a hair past its 5 seconds, into the start of the next file.

join.sh
ffmpeg -i a.mp4 -i b.mp4 \
  -filter_complex "[0:v]fps=30,setsar=1[v0];[1:v]fps=30,setsar=1[v1];[0:a]aresample=48000[a0];[1:a]aresample=48000[a1];[v0][a0][v1][a1]concat=n=2:v=1:a=1[v][a]" \
  -map "[v]" -map "[a]" -c:v libx264 -crf 23 -c:a aac out.mp4
check-clips.sh
ffprobe -v error -show_entries stream=codec_name,r_frame_rate,sample_rate,time_base -of compact a.mp4 b.mp4

Skip the binary

Or send the same filter graph to the API

POST /v1/ffmpeg takes the same -filter_complex in args and runs it on ffmpeg 8.1 on a fresh machine per job. With both clips as inputs, it wrote a clean 30 fps out.mp4 about 10 seconds after the request.

Compute is $0.02 per minute, billed per second, so the join cost well under a cent. A job takes up to 50 inputs, so the same graph with a longer n= joins more clips in one call.

join.mjsTry it
const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "inputs": {
      "a.mp4": "https://api.reelsdk.com/f/lib/in/errors/dts-a.mp4",
      "b.mp4": "https://api.reelsdk.com/f/lib/in/errors/dts-b.mp4"
    },
    "args": [
      "-i", "a.mp4", "-i", "b.mp4", "-filter_complex",
      "[0:v]fps=30,setsar=1[v0];[1:v]fps=30,setsar=1[v1];[0:a]aresample=48000[a0];[1:a]aresample=48000[a1];[v0][a0][v1][a1]concat=n=2:v=1:a=1[v][a]",
      "-map", "[v]", "-map", "[a]", "-c:v", "libx264", "-crf", "23", "-c:a",
      "aac", "out.mp4"
    ],
    "outputs": ["out.mp4"]
  }),
});
const { job } = await res.json();
Both clips joined with the concat filter on the API: 10 seconds at 30 fps.Input: second clip (25 fps)

Check the clips before you join them

Run ffprobe on every file and compare the codec, frame rate, sample rate and time base. If any differ, the concat demuxer with -c copy is the wrong tool, whatever the exit code says.

The warning count is a quick health check too. In our runs, a frame rate mismatch moved 25 video packets and a sample rate mismatch moved 20 audio packets; one warning on audio alone was the only result we saw from matched clips.

FAQ

Questions, answered

Is Non-monotonous DTS an error?

No, it is a warning: ffmpeg moves each late packet to the previous timestamp plus one and keeps going, so the exit code is 0. A few warnings are harmless; dozens mean the output timing is wrong, as with our 8-second result from two 5-second clips.

Why does newer ffmpeg say Non-monotonic DTS instead?

The text changed. ffmpeg 6.0 prints Non-monotonous DTS in output stream 0:0; per the ffmpeg source, 6.1 says Non-monotonic DTS in output stream, and 7.0 and later print Non-monotonic DTS; with the stream in the prefix, such as [vost#0:0/copy]. It is the same check.

Does -fflags +genpts or -avoid_negative_ts fix it?

Not here. On our two clips, -fflags +genpts and -avoid_negative_ts make_zero each still gave 45 warnings and about 8 seconds of video: the packets have to be decoded and retimed. Join with the concat filter, which re-encodes, or make the clips match first.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains