"decreasing DTS value" error with `nleurisource`s

amindfv at mailbox.org amindfv at mailbox.org
Fri Jul 22 08:35:00 UTC 2022


I'm attempting to write a .mp4 file made up of 4 clips from other videos. I'm using `nleurisource` to play a portion of a file, then when it's done I remove that `nleurisource` and create a new one for the next clip, until they're all done.

Before trying to write to a file, I had a version which output to `autovideosink`. That worked great. When I use x264enc->mp4mux->filesink, though, I get errors like this:


0:00:02.340877233 968227      0x47bae40 ERROR                  qtmux gstqtmux.c:4711:gst_qt_mux_add_buffer: decreasing DTS value 0:00:00.000000000 < 0:00:02.760000000
0:00:02.355170406 968227      0x47bae40 ERROR                  qtmux gstqtmux.c:4711:gst_qt_mux_add_buffer: decreasing DTS value 0:00:00.040000000 < 0:00:02.760000000
...
0:00:02.987386018 968227      0x47bae40 ERROR                  qtmux gstqtmux.c:4711:gst_qt_mux_add_buffer: decreasing DTS value 0:00:02.560000000 < 0:00:02.760000000
0:00:03.025097697 968227      0x47bae40 ERROR                  qtmux gstqtmux.c:4711:gst_qt_mux_add_buffer: decreasing DTS value 0:00:02.600000000 < 0:00:02.760000000


This seems to be occurring for the 2nd, 3rd, and 4th videos. It appears, then, that creating a new `nleurisource` is resetting a clock to zero somewhere, and the file encoding is getting messed up because of it?(i.e. the 1st video caused the clock to count up to ~2.76, and then it didn't like when the 2nd video reset the clock to zero?)

If I only try and write 1 clip instead of 4, it of course works fine.

Am I correctly diagnosing the issue? And more importantly, how can I fix it?!

(Note I'm specifically asking how to do this with `nleurisource` or segment seeking. I'm aware of `ges-launch` and other tools but for a variety of reasons I need more fine-grained control.)

Thanks!
Tom


More information about the gstreamer-devel mailing list