I need to know if there is a hard limit to add the number of tracks to AVMutableComposition using the API addMutableTrackWithMediaType? That is, if I want to make a collage of 9 videos, I understand I will need to add 9 tracks to AVMutableComposition and use appropriate AVCompositionInstructions to compose the video. How do I know the maximum number of tracks that can be added simultaneously and it is supported by the system? Or is this number device dependent? I read the number of simultaneous decoders that can be run is 16 in iOS, but still not in official documents.
AVMutableComposition addMutableTrackWithMediaType limit
Indeed, I believe you will be limited by available decoder resources, which is device dependent.
Thanks for response. May I know what is the limitation on devices running iOS13 and above? Can they safely support 6-8 decoders? Because I heard AVFoundation can support simultaneous eight AVAssetWriter sessions for encoding. I believe decoding is easier so should support atleast 8 tracks?