AVFoundation decode prores4444 movie with alpha channel

六眼飞鱼酱① 提交于 2019-12-23 01:27:11

问题


I'm trying to decode a prores4444 video with alpha channel on iOS with Swift to overlay as a complex animation over a user video and to export it to his library. The AVFoundation documentation is not that great and I'm struggling to find any code examples.

When I try to use the code below with AVAssetReaderTrackOutput to decode the video I get an "AVAssetReaderOutput does not currently support compressed output" error.

let avAssetReaderVideoCompositionOutput = AVAssetReaderVideoCompositionOutput(videoTracks: [videoOverlayAssetTrack], videoSettings: outputSettings: [AVVideoCodecKey: AVVideoCodecType.proRes4444])

Does anyone have a clue how to read in an asset track of a prores4444 with alpha channel to use it for an instance of AVMutableVideoCompositionLayerInstruction?

Should I use another codec?

来源:https://stackoverflow.com/questions/47627605/avfoundation-decode-prores4444-movie-with-alpha-channel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!