Closed Jkurbs closed 7 years ago
The library only provides the UI component, it's your job then to do the trimming of your video.
You have an example of how to export the video in the example app: https://github.com/prynt/PryntTrimmerView/blob/master/Example/PryntTrimmerView/VideoCropperViewController.swift
To trim the video, you can do something similar, and use the startTime
and endTime
properties of your PryntTrimmerView
instance to define the time range of your video composition.
Hello HHK1,
I'm using your library into my project and tried enough to trim the updated frame video but I failed.
Kindly help me in this case with video trim solution with updated trim frames.
Thanks in advance.
Hi @akashthakkar09 What do you mean by "trim the updated frame video" ? Are you trying to crop then trim the video ?
Yes, I'm trimming the video. but after applying the trimming on the video - I want the update start and end time frame video.
Once you have trimmed your video for the first time, you should have a url pointing to your new media.
You can create a new AVAsset
with it, and reload your PryntTrimmerView
instance with it:
myTrimmerView.asset = myTrimmedAsset
Is it what you want to achieve ? Otherwise, please take some time to provide more details about what you want to do precisely.
@HHK1 okay to generate the new AVAsset I should need to get the start time and end time of trimming and based on new start and end time - AVAsset object will be generated right?
I am unable to generate that new AVAsset object from the new start and end time.
Kindly give me the code if possible - which can get the updated video after applying trimming on it.
As I mentioned above:
The library only provides the UI component, it's your job then to do the trimming of your video.
If you're having trouble trimming the video, you can consult this stack overflow thread: https://stackoverflow.com/questions/35696188/how-to-trim-a-video-in-swift-for-a-particular-time
You just have to use an AVAssetExportSession
and set the right timeRange on it.
Hi, So I do I save the Trim Video (to the photo library)?
Thanks