¡@

Home 

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

iphone Programming Glossary: avasset

Creating 16:9 Video Rather than 4:3 - AVAsset Writer - iPhone

http://stackoverflow.com/questions/10358086/creating-169-video-rather-than-43-avasset-writer-iphone

16 9 Video Rather than 4 3 AVAsset Writer iPhone I am using the below code to make a video from a static 16 9 image using AVAsset writer. The problem is that.. Video Rather than 4 3 AVAsset Writer iPhone I am using the below code to make a video from a static 16 9 image using AVAsset writer. The problem is that for some reason the video that is produced is in a 4 3 format. Can anyone suggest a way that.. @ Documents IntroVideo.mov NSError error nil unlink betaCompressionDirectory UTF8String initialize compression engine AVAssetWriter videoWriter AVAssetWriter alloc initWithURL NSURL fileURLWithPath betaCompressionDirectory fileType AVFileTypeQuickTimeMovie..

How can you play music from the iPod app while still receiving remote control events in your app?

http://stackoverflow.com/questions/3191580/how-can-you-play-music-from-the-ipod-app-while-still-receiving-remote-control-ev

do have a URL property that returns a NSURL instance which the documentation says its explicitly for use with AVAsset objects but when you try initializing the AVAudioPlayer with that NSURL it fails. I used the 'now playing' track in iPod..

Adjusting the volume of a playing AVPlayer

http://stackoverflow.com/questions/3268949/adjusting-the-volume-of-a-playing-avplayer

the volume to anything you like and you can set it after the audio is playing. For example assuming your instance of AVAsset is called asset your instance of AVPlayerItem is called playerItem and the volume you want to set is called volume the following.. NSArray audioTracks asset tracksWithMediaType AVMediaTypeAudio NSMutableArray allAudioParams NSMutableArray array for AVAssetTrack track in audioTracks AVMutableAudioMixInputParameters audioInputParams AVMutableAudioMixInputParameters audioMixInputParameters..

Using MPMediaItems with AVAudioPlayer

http://stackoverflow.com/questions/5222464/using-mpmediaitems-with-avaudioplayer

actual audio data you have to first copy the audio file to your app's directory and then work with it there. The AVAsset AVPlayer stuff is the closest analogy to ALAsset if you're used to working with photos and videos. share improve this answer..

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

movie file with picture Array and song file using AVAsset I'm trying to make movie file using a picture array and an audio file. To make movie with a picture array i used the big.. NSString stringWithFormat @ @ @ documentsDirectoryPath tString error nil NSLog @ Write Started NSError error nil AVAssetWriter videoWriter AVAssetWriter alloc initWithURL NSURL fileURLWithPath path fileType AVFileTypeMPEG4 error error NSParameterAssert.. @ @ @ documentsDirectoryPath tString error nil NSLog @ Write Started NSError error nil AVAssetWriter videoWriter AVAssetWriter alloc initWithURL NSURL fileURLWithPath path fileType AVFileTypeMPEG4 error error NSParameterAssert videoWriter..

Using AVAssetReader to read (stream) from a remote asset

http://stackoverflow.com/questions/6242131/using-avassetreader-to-read-stream-from-a-remote-asset

AVAssetReader to read stream from a remote asset My main goal is to stream a video from a server and cut it frame by frame while.. as I recall it was from Apple's GLVideoFrame sample code NSArray tracks asset tracks NSLog @ d tracks.count for AVAssetTrack track in tracks NSLog @ type @ track mediaType initialFPS track.nominalFrameRate width GLuint track.naturalSize.width.. height GLuint track.naturalSize.height NSError error nil _movieReader is a member variable @try self._movieReader AVAssetReader alloc initWithAsset asset error error autorelease @catch NSException exception NSLog @ @ @ exception name exception..

Playing many different videos on iphone using AVPlayer

http://stackoverflow.com/questions/6258573/playing-many-different-videos-on-iphone-using-avplayer

asset and item recycling the player views layers etc. player pause contentURL NSURL alloc initFileURLWithPath newPath AVAsset newAsset AVURLAsset URLAssetWithURL contentURL options nil AVPlayerItem newPlayerItem AVPlayerItem playerItemWithAsset newAsset..

Caching with AVPlayer and AVAssetExportSession

http://stackoverflow.com/questions/6259095/caching-with-avplayer-and-avassetexportsession

with AVPlayer and AVAssetExportSession I would like to cache progressive download videos using AVPlayer. How can I save an AVPlayer's item to disk.. like to cache progressive download videos using AVPlayer. How can I save an AVPlayer's item to disk I'm trying to use AVAssetExportSession on the player's currentItem which is fully loaded . This code is giving me AVAssetExportSessionStatusFailed.. disk I'm trying to use AVAssetExportSession on the player's currentItem which is fully loaded . This code is giving me AVAssetExportSessionStatusFailed The operation could not be completed AVAsset mediaAsset self.player.currentItem.asset AVAssetExportSession..

How to combine video clips with different orientation using AVFoundation

http://stackoverflow.com/questions/6575128/how-to-combine-video-clips-with-different-orientation-using-avfoundation

