79266230

Date: 2024-12-09 19:32:02
Score: 0.5
Natty:
Report link

I commented on your Apple Dev Forums post as well:

You need to ensure that you re-use tracks in your composition when creating a composition. Validate that your existing composition video track can be re-used when making a new insert / edit - assuming you don't need multiple tracks for transition effects.

The API for this is mutableTrack(compatibleWith track: AVAssetTrack) -> AVMutableCompositionTrack?

The way this works is

for every source video track you want to edit into your composition:

The more times you can re-use the same track (ie for standard edits) the better, and less memory you will consume.

And note, that video with the same / compatible CMFormatDesc should allow for track re-use. If you happen to have 42 videos with completely incompatible formats (ie resolution, frame rate, pixel format, color space) are all unique combinations, you will get zero re-use.

if all videos are say, 1080p 30, BGRA rec 709 you should get 100% re-use.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: vade