gnonlin gnlurisource combine videos
troywang
troywang123 at gmail.com
Thu Oct 31 04:08:26 CET 2013
why is gnonlin-1.1.90's gnlfilesource missing? And thus how to use gnonlin to
combine some mp4 files? I have to use gnlurisource ?
I want to combine some mp4 files into a mp4 file. My python gstreamer code
as follow:
GObject.threads_init()
Gst.init(None)
class Main:
def __init__(self):
# creating the pipeline
self.pipeline = Gst.Pipeline()
self.bus = self.pipeline.get_bus()
self.bus.add_signal_watch()
self.bus.connect('message::eos',self.on_eos)
# creating a gnlcomposition
self.comp = Gst.ElementFactory.make("gnlcomposition",
"mycomposition")
self.pipeline.add(self.comp)
self.comp.connect("pad-added", self.OnPad)
# create a filesink
self.filesink = Gst.ElementFactory.make('filesink',
'filesink')
self.filesink.set_property('location','test.mp4')
self.pipeline.add(self.filesink)
# create a gnlurisource
self.video1 = Gst.ElementFactory.make("gnlurisource", "aaa")
self.comp.add(self.video1)
# set the gnlurisource properties
self.video1.set_property("uri", "aaa.mp4")
self.video1.set_property("start", 0 * Gst.SECOND*0)
self.video1.set_property("duration", 5 * Gst.SECOND)
# create a gnlurisource
self.video2 = Gst.ElementFactory.make("gnlurisource", "bbb")
self.comp.add(self.video2)
# set the gnlurisource properties
self.video2.set_property("uri", "bbb.mp4")
self.video2.set_property("start", 0 * Gst.SECOND*1)
self.video2.set_property("duration", 5 * Gst.SECOND)
self.pipeline.set_state(Gst.State.PLAYING)
def on_eos(self):
self.pipeline.set_state(Gst.State.NULL)
def OnPad(self, comp, pad):
print "pad added!"
convpad = self.filesink.get_static_pad("sink")
pad.link(convpad)
start=Main()
loop = GObject.MainLoop()
loop.run()
but it works unnormal,and the test.mp4 is 0.
I install gstreamer-1.2.0 and glib-2.34.3.Who can help me?
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gnonlin-gnlurisource-combine-videos-tp4663016.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list