Video 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: * UPDATED WORKING CODE, NOW WITH AUDIO! :) * -(void)resizeVideo:(NSString*)pathy{ NSString *newName = [pathy stringByAppendingString:@".down.mov"]; NSURL *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(videoWriter); AVAsset *avAsset = [[[AVURLAsset alloc]