You&#39;ll have to excuse my ignorance in my last email.  I had the mixer in the gnloperation, but I had the src pad of the mixer attached to the final output segment rather than the composition src pad.  I fixed that, but am still running into issues.<br>
<br>So, currently, I have a pipeline which resembles this:<br><br><br><font face="courier new,monospace">+--------------------------------+<br>| gnlcomposition                 |<br>| +----------------------------+ |<br>| | Box 1 (gnlfilesource)      | |  +-------+  +-------------------------------+<br>
| +----------------------------+ |-&gt;| queue |-&gt;| filesink (plus encoder stuff) |<br>| | Box 2 (gnlfilesource)      | |  +-------+  +-------------------------------+<br>| +----------------------------+ |<br>| | Video Mixer (gnloperation) | |<br>
| +----------------------------+ |<br>+--------------------------------+<br></font><br>  I hope that comes through ok..  Box 1, box 2 and video mixer all have the same duration and the input-priority-changed call is triggering the update to xpos and ypos on the video mixer pads.  Ultimately there will be 6 boxes per frame, but that I&#39;m trying to keep it simple at the moment.<br>
  <br>  The issue I&#39;m currently running into is with the video mixer.  With the Box 1 and Box 2 being 240x240 px, the final frame size is 240x240 px.  Is there a way to feed in a blank 720x480 frame into the mixer so it outputs the proper resolution or am I looking at this the wrong way?<br>
  I&#39;ve tried to input a 720x480 frame from a videotestsrc, but am having issues (structurally I believe) getting my test source to exist in a gnlsource at a 720x480 resolution.<br><br>  Again, any help is greatly, greatly appreciated as I&#39;m running short on time to get this complete.<br>
<br>  Best,<br>  Tim<br><br><div class="gmail_quote">On Sun, Nov 28, 2010 at 9:06 PM, Timothy Braun <span dir="ltr">&lt;<a href="mailto:braunsquared@gmail.com">braunsquared@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Edward,<br>  Thanks for the quick reply.  It has been most informative.  A couple questions if I may.  For the video rescale/capsfilter part, what is this doing and how should it look in the pipeline?  The input videos are all 240x240 px with a goal output frame size of 720x480px.<br>

<br>  For a very raw test, I am using this to build my pipeline:<br><br>    GstPipeline *pipeline = GST_PIPELINE(gst_pipeline_new(&quot;pipeline&quot;));<br>    <br>    GstCaps *caps = gst_caps_from_string(&quot;video/x-raw-yuv;video/x-raw-rgb&quot;);<br>

    <br>    // Create our composition<br>    GstElement *comp = gst_element_factory_make(&quot;gnlcomposition&quot;, &quot;composition&quot;);<br>    g_object_set(G_OBJECT(comp), &quot;caps&quot;, caps, NULL);<br>    <br>

    GstElement *src1 = gst_element_factory_make(&quot;gnlfilesource&quot;, &quot;source1&quot;);<br>    g_object_set(G_OBJECT(src1), &quot;location&quot;, &quot;loop1.mp4&quot;, <br>                 &quot;start&quot;, 0,<br>

                 &quot;duration&quot;, 30 * GST_SECOND,<br>                 &quot;media-start&quot;, 0,<br>                 &quot;media-duration&quot;, 30 * GST_SECOND,<br>                 &quot;priority&quot;, 1,<br>                 &quot;caps&quot;, caps,<br>

                 NULL);<br>    <br>    GstElement *src2 = gst_element_factory_make(&quot;gnlfilesource&quot;, &quot;source2&quot;);<br>    g_object_set(G_OBJECT(src2), &quot;location&quot;, &quot;loop2.mp4&quot;, <br>                 &quot;start&quot;, 0,<br>

                 &quot;duration&quot;, 30 * GST_SECOND,<br>                 &quot;media-start&quot;, 0,<br>                 &quot;media-duration&quot;, 30 * GST_SECOND,<br>                 &quot;priority&quot;, 2,<br>                 &quot;caps&quot;, caps,<br>

                 NULL);<br>    <br>    GstElement *oper = gst_element_factory_make(&quot;gnloperation&quot;, NULL);<br>    g_object_set(G_OBJECT(oper), &quot;caps&quot;, caps, &quot;expandable&quot;, TRUE, NULL);<br>    <br>

    GstElement *mixer = gst_element_factory_make(&quot;videomixer&quot;, NULL);<br>    gst_bin_add(GST_BIN(oper), mixer);<br>    <br>    // listen for the input priority change signal<br>    // to update the video mixer pad<br>

    g_object_connect(oper, &quot;signal::input-priority-changed&quot;, onPriorityChange, mixer, NULL );<br>    <br>    // add the sources to the composition<br>    gst_bin_add(GST_BIN(comp), src1);<br>    gst_bin_add(GST_BIN(comp), src2);<br>

    gst_bin_add(GST_BIN(comp), oper);<br>    <br>    // build the output stream<br>    GstElement *color = gst_element_factory_make(&quot;ffmpegcolorspace&quot;, &quot;colorspace&quot;);<br>    <br>    GstElement *identity = gst_element_factory_make(&quot;identity&quot;, &quot;ident&quot;);<br>

    g_object_set(identity, &quot;single-segment&quot;, TRUE, NULL);<br>    <br>    GstElement *enc = gst_element_factory_make(&quot;ffenc_mpeg1video&quot;, &quot;encoder&quot;);<br>    GstElement *mux = gst_element_factory_make(&quot;ffmux_mpeg&quot;, &quot;mux&quot;);<br>

    GstElement *queue = gst_element_factory_make(&quot;queue&quot;, &quot;queue&quot;);<br>    <br>    GstElement *sink = gst_element_factory_make(&quot;filesink&quot;, &quot;sink&quot;);<br>    g_object_set(sink, &quot;location&quot;, &quot;output.mpg&quot;, NULL);<br>

    <br>    gst_bin_add_many(GST_BIN(pipeline), comp, color, identity, enc, mux, queue, sink, NULL);<br>    <br>    /*<br>    g_object_connect (comp, &quot;signal::pad-added&quot;,<br>                      onPad, mixer, NULL);<br>

    */<br>    <br>    gst_element_link_many(mixer, queue, color, identity, enc, mux, sink, NULL);<br><br><br>It seems to link up fine, but fails to stream as it gets stuck in the paused state.  I&#39;ve tried adding queues all around, but no luck.  Here is the debug output:<br>

