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
1
vote
1 answer

No sound when I play an AVMutableComposition with AVPlayer

I'm trying to create an AVMutableComposition and playing it using AVPlayer. This is what I'm doing. //Define the AVComposition self.composition = [[AVMutableComposition alloc] init]; //Define Mutable Track self.mainVideoTrack = [self.composition…
Vishal Shah
  • 1,069
  • 1
  • 10
  • 11
1
vote
1 answer

+ exportSessionWithAsset:presetName: returning nil on iOS7

I'm using the following code: - (AVAssetExportSession *)testRecording { AVMutableComposition *composition = [[AVMutableComposition alloc] init]; NSURL *url = [[NSBundle mainBundle] URLForResource:kTestSongName withExtension:@"mp3"]; …
marosoaie
  • 2,352
  • 23
  • 32
1
vote
1 answer

iOS dynamically slow down the playback of a video, with continuous value

I have a problem with the iOS SDK. I can't find the API to slowdown a video with continuous values. I have made an app with a slider and an AVPlayer, and I would like to change the speed of the video, from 50% to 150%, according to the slider…
darksider
  • 1,030
  • 2
  • 14
  • 20
1
vote
0 answers

AVMutableComposition - scaleTimeRange causing high bit-rate video to stutter on fast motion

I am using scaleTimeRange:toDuration: to produce a fast-motion effect of upto 10x the original video speed. However I have noticed that videos with a higher bit-rate (say 20MBits/s and above) begin to stutter when played through an AVPlayer for…
1
vote
2 answers

Invalid composition error (-11841) when trying to add CATextLayer to video

I'm trying to add text over a video but no matter what I do I get invalid composition error (-11841). I have followed tutorials, read through threads and nothing stands out as being wrong. I am combining 3 videos, and an audio track and that works…
1
vote
0 answers

AVFoundation: on-the-fly compositions?

Can AVFoundation be used to create compositions on the fly? Scenario: I have five 10-second H.264 clips that I want to play with a nice 1-second fade/transition between them. Is there a means to create a composition with the first two, begin…
zzyzy
  • 973
  • 6
  • 21
1
vote
1 answer

Show time value on recorded video in iPhone (Video Filtering)

I am currently working on one application in which I am supposed to display the recording time while video recording is going on. Whats more interesting is that this recording time should also be there in the recorded video. So I think I have two…
1
vote
2 answers

AVMutableCompositionTrack upside-down when exported

I am using a video renderer which captures an openGL layer (irrlicht engine) using gl_readPixels and outputs a video .mp4 file. This takes place is two stages, the first capturing the video and saving it (AVAssetWriter) and the second taking the…
1
vote
2 answers

How to combine portrait and landscape assets in AVMutableComposition for preview

I have AVAssets that are portrait and landscape orientation. When I play them one at a time with the AVPlayer they play with the correct orientation. So the AVPlayer is reading each video's AVAssetTrack preferredTransform and adjusting accordingly.…
bcattle
  • 12,115
  • 6
  • 62
  • 82
1
vote
1 answer

Overlay audio with video in XCode

Can anyone help me merge 2 videos and an audio file? Below is the code from Ray Wanderlich. It helps me combine the 2 videos, one after the other. Then, it lets one add audio. However, when it adds the audio from the audio file, it removes any audio…
1
vote
2 answers

audio file processing like speed, play mode in iphone application

I have an iphone application and in that, I want to modify music file in my iphone application like changing speed, cutting portion of song, changing play mode etc. After modifying, it should be saved to my iphone application. Please help.
1
vote
2 answers

How to edit AVMutableComposition multiple times

I'm here again looking for help with AVFoundation. Sorry for my not perfect English. I'm programming video editor now. At first i load video from library and put it to AVAsset instance. Then, every time when user select some video area and set speed…
1
vote
1 answer

AVPlayer from AVMutableComposition with audio and video won't play

I'm trying to show a video from a composition of both video and audio. However, I seem to have a problem, once the video status never reaches AVPlayerStatusReadyToPlay. If I include the video asset or the audio asset directly to the player item it…
dwbrito
  • 5,194
  • 5
  • 32
  • 48
1
vote
1 answer

AVPlayerItem editing

I want to understand how a video editing app like iMovie on iOS handles changing the AVMutableComposition assigned to AVPlayerItem on the fly ? Example, user trims a video on the timeline, adds/modifies a text layer, adds a transition, etc. One way…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
1
vote
0 answers

Export a big file than the original one made using AVAssetExportSession

I am working on an iPhone app which recorded multiple files and then i merged the files into one file and at the end i upload that file on server. I experienced that if i make a single file of 7 mint recording its size is 0.85 MB but if i make two…