How can I use AVFoundation or AVAsset to create subtitles on top of my video?

I have a tuned player using songs and some AVAssets. Everything is working fine. Now I would like to add some subtitles on top of my video. I read in the documentation that there is a MediaType "AVMediaTypeSubtitle". Is there any Asset or AVAssetTrack that can generate TextOverlay, which I could insert into my composition to make subtitles?

+4
source share
1 answer

I think there is a better solution than mine, but you can use text overlay using CATextLayer in AVVideoCompositionCoreAnimationTool.

+1
source

All Articles