Reputation: 12819
Is there a way to switch between multiple video tracks in an AVMutableComposition
? I want to assign a different preferredTransform
to each, and switch between them.
I tried it by assigning alternating assets to an A track and a B track, but no video showed for the B track time.
Upvotes: 0
Views: 526
Reputation: 12819
It looks like to perform the switching between multiple video tracks ("video downmixing") you need to use AVAssetWriter
. According to the docs the class has "automatic interleaving of media data for multiple concurrent tracks".
So, if you want to preview a composition using multiple video tracks, you either need to write it out using AVAssetWriter
or compose it in an AVMutableComposition
using a single video track only.
Upvotes: 1