<div dir="ltr">Hey there,<div><br></div><div>I posted this on ffmpeg-user and they referred me to this list instead.<br><br>I'm writing a remuxer for Blu-rays, and I've got everything working well, except sometimes I will run into these errors:<br><br>[matroska @ 0x1782480] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 66413 >= 11651<br><br>I've got my C code here: <a href="https://gist.github.com/beandog/0f9a3721eeb6e4633c5f25a2f8d32450">https://gist.github.com/beandog/0f9a3721eeb6e4633c5f25a2f8d32450</a><br><br>Basically, I'm doing av_read_frame(input, &bluray_packet),<br>then updating pts, dts  using av_rescale_q_rnd and duration with av_rescale_q<br>then av_interleaved_write_frame(output, &bluray_packet);<br><br>So no encoding on it, just copying it over.<br><br>Any idea how to work around these errors?<br><br>Thanks! :D<br><br>Steve<br></div></div>