Question

I have the following pipeline setup in gstreamer:

two pulse audio sources (pulsesrc) from two seperate usb audio interfaces and one pulse audio sink (pulsesink). I'm combining the two incoming audio streams using the adder component. Unfortunately there is a slight delay between the two audio channels.

pulsesrc1 --- queue --- audioconvert --- audioresample --- |
                                                           | adder --- queue --- | pulsesink
pulsesrc2 --- queue --- audioconvert --- audioresample --- |

I'm using the system time/clock for syncing. Both Audio-Interfaces are connected to the same usb-hub. I'm guessing that the audio has already a slight delay before it even gets picked up by the sources (due to different clocks).

This is why I'd like to introduce a delay/gap/shift to the first audio channel (the 2nd lags slightly behind) to compensate for that.

So far I tried setting the property "min-threshold-time" of the first queue. Unfortunately the pipeline compensates for this delay and both audio streams get equally delayed. I've also checked out the element "audioecho". Unfortunately it is missing a "dry/wet" property. This means the original signal gets always played at its original time and then after that the delay tail kicks in (which does not help me at all).

Any further ideas how to solve this problem? Maybe adding a gap of silence? Or other parameters I might have been missing.

I've implemented this pipeline using Python. Thank you in advance!

Was it helpful?

Solution

You can use the min threshold time / bytes in queue to delay sending the data over the rest of the pipeline? I think it should work. Only if that does not go for this:

http://gentrans.sourceforge.net/docs/head/gst-entrans-plugins/html/gst-entrans-plugins-shift.html

or modify frie0r delay plugin for audio.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top