【问题标题】:how to set gop size of vp8, video codec, in webrtc?如何在 webrtc 中设置 vp8、视频编解码器的 gop 大小?
【发布时间】:2021-07-07 08:42:26
【问题描述】:

我正在使用video conference implementation source code 使用 webrtc 和 nodejs。

我设法使用 setCodecPreferences 方法set VP8 as codec 进行视频流,如下所示:

 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]]);
  }
});

但是,我找不到在 GoP 中设置 GoP 长度、关键帧速率/秒或帧间数的方法。

知道如何配置RTCPeerConnection 以提供此设置吗?

【问题讨论】:

  • 在转换静态或实时视频时,通常可以通过 ffmpeg 设置 GOP,但在 webRTC 中我认为是浏览器会检查设备的功能...
  • 是浏览器中的黑框吗?

标签: javascript node.js webrtc video-codecs


【解决方案1】:

WebRTC JS API 不提供设置关键帧间隔的方法。 WebRTC 会为您处理纠错和拥塞控制,并会选择它认为最好的设置。

你想完成什么?

【讨论】:

  • 我需要将webrtc视频编码的设置配置为VP8,GoP =10(3个关键帧为30 FPS)。我正在尝试使用 webrtc 评估我的原型的性能。
猜你喜欢
  • 2023-03-14
  • 2016-10-29
  • 1970-01-01
  • 2019-03-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-07-22
  • 1970-01-01
相关资源
最近更新 更多