On 5/31/2012 12:05 PM, Mamadou wrote:
> RTP/SAVPF should be enough if chrome developers are logic. e.g. NACK
> is not signaled but is sent.
> PLI should not be used to request keyframe because of congestion
> control.
Not true, though response to a PLI must be congestion controlled, and
"smart" responses to PLI may avoid some of the issues with classic
"send-a-big-iframe" methods. PLIs over RTCP are limited by RTCP rules
(AVPF in this case, which makes them useful).
> In short a basic algorithm should be something like this:
> if(packet_lost(n)){
> if(send_nack(n) == ok){ // pkt retransmitted
Um, how do you know the packet was retransmitted? And retransmissions
in interactive communication are close-to worthless. Or is this running
on the sender side, and "send nack" is really "retransmit packet"? In
any case, not useful.
> // do nothing
> }
> else{ // the remote cannot retransmit the pkt
> if(pkt_type(n) == I || lost_chunck_is_config()){ // Intra frame or
> lost chunck contains config (e.g. quant tables for VP8, SPS/PPS for H.
> 264 etc...)
> send_fir();
Probably send_idr() (sender-side) is what you mean. The receiver
often can't tell what type of packet was lost (sometimes it can, but not
always). Having the receiver send a nack/pli lets the sender decide the
proper recovery method.
> }
> else{ // predicted (P or B for H.264 or Gold for VP8 ...)
> if(decode(n) == -1){ // fails to decode/subjective quality is
> below a threshold
> send_fir();
> }
> else{
> if(subjective< threshold){
> send_pli(); // let the remote party send FIR or whatever
> based on the bandwidth mgt
> }
> pkt_display(n);
> }
> }
> }
> }
Sorry, there's just too much here I disagree with.
My algorithm
Receiver:
if (packet_loss(n...)) {
send_pli(n...);
}
Sender:
if (is_pli()) {
if (fast_recovery_possible(n...))
send_fast_recovery(n...);
else
send_idr();
}
Where fast_recovery uses any non-IDR techniques available, which vary by
codec (long term reference frames, p-frame recovery, etc). Yes, you can
make it more complex, compare different encodings, etc, but in most
cases it isn't worth it. Fast recovery is generally better than
better-but-later recovery (and IDRs are often slower AND worse and cause
congestion or require dropping frames following, or running higher
compression levels).
--
Randell Jesup
randel...@jesup.org