Synchronization of multiple audio sources

Rocket Show info at
Sun Nov 4 12:14:51 UTC 2018

Hi there

I am using Gstreamer on a Raspberry Pi to play multiple audio sources in sync. The pipeline looks like this:
- uridecodebin -> audioconvert -> audioresample -> alsasink
- uridecodebin -> audioconvert -> audioresample -> alsasink

The audio sources are simple WAV files. The next step would be to also add video files.

All elements are in the same pipeline. When I start the pipeline, all sources begin to play. But unfortunately, they are not in sync. Sometimes I am lucky and it works, but most of the time, they are a couple of milliseconds apart. Sometimes they „heal“ and get in sync after some seconds of playing and sometimes they don’t. Pausing/playing and seeking makes the desync worse.

I thought, Gstreamer would handle all the syncing, if the elements are in the same pipeline. But obviously, this is not the case. I tried playing with the async and sync properties on the alsasink elements, but it did not change anything. Using the same alsasink device or different ones also has no effect. 

Am I missing something or is the pipeline completely wrong?

Thanks for your replies and best,

More information about the gstreamer-devel mailing list