Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should PLI packets be used in WebRTC video recording

We are using the licode MCU to streaming video from Google Chrome to the server and record it. The tricky part here is that there is only one Chrome browser involved so the server-side code has to handle sending feedback to the client.

We added server-side code to send REMB (bandwidth) packets every 5 seconds to the client. This causes the client to increase bitrate so that the video quality is good.

We did something similar with PLI packets to attempt to improve video quality. The recorded video had blocky artifacts and didn't look good. The current code sends a PLI every 0.8 seconds which causes the client to send a keyframe (full frame of video). This fixes the poor video quality because it forces a keyframe but when there is packet loss (wifi network) it quickly gets bad again.

My question is how should these PLI packets be used?

I think PLI means:

PLI    - Picture Loss Indication
like image 967
Jay Prall Avatar asked Nov 17 '15 19:11

Jay Prall


1 Answers

Your application should send at least three kinds of RTCP feedback:

  • an accurate receiver report (RFC 3550) every second or so, indicating packet loss and jitter rates to the sender; this will cause the sender to adapt their throughpout to the link characteristics;
  • a generic NACK (RFC 4585) whenever it misses a packet; this will avoid corruption by causing the sender to resend any packet that is lost;
  • a PLI (RFC 4585) whenever it hasn't seen a keyframe in a given interval, for example two seconds.

Sending REMB is only necessary to limit throughput if it grows too fast, for example if the feedback provided in receiver reports is inaccurate.

like image 99
jch Avatar answered Sep 30 '22 19:09

jch