Video+Audio together stutter (but not separately)

Nicolas Dufresne nicolas.dufresne at gmail.com
Mon Mar 28 13:25:19 UTC 2016


Le dimanche 27 mars 2016 à 11:17 -0700, fadnavis a écrit :
> RECEIVER:
> udpsrc port=5000 caps="application/x-rtp" ! rtpjpegdepay ! decodebin
> !
> videoscale ! autovideosink  udpsrc port=5001
> caps="application/x-rtp,media=(string)audio,clock-
> rate=(int)44100,encoding-name=(string)MP4A-
> LATM,cpresent=(string)0,config=(string)40002420,payload=(int)96,ssrc=
> (uint)1152421420,timestamp-offset=(uint)3767852666,seqnum-
> offset=(uint)2211"
> ! rtpmp4adepay ! decodebin ! queue ! audioconvert ! autoaudiosink 
> 
> I have also tried adding "sync=false" at the end of both sinks on the
> receiver but the behavior is the same. I did some research around
> this and
> guessed there could be three reasons :
> 
> a) Bad timestamps

On the receiver side, you should be using rtpjitterbuffer elements.
This will provide both buffering and timestamp adjustment.

> b) Android CPU not powerful enough to render both audio and video
> together
> (remember - individual pipelines work fine. Also, same behavior on a
> powerful OnePlus one device with 3GB RAM)

You can test that. Just mux the stream (e.g. using mp4mux), copy that
file to your phone and play it with various audio/video player.

> c) Data is being read from the buffer faster than it is being fed
> into it -
> this is called underflow right? (or could it be overflow? I doubt
> though)

This is possible, that's also what a jitter buffer is responsible for.
A way to simplify your work here and more toward a more stable
solution, would be to use gst-rtsp-server library. And then on the
client, you could simply use playbin with rtps:// URI.

> 
> I'd appreciate if someone can help me understand if it is one of
> these three
> issues or could it be something else? Even if the issue is amongst
> the
> above, I have no idea how to solve it. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160328/6bbaaaa5/attachment.sig>


More information about the gstreamer-devel mailing list