【发布时间】: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