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) 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Administrator
|
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 > 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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 <[hidden email]> 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On 01/04/2011 10:33 AM, Timothy Braun wrote:
> Make sure the gnl input sources have different priorities and set the gnloperations priority to 0. Thanks for the idea. I tried setting the priority of the op to 0, src1 to 1, and src2 to 2. Now when I run it the stream hangs after 2 seconds, which is when the gnloperation and src2 are starting up. I did some testing and the hanging only occurs if I set the priority on src2 to anything other than 0. I can set the priorities on the op and src1 without hanging (it still doesn't work, however). Here is my code again with the updates: 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) src1.set_property("priority", 1) 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) src2.set_property("priority", 2) 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) 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) op.set_property("priority", 0) comp.add(op) I can get the smpte transition to work correctly on these two streams when not using the gnonlin elements, but that is not very interesting as I have to run the two streams in parallel. Any other ideas? Lane > On Jan 4, 2011, at 12:01 PM, Lane Brooks<[hidden email]> 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
---------- Forwarded message ---------- From: Timothy Braun <[hidden email]> Date: Tue, Jan 4, 2011 at 1:08 PM Subject: Re: Video transitions using gnloperation To: Lane Brooks <[hidden email]> What do you get when you set GST_DEBUG=2? The pipeline is most likely freezing because of a caps filter or a pad issue. What is the pipeline connected to for output? On Tue, Jan 4, 2011 at 12:56 PM, Lane Brooks <[hidden email]> wrote:
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Lane Brooks
So if I then add the gnloperation with priority 0 and set src2 priority=1 and src1 priority=2, the pipeline hangs when the gnloperation turns on. I verify this by having src1 turn at time 0 second. Then src2 turns on at time 2 second, and it takes over as seen previously. Then I have gnloperation turn on at 3 seconds, and that is when the pipeline hangs. See the answers to questions below: On 01/04/2011 11:08 AM, Timothy Braun wrote: What do you get when you set GST_DEBUG=2? The pipeline is most likely freezing because of a caps filter or a pad issue.Here is the output I get when I run wiht GST_DEBUG=2. This is the same output I get if I remove the gnloperation all together, so I am not sure it is related to the issue I am having. 0:00:00.038328446 1353 0x1ed8af0 WARN gnlsource gnlsource.c:545:gnl_source_change_state:<gnlfilesource0> Couldn't find a valid source pad 0:00:00.054148884 1353 0x22ccd20 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avc1 0:00:00.054183522 1353 0x22ccd20 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avcC 0:00:01.354701757 1353 0x1ed8af0 WARN gnlsource gnlsource.c:545:gnl_source_change_state:<gnlfilesource1> Couldn't find a valid source pad 0:00:01.369736423 1353 0x20aad30 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avc1 0:00:01.369785865 1353 0x20aad30 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avcC What is the pipeline connected to for output? The output is connected to a "queue" and an "autovideosink". The pipeline runs fine when no gnloperation is in place, and the second video takes priority. When I add the gnloperation but do not set any priorities, the pipeline runs as if the gnloperation is not there. When I set the priority on src2 to anything other than 1, then the pipeline hangs. By changing around the "start" time property on the gnloperation, the hanging seems to correspond to whenever the gnloperation starts up. 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Dear Lane,
I suggest you to take a look at GStreamer Editing Services 0.10.1 approach http://gstreamer.freedesktop.org/releases/gst-editing-services/0.10.1.html It is more or less the same solution described in: http://notes.brooks.nu/gstreamer-video-crossfade-example/ It works fine for me. Best Regards, Angel |
Free forum by Nabble | Edit this page |