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

AVMutableComposition missing frames recorder with difference cameras of iPad

I use the well known PBJVision to record videos which then must be combined together. I use AVMutableComposition to combine videos using insertTimeRange(_:ofAsset:atTime:error:). It works well if the videos have been taken with the same camera. But…
i-konov
  • 842
  • 1
  • 7
  • 19
0
votes
1 answer

how to add subtitle to mp4 in iOS

i already know that i should use AVFoundationto get the CGContextRef from .mp4 file; and use like : CATextLayer *subtitle1Text = [[CATextLayer alloc] init]; [subtitle1Text setFont:@"Helvetica-Bold"]; [subtitle1Text setFontSize:36]; [subtitle1Text…
0
votes
1 answer

AVFoundation concatenating videos

I am pulling my hair out over this. I try to concatenate videos and it just won't do what I want it to do. Specifically, I have videos that have a different orientation and I try to set it right with a Layer instruction. Alas, not matter what I try,…
Swissdude
  • 3,486
  • 3
  • 35
  • 68
0
votes
1 answer

Video Overlapping in iOS

I'm working on an app where I have to overlap an alpha channel video over a video recorded from the device camera. Is it possible using GPUImage framework? If YES how can I implement it using GPUImage? And if NO what alternative do I have?
Chengappa C D
  • 1,841
  • 1
  • 12
  • 19
0
votes
1 answer

Video not playing on device but playing ov simulator

I am really stuck on this, i have merged videos (mp4 kind that are saved in xcode, and mov - from users photo library) and audio (mp3 kind saved in xcode). On the simulator it works fine and shows the video and audio, but on the device it doesn't…
0
votes
1 answer

AVAssetTrack with alpha channel?

I am trying to layer AVAssetTracks in an AVMutableComposition where the AVAssetTracks have an alpha channel in the video. I have successfully exported an video AVAsset with pixel buffers than have an alpha channel and transparency, but when I try to…
tomgerhardt
  • 711
  • 1
  • 4
  • 5
0
votes
1 answer

iOS audio conversion from AVMutableComposition to AVAudioPlayer

I been searching for a solution for this but so far I couldn't find it. Right now I'm creating an audio file with AVMutableComposition and writing it to disk with AVAssetExportSession so I can load it with AVAudioPlayer and play it at a certain…
Francis Reynolds
  • 476
  • 6
  • 18
0
votes
1 answer

Changing the order of AVMutableCompositionTrack segments

I am trying to create a functionality in my app in which the user can "drag and drop" to change the order of the trimmed videos which are already inserted into the an AVMutableComposition track. I can retrieve the NSArray containing each segment of…
maven25
  • 231
  • 2
  • 12
0
votes
2 answers

AVVideoCompositionCoreAnimationTool making first frame black

when using AVVideoCompositionCoreAnimationTool to add a text overlay to one of my videos, the first frame is a black one most of the times. When I comment out the all of the code belonging to the animation tool and its setup, everything is working…
Tim Specht
  • 3,068
  • 4
  • 28
  • 46
0
votes
1 answer

Composing Video with AVFoundation

I want to compose a video as per my aspect. User will select video from library. Have a look at my screen. There is a background which is UIView. Its colour is changeable. And there is a AVPlayer above that view. I have resized AVPlayer according to…
DipakSonara
  • 2,598
  • 3
  • 29
  • 34
0
votes
0 answers

Merging audio and video file in ios

I am trying to merge Audio and Video file, below is my code : AVURLAsset* audioAsset = [[AVURLAsset alloc]initWithURL:_BAckgroungMusicFileURL options:nil]; AVURLAsset* videoAsset = [AVURLAsset URLAssetWithURL:[NSURL…
Ankita Shah
  • 2,178
  • 3
  • 25
  • 42
0
votes
0 answers

Cropping AVAsset on the fly, without exporting it

so I'm combining movie from several clips using AVMutableComposition (which is subclass of AVAsset) and play the preview instantly with GPUImage. What I want to do now, is crop the video. I've found lots of sample codes how to do that when using…
msmialko
  • 1,439
  • 2
  • 20
  • 35
0
votes
2 answers

How to play multiple videos, without gap

I work on iOS and i want to read videos files, one after another, without delay between videos. Also, i must to be able to refresh the playlist while playing (add videos to the queue). I've tried with AvQueuePlayer, it works fine, i can refresh the…
Julie Bsd
  • 191
  • 1
  • 2
  • 10
0
votes
1 answer

Switching between multiple video tracks in a AVMutableComposition

Is there a way to switch between multiple video tracks in an AVMutableComposition? I want to assign a different preferredTransform to each, and switch between them. I tried it by assigning alternating assets to an A track and a B track, but no…
bcattle
  • 12,115
  • 6
  • 62
  • 82
0
votes
1 answer

Can I use an image to be a poster frame for an audio clip on iOS?

I'm using AVMutableComposition and AVAssetExportSession to composite several discrete audio clips/files together into a single file, similarly to this post but there will be no "video" track. I'd like to give the track some visual appeal using a…
nickthedude
  • 4,925
  • 10
  • 36
  • 51
1 2 3
18
19