I've created a custom camera similar to snapchat with AVFoundation. The picture aspect works: take a picture and I display the picture. Now I'm trying to take a video and display the video.
I have captured a successful video file, tested and works with MPMoviePlayer, but am unable to play it back on AVPlayer.
- (void)takeVideoAction:(id)sender {
    NSString *outputPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"output.mp4"];
    NSFileManager *manager = [[NSFileManager alloc] init];
    if ([manager fileExistsAtPath:outputPath]){
        [manager removeItemAtPath:outputPath error:nil];
    }
   [movieFileOutput startRecordingToOutputFileURL:[NSURL fileURLWithPath:outputPath] recordingDelegate:self];
}
- (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error{
            AVURLAsset *asset = [AVURLAsset URLAssetWithURL:outputFileURL options:nil];
            [asset loadValuesAsynchronouslyForKeys:@[@"tracks"] completionHandler:^{
            dispatch_async(dispatch_get_main_queue(), ^{
                 NSError *error = nil;
                 if([asset statusOfValueForKey:@"tracks" error:&error] == AVKeyValueStatusFailed){
                    NSLog(@"error: %@", [error description]);
                }
                else{
                    self.playerItem = [AVPlayerItem playerItemWithAsset:asset];
                    self.player = [AVPlayer playerWithPlayerItem:self.playerItem];
                    self.playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
                    self.playerLayer.frame = self.view.bounds;
                    [self.view.layer addSublayer:self.playerLayer];
                    [self.player play];
                }
            });
        }];
    }
This is my first time using AVFoundation & AVPlayer. Is it that I can not [self.player play] after the asset loads right? I need to wait for item status to be AVPlayerItemStatusReadyToPlay?
ERROR: Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server."