streaming over network to multiple clients in sync

John Ruemker john.ruemker at gmail.com
Mon Feb 20 08:09:11 PST 2012


Thanks for the feedback.  The rtsp pipeline was just one of the many 
different variants I tried.  I gave that one a shot simply because that 
was what most of the examples of network streaming I found were using.  
However, even without rtsp I have never been able to get decent 
performance on playback, using multicast to multiple clients, udp to a 
single client, or tcp to a single client.

Do you have an example of a simple pipeline that would work well for 
network streaming? Are there specific settings on the sink/src plugins 
that I should look at tweaking to buffer more data on the client to 
avoid playback stalling?

Thanks,
John

On 02/20/2012 10:59 AM, Marc Murphy wrote:
> Hi,
> Just on a note, why are you using rtsp to send to multiple clients, you will always have loading issues if using lots of clients.
>
> You would normally use a multicast system to allow for low load  (on the server and network) and clients can then easily subscribe/unsubscribe to the service.  The server would normally be constantly running.
>
> Just maybe something else to look at.
>
> Cheers
> Marc
> ________________________________________
> From: gstreamer-devel-bounces+marcmltd=marcm.co.uk at lists.freedesktop.org [gstreamer-devel-bounces+marcmltd=marcm.co.uk at lists.freedesktop.org] on behalf of John Ruemker [john.ruemker at gmail.com]
> Sent: 15 February 2012 15:40
> To: gstreamer-devel at lists.freedesktop.org
> Subject: streaming over network to multiple clients in sync
>
> Hey all,
> I am a relative gstreamer n00b, but I've read the application
> development manual and gone through as many pipeline examples as I can
> find to try and get up to speed.
>
> I'm trying to figure out the ideal pipeline for streaming over the
> network to multiple clients.  The test I'm working with now is 720p mkvs
> using filesrc on the server streaming to multiple clients that will need
> to play back in-sync (more on that below).  I've come up with a number
> of different pipelines that will stream it and play on the clients, but
> the main two problems I need help solving are:
>
> a) Performance.  I can't seem to get smooth playback on the client in
> any of the pipelines I've tried.  Most of them have been pieced together
> from examples I've found (I still don't have much familiarity with the
> different plugins), so its quite possible I'm doing something stupid or
> missing an important setting.  I'm able to play the same file over NFS
> using different gstreamer players, so I'm convinced its something in the
> pipeline.  Here's an example of what I've tried:
>
> ### server
> # gst-launch -v gstrtpbin name=rtpbin filesrc location=file.mkv !
> decodebin ! x264enc ! rtph264pay ! queue max-size-buffers=2
> max-size-time=0 max-size-bytes=0  ! rtpbin.send_rtp_sink_0
> rtpbin.send_rtp_src_0 ! udpsink host=192.168.2.2 port=5000
> rtpbin.send_rtcp_src_0 ! udpsink preroll-queue-len=10000 port=5001
> sync=false async=false udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0
>
> ### client
> # gst-launch udpsrc port=5000 caps="application/x-rtp,
> media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264"
> ! .recv_rtp_sink_0     gstrtpbin ! decodebin ! xvimagesink
>
> I've also tried without RTP, tcp instead of udp, and tweaking some of
> the buffer/preroll settings to no avail.  Anyone have a good example of
> a pipeline that performs well over the network?
>
> b) Playing in sync on multiple clients. I need playback to be
> synchronized on the clients, but can't figure out how to do so.  I
> understand that I can use gst_net_time_provider_new() and
> gst_net_client_clock_new(), but as I understand that will only cause the
> client to use the same clock for playback, but their position in the
> streams will not be synchronized.  Any idea how I can accomplish this?
> Ideally the pipeline would be set up such that if I pause or set the
> position on the client it would carry back to the server and propagate
> to the other clients, but if the only way is to communicate from
> client->server at an application level to have the server do it, that's
> fine.
>
> Thanks in advance for any help you can provide!
>
> -John
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list