GES 1.12 -- Multiple encodings to multiple files

David Ing ding at panopto.com
Thu Jul 5 18:54:58 UTC 2018


Thibault,

That might work except that "nle.h" headers (and everything it includes)
are not provided in gstreamer's header API (i.e. the header files are not
included in the public build of gstreamer).  Therefore, I don't really have
a basis for identifying the relevant GstElement (because the GType `
NLE_TYPE_COMPOSITION` is defined in a private header which I don't have).

So I am back to including _GESTrackPrivate in my code.

I have filed a bug here:  https://bugzilla.gnome.org/show_bug.cgi?id=796754

I am happy to create a patch for this, but it would be about 2 months
before I can something submitted.


On Tue, Jul 3, 2018 at 5:54 PM, Thibault Saunier <tsaunier at gnome.org> wrote:

> Ah right, just use the GstBin API on GESTrack
> (`gst_bin_iterate_elements` or so).
> On Tue, Jul 3, 2018 at 8:04 PM David Ing <ding at panopto.com> wrote:
> >
> > Because the only way I know to connect to "query-position" is to follow
> the example I found in ges-pipeline.c
> >
> > chain->query_position_id =
> >     g_signal_connect (ges_track_get_composition (track),
> "query-position",
> >     G_CALLBACK (_query_position_cb), self);
> >
> >
> > which led me to write the following:
> >
> > //  It is necessary to connect the "query-position" signal to each track
> > g_signal_connect(
> >     videoTrack->priv->composition,                      //
> (GESTrack*)->priv->compositoin
> >     "query-position",
> >     G_CALLBACK(CompositionJob::cbQueryPosition),        // my callback
> method
> >     m_gstPipeline);                                     // GstPipeline*
> >
> >
> > So basically I had to pull in the definition of _GESTrackPrivate to make
> that work.
> >
> > If there is a better way to do it then please let me know.  (I am not
> usually a glib programmer so perhaps there is something I don't know about.)
> >
> >
> > On Tue, Jul 3, 2018 at 4:37 PM, Thibault Saunier <tsaunier at gnome.org>
> wrote:
> >>
> >> Why do you think you need to access the composition?
> >> On Tue, Jul 3, 2018 at 7:22 PM David Ing <ding at panopto.com> wrote:
> >> >
> >> > Thanks Thibault.
> >> >
> >> > Unfortunetly I would need a method which is not exposed through the
> headers:  ges_track_get_composition  ... I will need to pull in code from
> the *.c files to implement the method on my end ... a dirty deed indeed.
> >> >
> >> >
> >> > On Mon, Jul 2, 2018 at 10:05 AM, Thibault Saunier <tsaunier at gnome.org>
> wrote:
> >> >>
> >> >> Hello David,
> >> >>
> >> >> There should be no problem using a GstPipeline as long as you make
> >> >> sure to connect to the query-position signal of each track, I do not
> >> >> think there is any other quirk but I might be misremembering :-)
> >> >>
> >> >> With the GESPipeline API I do not see a clean way to do what you want
> >> >> so I believe your best bet is to just use a GstPipeline.
> >> >>
> >> >> Regards,
> >> >>
> >> >> Thibault
> >> >> On Mon, Jul 2, 2018 at 12:41 PM David Ing <ding at panopto.com> wrote:
> >> >> >
> >> >> > I sent the original message on this thread Friday evening (US
> Pacific Time) ... chances are that most people never saw it, so I'm trying
> again:
> >> >> >
> >> >> > On a prior email thread, it was suggested that GESTimeline and
> GstPipeline are not 100% compatible with each other:
> https://lists.freedesktop.org/archives/gstreamer-devel/2018-
> March/067349.html
> >> >> >
> >> >> > >     The GES timeline can indeed be used in a regular gstreamer
> pipeline, but there
> >> >> > >     are some undocumented quirks, amongst them the
> "query-position" signal emitted
> >> >> > >     by the NLEComposition wrapped by the GESTrack object, this
> is why using GESPipeline
> >> >> > >     is the recommended approach.
> >> >> >
> >> >> >
> >> >> > I am now in the position of being forced to use the GstPipeline
> with the GESTimeline (for reasons described in the first message of this
> thread).  I wonder if anybody can shed some light on the problems that I
> might see, and provide a hint about how I might overcome them.  I am
> working in C / C++ so I have a lot of options, but I would benefit from a
> little guidance.
> >> >> >
> >> >> >
> >> >> > On Fri, Jun 29, 2018 at 4:24 PM, David Ing <ding at panopto.com>
> wrote:
> >> >> >>
> >> >> >> To partially answer my own question:  I think I need to use a
> GstPipeline rather than a GESPipeline (so I can have full control over the
> GstElements which do the encoding and writing to files).
> >> >> >>
> >> >> >> On another email thread, it was suggested that GESTimeline and
> GstPipeline are not 100% compatible with each other:
> https://lists.freedesktop.org/archives/gstreamer-devel/2018-
> March/067349.html
> >> >> >>
> >> >> >> >     The GES timeline can indeed be used in a regular gstreamer
> pipeline, but there
> >> >> >> >     are some undocumented quirks, amongst them the
> "query-position" signal emitted
> >> >> >> >     by the NLEComposition wrapped by the GESTrack object, this
> is why using GESPipeline
> >> >> >> >     is the recommended approach.
> >> >> >>
> >> >> >>
> >> >> >> If I use GESTimeline with GstPipeline, what kinds of trouble can
> I expect?
> >> >> >>
> >> >> >> On Fri, Jun 29, 2018 at 1:32 PM, David Ing <ding at panopto.com>
> wrote:
> >> >> >>>
> >> >> >>> I am using GES 1.12 and I am trying to build a single
> GESPipeline with a somewhat complicated set of outputs.  I am coding in C++
> (using gstreamer headers and libs).
> >> >> >>>
> >> >> >>> Consider a representative example:
> >> >> >>>
> >> >> >>> I have built a GESTimeline which sits inside a GESPipeline.
> >> >> >>>
> >> >> >>> I want to generate multiple encodings.
> >> >> >>>
> >> >> >>> Low quality video AVC (h.264)
> >> >> >>> Mid quality video AVC (h.264)
> >> >> >>> High quality video AVC (h.264)
> >> >> >>> High quality audio AAC
> >> >> >>>
> >> >> >>> I want to shunt these encodings into multiple containers.
> >> >> >>>
> >> >> >>> HLS folder (all encodings)
> >> >> >>> MP4 high quality (encodings 3 & 4)
> >> >> >>> MP4 mid quality (encodings 2 & 4)
> >> >> >>>
> >> >> >>> Presumably, the most efficient approach (computationally) is to
> use a single pipeline for all of this.  Computational efficiency is of
> paramount importance to me.
> >> >> >>>
> >> >> >>> My question is:  What approach should I take?
> >> >> >>>
> >> >> >>> One approach is to manually construct the GstElements I need for
> encoding and muxing, and connect them together in the appropriate way
> within the GESPipeline (I guess they would source directly from the sinks
> on the GESTimeline).  Is that the correct approach?  Or is there another
> approach that will work better?
> >> >> >>>
> >> >> >>> Guidance is appreciated.
> >> >> >>
> >> >> >>
> >> >> >
> >> >> > _______________________________________________
> >> >> > gstreamer-devel mailing list
> >> >> > gstreamer-devel at lists.freedesktop.org
> >> >> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >> >> _______________________________________________
> >> >> gstreamer-devel mailing list
> >> >> gstreamer-devel at lists.freedesktop.org
> >> >> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >> >
> >> >
> >> > _______________________________________________
> >> > gstreamer-devel mailing list
> >> > gstreamer-devel at lists.freedesktop.org
> >> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >> _______________________________________________
> >> gstreamer-devel mailing list
> >> gstreamer-devel at lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180705/48f4631e/attachment-0001.html>


More information about the gstreamer-devel mailing list