2
votes

Problem :

  1. Its live audio-video streaming over WiFi + udp network.
  2. Stream : Mpeg2Ts
  3. Player Framework : gstreamer.
  4. Pipeline Appsrc ----> tsdemuxer -----> audio-queue---->faad decoder--->alsasink - ----->video-queue->vpudecoder ---->videosink
  5. Audio device is configured for processing 48000 samples per second.
  6. Senders clock is faster than receiver clock and i get this info by tracking the pcr value coming in the stream and receiver system clock. After 1 hour there is 8 second difference between sender and receiver clocks.
  7. So problem is sender is sending more samples in one seconds with respect to receiver clock due to this latency between sender and receiver is keep increasing with the time.
1

1 Answers

2
votes

The clock skew should be automatically handled by GStreamer's synchronization mechanisms and the skewing logic inside the audio sink base class.

To solve your problem of increasing latency between sender and receiver, you would have to timestamp the input properly instead of relying on the timestamps inside the TS stream (which are based on the sender clock and thus wrong on your side). For that it might already be enough to use a recent enough GStreamer version and setting do-timestamp=true and format=time on the appsrc.