synchronising multiple audio clients
Johannes Bauer
bauer.hannes.jo at gmail.com
Fri Jul 8 10:21:54 UTC 2016
Hello!
Since I had problems getting gst-python running i wrote my programs in C
for both serer and client.
I now have GStreamer 1.8.1 on my server (Win7) and also on both of my
clients (raspi2 with wheezy and raspi3 with jessy).
My server starts streaming an mpa stream from the mic input to the clients
via rtp and rtcp multicast. The clients receive the rtp stream and the rtcp
data.
I hear the output on both of my raspberries, however raspi2 is about 0.5
seconds delayed in contrast to the raspi3.
Is it possible to synchronize them, so there is "no" delay among the
clients?
I read something about the rtpbin parameters ntp-time-source, ntp-sync,
latency, buffer-mode and tried to play around with them, but i can't manage
to get the clients synchronised. Is it possible with the properties or do i
need to do something else here?
here is a snippet of the server:
g_object_set(G_OBJECT(rtpbin), "latency", 200, NULL);
g_object_set(G_OBJECT(rtpbin), "buffer-mode", 0, NULL);
// g_object_set(G_OBJECT(rtpbin), "ntp-sync", true, NULL);
g_object_set(G_OBJECT(rtpbin), "ntp-time-source", 3, NULL);
// g_object_set(G_OBJECT(rtpbin), "use-pipeline-clock", true, NULL);
g_object_set(G_OBJECT(source), "location", call->wav_file, NULL);
g_object_set(G_OBJECT(udpsink_rtp), "host", call->ip, NULL);
g_object_set(G_OBJECT(udpsink_rtp), "port", call->in_rtp_port, NULL);
g_object_set(G_OBJECT(udpsink_rtcp), "host", call->ip, NULL);
g_object_set(G_OBJECT(udpsink_rtcp), "port", call->in_rtcp_port, NULL);
// g_object_set(G_OBJECT(udpsink_rtcp), "sync", false, NULL);
here is a snippet of the client:
g_object_set(G_OBJECT(rtpbin), "latency", 200, NULL);
g_object_set(G_OBJECT(rtpbin), "buffer-mode", 0, NULL);
// g_object_set(G_OBJECT(rtpbin), "ntp-sync", TRUE, NULL);
g_object_set(G_OBJECT(rtpbin), "ntp-time-source", 3, NULL);
// g_object_set(G_OBJECT(rtpbin), "use-pipeline-clock", TRUE, NULL);
g_object_set(G_OBJECT(call->rtpsrc), "address", call->ip, NULL);
g_object_set(G_OBJECT(call->rtpsrc), "port", call->in_rtp_port, NULL);
g_object_set(G_OBJECT(call->rtpsrc), "auto-multicast", TRUE, NULL);
g_object_set(G_OBJECT(call->rtpsrc), "timeout", 10000000000, NULL);
g_object_set(G_OBJECT(call->rtpsrc), "caps", caps_rtp, NULL);
g_object_set(G_OBJECT(call->rtcpsrc), "address", call->ip, NULL);
g_object_set(G_OBJECT(call->rtcpsrc), "port", call->in_rtcp_port, NULL);
g_object_set(G_OBJECT(call->rtcpsrc), "auto-multicast", TRUE, NULL);
g_object_set(G_OBJECT(call->rtcpsrc), "caps", caps_rtcp, NULL);
Kind regards
Johannes Bauer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160708/04be645d/attachment.html>
More information about the gstreamer-devel
mailing list