NSURL url NSURL alloc initFileURLWithPath path AVURLAsset asset AVURLAsset URLAssetWithURL url options nil url release AVAssetTrack videoTrack asset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 AVAssetTrack audioTrack asset tracksWithMediaType.. url options nil url release AVAssetTrack videoTrack asset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 AVAssetTrack audioTrack asset tracksWithMediaType AVMediaTypeAudio objectAtIndex 0 set the orientation if i 0 compositionVideoTrack.. combined video NSString combinedPath path of the combined video NSURL url NSURL alloc initFileURLWithPath combinedPath AVAssetExportSession exporter AVAssetExportSession alloc initWithAsset composition presetName AVAssetExportPreset640x480 autorelease..

Video Encoding using AVAssetWriter - CRASHES

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

Encoding using AVAssetWriter CRASHES I have a function that is supposed to re encode a video to a manageable bitrate on iphone ipad. Here it is.. fullPath NSURL fileURLWithPath newName NSURL path NSURL fileURLWithPath pathy NSLog @ Write Started NSError error nil AVAssetWriter videoWriter AVAssetWriter alloc initWithURL fullPath fileType AVFileTypeQuickTimeMovie error error NSParameterAssert.. newName NSURL path NSURL fileURLWithPath pathy NSLog @ Write Started NSError error nil AVAssetWriter videoWriter AVAssetWriter alloc initWithURL fullPath fileType AVFileTypeQuickTimeMovie error error NSParameterAssert videoWriter AVAsset avAsset..

iOS Stream Audio from one iOS Device to Another

http://stackoverflow.com/questions/8357514/ios-stream-audio-from-one-ios-device-to-another

Stream Audio from one iOS Device to Another I get a song from the device iTunes library and shove it into an AVAsset void mediaPicker MPMediaPickerController mediaPicker didPickMediaItems MPMediaItemCollection mediaItemCollection NSArray.. didReceiveData NSData data fromPlayer NSString playerID I'm having a LOT of trouble figuring out how to send this AVAsset via GameCenter and then have it play on the receiving device. I've read through http developer.apple.com library ios #documentation..

AVPlayerItem fails with AVStatusFailed and error code “Cannot Decode”

http://stackoverflow.com/questions/8608570/avplayeritem-fails-with-avstatusfailed-and-error-code-cannot-decode

pipeline AVPlayer player AVPlayer playerWithPlayerItem somePlayerItem assuming the AVPlayerItem is ready to go with an AVAsset that has been loaded I was also warned that you cannot assume that you will have 4 pipelines available to you. Another App..

how to detect (iphone sdk) if a video file was recorded in portrait orientation, or landscape

http://stackoverflow.com/questions/4627940/how-to-detect-iphone-sdk-if-a-video-file-was-recorded-in-portrait-orientation

recorded while holding the phone in portrait orientation I have also tried this given the url of the asset AVURLAsset avAsset AVURLAsset alloc initWithURL url options nil CGSize size avAsset naturalSize NSLog @ size.width f size.height f size.width.. also tried this given the url of the asset AVURLAsset avAsset AVURLAsset alloc initWithURL url options nil CGSize size avAsset naturalSize NSLog @ size.width f size.height f size.width size.height CGAffineTransform txf avAsset preferredTransform NSLog.. nil CGSize size avAsset naturalSize NSLog @ size.width f size.height f size.width size.height CGAffineTransform txf avAsset preferredTransform NSLog @ txf.a f txf.b f txf.c f txf.d f txf.tx f txf.ty f txf.a txf.b txf.c txf.d txf.tx txf.ty Which..

Video Encoding using AVAssetWriter - CRASHES

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

alloc initWithURL fullPath fileType AVFileTypeQuickTimeMovie error error NSParameterAssert videoWriter AVAsset avAsset AVURLAsset alloc initWithURL path options nil autorelease NSDictionary videoSettings NSDictionary dictionaryWithObjectsAndKeys.. YES videoWriter addInput videoWriterInput NSError aerror nil AVAssetReader reader AVAssetReader alloc initWithAsset avAsset error aerror AVAssetTrack videoTrack avAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 videoWriterInput.transform.. NSError aerror nil AVAssetReader reader AVAssetReader alloc initWithAsset avAsset error aerror AVAssetTrack videoTrack avAsset tracksWithMediaType AVMediaTypeVideo objectAtIndex 0 videoWriterInput.transform videoTrack.preferredTransform NSDictionary..

MOV to Mp4 video conversion iPhone Programmatically

http://stackoverflow.com/questions/8474517/mov-to-mp4-video-conversion-iphone-programmatically

PS3 support. This is what I have done but it crashes if I set different file type than its source files. AVURLAsset avAsset AVURLAsset URLAssetWithURL videoURL options nil NSArray compatiblePresets AVAssetExportSession exportPresetsCompatibleWithAsset.. URLAssetWithURL videoURL options nil NSArray compatiblePresets AVAssetExportSession exportPresetsCompatibleWithAsset avAsset if compatiblePresets containsObject AVAssetExportPresetLowQuality AVAssetExportSession exportSession AVAssetExportSession.. AVAssetExportPresetLowQuality AVAssetExportSession exportSession AVAssetExportSession alloc initWithAsset avAsset presetName AVAssetExportPresetLowQuality exportSession.outputURL NSURL fileURLWithPath videoPath exportSession.outputFileType..