You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Randomly the audio/video in mp4 files recorded by egress in participant egress is out-of-sync.
This issue happens when the user state audio and video at different times
I have analysed the a/v sync logic in egress code.
Below functions are used for synchronizing audio/video (Code snippets from server-sdk-go)
func (p*participantSynchronizer) synchronizeTracks() {
// get estimated ntp start times for all tracksestimatedStartTimes:=make(map[uint32]time.Time)
// we will sync all tracks to the earliestvarearliestStart time.Timeforssrc, pkt:=rangep.senderReports {
t:=p.tracks[ssrc]
pts:=t.getSenderReportPTS(pkt)
ntpStart:=mediatransportutil.NtpTime(pkt.NTPTime).Time().Add(-pts)
ifearliestStart.IsZero() ||ntpStart.Before(earliestStart) {
earliestStart=ntpStart
}
estimatedStartTimes[ssrc] =ntpStart
}
p.ntpStart=earliestStart// update pts delay so all ntp start times will match the earliestforssrc, startedAt:=rangeestimatedStartTimes {
t:=p.tracks[ssrc]
ifdiff:=startedAt.Sub(earliestStart); diff!=0 {
t.Lock()
t.ptsOffset+=difft.Unlock()
}
}
}
This code sync audio/video using the ntp time stanp in sender recort of the tracks. But egress is not receiving sender report for audio track from livekit-server.
Hence audio and video are not synchronized with ntp timestamp.
I have added logs in these functions and verified that no sender report is received for audio track.
Sender report is received for video track only.
I have verified participant egress and track egress. In both for audio track sender report is not received.
Is my understanding correct about the code or some other logic is used for a/v sync.
Egress Version
Latest master code
Additional context
NA
Logs
Post any relevant logs from the egress service here.
The text was updated successfully, but these errors were encountered:
Describe the bug
Randomly the audio/video in mp4 files recorded by egress in participant egress is out-of-sync.
This issue happens when the user state audio and video at different times
I have analysed the a/v sync logic in egress code.
Below functions are used for synchronizing audio/video (Code snippets from server-sdk-go)
This code sync audio/video using the ntp time stanp in sender recort of the tracks.
But egress is not receiving sender report for audio track from livekit-server.
Hence audio and video are not synchronized with ntp timestamp.
I have added logs in these functions and verified that no sender report is received for audio track.
Sender report is received for video track only.
I have verified participant egress and track egress. In both for audio track sender report is not received.
Is my understanding correct about the code or some other logic is used for a/v sync.
Egress Version
Latest master code
Additional context
NA
Logs
Post any relevant logs from the egress service here.
The text was updated successfully, but these errors were encountered: