Issues trying to synchronise video appsrc with audio

stic at free.fr stic at free.fr
Thu May 22 03:45:48 PDT 2014


when i try this method (buffer timestamps with current clock time - gst_element_get_base_time()) I have following on few first buffers:
matroska-mux.c:3212:gst_matroska_mux_write_data:<matroskamux0:video_0> Invalid buffer timestamp; dropping buffer

Then the output video does not appear immediately and is delayed of something like 15 seconds! (i think it is the time is takes for the output video to appear)

Please does someone have any idea of what I could do ?

----- Mail original -----
De: stic at free.fr
À: "Discussion of the development of and with GStreamer" <gstreamer-devel at lists.freedesktop.org>
Envoyé: Mercredi 21 Mai 2014 12:12:19
Objet: Re: Issues trying to synchronise video appsrc with audio

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
_______________________________________________
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