¡@

Home 

2014/10/15 ¤U¤È 10:04:12

iphone Programming Glossary: audioreader

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

@ caf NSLog @ @ fileURL AVAsset asset AVURLAsset URLAssetWithURL fileURL options nil retain AVAssetReader audioReader AVAssetReader assetReaderWithAsset asset error error retain AVAssetWriterInputPixelBufferAdaptor adaptor AVAssetWriterInputPixelBufferAdaptor.. readerOutput AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack audioTrack outputSettings nil audioReader addOutput readerOutput NSParameterAssert videoWriterInput NSParameterAssert audioWriterInput NSParameterAssert videoWriter.. videoWriterInput markAsFinished I finish write picture in movie file and I want copy audio in the file and I do this audioReader startReading videoWriter startSessionAtSourceTime kCMTimeZero dispatch_queue_t mediaInputQueue dispatch_queue_create mediaInputQueue..

Video Encoding using AVAssetWriter - CRASHES

http://stackoverflow.com/questions/8191840/video-encoding-using-avassetwriter-crashes

AVAssetWriterInput assetWriterInputWithMediaType AVMediaTypeAudio outputSettings nil retain AVAssetReader audioReader AVAssetReader assetReaderWithAsset avAsset error error retain AVAssetTrack audioTrack avAsset tracksWithMediaType AVMediaTypeAudio.. readerOutput AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack audioTrack outputSettings nil audioReader addOutput readerOutput NSParameterAssert audioWriterInput NSParameterAssert videoWriter canAddInput audioWriterInput audioWriterInput.expectsMediaDataInRealTime.. your method for when the conversion is done should call finishWriting on the writer hook up audio track audioReader startReading videoWriter startSessionAtSourceTime kCMTimeZero dispatch_queue_t mediaInputQueue dispatch_queue_create mediaInputQueue..