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
[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
| Clips differ in | What we saw | Fix |
|---|---|---|
| Frame rate (25 vs 30 fps) | 26 warnings: 25 video, 1 audio | fps=30 on each input, then concat |
| Sample rate (44.1 vs 48 kHz) | 20 warnings, all audio | aresample=48000 on each input |
| Both | 45 warnings, about 8 s of video instead of 10 s | The concat filter graph on this page |
| Nothing | 1 audio warning, one tick moved | Safe 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.
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.mp4ffprobe -v error -show_entries stream=codec_name,r_frame_rate,sample_rate,time_base -of compact a.mp4 b.mp4Skip 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.
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();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.
- Concatenate videos with ffmpegJoin clips with the concat demuxer and -c copy when they match, or with the concat filter when their size, frame rate or codec differ.
- Merge videosJoin clips into one MP4 by URL with the concat filter or demuxer, up to 50 inputs, for well under a cent a merge.
- Merge videosJoin videos into one in your browser, as they are or resized to match, free and without uploading them, or with one API call.
- Change the frame rate with ffmpegConvert a video to 24, 30 or 60 fps with the fps filter, see how -r differs, and make smooth 60 fps with minterpolate.
- ffmpeg -filter_complex explainedLabels, commas and semicolons: how a filtergraph wires inputs to outputs, with four working graphs and the errors they fix.
- Too many packets buffered for output streamffmpeg ran out of muxing queue while it waited for a stream that starts late. Raise -max_muxing_queue_size, or run it on ffmpeg 8.1.
- moov atom not foundThe MP4's index is missing, usually because the file was cut off. Re-fetch it, repair it with untrunc, or move the moov first.
- ffmpeg exited with code 1: Conversion failed!fluent-ffmpeg reports only ffmpeg's exit code and last line. The real cause is in stderr: print it, or use -v error to see it alone.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
