[gst-devel] Video transitions using gnloperation

Timothy Braun braunsquared at gmail.com
Tue Jan 4 18:33:44 CET 2011


Make sure the gnl input sources have different priorities and set the gnloperations priority to 0. 

Sent from my iPhone

On Jan 4, 2011, at 12:01 PM, Lane Brooks <lane at brooks.nu> wrote:

> On 01/04/2011 05:39 AM, Edward Hervey wrote:
>> On Mon, 2011-01-03 at 23:23 -0700, Lane Brooks wrote:
>>> I have a gnlcomposition containing two video sources. I would like to
>>> apply a smpte transition from one source to the next.
>>> 
>>> I have tried overlapping the two gnlsources by 3 seconds. I then put a
>>> 'smpte' element in a 'gnloperation' and add the 'gnloperation' to the
>>> 'gnlcompostion'. The addition of the gnloperation doesn't seem to do
>>> anything. The resulting video is the same regardless of whether I add
>>> the gnloperation or not. The result is always that the second video
>>> takes over during the period of overlap. Here is code I have (in python):
>>> 
>>>          comp = gst.element_factory_make("gnlcomposition")
>>>          src1 = gst.element_factory_make("gnlfilesource")
>>>          src2 = gst.element_factory_make("gnlfilesource")
>>> 
>>>          comp.add(src1)
>>>          src1.set_property("location", "/test1.mp4")
>>>          src1.set_property("start",          0 * gst.SECOND)
>>>          src1.set_property("duration",       5 * gst.SECOND)
>>>          src1.set_property("media-start",    0 * gst.SECOND)
>>>          src1.set_property("media-duration", 5 * gst.SECOND)
>>> 
>>>          comp.add(src2)
>>>          src2.set_property("location", "/test2.mp4")
>>>          src2.set_property("start",          2 * gst.SECOND)
>>>          src2.set_property("duration",       5 * gst.SECOND)
>>>          src2.set_property("media-start",    0 * gst.SECOND)
>>>          src2.set_property("media-duration", 5 * gst.SECOND)
>>> 
>>>          op = gst.element_factory_make("gnloperation")
>>>          tran = gst.element_factory_make("smpte")
>>>          tran.set_property("type", 234)
>>>          tran.set_property("duration", 3 * gst.SECOND)
>>>          op.add(tran)
>> 
>>   Set the [media-]{start|duration} propertie son op also
> 
> I had already tried this as well.
> 
>         op.set_property("start",          2 * gst.SECOND)
>         op.set_property("duration",       3 * gst.SECOND)
>         op.set_property("media-start",    0 * gst.SECOND)
>         op.set_property("media-duration", 3 * gst.SECOND)
> 
> I am not sure what I should put the media-start at, but I have tried 
> both 0 and 2 and neither works. Any other ideas?
> 
> 
>> 
>>>          comp.add(op)
>>> 
>>> Anyone know if using an smpte transition is possible, and if so, what I
>>> am doing wrong?
>>> 
>>> Thanks,
>>> Lane
> 
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and, 
> should the need arise, upgrade to a full multi-node Oracle RAC database 
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list