Issues trying to synchronise video appsrc with audio

Mailing List SVR lists at svrinformatica.it
Mon May 19 00:06:07 PDT 2014


Hi,

try an audio encoder less resource intesive such as mulawenc or alawenc 
this way works for me,

for the timestamp you can also set do-timestamp=true on appsrc if you 
don't have nothing better,

Nicola

Il 18/05/2014 23:06, stic at free.fr ha scritto:
> Hi,
>
> I am trying to synchronise video produced by appsrc with audio.
>
> Here is the pipeline I am using:
> appsrc name=vsource ! video/x-h264,framerate=30/1 ! h264parse config-interval=2 ! queue ! muxer. openslessrc name=asource ! audioconvert ! audio/x-raw,rate=16000 ! faac ! queue ! matroskamux name=muxer streamable=true ! tcpserversink...
>
> The problem is that as soon as I introduce audio in the pipeline it blocks video and shows following warnings:
> gstaudiobasesrc.c:863:gst_audio_base_src_create:<asource> warning: Can't record audio fast enough
> gstaudiobasesrc.c:863:gst_audio_base_src_create:<asource> warning: Dropped 10560 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
>
> Here is how I produce timestamps in the function called by the "need-data" signal:
> // timestamp is initialized with 0 value
> static GstClockTime timestamp = 0;
>
> //then for each buffer the timestamp value is updated like this:
> GST_BUFFER_PTS(buffer) = timestamp;
> GST_BUFFER_DURATION(buffer) = gst_util_uint64_scale_int(1, GST_SECOND, framerate);
> timestamp += GST_BUFFER_DURATION(buffer);
>
> I know this is probably not the best way to give timestamps to buffers, but it works very well with video alone.
> I tried to replace this by using do-timestamp=true and is-live=true properties to appsrc but as soon as I try to do this it ends with following warning from matroskamux for every buffer: "Invalid buffer timestamp; dropping buffer"
>
> I am really stuck, any hints on how I could manage timestamps and synchonisation for this ?
>
> Thank you.
> _______________________________________________
> 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