gstrtpbin with UDP Multicast for Sync Audio Playback on Multiple Clients
Mohammad Afaneh
mafaneh at gmail.com
Wed Jun 13 13:55:57 PDT 2012
Hi,
Anyone have an answer for this question? I was searching the archives for
threads related to synchronous audio playback for multiple clients and
found this thread.
If anyone has any input on this subject/problem your help would be
appreciated.
Thanks,
Mohammad
On Wed, Feb 29, 2012 at 11:21 AM, Endejan, Edward <
Edward.Endejan at dmh-global.com> wrote:
> Hello,
>
> Is it possible, and if so has anyone been successful in using gstrtpbin
> from the command line with gst-launch to stream audio (or video, or both)
> through UDP multicast and receive it on multiple clients which playback the
> audio in sync? I have seen one post which indicates this is not possible
> from a gst-launch command line because some unique session parameters such
> as ssrc, clock-base, and seqnum-base from the server need to be available
> to the clients. I have tried manually copying these parameters to the
> client(s) after the session is started on the server, but that has not
> helped. It is also not clear to me whether gstrtpbin will allow for
> synchronizing playback on multiple clients, or only synchronize multiple
> streams on a single client. In addition, I'm hoping it compensates for
> slight differences in clock rates between the server and the client(s).
>
> I have searched through the documentation and the mailing list archives,
> but have not found an example which is claimed to have worked. The online
> documentation for gstrtpbin gives example command lines for streaming audio
> and video, which I've adapted to stream only audio, but the results I get
> are intermittent at best. Sometimes the audio starts to play back fine for
> a while and then starts breaking up, but most of the time it stutters and
> skips from the beginning and often times it stops completely. I have
> simplified my test case to stream only to localhost (127.0.0.1) and run the
> server and client on the same device to eliminate any physical network
> issues or clock mismatch issues, but still the problems persist.
>
> I saw a recent post by Matthias Dodt which is very similar, and though he
> is trying to stream video instead, it is not working for him either.
>
> Here are the command lines I'm using:
>
> SERVER:
> gst-launch -v gstrtpbin name=rtpbin \
> audiotestsrc num-buffers=3000 samplesperbuffer=441 wave=0 freq=1000
> volume=1 is-live=true !\
> "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2" !\
> audioconvert !\
> "audio/x-raw-int, endianness=(int)4321, signed=(boolean)true,
> width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2" !\
> rtpL16pay !\
> rtpbin.send_rtp_sink_0 \
> rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=5002
> \
> rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5003
> sync=false async=false \
> udpsrc multicast-group=127.0.0.1 port=5007 !
> rtpbin.recv_rtcp_sink_0
>
> CLIENT:
> gst-launch -v --gst-debug=baseaudiosink:5 gstrtpbin name=rtpbin \
> udpsrc caps="application/x-rtp, media=(string)audio,
> clock-rate=(int)44100, encoding-name=(string)L16,
> encoding-params=(string)2, channels=(int)2" \
> multicast-group=127.0.0.1 port=5002 !\
> rtpbin.recv_rtp_sink_0 rtpbin. !\
> rtpL16depay !\
> queue2 max-size-bytes=204800 use-buffering=true
> ring-buffer-max-size=204800 !\
> "audio/x-raw-int, endianness=(int)4321, signed=(boolean)true,
> width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2" !\
> audioconvert !\
> "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2" !\
> alsasink device=plughw:0,1 drift-tolerance=10000 slave-method=1 sync=true
> \
> udpsrc multicast-group=127.0.0.1 port=5003 ! \
> rtpbin.recv_rtcp_sink_0 \
> rtpbin.send_rtcp_src_0 !\
> udpsink host=127.0.0.1 port=5007 sync=false async=false
>
>
> I intend to write an application eventually, but for now would like to
> verify proper operation using only the command line if possible. The other
> reason I want to verify this using a set of command lines rather than
> developing a full-blown application is that I hope to profile the CPU load
> for several use cases to ensure the feasibility of what I'm trying to do
> with a given hardware platform.
>
> Any guidance would be appreciated.
>
> Regards,
> Ed Endejan
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120613/9fdde89d/attachment.htm>
More information about the gstreamer-devel
mailing list