Choppy sound in WebRTC player

Yu You youyu.youyu at gmail.com
Wed Jan 26 11:49:29 UTC 2022


Hi,

Recently we tested using the "webrtcbin" and a WebRTC JS player
(RTCPeerConnection) with a video (vp8 and h264 encoders) and audio (opus
encoder).

The video and audio streams worked without any noticeable packets discarded
by the WebRTC player in Chrome. But we observed lots of packets were
discarded from "chrome://webrtc-internals/", for example,
packetsDiscarded: 475

The spec. says the packets are discarded (not lost) because they may be too
late or early.

Working pipeline (pseudo code):

Local sound source (wav file or alsasrc do-timestamp=true) with "clocksync
sync=true" => webrtc sound pipeline

Choppy pipeline (pseudo code):
(same audio source)  ! rtpmp4apay ! udpsink sync=true -> udrsrc ! rtpdepay
! => webrtc sound pipeline

I even tested with a "tee" element before the webrtcbin; and the audio
sounds correctly. The pseudo code omitted details but all caps, convert
elements, queue, e.g. are used.

So the audio packet discarded on the web browser should be caused by the
RTP/UDP part. No video-related packet discard was observed; and video
stream is also transported over a separate RTP/UDP channel.  Audio and
video streams are not synchronized.

Any idea how to find out the root cause of the choppy sound in the
Browser?  Or should video and audio must be synchronized before linking to
webrtcbin pads?

Thanks for any ideas.

Regards,

Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220126/abaa49d6/attachment.htm>


More information about the gstreamer-devel mailing list