Satellite-im/Warp

add debugging for RTP packets in Blink

Closed this issue · 2 comments

webrtc-rs queues RTP packets and turns them into a Sample. It would be helpful if there was an option to log these packets for each stream during a call, and a simple tool to analyze the data.

When recording multiple RTP streams to an MP4 file, the timestamps need to be correct or the tracks will be played out of sync. Difficulties are:

  • audio and video will have different sampling rates yet the mp4 file will probably use a common timescale for all tracks; the timescale will need to be compatible with the sampling rate of every track.
  • network delays may cause packets to arrive at irregular intervals
  • packets may be dropped, causing further irregularities regarding the intervals between packets

Addressing the above issues will help with #273

have a rtp logger mostly done here. BlinkImpl needs to be changed to take the log path as a parameter.

Eventually this module may also be useful for detecting audio degredation - if packets are dropped or coming in at irregular times, Blink could emit an event.

work was done for this here. the log files indicated that after a delay, a large number of samples were being received all at once.

seems like when there's audio degradation the queue in OpusSink fills up. That's probably the easiest place to emit an event.