Looks like I’ve overlooked the logPacketLoss flag. So here is my evaluation result: setting logPacketLoss=true and useNack=true (with useNack=false nothing happens), I see some activity.
First there are WARN entries in the Wowza log:
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:15819 current sequence number:15850, diff: 30
And also the lossNotification event (set be WebRTCSession.setLossNotifier()
will get invoked. I also have to call the WebRTCSession.setLossNotifierInterval()
which takes a long parameter, which is not milliseconds, but it is correlated with the frequency of the notifier being invoked - setting to 100 will gave a 1-6 sec time between notification, maybe it’s related to loss packet/byte count? (I’m simulating a 25% packet loss on the network for quick testing)
The interesting thing is the parameters of the IWebRTCLossNotifier.onLossNotification(long l, double v, WebRTCSession webRTCSession)
method invoked: the l parameter is most likely the total diff in sequence numbers on the track with highest total diff (based on the diff fields in the log, see below), the v parameter is strange, I have no clue what it could be
The interesting thing is that if I use the WebRTCSession.setLossNotifier()
method, the RTPSession’s IOPerformanceCounter reports 0 for InBytes and InCount metrics. The LossCount and LossBytes metrics are always zero, even with logPacketLoss set to true and no loss notifier set.
Here is a log excerpt, on what i see:
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:34617 current sequence number:34641, diff: 23
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:34641 current sequence number:34658, diff: 16
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:15193 current sequence number:15195, diff: 1
2021-06-05 09:59:51 (INFO) onLossNotification l=39 v=164375.0
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:34864 current sequence number:35034, diff: 169
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:15257 current sequence number:15324, diff: 66
2021-06-05 09:59:51 (INFO) onLossNotification l=169 v=167689.0
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:35814 current sequence number:35911, diff: 96
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:15558 current sequence number:15595, diff: 36
2021-06-05 09:59:57 (INFO) onLossNotification l=96 v=206233.0
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:36635 current sequence number:36642, diff: 6
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:36642 current sequence number:36790, diff: 147
WARN server comment - JitterBuffer.packetLoss[s/_definst_/publish-1c945e43-553f-4545-b79f-a1776e1a6336]: last sent sequence number:15819 current sequence number:15850, diff: 30
2021-06-05 10:00:03 (INFO) onLossNotification l=153 v=117893.0
Anyway, this is getting close to what I’m looking for, I practically have the number of lost packets, but knowing the total number of packets would also be important, but unfortunately it is lost, as soon as I set a loss notifier… I join the slack channel you suggested and try to pursue more information on the subject.