<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi Tim,</div>

<div> </div>

<div>thanks for you reply. I have a bunch of video files (mp4) WITHOUT audio track and another bunch of video files (mixed formats) WITH audio track. I want them all concatenated together. The videos with audio track should be kept as they are the others without audio track got a new audio track mixed in from MP3.</div>

<div> </div>

<div>My pipeline looks like this (schematic).</div>

<div> </div>

<div><strong>part 1: video without audio track and separate audio file:</strong></div>

<div><span style="font-family:courier new,courier,monospace;">filesrc -> flvdemux -> h264parse -> concat (video)<br/>
filesrc -> decodebin -> concat (audio)</span></div>

<div><br/>
<strong>part 2: video with audio track:</strong></div>

<div><span style="font-family:courier new,courier,monospace;">                       ->  x264enc -> concat (video)<br/>
filesrc -> decodebin +|<br/>
                       ->  concat (audio)</span></div>

<div><br/>
<strong>part 3: mux concatenated streams together into filesink</strong></div>

<div><span style="font-family:courier new,courier,monospace;">concat (video)                             \<br/>
                                            --> matroskamux -> filesink<br/>
concat (audio) -> audioconvert -> voaacenc /</span></div>

<div><br/>
I put everything together programmatically via python bindings. I loop through a list of files where part1 and part2 creates dynamically new sources and links them to the concat elements. Everything is working quite well BUT the streams are somehow drifting apart.<br/>
The goal is that the videos with audio track should be synchron to its audio in the big concatenated video. I guess streamsynchronizer should do the trink but i am not sure where to put it in and how to link it programmatically (pad-added probe or just "decodebin.link(streamsynchronizer)" and so on).</div>

<div>Besause it is enough to have part2 sources av-synchronous i tried to create every time a new streamsynchronizer element. But everything i tried so far ended in nothing has changed or the pipeline just stopped and hangs in a paused state. I hope its more or less understandable.</div>

<div> </div>

<div>Regards,<br/>
Jens</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Sonntag, 05. Februar 2017 um 12:14 Uhr<br/>
<b>Von:</b> "Tim Müller" <tim@centricular.com><br/>
<b>An:</b> gstreamer-devel@lists.freedesktop.org<br/>
<b>Betreff:</b> Re: example for streamsynchronizer?</div>

<div name="quoted-content">On Wed, 2017-02-01 at 23:56 +0100, hammer.werfer@gmx.de wrote:<br/>
<br/>
Hi,<br/>
 <br/>
> can someone provide a litte example code (c, python, whatever) how to<br/>
> use the streamsynchronizer plugin?<br/>
<br/>
Let's take a step back - what are you actually trying to achieve? Most<br/>
people should not need to use the streamsynchronizer element ever. It<br/>
might not do what you want it to do, it's slightly misnamed.<br/>
<br/>
Cheers<br/>
-Tim<br/>
<br/>
--<br/>
Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br/>
_______________________________________________<br/>
gstreamer-devel mailing list<br/>
gstreamer-devel@lists.freedesktop.org<br/>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></div>
</div>
</div>
</div></div></body></html>