Questions tagged [avcomposition]
72 questions
47
votes
3 answers
Multiple videos with AVPlayer
I am developing an iOS app for iPad that needs to play videos in some part of the screen. I have several video files that needs to be played after each other in an order that is not given at compile time. It must looks as if it is just one video…

Peter
- 1,495
- 1
- 14
- 21
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
16
votes
1 answer
Inserting an HTTP stream into a AVMutableComposition
I am trying to insert an AVURLAsset of a AVPlayerItem that states AVPlayerItemStatusReadyToPlay into an AVMutableComposition like this:
composition_ = [[AVMutableComposition alloc] init];
insertionPoint_ = kCMTimeZero;
item_ = [[AVPlayerItem…

Till
- 27,559
- 13
- 88
- 122
13
votes
2 answers
How do I add a still image to an AVComposition?
I have an AVMutableComposition with a video track and I would like to add a still image into the video track, to be displayed for some given time. The still image is simply a PNG. I can load the image as an asset, but that’s about it, because the…

zoul
- 102,279
- 44
- 260
- 354
12
votes
2 answers
AVMutableComposition resizing issue
I'm trying to render an image into a video captured with the front camera using AVMutableComposition. The size of the resulting video (including the image) is perfectly fine.
However, the initial video will be resized as shown in this picture:
I'm…

thelearner
- 1,440
- 3
- 27
- 58
11
votes
1 answer
AVPlayer and Progressive Video Downloads with AVURLAssets
We've got an app we're working on that needs to provide playback of video files via AVPlayer. The files need to be stored on the user's device, but also must playback while downloading.
At the moment we've built a download module that uses the…

Robert Nall
- 180
- 2
- 9
8
votes
1 answer
What is the correct time range to use when sequencing AVAssets?
I'm working on a project that requires sequencing a large number (problem is visible at n = 30 or fewer) of short (1-5 second) AVAssets. All of the reference material and sample projects I can find points to using the range CMTimeRange(start: .zero,…

jefflovejapan
- 2,047
- 3
- 20
- 34
8
votes
4 answers
AVFoundation Crash on Exporting Video With Text Layer
I'm developing a video editing app for iOS on my spare time.
I just resumed work on it after several weeks of attending other rpojects, and -even though I haven't made any significant changes to the code- now it crashes everytime I try to export my…

Nicolas Miari
- 16,006
- 8
- 81
- 189
7
votes
2 answers
Reloading AVMutableComposition
I have a AVMutableComposition that I've associated with an AVPlayer.
It seems if I add tracks to this composition the AVPlayer doesn't play the added tracks unless I set the composition on the player again. Right now I'm doing this by just replacing…

Kenny Lövrin
- 781
- 5
- 15
7
votes
1 answer
How to get file Url of Slow motion video from Asset?
I am getting file url of normal video, but slow motion video asset type is AVComposition. I am try with AVAssetExportSession But it consuming large time.
PHVideoRequestOptions *options=[[PHVideoRequestOptions alloc] init];
options.version =…

ishwar lal janwa
- 524
- 5
- 8
7
votes
3 answers
Error -11800 when attempting to insertTimeRange of AVComposition to AVMutableComposition
I'm working with AVFoundation using audio only - i.e. no video - and trying to join several AVCompositions together, one after the other, to end up with one single AVComposition.
Example case: just two AVCompositions. Each of them plays fine by…

jf_by_the_sea
- 71
- 1
- 4
7
votes
1 answer
How to instantiate an AVMutableCompositionTrack with type AVMediaTypeText
I'm trying to place some text of a part of a video that I'm creating.
I realize that I can use a layer with text over an entire length of the video using CALayers, but how do I do it over only part of the video?
After some research I have found…

pikovayadama
- 808
- 2
- 8
- 26
6
votes
3 answers
precise timing with AVMutableComposition
I'm trying to use AVMutableComposition to play a sequence of sound files at precise times.
When the view loads, I create the composition with the intent of playing 4 sounds evenly spaced over 1 second. It shouldn't matter how long or short the…

sabajt
- 426
- 1
- 6
- 11
6
votes
0 answers
AVFoundation how to add subtitles track to AVComposition
I want to add a track of type AVMediaTypeSubtitle to AVMutableComposition
the adding itself is easy, but how to populate this Track? and how to read it later?!!
I can't find any thing related to how to read/write a track of type AVMediaTypeSubtitle…

AMTourky
- 1,190
- 13
- 25
6
votes
2 answers
AVComposition breaks on Airplay
I have a video composition which I'd like to play over Airplay (without mirroring). The app works as expected when using normal Airplay mirroring, but I'd like to get the speed, reliability, and resolution bump you get from using Airplay video…

mrgrieves
- 567
- 5
- 19