Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the text overlay, edit, drag and drop, zoom. #70

Open
junnnerr opened this issue Apr 23, 2021 · 1 comment
Open

About the text overlay, edit, drag and drop, zoom. #70

junnnerr opened this issue Apr 23, 2021 · 1 comment

Comments

@junnnerr
Copy link

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.

@Alexey-Matjuk
Copy link

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 {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants