iOS - How to play a video with transparency?

前端 未结 8 1381
情书的邮戳
情书的邮戳 2020-11-29 06:38

I recorded a video with a bluescreen. We have the software to convert that video to a transparent background. What\'s the best way to play this video overlaid on a custom

8条回答
  •  日久生厌
    2020-11-29 07:13

    I'm assuming what you're trying to do is actually remove the blue screen in real-time from your video: you'll need to play the video through OpenGL, run pixel shaders on the frames and finally render everything using an OpenGL layer with a transparent background.

    See the Capturing from the Camera using AV Foundation on iOS 5 session from WWDC 2011 which explains techniques to do exactly that (watch Chroma Key demo at 9:00). Presumably the source can be downloaded but I can't find the link right now.

提交回复
热议问题