Questions tagged [avvideocomposition]
80 questions
0
votes
0 answers
animationTool not works for videoCompositionWithAsset:applyingCIFiltersWithHandler
when I use videoCompositionWithAsset:applyingCIFiltersWithHandler to construct the VideoComposition, the animationTool is not working
let videoComposition = AVMutableVideoComposition(asset: asset) { request in
request.finish(with: resultImage,…
0
votes
1 answer
How to display a cutout/portion of a video in AVFoundation
I'm trying to crop a video / display a portion of a video in AVFoundation. So far my code looks right to me but the output is not what I wanted. I don't see what is wrong. Any ideas?
let item = AVPlayerItem(url: nextVideoItem.url)
let cropRect =…

Nico S.
- 3,056
- 1
- 30
- 64
0
votes
0 answers
Swift: Apply CIFilter to video error - unfinished AVAsynchronousVideoCompositionRequest deallocated
I'm building a video editor that lets you apply a CIFilter to a video. And it works well.
The only problem I'm facing is that when I dismiss the ViewController I get this error:
Unfinished AVAsynchronousVideoCompositionRequest deallocated -…

El Tecla
- 37
- 8
0
votes
1 answer
CIImage CVPixelBuffer is nil after scaling down
I'm using the AVVideoComposition API to get CIImages from a local video, and after scaling down the CIImage I'm getting nil when trying to get the CVPixelBuffer.
Before scaling down the source frame, I'm getting the original frame CVPixelBuffer.
Is…

Roi Mulia
- 5,626
- 11
- 54
- 105
0
votes
1 answer
AVAsynchronousVideoCompositionRequest sourceFrameByTrackID nil for video with alpha
I'm trying to add some transparent animation videos to my composition as a transition but in my custom compositor (AVVideoCompositing) when I try to get pixel buffer via
AVAsynchronousVideoCompositionRequest.sourceFrame it returns nil. If I use non…

manikal
- 953
- 7
- 30
0
votes
1 answer
AVVideocomposition AVPlayerItem position of video-layer
I used Apple's AVEdit-Demo, tweaked it a little and was able to add CALayers with animations and images to the video-composition. So far, this works fine.
It uses AVVideoComposition and AVPlayer/AVPlayerItem to merge videos (and show them - the…

Swissdude
- 3,486
- 3
- 35
- 68
0
votes
1 answer
Getting black screen during image compose with custom compositor
I'm trying to make movie from still image, for that i use custom compositor with custom instructions. Actually i get movie and length is as expected, but after one frame (5 second) i get black screen(for another frames)
What i did is in my demo…

SPatel
- 4,768
- 4
- 32
- 51
0
votes
1 answer
Equal-Power Crossfade in AVMutableVideoCompositionLayerInstruction
How can I get an equal-power crossfade working in an AVVideoComposition? I'm using something like the following to fade between video tracks, but when looping the same video over and over there is a very noticeable brightness dip during the…

Dan Halliday
- 725
- 6
- 22
0
votes
1 answer
VideoComposition not honoring instructions
Since updating to iOS 13 my video composition I use to fade a video in and out is broken. This is my code which worked correctly up until installing iOS 13.
Now when I export the video there is sound and just a black screen.
let urlAsset =…

Matthew Foster
- 167
- 1
- 10
0
votes
1 answer
Overlaying image on video reduces video resolution
When I overlay an image on my video, the video quality is greatly reduced. If I don't set the video composition of the export session or set the export quality to passthrough, the video quality is great (but I get no overlays obviously).
I'm passing…

connorvo
- 761
- 2
- 7
- 21
0
votes
1 answer
Flip video horizontally on x- axis in objective c
I have two play two videos simultaneously on a view .Both videos would be same.
Now, my concern is the video on right is actually to be flipped horizontally along x-axis and then saved in photo library.I have tried googling a lot and found that…

user10856322
- 13
- 5
0
votes
1 answer
AVVideoComposition with CIFilters crash
I am creating an AVVideoComposition with CIFilters this way:
videoComposition = AVMutableVideoComposition(asset: asset, applyingCIFiltersWithHandler: {[weak self] request in
// Clamp to avoid blurring transparent pixels at the image…

Deepak Sharma
- 5,577
- 7
- 55
- 131
0
votes
1 answer
How to trim video of duration more than 30 seconds in iOS?
I want to select video from gallery but user can only choose video upto 30 seconds from the app.
so how to achieve video trimming for certain amount of time?
By using AVFoundation I have done till selecting the video but i don't know how to trim…

Parth Barot
- 355
- 3
- 9
0
votes
1 answer
CIImage gets resized when applying to CIFilter
I am trying to add a fullscreen watermark to my video.
Unfortunately, the watermark image (red rectangle) gets resized by the CIFilter and I don't find a way to make it fullscreen.
Is there a way how to set the size of the CIImage?
let…

thelearner
- 1,440
- 3
- 27
- 58
0
votes
0 answers
AVMutableVideoComposition frameDuration not working
I have a AVMutableVideoComposition and I want to set the export frame rate (e.g. 10 fps):
videoComposition.frameDuration = CMTimeMakeWithSeconds(1, 10);
I've got various other instructions like transform on the composition and they all work,…

Can Poyrazoğlu
- 33,241
- 48
- 191
- 389