<br>** Message: Creating run loop...<br>** Message: Building pipeline...<br>** Message: Attaching to bus...<br>** Message: Setting state to PLAYING...<br>0:00:00.141504000  [334m91821 [00m    0x100609d30  [33;01mWARN    [00m  [00;01;34m           gnlsource gnlsource.c:545:gnl_source_change_state:&lt;source2&gt; [00m Couldn&#39;t find a valid source pad<br>

0:00:00.162296000  [334m91821 [00m    0x100609d30  [33;01mWARN    [00m  [00;01;35m      GST_SCHEDULING gstpad.c:4692:gst_pad_get_range:&lt;source:src&gt; [00m getrange failed unexpected<br>0:00:00.191513000  [334m91821 [00m    0x100609d30  [33;01mWARN    [00m  [00;01;34m           gnlsource gnlsource.c:545:gnl_source_change_state:&lt;source1&gt; [00m Couldn&#39;t find a valid source pad<br>

0:00:00.199956000  [334m91821 [00m    0x100686b10  [33;01mWARN    [00m  [00m             qtdemux qtdemux.c:5801:qtdemux_parse_trak:&lt;qtdemux0&gt; [00m unknown version 00000000<br>0:00:00.200693000  [334m91821 [00m    0x100609d30  [33;01mWARN    [00m  [00;01;35m      GST_SCHEDULING gstpad.c:4692:gst_pad_get_range:&lt;source:src&gt; [00m getrange failed unexpected<br>

0:00:00.210835000  [334m91821 [00m    0x10064f030  [33;01mWARN    [00m  [00m             qtdemux qtdemux.c:5801:qtdemux_parse_trak:&lt;qtdemux1&gt; [00m unknown version 00000000<br>0:00:00.244706000  [334m91821 [00m    0x101879f60  [33;01mWARN    [00m  [00;01;34m           gnlsource gnlsource.c:221:element_pad_added_cb:&lt;source2&gt; [00m We already have (pending) ghost-ed a valid source pad (ghostpad:&#39;&#39;:&#39;&#39;, pendingblock:1<br>

0:00:00.244852000  [334m91821 [00m    0x1006501f0  [33;01mWARN    [00m  [00;01;34m           gnlsource gnlsource.c:221:element_pad_added_cb:&lt;source1&gt; [00m We already have (pending) ghost-ed a valid source pad (ghostpad:&#39;&#39;:&#39;&#39;, pendingblock:1<br>

** Message: Priority Changed: composition::gnloperation0-&gt;gnloperation0::sink_1(videomixer0::sink_1) - 2<br>** Message: Priority Changed: composition::gnloperation0-&gt;gnloperation0::sink_0(videomixer0::sink_0) - 1<br>

<br>I&#39;ve been battling with this for a bit now, can&#39;t seem to make any headway.  Any input is, again, much appreciated.<br><br>Best,<br>Tim<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Nov 28, 2010 at 3:58 AM, Edward Hervey <span dir="ltr">&lt;<a href="mailto:bilboed@gmail.com" target="_blank">bilboed@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<div><br>
On Sat, 2010-11-27 at 13:50 -0500, Timothy Braun wrote:<br>
&gt; Kapil,<br>
&gt;   Thanks for the suggestion, but with multifilesrc I would have to<br>
&gt; have the files static with incrementing named files.  A single box in<br>
&gt; the 3x2 grid may contain the same file multiple times so I&#39;m afraid it<br>
&gt; won&#39;t be the best solution.<br>
&gt;<br>
&gt;   I guess, ultimately, there&#39;s multiple ways to attack this one from<br>
&gt; what I&#39;ve been able to find.  Here are the two that I&#39;ve been looking<br>
&gt; at, I&#39;m just not sure which is the better solution at this point:<br>
&gt;       * A single gnonlin composition with a 4 gnlsources similar in<br>
&gt;         setup as the gst-launch text I have below.<br>
<br>
</div>  Using one composition would actually be the &#39;proper&#39; way.<br>
<br>
&gt;       * 6 gnonlin compositions, each feeding to a single videomixer<br>
<div><div></div><div>&gt;         which combines them into the final frame.<br>
&gt;               * This path I&#39;m currently investigating.  I have a test<br>
&gt;                 written in C, but I&#39;m having some difficulties with<br>
&gt;                 pad linkage as I still don&#39;t have a complete<br>
&gt;                 understanding of when certain things will exist and<br>
&gt;                 how to get them.<br>
&gt;               * Here&#39;s currently whats happening:<br>
&gt;                       * Create a new pipeline<br>
&gt;                       * Create a videomixer<br>
&gt;                       * Create 6 gnonlin compositions each with a<br>
&gt;                         pad-added signal callback to connect<br>
&gt;                         gnlcomposition pad to videomixer.<br>
&gt;                       * ... (this is were it&#39;s going wrong)<br>
&gt;               * In the pad-added callback I have:<br>
&gt;                       * static void onPad(GstElement *comp, GstPad<br>
&gt;                         *pad, GstElement *sink) {<br>
&gt;                             GstPad *v = gst_element_get_pad(sink,<br>
&gt;                         &quot;sink&quot;);<br>
&gt;                             gst_pad_link(pad, v);<br>
&gt;                             gst_object_unref(v);<br>
&gt;                         }<br>
&gt;                       * gst_element_get_pad is not returning a pad<br>
&gt;                         from the video mixer (sink) which leads me to<br>
&gt;                         believe that I&#39;m either not asking in the<br>
&gt;                         right manner or the pad doesn&#39;t exist.  (I&#39;m<br>
&gt;                         aware that gst_element_get_pad is deprecated,<br>
&gt;                         I&#39;m just looking to test at the moment)<br>
&gt;                       * I noticed in one of the repositories under a<br>
&gt;                         unit test, the videomixer was attached as a<br>
&gt;                         gnloperation?  Is this the better path to<br>
&gt;                         take?<br>
&gt;<br>
&gt;   This all leads me to a couple more questions as well:<br>
&gt;       * A video mixer pad has xpos and ypos properties.  This would<br>
&gt;         let me shift the video around without needing a video box<br>
&gt;         which I believe may be more efficient?<br>
<br>
</div></div>  Yes, it will be more efficient.<br>
<div><br>
&gt;       * If I use the xpos and ypos properties, is the video mixer<br>
&gt;         smart enough to change the frame size appropriately or will it<br>
&gt;         simply crop the frame to the size of the largest input frame?<br>
&gt;               * If so, would it be better to add a videobox to do the<br>
&gt;                 adjustments for me, or feed in a solid color<br>
&gt;                 background of the required output size?<br>
<br>
</div>  No, it won&#39;t change the size, but what you could do is mix the<br>
original sizes with original offsets and then downconvert the video<br>
later.<br>
<br>
  Example for one 3x2 segment:<br>
<br>
  Create a gnloperation with a videomixer in it with a gnl priority of<br>
0.<br>
  Create a gnlfilesource for each clip with increasing priorities (1-&gt;6)<br>
going from left-right and then top to bottom:<br>
     1  2  3<br>
     4  5  6<br>
<br>
  Connect to the gnloperation &#39;input-priority-changed&#39; signal. When your<br>
callback is called, you will know which priority is being connected to<br>
which gnloperation ghostpad. You can get the videomixer sink pad by<br>
using the gst_ghost_pad_get_target() method and then setting the proper<br>
xpos/ypos property on that pad based on the priority of the feed being<br>
provided.<br>
<br>
  Set &#39;video/x-raw-yuv;video/x-raw-rgb&#39; as the caps property on all your<br>
sources.<br>
<br>
  Set duration and media-duration of *all* gnlobjects to the same<br>
duration.<br>
  If you want to add another segment of 3x2 clips, you&#39;ll need to re-add<br>
all those 7 objects with a modified &#39;start&#39; property.<br>
<br>
  First connect your composition to an imagesink to make sure the result<br>
is what you want. When it is, insert a videoscale element followed with<br>
a capsfilter with your target resolution.<br>
<br>
  Hope this helps.<br>
<div><div></div><div><br>
&gt;<br>
&gt;   Thanks again for the time.  I know there&#39;s a lot of questions above,<br>
&gt; but any help of any kind is greatly appreciated.<br>
&gt;<br>
&gt;   All the best,<br>
&gt;   Tim<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Nov 26, 2010 at 1:04 AM, Kapil Agrawal &lt;<a href="mailto:kapil.agl@gmail.com" target="_blank">kapil.agl@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;         Just a quick clue that might help, try using multifilesrc ?<br>
&gt;<br>
&gt;<br>
&gt;         On Thu, Nov 25, 2010 at 9:47 PM, Timothy Braun<br>
&gt;         &lt;<a href="mailto:braunsquared@gmail.com" target="_blank">braunsquared@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;                 Hello Everyone,<br>
&gt;                   I&#39;m fairly new to G-Streamer so any input you can<br>
&gt;                 provide is much appreciated.  I&#39;m working on a project<br>
&gt;                 where we need to generate a 2 minute video which is a<br>
&gt;                 composite of a total of 24 input videos.  The output<br>
&gt;                 video will have 4 different 30 second sections, each<br>
&gt;                 containing a 3x2 grid of the smaller input videos.<br>
&gt;                 The input videos are all naturally at 240x240 with the<br>
&gt;                 goal of having a final output frame size of 720x480.<br>
&gt;<br>
&gt;                   Using gst-launch, I&#39;ve been able to construct a<br>
&gt;                 sample 30 second clip using a combination of inputs,<br>
&gt;                 videoboxes and a videomixer.  Here is what I&#39;ve come<br>
&gt;                 up with so far:<br>
&gt;<br>
&gt;                 videomixer name=mix ! ffmpegcolorspace !<br>
&gt;                 ffenc_mpeg1video ! ffmux_mpeg name=mux ! queue !<br>
&gt;                 filesink location=output.mpg<br>
&gt;                 adder name=adder ! audioconvert ! ffenc_mp2 ! mux.<br>
&gt;                 filesrc location=loop1.mp4 ! decodebin name=decode1<br>
&gt;                 decode1. ! videobox border-alpha=0 top=-240 left=0 !<br>
&gt;                 queue ! mix.<br>
&gt;                 decode1. ! adder.<br>
&gt;                 filesrc location=loop2.mp4 ! decodebin name=decode2<br>
&gt;                 decode2. ! videobox border-alpha=0 top=-240<br>
&gt;                 left=-240 ! queue ! mix.<br>
&gt;                 decode2. ! adder.<br>
&gt;                 filesrc location=loop3.mp4 ! decodebin name=decode3<br>
&gt;                 decode3. ! videobox border-alpha=0 top=-240<br>
&gt;                 left=-480 ! queue ! mix.<br>
&gt;                 decode3. ! adder.<br>
&gt;                 filesrc location=loop4.mp4 ! decodebin name=decode4<br>
&gt;                 decode4. ! videobox border-alpha=0 top=0 left=0 !<br>
&gt;                 queue ! mix.<br>
&gt;                 decode4. ! adder.<br>
&gt;                 filesrc location=loop5.mp4 ! decodebin name=decode5<br>
&gt;                 decode5. ! videobox border-alpha=0 top=0 left=-240 !<br>
&gt;                 queue ! mix.<br>
&gt;                 decode5. ! adder.<br>
&gt;                 filesrc location=loop6.mp4 ! decodebin name=decode6<br>
&gt;                 decode6. ! videobox border-alpha=0 top=0 left=-480 !<br>
&gt;                 queue ! mix.<br>
&gt;                 decode6. ! adder.<br>
&gt;<br>
&gt;                   Now I need to do this 4 times, each time with a<br>
&gt;                 potentially different video in each box.  I&#39;ve started<br>
&gt;                 looking into C interfaces as there&#39;s other pieces of<br>
&gt;                 the puzzle which need to be tied into this, and I am<br>
&gt;                 trying to determine the best way to tackle this.  I<br>
&gt;                 originally was looking at Gnonlin, but the<br>
&gt;                 documentation is lacking in regards to how<br>
&gt;                 gnloperations work.  I also recently stumbled upon the<br>
&gt;                 GES library by Edward Hervey, this looks promising as<br>
&gt;                 well, but I haven&#39;t been able to spend much time on<br>
&gt;                 it.<br>
&gt;<br>
&gt;                   If I go the Gnonlin route, I believe I would need 6<br>
&gt;                 compositions, one for each box.  At the 30 second<br>
&gt;                 marker, I would swap the filesource to a new one using<br>
&gt;                 dynamic pads and listening for messages on the<br>
&gt;                 pipeline bus.  Am I far off on this?  Any suggestions?<br>
&gt;<br>
&gt;                   As for the GES library, it looks very promising and<br>
&gt;                 powerful from the little I read on it.  Would this be<br>
&gt;                 the smarter route to take?  If so, does anyone have<br>
&gt;                 any suggestions for how the pipeline would be<br>
&gt;                 structured?<br>
&gt;<br>
&gt;                   Thank you in advance for your time on this and I<br>
&gt;                 truly appreciate any information you are willing to<br>
&gt;                 share with me.<br>
&gt;<br>
&gt;                   Happy Thanksgiving,<br>
&gt;                   Tim<br>
&gt;<br>
&gt;<br>
&gt;                 ------------------------------------------------------------------------------<br>
&gt;                 Increase Visibility of Your 3D Game App &amp; Earn a<br>
&gt;                 Chance To Win $500!<br>
&gt;                 Tap into the largest installed PC base &amp; get more eyes<br>
&gt;                 on your game by<br>
&gt;                 optimizing for Intel(R) Graphics Technology. Get<br>
&gt;                 started today with the<br>
&gt;                 Intel(R) Software Partner Program. Five $500 cash<br>
&gt;                 prizes are up for grabs.<br>
&gt;                 <a href="http://p.sf.net/sfu/intelisp-dev2dev" target="_blank">http://p.sf.net/sfu/intelisp-dev2dev</a><br>
&gt;                 _______________________________________________<br>
&gt;                 gstreamer-devel mailing list<br>
&gt;                 <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;                 <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         --<br>
&gt;         <a href="http://www.mediamagictechnologies.com" target="_blank">www.mediamagictechnologies.com</a> (Gstreamer, ffmpeg, Red5,<br>
&gt;         Streaming)<br>
&gt;         twitter handle: @gst_kaps<br>
&gt;         <a href="http://www.linkedin.com/in/kapilagrawal" target="_blank">http://www.linkedin.com/in/kapilagrawal</a><br>
&gt;<br>
&gt;         ------------------------------------------------------------------------------<br>
&gt;         Increase Visibility of Your 3D Game App &amp; Earn a Chance To Win<br>
&gt;         $500!<br>
&gt;         Tap into the largest installed PC base &amp; get more eyes on your<br>
&gt;         game by<br>
&gt;         optimizing for Intel(R) Graphics Technology. Get started today<br>
&gt;         with the<br>
&gt;         Intel(R) Software Partner Program. Five $500 cash prizes are<br>
&gt;         up for grabs.<br>
&gt;         <a href="http://p.sf.net/sfu/intelisp-dev2dev" target="_blank">http://p.sf.net/sfu/intelisp-dev2dev</a><br>
&gt;         _______________________________________________<br>
&gt;         gstreamer-devel mailing list<br>
&gt;         <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;         <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Increase Visibility of Your 3D Game App &amp; Earn a Chance To Win $500!<br>
&gt; Tap into the largest installed PC base &amp; get more eyes on your game by<br>
&gt; optimizing for Intel(R) Graphics Technology. Get started today with the<br>
&gt; Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.<br>
&gt; <a href="http://p.sf.net/sfu/intelisp-dev2dev" target="_blank">http://p.sf.net/sfu/intelisp-dev2dev</a><br>
&gt; _______________________________________________ gstreamer-devel mailing list <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>


<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Increase Visibility of Your 3D Game App &amp; Earn a Chance To Win $500!<br>
Tap into the largest installed PC base &amp; get more eyes on your game by<br>
optimizing for Intel(R) Graphics Technology. Get started today with the<br>
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.<br>
<a href="http://p.sf.net/sfu/intelisp-dev2dev" target="_blank">http://p.sf.net/sfu/intelisp-dev2dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>