"decreasing DTS value" error with `nleurisource`s

amindfv at mailbox.org amindfv at mailbox.org
Sun Aug 7 06:05:52 UTC 2022


On Sat, Jul 30, 2022 at 01:41:39AM +0200, Mathieu Duponchelle via gstreamer-devel wrote:
> Sure, I can hear that. nlecomposition however is probably still low level enough to not force you to architect your program around it. Agreed re. sparse documentation, there is some documentation for committing though:
> https://gstreamer.freedesktop.org/documentation/nle/NleObject.html?gi-language=c#action-signals :)

Thanks for the reply. No news yet but I'm working on two proofs-of-concept with `nlecomposition` to see how it works for my needs.

In terms of documentation, the above link still has the problem I keep encountering: it doesn't actually say what committing _is_. In fact, it uses the word "commit" in the definition of "commit," leaving me still not sure what it means to commit something.

Is there anywhere I could look for documentation or even just helpful comments in code? After a lot of searching online I found one reference to the pitivi codebase as a good place to start, but even then there's ~40k lines of code and no clear place to start reading.

Thanks,
Tom


> On Jul 28 2022, at 10:14 am, amindfv--- via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> > My reservations about using nlecomposition/GES mostly come down to a couple things. I'd love to hear peoples' impressions on if they're accurate:
> >
> > - I'm concerned they're abstractions that'll force me in a different direction. My code really doesn't have anything to do with parallel overlapping tracks of audio and video, and really doesn't bear much resemblance to the average NLE editor workflow. I'm concerned the things I want to do won't be easy, and the things it makes easy will mostly not be things I need to do.
> > - There's not much documentation. For example, looking through the nlecomposition source code there are several references to something called "committing." What is it? I'm not sure: there's no mention of it in subprojects/gst-editing-services/docs. I've also scoured the web for GES docs/blog posts/etc and found very little about GES. Doing pipeline manipulation with plain GStreamer is admittedly not easy, but there's plenty of helpful information in the gst-docs subproject to guide my way.
> > Thanks,
> > Tom
> >
> >
> > On Wed, Jul 27, 2022 at 02:11:42PM +0200, Mathieu Duponchelle wrote:
> > > 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
> > > > > >
> > > > >
> > > >
> > >
> >
> 


More information about the gstreamer-devel mailing list