Disabling synchronization in udpsink for reverse playback

Muzzu Daniela Daniela.Muzzu at selexelsag.com
Thu Sep 27 06:41:45 PDT 2012


I'm trying to implement reverse playback in gst-rtsp server (and client-side too where needed), playing from a previously recorded stream. I also have a GStreamer-based client, with rtspsrc as source, that sends to the server an RTSP request with a negative scale to play backwards at a certain point.
Both client and server in this case set a newsegment with rate -1, and the server starts sending GOPs to the client in reverse order (from stop position to start, but with bytes in forward order inside GOP). The client is then able to queue and reverse  frames inside received GOPs and present them going backwards.

The main issue I have is about timestamps, more specifically related to multiudpsink synchronization in the server. Since GOPs are sent in reverse order but with frames in forward order, in current implementation frames arrive to udpsink with timestamps in this order (very simple example, playing from 10 to 0): 
7 8 9   4 5 6   2 3 4   0 1

and multiudpsink-basesink synchronize, with rate < 0, with the rule :
time = stop - position -> 3 2 1   6 5 4   8 7 6   10 9 
(time to be added to base_time before syncing).

[In forward order on the contrary timestamp would increase from 0 to 10 and time = pos - start]

This leads to a synchronization time which is not monotonically increasing, as Wim stated it should be; moreover, there is a delay (almost 1 sec.) at first GOPs starting, while the remaining frames in the GOP are sent immediately because they are late.
Obviously there is something strange, and I'm trying to figure out how to change things in order to have a smoother synchronization in multiudpsink also in reverse playback. I was wondering whether in this case synchronization still has to be enabled, but it seems that yes, it has to.

I hope my explanation is clear. Any suggestion is appreciated.
Thanks and regards, 
Daniela



-----Original Message-----
From: gstreamer-devel-bounces+daniela.muzzu=selexelsag.com at lists.freedesktop.org [mailto:gstreamer-devel-bounces+daniela.muzzu=selexelsag.com at lists.freedesktop.org] On Behalf Of Krause, Mathias
Sent: Thursday, September 27, 2012 1:41 PM
To: Discussion of the development of and with GStreamer
Subject: RE: Disabling synchronization in udpsink for reverse playback

Hi,

I don't exactly know, what you're trying to do. But as far as I can say:

If you turn the sync option off, that means, that udpsink does sent the data through UDP as fast as possible, instead of keep sending the data in sync with the own clock. That means, that you get a lot of traffic, if the source provides enough data. For a live source, you may disable the sync, but I don't exactly understand, what you're trying to archive with that.

Regards,
Mathias




From: gstreamer-devel-bounces+mathias.krause=xse.de at lists.freedesktop.org [mailto:gstreamer-devel-bounces+mathias.krause=xse.de at lists.freedesktop.org] On Behalf Of Muzzu Daniela
Sent: Friday, September 21, 2012 10:46 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: Disabling synchronization in udpsink for reverse playback

Hi,

I have a question related to the following bug (marked as INVALID), where it was proposed to disable sync in udpsink for live streams:
https://bugzilla.gnome.org/show_bug.cgi?id=665435

It has been replied that sync should be set to TRUE in all cases.
But, what about reverse playback? The server has to send chunks in reverse order, with a non-regular increase of timestamps. Does it make sense to set sync property to FALSE in this case?

Thanks,
Daniela

_______________________________________________
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