Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

audio and video synchronization

80 views
Skip to first unread message

Pradeep Acharya

unread,
Dec 25, 2024, 9:24:49 AM12/25/24
to discuss...@googlegroups.com
Hi All,

i'm new to webrtc and developing video conference solutions. I observe that intermittently either audio or video gets delayed in playing and goes out of sync sometimes .

Started debugging the problem by adding additional logs in the wbertc source code on MAC machine and chromium browser. . i could see 2 problems for delay in audio and video playout and miss in their synchronization

1.  Sometimes the function ExtractPackets  () that is implemented in  neteq_impl.cc, is not invoked anywhere between 20 to 250 ms. Depending on the time which is not invoked, the number of packets in the buffer keeps increasing  adding to delay in audio playout

182305.938478:VERBOSE1:neteq_impl.cc(1902)]  Entered ExtractPackets () no of elements in packet_buffer: 8 

182330.248348:VERBOSE1:neteq_impl.cc(1902)]  Entered ExtractPackets () no of elements in packet_buffer: 17

At one log instance found that   for about 249 ms, the ExtractPackets () function is not called. 249/20 = 11 i,,e 17+11 = 28 packets were accumulated. 

1220/182330.497885:VERBOSE1:neteq_impl.cc(1902)]  Entered ExtractPackets () no of elements in packet_buffer: 28   

When synchronization thread, gets invoked, the samples size in jitterbuffer is around 480ms and this gets increased as and when ExtractPackets() function doesn't get called on time.

WARNING:channel_receive.cc(1149)]  GetSyncInfo () current jitter_buffer_delay: 451 playout_delay_ms_: 30 current_delay_ms: 48

182331.039824:VERBOSE1:stream_synchronization.cc(180)] Sync video delay 373 for video stream 2475061758 and audio delay 0 for audio stream 113103508

The Video is delayed by 373ms to compensate audio playout delay and both streams are delayed in playout


2. Sometimes ChannelReceive::OnRtpPacket () function implemented in channel_receive.cc ,  is not invoked immediately as the packet is received. The delay is observed to be anywhere between 40 to 150 ms. The packet capture shows audio is received at regular
interval of 20 ms and no delay in receiving packets. Looks like there is delay in invoking the function after receiving the packets. 

 182305.113998:INFO:channel_receive.cc(689)]  Packet rcvd seq num: 187 ssrc: 1131035083 rtp_timestamp_: 179520

Is there any configuration that can be done which helps in reducing the delay ? Any insights on how to solve the problem would be helpful 

Thanks and Regards

Pradeep Acharya

unread,
Jan 2, 2025, 4:23:41 AMJan 2
to discuss...@googlegroups.com
Hi All ,
             Any suggestions to resolve  below mentioned issue would be helpful

Regards
Pradeep
Reply all
Reply to author
Forward
0 new messages