<div dir="ltr">Hi,<div><br></div><div>I'm trying to build an application to post-process some recorded media using gstreamer. In particular, audio and video files are separated, and timestamps are used to specify when they appeared in the original session. What I'm trying to do is replicating the session using dynamic audio and video mixing, by attaching the streams only when they're supposed to be there.</div>
<div><br></div><div>At the beginning I tried to do this "manually", that is, attaching the streams to an adder/videomixer2 when some time had passed: this had mixed results (actually, quite bad results, especially in terms of A/V synchronization) so I tried a different approach, using the gnonlin plugins for the purpose.</div>
<div><br></div><div>I found a couple of old posts on the mailing list that helped me understand how I could make use of them for my scenario:</div><div><br></div><div><a href="http://lists.freedesktop.org/archives/gstreamer-devel/2010-November/029300.html">http://lists.freedesktop.org/archives/gstreamer-devel/2010-November/029300.html</a><br>
</div><div><a href="http://lists.freedesktop.org/archives/gstreamer-devel/2011-February/030777.html">http://lists.freedesktop.org/archives/gstreamer-devel/2011-February/030777.html</a><br></div><div><br></div><div>and basing on them I at least managed to have the streams (both audio and video) dynamically appear at the same time. I still have some issues (e.g., when streams end or get stuck for any reason, which I guess I'll have to handle accordingly by detaching the related pads) but I'll move to this only when I'll have the scenario sorted out, so that's not what I'd like to ask you.</div>
<div><br></div><div>Right now, I managed to implement the dynamic videomixing functionality following the suggestions in the mentioned posts: using a gnloperation containing the videomixer2, the 'input-priority-changed' signal and properly set priority values on the video streams, I'm able to set the xpos/ypos/zorder of the video in the videomixer2 element just fine. The problem is that I'd like to do some manipulation on the videos before passing them to the videomixer2 element, specifically cropping the video (they are 320x240 while I need them to be 240x240) and adding a simple textoverlay on top of them. This is something I could do in my original "naive" attempt, but I can't seem to be able to do it using gnonlin.</div>
<div><br></div><div>As far as I've understood, anything in a gnlcomposition must be a compliant non-linear bin element, meaning I cannot just place those filters cascaded after a gnlfilesource. I guess the proper way to do so would be to have further gnloperation elements to take care of those operations, but I haven't managed so far to understand whether or not a gnlcomposition can contain more than a single gnloperation at all. If so, how can I have a specific gnlfilesource attach to a specific gnloperation taking care of it, and then have this be the source of the data to feed to the videomixing gnloperation itself? I tried playing a bit with the 'pad-added' signals but I couldn't do anything in that sense.</div>
<div><br></div><div>Any hint on the best way to proceed?</div><div>Thanks in advance for any help you'll be able to provide me!</div><div><br></div><div>Lorenzo</div></div>