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
0
votes
0 answers

While merging audio, both the audio come linearly though I want it to overlay

So, I try to use the following code in a 'for' loop to overlay the audio, but they are coming in linearly, with the last attached audio coming in first. [compositionAudioTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, CMTimeMake(5, 1))…
0
votes
1 answer

Splitting mixed(merged) sounds into separate units in iOS programming

I am recording two sounds and then mixing them using AVMutableComposition and AVAudioMix. I am able to achieve this using the code given -(void)saveRecording { AVMutableComposition *composition = [AVMutableComposition composition]; …
0
votes
1 answer

iOS - how can I export a mix audio composition to a file of smallest file size?

I use AVAudioRecorder to record sound, the out put file format is .caf. And then I add a background sound (which is also in .caf format) onto the audio that I recorded, with AVMutableComposition. It works perfectly when I try to play it. Now I…
Newbie
  • 2,775
  • 6
  • 33
  • 40
0
votes
0 answers

GPUImage filters in runtime on AVMutableComposition

I am working on integrating a video player with the very powerful GPUImage framework (https://github.com/BradLarson/GPUImage), whereby user can queue videos for continuous playback (AVMutableComposition) and also select a number of GPUImage filters…
Zaki Naeem
  • 98
  • 9
0
votes
1 answer

Add sound to AVMutableVideoComposition multiple times

I'm using an AVMutableVideoComposition to add video and audio. I have multiple video and audio files that I stitch together, which basically works fine. I'm using this code to add the audio: AVURLAsset *audioAsset = [[AVURLAsset alloc]…
Swissdude
  • 3,486
  • 3
  • 35
  • 68
0
votes
1 answer

ios AVMutuableComposition Track List and debugging

Can someone point me in the right direction to help me debug why my AVMutuableComposition for an AVPlayerItem in ios 6.1 does not load the track list correctly. What I am doing is creating an AVMutableCompositionTrack and adding Time ranges to it…
vallete
  • 21
  • 4
0
votes
1 answer

Merge an Audio File with Two Video Files iphone sdk

I am wondering how I would combine a given audio file with two video files. I am stuck when it comes to combining the audio but the video is fine, here is what I have done so far - (IBAction)MergeAndSave:(id)sender{ if(firstAsset !=nil &&…
Lee
  • 23
  • 1
  • 6
0
votes
1 answer

Exception error trying to merge videos with AVMutableComposition: "objects cannot be nil"... but they don't appear to be nil?

My brain feels like scrambled eggs... I'm trying to merge video clips together. I have each clip URL stored in an NSMutableArray (arrayClipURL) & that's all good. When I print timeRanges & tracks (both NSMutableArrays) in debug console, everything…
0
votes
1 answer

AVMutableCompositon AVMutableCompositionTrack m4a problems

I am able to successfully create a simple app that plays sound using the code below. The problem however is if I change the asset from being an mp3 to an m4a (with aac encoding). No sound is produced, yet the duration of the composition matches the…
the-a-train
  • 1,123
  • 13
  • 32
0
votes
1 answer

Facebook not Respecting preferredTransform flag on AVMutableCompositionTrack

I have an AVMutableComposition track which I am rotating 180 degrees as follows : if (shouldRotate) { //Code to rotate original main video 180 degrees if required. CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI); …
0
votes
1 answer

Can't get AVMutableComposition in loop to play out of loop

Xcode for iOS The issue that I'm having is in the playback of an AVMutableComposition. I'm creating the composition then adding AVURLAssets to it inside a for loop. I'm adding everything as I would similarly add an object to a mutable array and then…
0
votes
1 answer

Not getting resulted movie in PhotoLibrary iPad

i am creating a movie with an array of images and a audio file and saving that created movie to photo library, in simulator i am getting correct movie with my array of image and audio file but while running in device i am not getting my resulted…
Steve Gear
  • 757
  • 2
  • 16
  • 44
1 2 3
18
19