Synchronized video playback on different Android devices

Jeppe Ledet-Pedersen jlp at steinwurf.com
Fri Aug 29 02:22:39 PDT 2014


Hi,

I'm using gstreamer 1.4.0 to implement synchronized video playback on
Android devices. I have implemented this pipeline in my app:

appsrc is-live=true do-timestamp=true min-latency=0 ! rtpjitterbuffer
latency=1000 ! decodebin ! videoconvert ! glimagesink

RTP frames are pushed into the appsrc from a reliable multicast source.
I have set "format" of the appsrc toGST_FORMAT_TIME and the caps to:
"application/x-rtp,media=(string)video,clock-rate(int)90000,payload=(int)96,encoding-name=(string)H264"

I have synchronized the client clocks to the server clock with a
GstNetTimeProvider/GstNetClientClock pair. The server basetime is
distributed when the clients join the stream.

This works quite well as long as the app is running on the same type of
device (e.g. a couple of Nexus 5's). If I test with a mix of Nexus 5 and
Nexus 7's, the video is only synchronized to the devices of the same model.

I assume this is because the pipeline latencies of the two devices are
not the same? Can I somehow read back the latency and adjust the
rtpjitterbuffer latency to get a identical total latency of all the
devices? Or is there a better solution?

The devices both run Android 4.4 and use the built-in H264 hardware
decoders (through decodebin).

Thanks,

-Jeppe


More information about the gstreamer-devel mailing list