New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620877 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Video jitter buffer delays significantly above audio ones causing bad AV sync.

Reported by ganapath...@gmail.com, Jun 16 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Open a peerconnection with camera feed as input for video
2. After a few minutes into the AV session, switch the stream from video to desktop (sdp does get renegotiated for this source change)
3. Audio and video goes out of sync at the end which switched the stream. The AV is in sync for a few minutes after the switch but starts drifting after a few minutes.

What is the expected behavior?

What went wrong?
Everytime the AV went out of sync I could find the googCurrentDelayMs increasing from the order of few ten milliseconds to about 3 seconds.

Did this work before? N/A 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? N/A 

Chrome version: 51.0.2704.84  Channel: n/a
OS Version: OS X 10.10.0
Flash Version: Shockwave Flash 21.0 r0
 
webrtc_internals_dump (1).txt.zip
102 KB Download
Components: Blink>WebRTC
Owner: pbos@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report, and dump!

pbos: I recall we used to have some sync problems related to Windows drivers, but this is OS X. Can you take a look?

Comment 3 by pbos@chromium.org, Jun 21 2016

Cc: qiangchen@chromium.org philipel@chromium.org nisse@chromium.org holmer@chromium.org mflodman@chromium.org
I believe the AV sync offset is due to jitter buffer spikes. Does this AV sync ever recover once it goes out of sync?

Comment 4 by pbos@chromium.org, Jun 21 2016

Cc: sprang@chromium.org
No it does not. It continues to be out of sync. However, when we switch the stream from desktop back to camera it does get back into sync most of the times. But then that's not guaranteed.

Comment 6 by pbos@chromium.org, Jun 21 2016

Cc: sergeyu@chromium.org
FTR desktop capture is timestamped with TimeTick::Now:

https://chromium.googlesource.com/chromium/src/+/master/content/browser/media/capture/desktop_capture_device.cc#309

I'll take a look at SDPs tomorrow if they are in the dump to make sure that sync labels are applied properly.

What're you using for audio? How do you tell whether they are in sync or not?
The far end audio is just voice. We used simple counting mechanism to check for the AV sync. It was way off and was pretty easy to notice. Audio was ahead by atleast a couple of seconds.

Comment 8 by m...@chromium.org, Jul 12 2016

This may be the root cause: https://cs.chromium.org/chromium/src/content/renderer/media/webrtc/webrtc_audio_sink.cc?rcl=0&l=85

In other words, it's currently impossible to guarantee A/V sync because the necessary plumbing is missing. ;-)

Comment 9 by pbos@chromium.org, Jul 13 2016

Cc: pbos@chromium.org
Owner: holmer@chromium.org
Summary: Video jitter buffer delays significantly above audio ones causing bad AV sync. (was: AV out of sync in a webrtc session)
I believe it's closer related to googCurrentDelayMs increasing to ~3 seconds. I wouldn't expect these to far out of sync otherwise. We're aware of the video jitter buffer increasing delays significantly over audio delays, I think this best tracks that.

Even without corresponding track labels we should best-effort be kind-of-in-sync I think.
ganapathy.vijay@gmail.com, Is there a media server involved here? 

Sounds to me like the stream switch isn't handled correctly causing unexpected jitter. Could either be caused by webrtc not timestamping correctly when streams switch, but also by a misbehaving 
Sorry for a late reply. Yes there is a media server involved here. We do use temasys plugin for our app on IE. We don't get into this situation with IE. To my knowledge our mediaserver doesn't treat these two any differently. At this point I think this point it appears to be a chrome factor.
Could you provide an rtc event log from chrome://webrtc-internals while you reproduce this problem at the receiver?
Check the checkbox named "Enable diagnostic packet and event recording" under "Create Dump".

That way we can look at the timestamps to ensure they're sane, as a first step.
ping
Status: Archived (was: Assigned)
Archiving due to inactivity. Please reopen if more information becomes available.

Sign in to add a comment