【问题标题】:How to enable VP8 on iOS WebRTC?如何在 iOS WebRTC 上启用 VP8?
【发布时间】:2021-05-17 18:10:44
【问题描述】:

如何在 iOS WebRTC 上启用 VP8?我已经在 ios 上构建了 webrtc,我可以在 ios 的 webrtc 源代码中看到 libvpx。但是我不知道如何启用它。

PeerConnection to createOffer只有h264,SDP中没有VP8描述。

感谢您的帮助

【问题讨论】:

    标签: ios webrtc vp8


    【解决方案1】:

    你必须为RTCDefaultVideoEncoderFactory设置preferedCodec

    let encoderFactory = RTCDefaultVideoEncoderFactory()
    
    // Set video codec to VP8
    encoderFactory.preferredCodec = RTCVideoCodecInfo(name: kRTCVideoCodecVp8Name)
    
    let factory = RTCPeerConnectionFactory(
        encoderFactory: encoderFactory,
        decoderFactory: RTCDefaultVideoDecoderFactory()
    )
    

    【讨论】:

    • 这对我有用,谢谢。
    猜你喜欢
    • 2019-06-22
    • 2016-05-18
    • 1970-01-01
    • 2016-08-14
    • 1970-01-01
    • 2015-02-09
    • 1970-01-01
    • 2014-11-15
    • 1970-01-01
    相关资源
    最近更新 更多