Guides › FFmpeg

FFmpeg "Non-monotonous DTS" warning: causes and fixes

Fix the FFmpeg "non monotonically increasing dts to muxer" warning: what causes it, plus fixes with -fflags +genpts, -avoid_negative_ts and re-encoding.

What it looks like in your log

[mp4 @ 0x55d] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 1234 >= 1200

How do I fix Non-monotonous DTS in FFmpeg?

Timestamps in the input go backwards or repeat. This happens with concatenated clips, capture recordings, streams that reconnected, and MPEG-TS from broadcast sources. FFmpeg patches it, but it can cause stutter, A/V desync or failed muxing.

How to fix it

  1. Add -fflags +genpts before -i to regenerate presentation timestamps.
  2. Add -avoid_negative_ts make_zero to the output.
  3. When concatenating, make sure all parts share codec, resolution, frame rate and audio sample rate (or re-encode).
  4. If -c copy still fails, re-encode: -c:v libx264 -c:a aac.
  5. For audio drift add -af aresample=async=1.

Not sure this is your problem?

Upload your OBS log and StreamRx will tell you exactly what is wrong in 60 seconds, free.

Diagnose my log

📬 The StreamRx newsletter

One short email with OBS fixes, settings for Twitch/YouTube/Kick, and new StreamRx features. Unsubscribe anytime with one click.

No spam. Every email has an unsubscribe link, or reply "unsubscribe" to [email protected].

Related guides