Open junnnerr opened 3 years ago
There is Overlay Demo. Text should be rendered to an image and then added as overlay Everything should be implemented by yourself. And then applied to timeline.
For example: You can apply transformations to video like this:
trackItem.videoConfiguration.transform = <Your Transformation>
Or trim video:
let videoPlayableRange: ClosedRange<Double>
guard let exportSession = compositionGenerator.buildExportSession(outputURL: outputURL) else { return }
exportSession.timeRange = CMTimeRange(
start: CMTime(
seconds: videoDuration * videoPlayableRange.lowerBound,
preferredTimescale: CMTimeScale(NSEC_PER_SEC)
),
end: CMTime(
seconds: videoDuration * videoPlayableRange.upperBound,
preferredTimescale: CMTimeScale(NSEC_PER_SEC)
)
)
exportSession.exportAsynchronously {}
About the text overlay, edit, drag and drop, zoom in and out of the function, whether there is a demonstration code, or a way of thinking to achieve.