Using AVMutableVideoComposition and AVAssetExportSession to remove the background from video

Hi!

Like in the title, I am using AVMutableVideoComposition and AVAssetExportSession to remove the background of the video on export. I'll remove the background with Vision/ML predictions.

I am having issues utilizing AVVideoCompositing and AVVideoCompositionInstructionProtocol and AVAssetExportSession. Does anyone have any more up-to-date resources available for examples?

Sadly I have the same issue.

Specifying an AVVideoCompositionInstructionProtocol with requiredSourceTrackIDs seems to fail the export process with a "Cannot Decode" error

Using AVMutableVideoComposition and AVAssetExportSession to remove the background from video
 
 
Q