Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a customized Player using compositions and some AVAssets. Everything works fine. Now I would like to to some Subtitle on top of my video. I've read in the documentation, that a mediaType "AVMediaTypeSubtitle" exists. Is there any Asset or AVAssetTrack, which can generate a TextOverlay, which I could insert into my composition to do subtitles?

like image 957
JackPearse Avatar asked Nov 14 '22 05:11

JackPearse


1 Answers

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

like image 103
Steve Avatar answered Mar 01 '23 23:03

Steve