gnlcomposition plays only first clip

Thibault Saunier tsaunier at gnome.org
Wed Jul 15 00:40:57 PDT 2015


Hello,

You should probably have a look at the GStreamer Editing Services:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-editing-services/html/
which offers a higher level API for Editing related task.

Also it looks like you are using pygst, that is dead and unmantained,
you should now use the PyGObject bindings with GStreamer 1.X

Regards,

Thibault Saunier

On Tue, Jul 14, 2015 at 5:32 PM, aetitcomb <andrew at pixelstreetinc.com> wrote:
> I'm having trouble concatenating two audio clips back-to-back.  Ultimately, I
> want them to overlap . . . but, I can't even get them both to play one after
> the other.
>
> Here's my script:
>
> #!/usr/local/bin/python
>
> import sys
> import gobject, pygst
> import gst
>
> class GStreamerAudio(object):
>
>     def __init__(self):
>         gobject.threads_init()
>
>         # create the pipeline ----
>         self.pipeline = gst.Pipeline("audioPipeline")
>
>         # create a gnlcomposition ----
>         self.comp = gst.element_factory_make("gnlcomposition",
> "audioComposition")
>         self.pipeline.add(self.comp)
>         self.comp.connect("pad-added", self.OnPad)
>
>         # create an audioconvert ----
>         self.audioConverter = gst.element_factory_make("audioconvert",
> "audioConverter")
>         self.pipeline.add(self.audioConverter)
>
>         # create an alsasink for live output ----
>         self.sink = gst.element_factory_make("alsasink", "alsasink")
>         self.pipeline.add(self.sink)
>         self.audioConverter.link(self.sink)
>
>         # create file sources for each track ----
>         file0 = '/usr/home/bobbybrady/test1.aiff'
>         file1 = '/usr/home/cindybrady/test2.aiff'
>
>         audio0 = gst.element_factory_make("gnlfilesource", "audio0")
>         self.comp.add(audio0)
>         audio0.set_property("location", file0)
>         audio0.set_property("start",0 * gst.SECOND)
>         audio0.set_property("duration", 4 * gst.SECOND)
>         audio0.set_property("media-start", 0 * gst.SECOND)
>         audio0.set_property("media-duration", 4 * gst.SECOND)
>
>         audio1 = gst.element_factory_make("gnlfilesource", "audio1")
>         self.comp.add(audio1)
>         audio1.set_property("location", file1)
>         audio1.set_property("start", 4 * gst.SECOND)
>         audio1.set_property("duration", 3 * gst.SECOND)
>         audio1.set_property("media-start", 0 * gst.SECOND)
>         audio1.set_property("media-duration", 3 * gst.SECOND)
>
>         self.pipeline.set_state(gst.STATE_PLAYING)
>
>         # wait for keyboard input
>         raw_input('Press enter to stop playing...')
>
>     def OnPad(self, comp, pad):
>         convpad = self.audioConverter.get_compatible_pad(pad,
> pad.get_caps())
>         pad.link(convpad)
>
> if __name__ == '__main__':
>     GStreamerAudio()
>
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gnlcomposition-plays-only-first-clip-tp4672672.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list