iphone Programming Glossary: mixcomposition
Merge Two Video files in iPhone Application http://stackoverflow.com/questions/10071029/merge-two-video-files-in-iphone-application For Merge video files i try this code but not useful here is some blank screen between video AVMutableComposition mixComposition AVMutableComposition composition NSString documentsDirectoryPath NSSearchPathForDirectoriesInDomains NSDocumentDirectory.. video_timeRange1 CMTimeRangeMake kCMTimeZero videoAsset1.duration AVMutableCompositionTrack a_compositionVideoTrack1 mixComposition addMutableTrackWithMediaType AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid a_compositionVideoTrack1 insertTimeRange.. 0 atTime videoAsset1.duration error nil AVAssetExportSession _assetExport AVAssetExportSession alloc initWithAsset mixComposition presetName AVAssetExportPresetLowQuality _assetExport.shouldOptimizeForNetworkUse YES _assetExport.outputFileType @ com.apple.quicktime..
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 ext AVURLAsset videoAsset AVURLAsset alloc initWithURL NSURL fileURLWithPath filePath options nil AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionVideoTrack mixComposition addMutableTrackWithMediaType.. AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid AVAssetTrack clipVideoTrack.. AVMutableVideoCompositionInstruction videoCompositionInstruction instruction.timeRange CMTimeRangeMake kCMTimeZero mixComposition duration AVAssetTrack videoTrack mixComposition tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 AVMutableVideoCompositionLayerInstruction..
How to use scaleTimeRange in an AVMutableComposition? http://stackoverflow.com/questions/17450864/how-to-use-scaletimerange-in-an-avmutablecomposition audioURL options nil AVURLAsset videoAsset AVURLAsset alloc initWithURL videoURL options nil AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionCommentaryTrack mixComposition addMutableTrackWithMediaType.. mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionCommentaryTrack mixComposition addMutableTrackWithMediaType AVMediaTypeAudio preferredTrackID kCMPersistentTrackID_Invalid compositionCommentaryTrack.. AVMediaTypeAudio objectAtIndex 0 atTime kCMTimeZero error nil AVMutableCompositionTrack compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid compositionVideoTrack insertTimeRange..
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 audioUrl options nil AVURLAsset videoAsset AVURLAsset alloc initWithURL videoUrl options nil AVMutableComposition mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionCommentaryTrack mixComposition addMutableTrackWithMediaType.. mixComposition AVMutableComposition composition AVMutableCompositionTrack compositionCommentaryTrack mixComposition addMutableTrackWithMediaType AVMediaTypeAudio preferredTrackID kCMPersistentTrackID_Invalid compositionCommentaryTrack.. AVMediaTypeAudio objectAtIndex 0 atTime kCMTimeZero error nil AVMutableCompositionTrack compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid compositionVideoTrack insertTimeRange..
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 put together movie file and audio file. To do this follow my code void CompileFilesToMakeMovie AVMutableComposition mixComposition AVMutableComposition composition NSString audio_inputFileName @ deformed.caf NSString audio_inputFilePath Utilities documentsPath.. video_timeRange CMTimeRangeMake kCMTimeZero videoAsset.duration AVMutableCompositionTrack a_compositionVideoTrack mixComposition addMutableTrackWithMediaType AVMediaTypeVideo preferredTrackID kCMPersistentTrackID_Invalid a_compositionVideoTrack insertTimeRange.. audio_timeRange CMTimeRangeMake kCMTimeZero audioAsset.duration AVMutableCompositionTrack b_compositionAudioTrack mixComposition addMutableTrackWithMediaType AVMediaTypeAudio preferredTrackID kCMPersistentTrackID_Invalid b_compositionAudioTrack insertTimeRange..
|