Questions tagged [avvideocomposition]

80 questions
19
votes
2 answers

Custom AVVideoCompositing class not working as expected

I'm attempting to apply a CIFilter to an AVAsset, and then save it with the filter applied. The way that I am doing this is by using an AVAssetExportSession with videoComposition set to an AVMutableVideoComposition object with a custom…
Jojodmo
  • 23,357
  • 13
  • 65
  • 107
15
votes
4 answers

Swift 3: How to add watermark on video ? AVVideoCompositionCoreAnimationTool iOS 10 issue

This code used to work on iOS9 to add a watermark and text to a video but since iOS10 it's not working anymore. There is a iOS 10 bug that has been filed but no answer from Apple. I have not been able to implement any workaround to add watermark and…
Sam
  • 1,101
  • 2
  • 13
  • 26
11
votes
2 answers

iOS Video Editing - Is it possible to merge (side by side not one after other) two video files into one using iOS 4 AVFoundation classes?

I know you could merge multiple clips and create a single video by appending one after other using AVFoundation classes- AVURLAsset, AVMutableComposition, AVMutableCompositionTrack etc. There are apps like 'Video-Joiner' that do that. What I want…
10
votes
2 answers

How do make a reduced size video using AVAssetWriter?

I would make reduced size video, maybe 50 pixel across and 75 pixels for length. Those are the physical dimension. How do you set that? in the videosettings? I think AVVideoWidthKey and AVVideoHeightKey are more for resolution not for physically…
lilzz
  • 5,243
  • 14
  • 59
  • 87
9
votes
1 answer

Can't show animated CALayer in video using AVVideoCompositionCoreAnimationTool

UPDATE 6: I've managed to fix my issue completely but I still would like a better explanation than what I'm guessing is the reason it didn't work if I'm incorrect I've been trying to animate a sprite sheet over a video but every time I export the…
9
votes
1 answer

Exporting AVCaptureSession video in a size that matches the preview layer

I'm recording video using AVCaptureSession with the session preset AVCaptureSessionPreset640x480. I'm using an AVCaptureVideoPreviewLayer in a non-standard size (300 x 300) with the gravity set to aspect fill while recording. It's setup like…
8
votes
5 answers

Video rotated after applying AVVideoComposition

After applying an AVVideoComposition to my AVPlayerItem, the filter I apply does work, but the video gets rotated in the AVPlayerLayer. I know for a fact that the problem is not with the filtered frame because if I show the frame in a UIImageView,…
IHaveAQuestion
  • 789
  • 8
  • 26
8
votes
5 answers

How to trigger redraw of filter in AVVideoComposition's applyingCIFiltersWithHandler?

I'm using Swift to show content from an AVPlayer in a view's AVPlayerLayer. The associated AVPlayerItem has a videoComposition, and slightly simplified version of the code to create it (without error checking, etc.) looks like…
Charlie Hitchcock
  • 287
  • 1
  • 3
  • 8
8
votes
3 answers

AVAssetImageGenerator returns sometimes same image from 2 successive frames

I'm currently extracting every frame from a video with AVAssetImageGenerator, but sometimes it returns me successively 2 times almost the same image (they do not have the same "frame time"). The funny thing is it always happen (in my test video)…
Martin
  • 11,881
  • 6
  • 64
  • 110
5
votes
2 answers

Compositing 2 videos on top of each other with alpha

AVFoundation allows you to "compose" 2 assets (2 videos) as 2 "tracks", just like in Final Cut Pro, for example. The theory says I can have 2 videos on top of each other, with alpha, and see both. Either I'm doing something wrong, or there's a bug…
StuFF mc
  • 4,137
  • 2
  • 33
  • 32
5
votes
1 answer

Swift 3 : How to export video with text using AVVideoComposition

I am trying to useAVVideoComposition to add some text on top of a video and save the video. This is the code I use: I Create an AVMutableComposition and AVVideoComposition var mutableComp = AVMutableComposition() var mutableVidComp = …
6994
  • 107
  • 2
  • 9
5
votes
1 answer

AVPlayer plays video composition result incorrectly

I need a simple thing: play a video while rotating and applying CIFilter on it. First, I create the player item: AVPlayerItem *item = [AVPlayerItem playerItemWithURL:videoURL]; // DEBUG LOGGING AVAssetTrack *track = [[item.asset…
frangulyan
  • 3,580
  • 4
  • 36
  • 64
5
votes
1 answer

AVVideoComposition doesn't work in iOS 8

I'm working on App in which I'm composing video and export to directory. It works fine in iOS 7, but fail in iOS 8. Below is my code: AVAsset *pVideoTrack = [AVAsset assetWithURL:[NSURL fileURLWithPath:assetPath]]; AVVideoComposition…
5
votes
1 answer

How to increase speed of the video when saving it by using AVAssetExportSession

I have a video file which I can load into an AVAsset. I want to change the rate at this video is played and double up its speed so that if the video was 10 seconds long, it would speed up to finish in 5 seconds. Here is the code I am trying with,…
Jatin
  • 1,668
  • 2
  • 16
  • 23
3
votes
0 answers

How to avoid compression options pop up box in avisaveoptions

I am using AviFile api to make a screen capture video. I want to capture it as small videos of 2 minutes length instead of creating one single video at a stretch. When the video starts getting recorded, a pop-up box to chose the compression option…
Niranjan
  • 813
  • 2
  • 12
  • 33
1
2 3 4 5 6