AVURLAsset not loading (.mov file)

I am trying to upload a file called output.mov (created on iPhone) as AVURLAsset using the following code:

 NSURL *outputURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), @"output.mov"]]; AVURLAsset *videoAsset = [AVURLAsset URLAssetWithURL:outputURL options:nil]; 

The file is located in the tmp application. No errors occur, but it seems that the asset is not loaded, because metadata is not available (ie Calling NSLog(@"%@", [videoAsset commonMetadata]) does not return anything), so I can do nothing with this asset.

I used the following code to guarantee the availability of a resource through a URL, and it definitely looks like this:

 if ([outputURL checkResourceIsReachableAndReturnError:&err] == NO) NSLog(@"Not reachable!"); 

so I'm not sure why the asset is not loading. I also tried loading the object using [AVAsset assetWithURL:] , but this also does not work.

Any help would be greatly appreciated.

+4
source share

All Articles