Trouble syncing 2 mono audio IP cams into stereo

Shervin Emami shervin.emami at gmail.com
Thu Jun 16 08:51:29 UTC 2016


Hi,

I'm trying to convert mono (G.711 mulaw) streams from 2 IP cameras into a
single stereo stream, but I've had a lot of trouble getting the Left &
Right channel to stay in sync. Sometimes the 2 channels are perfectly in
sync but sometimes they are 125ms out of sync. Here is my current pipeline
(using Gstreamer 1.2.4 on Jetson TK1):

gst-launch-1.0 -e \
        interleave name=i ! \
        audioconvert ! avimux name=mux ! filesink location=out.avi \
        rtspsrc location=rtsp://camL latency=2000 name=in1 \
        in1. ! queue min-threshold-time=200000000 ! application/x-rtp,
media=audio ! rtppcmudepay ! mulawdec tolerance=1000000 ! audiorate
tolerance=150000000 ! audioconvert !
audio/x-raw,channels=1,channel-mask=(bitmask)0x1 ! queue ! i. \
        rtspsrc location=rtsp://camR latency=2000 name=in2 \
        in2. ! queue min-threshold-time=200000000 ! application/x-rtp,
media=audio ! rtppcmudepay ! mulawdec tolerance=1000000 ! audiorate
tolerance=150000000 ! audioconvert !
audio/x-raw,channels=1,channel-mask=(bitmask)0x2 ! queue ! i.


If I reduce some of the parameters I also get some dropped audio packets,
but the pipeline above has mostly perfect audio but has left-right sync
issues. I will pay anyone that helps me get left & right in sync properly.


Cheers,
Shervin Emami.
http://www.shervinemami.info/Robotics_Engineer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160616/af084470/attachment.html>


More information about the gstreamer-devel mailing list