Issues trying to synchronise video appsrc with audio
stic at free.fr
stic at free.fr
Wed May 21 03:12:19 PDT 2014
yes the video source produces buffers in real time.
Taking the current clock time - gst_element_get_base_time() seems better because yes now i don't have anymore gaps in the video elapsed time. So then it will probably be easier to synchronise with audio :)
For now I focus only on video without audio, but now the video is very delayed with a latency I didn't have before (it was immediate with the initial method), probably because the pts time I give now is too late.
How can I get the latency value I could subtract to the pts time to get an immediate stream ? (current clock time - gst_element_get_base_time() - <latency_value> ???)
Thank you very much
----- Mail original -----
De: "Sebastian Dröge" <sebastian at centricular.com>
À: "Discussion of the development of and with GStreamer" <gstreamer-devel at lists.freedesktop.org>
Envoyé: Mercredi 21 Mai 2014 09:55:51
Objet: Re: Issues trying to synchronise video appsrc with audio
On Mi, 2014-05-21 at 09:46 +0200, stic at free.fr wrote:
> please can you give me advices on how I can synchronise correctly video and audio in my case ?
> Do you know if I have to insert empty buffers to compensate the fact that the appsrc video input does not push data when the input is not changing ?
If you don't produce video buffers when the input does not change,
that's not a problem at all. Just make sure that the timestamps are
correct after the gap, and don't just continue as if there was no gap
and a constant framerate was produced (like what the code you pasted
would do).
If your video source produces buffers in real time, you might just take
the current clock time at the moment you capture (minus
gst_element_get_base_time()) as the buffer timestamp. That's what
basesrc would do if do-timestamp=true.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
_______________________________________________
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