Alsasrc && Appsrc synchronisation problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Alsasrc && Appsrc synchronisation problems

llama
Hello,

I have a problem with alsasrc and appsrc buffer synchronization. I have a stream like this:
alsasrc ------> flvmux -----> rtmpsink
appsrc ----------^

I am pushing buffers on appsrc on need-data signal.
I make feed to appsrc as much as need-data callback executes.
The main problems is that after a while of streaming i got sound are dis-aligned to image. So that i see the sound should occur on this image but actually i hear the image after 1s.  If i stream even more, i got even more dis-alignment.

I experienced this problem only when sourcing by appsrc element.
I am setting appsrc buffer PTS based on stream running time. Anyway i got dis-alignment over time.
After 5min streaming, i got 1s sound dis-alignment.

What may be the cause of this problem : buffer timestamping on appsrc, inconsistent appsrc fps or anything else ?
Any help is really important.

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Alsasrc && Appsrc synchronisation problems

Yi-Lung Tsai
Check PTS of appsrc buffer first is a good start.
If the PTS is created when appsrc buffer is generated, it could be late.
If the PTS is created when you receive need-data signal, this PTS is more likely to catch up alsasrc buffer.

--
Yi-Lung (Bruce) Tsai





On Apr 14, 2017, at 6:25 AM, LC <[hidden email]> wrote:

Hello,

I have a problem with alsasrc and appsrc buffer synchronization. I have a
stream like this:
alsasrc ------> flvmux -----> rtmpsink
appsrc ----------^

I am pushing buffers on appsrc on need-data signal.
I make feed to appsrc as much as need-data callback executes.
The main problems is that after a while of streaming i got sound are
dis-aligned to image. So that i see the sound should occur on this image but
actually i hear the image after 1s.  If i stream even more, i got even more
dis-alignment.

I experienced this problem only when sourcing by appsrc element.
I am setting appsrc buffer PTS based on stream running time. Anyway i got
dis-alignment over time.
After 5min streaming, i got 1s sound dis-alignment.

What may be the cause of this problem : buffer timestamping on appsrc,
inconsistent appsrc fps or anything else ?
Any help is really important.

Thanks in advance!




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Alsasrc-Appsrc-synchronisation-problems-tp4682663.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel