meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.11k stars 2.46k forks source link

Videoroom A/V Sync Issues #1653

Closed kylefoley closed 4 years ago

kylefoley commented 5 years ago

We're seeing audio/video not synced - note the googCurrentDelayMS in the graph which seems to be growing. In this case, the audio was ahead of the video by 1s. The audio googCurrentDelayMS was about 50ms.

I can attach a WebRTC dump if necessary. Any help in debugging it would be appreciated appreciated. Thanks!

Janus v0.7.1 Video Codec - H264 Audio Codec - OPUS Browsers - Chrome v74 Using CoTURN MacOS on one side, Win10 on the other

image

lminiero commented 4 years ago

Please test the PR above.

ghost commented 4 years ago

We see the lipsync issue as well.

Using the latest master version of Janus, videoroom plugin, Chrome 80 (Windows) on both ends, Alice and Bob. Bob's video gets about 1 sec out of sync with his audio (video is 1 sec delayed. as viewed by Alice). Alice's video and audio (as viewed by Bob) stay in sync.

Sync problem does not occur every time--it seems to start after there's been some kind of 'hiccup' in the connection that causes a momentary packet loss and/or packet nacks. But thereafter, the sync problem persists in that PeerConnection. If we destroy that PeerConnection and then create a new PC, the sync problem goes away... at least until it comes back again after another connection 'hiccup'.

I'll try to record pcap once I figure out how to do that.

lminiero commented 4 years ago

Please only provide feedback and pcaps if they refer to the PR above. We're not interested in data from master: we already know the issue may arise. We need information on whether the PR we came up with helps or not.

ghost commented 4 years ago

Understood. I'll try the PR rather than the master.

ghost commented 4 years ago

The PR (#2007) does appear to fix the sync issue. Will continue testing, but looks good.

lminiero commented 4 years ago

Merged, so I'll close.