Re: [webrtc-stats] Stats to keep track of sync between audio and video

@stefanholmer @icydragons Trying to piece things together based on 
previous discussions. I want to come up with a definition. Is this 
correct and how does this sound?

- _Last known NTP timestamp_ - Video frames and audio samples arrive 
with RTP timestamps that are periodically mapped to NTP timestamps 
through messages mapping RTP to NTP. (@vr000m Is this spec'ed behavior
 or implementation specific?)
- `RTCMediaStreamTrackStats.playoutTime` - This is the estimated 
playout time, in NTP timestamp, of this track. It is the time of what 
is currently being played out, or what the time supposedly would be if
 there was something to be played out. It is extrapolated between 
video frames and audio samples. It is the _last known NTP timestamp_ +
 the time elapsed since that video frame or audio sample arrived.
- `RTCMediaStreamTrackStats.estimatedCaptureTime` - This is the 
estimated current time, in NTP timestamp, of the remote source. This 
is the _last known NTP timestamp_ + half of the estimated round trip 
time when that video frame or audio sample arrived + the time elapsed 
since that video frame or audio sample arrived.

Notes:
- Extrapolating with "time elapsed since..." means we don't have to 
care about frequency differences between audio and video or do special
 magic if audio or video packets arrive with different intervals or 
one/both of them lags.
- `audio.estimatedCaptureTime - video.estimatedCaptureTime` should be 
roughly zero but could be different because the round trip time 
estimate could be different for the audio and video streams.
- `e2eVideoDelay = video.currentEstimatedCaptureTime - 
video.playoutTime`, this is half of the estimated round trip time of 
the video frame (or eq. for audio sample) that provided the _last 
known NTP timestamp_.
- `AVSync = audio.playoutTime - video.playoutTime`

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at 
https://github.com/w3c/webrtc-stats/issues/158#issuecomment-280343004 
using your GitHub account

Received on Thursday, 16 February 2017 14:23:17 UTC