¡@

Home 

2014/10/15 ¤U¤È 10:15:45

iphone Programming Glossary: videoasset

How can I add overlay text on a video, then re-encode it?

http://stackoverflow.com/questions/10190333/how-can-i-add-overlay-text-on-a-video-then-re-encode-it

question void addAnimation NSString filePath NSBundle mainBundle pathForResource videoName ofType ext AVURLAsset videoAsset AVURLAsset alloc initWithURL NSURL fileURLWithPath filePath options nil AVMutableComposition mixComposition AVMutableComposition.. AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid AVAssetTrack clipVideoTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration.. tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack clipVideoTrack atTime kCMTimeZero error nil compositionVideoTrack setPreferredTransform videoAsset tracksWithMediaType..

Merging Audio with Video Objective-C

http://stackoverflow.com/questions/13909400/merging-audio-with-video-objective-c

defaultManager removeItemAtPath outputFilePath error nil NSLog @ b CMTime nextClipStartTime kCMTimeZero AVURLAsset videoAsset AVURLAsset alloc initWithURL video_inputFileUrl options nil CMTimeRange video_timeRange CMTimeRangeMake kCMTimeZero videoAsset.duration.. AVURLAsset alloc initWithURL video_inputFileUrl options nil CMTimeRange video_timeRange CMTimeRangeMake kCMTimeZero videoAsset.duration AVMutableCompositionTrack a_compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo.. preferredTrackID kCMPersistentTrackID_Invalid a_compositionVideoTrack insertTimeRange video_timeRange ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime nextClipStartTime error nil NSLog @ c AVURLAsset audioAsset..

How to use scaleTimeRange in an AVMutableComposition?

http://stackoverflow.com/questions/17450864/how-to-use-scaletimerange-in-an-avmutablecomposition

up or slowed down Here's my code AVURLAsset audioAsset AVURLAsset alloc initWithURL audioURL options nil AVURLAsset videoAsset AVURLAsset alloc initWithURL videoURL options nil AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack.. preferredTrackID kCMPersistentTrackID_Invalid compositionCommentaryTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack audioAsset tracksWithMediaType AVMediaTypeAudio objectAtIndex 0 atTime kCMTimeZero error nil AVMutableCompositionTrack.. preferredTrackID kCMPersistentTrackID_Invalid compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero error nil AVAssetExportSession..

How to add audio to video file on iphone SDK

http://stackoverflow.com/questions/3440266/how-to-add-audio-to-video-file-on-iphone-sdk

Daniel. I figured it out its easy. AVURLAsset audioAsset AVURLAsset alloc initWithURL audioUrl options nil AVURLAsset videoAsset AVURLAsset alloc initWithURL videoUrl options nil AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack.. preferredTrackID kCMPersistentTrackID_Invalid compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero error nil AVAssetExportSession.. compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero error nil AVAssetExportSession _assetExport AVAssetExportSession..

[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array from AVURLAsset

http://stackoverflow.com/questions/4398764/nsmutablearray-objectatindex-index-0-beyond-bounds-for-empty-array-from-avur

with following code to merge the audios. AVMutableComposition composition AVMutableComposition composition AVURLAsset videoAsset AVURLAsset alloc initWithURL audioURL options nil AVURLAsset audioAsset1 AVURLAsset alloc initWithURL audioURL1 options.. kCMPersistentTrackID_Invalid NSError error NULL compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero AVMutableCompositionTrack.. NSError error NULL compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero AVMutableCompositionTrack compositionAudioTrack1..

AVFoundation + AssetWriter: Generate Movie With Images and Audio

http://stackoverflow.com/questions/5640657/avfoundation-assetwriter-generate-movie-with-images-and-audio

NSString outFilePath NSError error nil AVMutableComposition composition AVMutableComposition composition AVURLAsset videoAsset AVURLAsset URLAssetWithURL NSURL fileURLWithPath filePath options nil AVAssetTrack videoAssetTrack videoAsset tracksWithMediaType.. composition AVURLAsset videoAsset AVURLAsset URLAssetWithURL NSURL fileURLWithPath filePath options nil AVAssetTrack videoAssetTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 AVMutableCompositionTrack compositionVideoTrack composition.. videoAsset AVURLAsset URLAssetWithURL NSURL fileURLWithPath filePath options nil AVAssetTrack videoAssetTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 AVMutableCompositionTrack compositionVideoTrack composition addMutableTrackWithMediaType..

Make movie file with picture Array and song file, using AVAsset

http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset

NSFileManager defaultManager removeItemAtPath outputFilePath error nil CMTime nextClipStartTime kCMTimeZero AVURLAsset videoAsset AVURLAsset alloc initWithURL video_inputFileUrl options nil CMTimeRange video_timeRange CMTimeRangeMake kCMTimeZero videoAsset.duration.. AVURLAsset alloc initWithURL video_inputFileUrl options nil CMTimeRange video_timeRange CMTimeRangeMake kCMTimeZero videoAsset.duration AVMutableCompositionTrack a_compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo.. preferredTrackID kCMPersistentTrackID_Invalid a_compositionVideoTrack insertTimeRange video_timeRange ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime nextClipStartTime error nil nextClipStartTime CMTimeAdd nextClipStartTime..

AVPlayer with one video tracks and multiples audio tracks

http://stackoverflow.com/questions/6735979/avplayer-with-one-video-tracks-and-multiples-audio-tracks

done this but the player won't launch AVMutableComposition composition AVMutableComposition composition AVURLAsset videoAsset AVURLAsset alloc initWithURL urlVideo options nil AVMutableCompositionTrack compositionVideoTrack composition addMutableTrackWithMediaType.. kCMPersistentTrackID_Invalid NSError error NULL compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero error error NSMutableArray.. NSError error NULL compositionVideoTrack insertTimeRange CMTimeRangeMake kCMTimeZero videoAsset.duration ofTrack videoAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 atTime kCMTimeZero error error NSMutableArray allAudio NSMutableArray..