Sync rpicamsrc and appsrc in RTSP server

Sebastian Dröge sebastian at centricular.com
Fri Nov 4 16:09:05 UTC 2016


On Thu, 2016-11-03 at 07:27 -0700, bomba wrote:
> Sebastian Dröge-3 wrote
> > Ok but where does the data come from? Without setting timestamps,
> > synchronization between streams can't possibly work. You either
> > have to
> > set appropriate timestamps so it goes together with the video, or
> > if
> > it's live data that was captured "now", you can try the "do-
> > timestamp"
> > property on appsrc (which will timestamp it with "now").
> 
> The media comes from an hardware OGG encoder, it has its own timestamps.
> The data comes out the hardware encoder ~1 second late so setting
> "do-timestamp" would not produce
> the desired result. I was thinking about "min-latency" and "max-latency"
> instead.

You want min-latency=1s then, and max-latency the same in your case.
And then timestamp the buffers accordingly with the timestamps coming
from the hardware encoder translated to the GStreamer pipeline's
running time (and especially to the clock used by the pipeline).

Those timestamps are still 1s "late" though, the min-latency setting
compensates for that (and ensures that video is in sync with that).

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161104/f81b0634/attachment.sig>


More information about the gstreamer-devel mailing list