I am looking to read video samples through AVAssetReader, and I come across all kinds of road blocks. Is there any single zip code that installs AVAsset from a video named "Movie.m4v" from the application package and uses AVAssetReader to cycle through video frames (CMSampleBufferRef).
Here are some of the code I'm using now that does not work:
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Movie.m4v"]; AVAsset *avAsset = [[AVURLAsset alloc] initWithURL:[NSURL URLWithString:path] options:nil]; NSError *error = nil; AVAssetReader *reader = [[AVAssetReader alloc] initWithAsset:avAsset error:&error];
source share