Questions tagged [avmutablecomposition]

AVMutableComposition is a mutable subclass of AVComposition you use when you want to create a new composition from existing assets. You can add and remove tracks, and you can add, remove, and scale time ranges.

AVMutableComposition is a mutable subclass of AVComposition you use when you want to create a new composition from existing assets. You can add and remove tracks, and you can add, remove, and scale time ranges.

At its top-level, AVComposition is a collection of tracks, each presenting media of a specific media type, e.g. audio or video, according to a timeline. Each track is represented by an instance of AVCompositionTrack. Each track is comprised of an array of track segments, represented by instances of AVCompositionTrackSegment. Each segment presents a portion of the media data stored in a source container, specified by URL, a track identifier, and a time mapping. The URL specifies the source container, and the track identifier indicates the track of the source container to be presented.

Sources:

282 questions
10
votes
2 answers

How to properly export CALayer on top of AVMutableComposition with AVAssetExportSession

I know this question was asked before (for example here and here) but I just can't figure out what I'm doing wrong. I have an AVMutableComposition that I use to combine some video clips with some CALayers that animate on top of them. Everything…
10
votes
2 answers

iPhone SDK. is it possible to rotate videos in AVplayer using AVURLlAsset / AVMutableComposition?

I have a simple video editing view that uses AVPlayer. I create a AVMutableComposition using one or several AVURLAsset. All works fine but the videos are always rotated 90 degrees. i.e. if the source video was taken in portrait mode. AVPlayer shows…
10
votes
4 answers

How to flip a video using AVFoundation

I've recorded a video with the front facing camera and the output is mirrored... I've tried using AVMutablecomposition and layerinstructions to flip the video but no luck. Googling and searching Stack Overflow has been fruitless so I bet a simple,…
PinkFloydRocks
  • 808
  • 3
  • 14
  • 29
8
votes
1 answer

Blank frame on merging videos using AVMutableComposition

This question has been asked many times before but nothing helped me. I am merging multiple videos using AVMutableComposition. After merging videos, I get blank frames in between 30 - 40% of the videos. Others merge fine. I just play the composition…
blancos
  • 1,576
  • 2
  • 16
  • 38
8
votes
1 answer

How to animate multiple video layers at the same time in AVMutableComposition?

I'm writing a piece of code that generates a slide show video from multiple images and multiple videos on iOS devices. I was able to do so with a single video and multiple images, but I'm not be able to figure out how to enhance it to multiple…
8
votes
1 answer

audio slow motion like default Slo-Mo Camera functionality using 240FPS

i want to implement Slowmotion Video like Defalut functionality of Slo-Mo in Camera and i used following code and it worked fine for video. but in Audio track of that video is not working properly. double videoScaleFactor =8.0; …
Developer
  • 760
  • 3
  • 15
8
votes
3 answers

AVFoundation AVMutableComposition - video with audio - freezes video

I have a recorded video with sound. When adding that to an AVMutableComposition and then export it, the video will freeze when the sound is playing. What am I missing? I have my two tracks: _compositionVideoTrack = [self.composition…
Mikael
  • 3,572
  • 1
  • 30
  • 43
8
votes
1 answer

How to repeat audio track if video duration in longer than audio duration

I am mixing an audio and video file using AVMutableComposition. Below is my code for that: enter code here AVMutableComposition* mixComposition = [AVMutableComposition composition]; NSString *bundleDirectory = [[NSBundle mainBundle] bundlePath]; …
coder1010
  • 412
  • 5
  • 15
8
votes
1 answer

Composing video and audio using AVMutableComposition

I have a weird problem. In my app I am combining multiple audio and video files using the code below. The resulted video seems to work fine once I downloaded it from the device to the computer and play with Quick Time, but whenever I am trying to…
Janusz Chudzynski
  • 2,700
  • 3
  • 33
  • 46
8
votes
3 answers

iOS - Reversing video file (.mov)

Requirement : It sounds like litte different but this is what I want to achieve. I want to make movie (.mov) file in reverse. Just like how we rewind the movie file. I also want maintain same frame rate as my video is containing. NOTE: I do not…
BornCoder
  • 1,046
  • 8
  • 10
8
votes
2 answers

Extract audio from video file

How can I extrace Audio from Video file without using FFmpeg? I want to use AVMutableComposition and AVURLAsset for solving it.e.g. conversion from .mov to .m4a file.
Tripti Kumar
  • 1,559
  • 14
  • 28
7
votes
3 answers

Setting AVMutableComposition's frameDuration

I'm playing with the AVEditDemo project, from Apple's WWDC 2010 sample pack, and I'm trying to change the frame rate of the exported video. The video is exported using an AVMutableComposition on which the frameDuration is set like…
7
votes
3 answers

Swift Merge AVasset-Videos array

I want to merge the AVAsset-arrayVideos into one single video and save it on camera roll. Raywenderlich.com has a great tutorial where two videos are merged into one. I've created the following code, however the video that I get after exporting to…
mmsarquis
  • 170
  • 3
  • 16
7
votes
1 answer

AVMutableAudioMixInputParameters not applied correctly to AudioMiX

I am working on Application that combines the multiple videos along with background audio track. It also need to set different audio level for different videos. Following is the code for AssetItem class & AssetManager Class // AssetItem Class…
Solid
  • 307
  • 1
  • 12
7
votes
0 answers

AVMutableVideoCompositionLayerInstruction translate scale rotation

I am using AVMutableComposition to merge/stitch multiple recorded video tracks and save it like this expected output ..so I am looping through the subviews to transform each tracks according to each subview size. var index = 0 for…
1
2
3
18 19