I would like to play the sound, and only the sound of a video I have recorded with the ipad camera. The file is a .mov file.
I successfully play the sound of .mp4 files. I will show you how I do it for mp4 files.
There are 2 members of my player class. audioPlayer a AVAudioPlayer and _urlOfVideoToPlay a NSURL with a local video.
NSError *audioError;
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:_urlOfVideoToPlay error:&audioError];
bool prep2play = [audioPlayer prepareToPlay];
NSLog(@"%i", prep2play);
if(audioError) {
NSLog([audioError localizedDescription]);
}
The result is:
2012-09-21 14:50:23.312 AppName[2201:907] 0
2012-09-21 14:50:23.315 AppName[2201:907] The operation couldn’t be completed. (OSStatus error 1954115647.)
First output is 0, that means prep2play is NO (false). Second output is error.
Do you may have any ideas on that?
Regards