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 >= 1200How 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
- Add -fflags +genpts before -i to regenerate presentation timestamps.
- Add -avoid_negative_ts make_zero to the output.
- When concatenating, make sure all parts share codec, resolution, frame rate and audio sample rate (or re-encode).
- If -c copy still fails, re-encode: -c:v libx264 -c:a aac.
- 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].