avasset

How to trim the video file and convert to 15 seconds video with iOS SDK?

那年仲夏 提交于 2019-11-27 15:13:34
问题 I want to trim a video file. I want to just pick the video from a gallery and convert it to a 15-second video. If I use normal trimming with picker view controller, it does not specify a time and just shows the frames, but I need to be fixed for 15 seconds. How can I achieve this? 回答1: Objective-C -(void)cropVideo:(NSURL*)videoToTrimURL{ AVURLAsset *asset = [AVURLAsset URLAssetWithURL:videoToTrimURL options:nil]; AVAssetExportSession *exportSession = [[AVAssetExportSession alloc]

Only First Track Playing of AVMutableComposition()

不羁岁月 提交于 2019-11-27 06:38:34
问题 New Edit Below I have already referenced AVMutableComposition - Only Playing First Track (Swift) but it is not providing the answer to what I am looking for. I have a AVMutableComposition() . I am trying to apply MULTIPLE AVCompositionTrack , of a single type AVMediaTypeVideo in this single composition. This is because I am using 2 different AVMediaTypeVideo sources with different CGSize 's and preferredTransforms of the AVAsset 's they come from. So, the only way to apply their specified

How can I add a watermark in a captured video on iOS [duplicate]

不打扰是莪最后的温柔 提交于 2019-11-27 03:04:14
This question already has an answer here: iPhone Watermark on recorded Video. 5 answers I was wondering if anybody can tell me how I can achieve this. If been thinking of a couple of solutions: Create individual images from the captured video and later merge them per image and after that create a new AVAsset... Sounds a bit complicated don't you think? Merge 2 videos, one is transparent (the one holding the watermark) and the other is the asset captured with the camera. This code is add a text or string ON the video and after saving video you will play on any player. Most Advantage of this

How can I add a watermark in a captured video on iOS [duplicate]

折月煮酒 提交于 2019-11-26 10:23:01
问题 This question already has answers here : iPhone Watermark on recorded Video. (5 answers) Closed 3 years ago . I was wondering if anybody can tell me how I can achieve this. If been thinking of a couple of solutions: Create individual images from the captured video and later merge them per image and after that create a new AVAsset... Sounds a bit complicated don\'t you think? Merge 2 videos, one is transparent (the one holding the watermark) and the other is the asset captured with the camera.