1

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?

Ahmad Alhilal
  • 444
  • 4
  • 19

1 Answers1

2

The WebRTC JS API doesn't provide a way to set the keyframe interval. WebRTC handles error correction and congestion control for you, and will pick what it thinks the best settings are.

What are you trying to accomplish?

Sean DuBois
  • 3,972
  • 1
  • 11
  • 22
  • I need to configure the settings of webrtc video coding to VP8, GoP =10 (3 keyframes for 30 FPS). I'm trying to evaluate the performance my a prototype with the webrtc's. – Ahmad Alhilal Apr 15 '21 at 07:37