2

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?

fsoc
  • 81
  • 1
  • 5
  • You can only decode h.264 (or h.265 on newer iOS hardware). Anything else including a simple Animation codec is not supported and will not be in the future. There are other options, you will need to look into a 3rd party solution. – MoDJ Dec 05 '17 at 02:48
  • See my question and answer here: https://stackoverflow.com/q/47651412/7840155 – Tzar Dec 25 '17 at 07:18

0 Answers0