420YpCbCr8PlanarFullRange pixel buffer works with H.264 but not VP8

16 views
Skip to first unread message

na...@cape.com

unread,
May 16, 2018, 2:31:46 AM5/16/18
to discuss-webrtc
Hi,

I'm developing an app on iPad and having a problem when I use VP8 over H.264.
Basically, I'm generating a pixelBuffer, and feeding it via the module below.

class MyVideoCapturer: RTCVideoCapturer {
    func feed(pixelBuffer: CVPixelBuffer) {
        let rtcPixelBuffer = RTCCVPixelBuffer(pixelBuffer: pixelBuffer)
        let ts = llround(CACurrentMediaTime() * Double(NSEC_PER_SEC))
        let videoFrame = RTCVideoFrame(buffer: rtcPixelBuffer, rotation: ._0, timeStampNs: ts)
        delegate?.capturer(self, didCapture: videoFrame)
    }
}

This works perfectly and Chrome browser shows the video stream as I expect... as long as:

1. codec is "H264", or
2. codec is "VP8" and pixelBuffer is kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.

When pixelBuffer is kCVPixelFormatType_420YpCbCr8PlanarFullRange, it only works like a charm when codec is H264.
But when it's VP8, Chrome browser shows a solid grey box.

Since it works with H.264, I suppose the pixelBuffer itself is not the problem. And I can't tell anything strange from chrome://webrtc-internals/ regardless of format/codec.

Is this a known issue or am I missing something?  Does anyone have any clue what is going wrong?

Reply all
Reply to author
Forward
0 new messages