I'm using the video conference implementation source code using webrtc and nodejs.
I managed to set VP8 as codec for the video streaming using setCodecPreferences method as follows:
rtcPeerConnection = new RTCPeerConnection(iceServers)
.......
const transceiver = rtcPeerConnection .addTransceiver('video');
const capabilities = RTCRtpSender.getCapabilities('video');
const { codecs } = capabilities;
codecs.forEach(codec => {
if (codec.mimeType.toLowerCase() === 'video/vp8') {
transceiver.setCodecPreferences([codecs[0]]);
}
});
However, I couldn't find a way to set the GoP length, keyframe rate/s or number of inter-frame in GoP.
Any idea how to configure RTCPeerConnection
so as to provide this setting?