"decreasing DTS value" error with `nleurisource`s

Mathieu Duponchelle mathieu at centricular.com
Wed Jul 27 12:11:42 UTC 2022


nlecomposition is taking care of arranging your sources (or other NLEObject subclasses) together along a time axis, ie what you want to achieve. I suppose if you'd rather use nlesource only, you can take a look at the source code of nlecomposition and take inspiration from it :)

On Jul 26 2022, at 11:27 am, amindfv--- via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> Can you describe the advantages of using nlecomposition in this case?
>
> To take a step back, the code I've written constructs a pipeline, essentially:
> nleurisource ! videoconvert ! autovideosink
> I've got a pad probe that listens for EOS, and when it gets one it removes the nleurisource and adds a new one in its place. This works great for my uses.
> But then, if I want to write to a file instead of watch live, I take the same code and construct a pipeline like:
> nleurisource ! videoconvert ! x264enc ! mp4mux ! filesink
> This results in no useful output, seemingly because a clock somewhere is being reset to zero.
> I'm exploring the possibilities that:
> a) the nleurisource is issuing a flushing seek
> b) the `running-time` is being set to zero, and I should observe its value before replacing the nleurisource, and then set it back to that value with `gst_pad_set_offset()`
>
> Are either of these on the right track?
> Thanks,
> Tom
>
> On Mon, Jul 25, 2022 at 04:35:28PM +0200, Mathieu Duponchelle via gstreamer-devel wrote:
> > If composing multiple sources together, you might want to take the next step and either use nlecomposition, or GES itself.
> >
> > On Jul 23 2022, at 8:54 pm, amindfv--- via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> > > A more general version of this question is how does one play a clip, then play another clip, writing the whole thing out to a single file?
> > >
> > > I asked a variation on this question a few weeks ago, and I was pointed towards `nleurisource`, but now it seems like I'm having similar clock issues with `nleurisource` too.
> > > A high-level description is fine: I'm comfortable adding pad probes, doing pipeine manipulation, etc. A link to docs or example code would be a great help.
> > > Thanks,
> > > Tom
> > >
> > > On Fri, Jul 22, 2022 at 01:35:00AM -0700, amindfv--- via gstreamer-devel wrote:
> > > > 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
> > >
> >
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220727/187de93e/attachment.htm>


More information about the gstreamer-devel mailing list