I am currently using webrtc to receive an h264 stream over udp(rtp).
I am encoding this stream and sending it, using gstreamer.
The way I am encoding it right now, is with an infinite GOP size, to allow for lowest bitrate.
However with an infinite GOP size, packet loss etc requires me to send keyframes.
I am wondering if there are better metrics for figuring out when to send a keyframe, and why we need to send keyframes in this situation at all.
For example, what is happening to the stream that requires a keyframe.
Also what is the best metric that can be used to determine that it is a good time to send keyframes. I've heard packet loss isn't good enough, since not all packet loss requires a keyframe refresh, and sometimes there is a delay between packet loss and the frame being received.