I have the following code that reads a video file from the camera roll which works perfectly fine
Scene *scene = [_sceneArray objectAtIndex:0];
NSString *path = scene.src_url;
NSURL *full_url = [[NSURL alloc] initFileURLWithPath:path];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:full_url options:nil];
AVAssetTrack *videoTrack = [[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
However, when i try to extract just the audio of a given video file using the following code, the application force closes (with array out of bound exception)
audioTrack = [[asset tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0];