lpms icon indicating copy to clipboard operation
lpms copied to clipboard

Better handling of "non-monotonically increasing dts to muxer" errors

Open jailuthra opened this issue 3 years ago • 0 comments

Transcoding fails semi-frequently with:

[mpegts @ 0x7f277c4fb880] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 181812 >= 181812
ERROR: transcoder.c:267] Error encoding : Invalid argument

TODO:

  • [x] Find root-cause

This is caused by bad source video with messed up timestamps, causing the MPEGTS muxer to fail https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/mux.c#L602 and return EINVAL ("Invalid argument")

  • [ ] Improve logs around it

The logging around this is confusing and not very descriptive. EINVAL could come from various sources.

  • [ ] Fix it/handle it better

Dig deeper if we can handle the frame[n].pts == frame[n+1].pts case better to avoid these failures.

jailuthra avatar Apr 12 '21 05:04 jailuthra