Ios 在MPMoviePlayerController中播放视频URL时出现问题
我必须在我的应用程序中压缩视频大小,并在Ios 在MPMoviePlayerController中播放视频URL时出现问题,ios,objective-c,mpmovieplayercontroller,Ios,Objective C,Mpmovieplayercontroller,我必须在我的应用程序中压缩视频大小,并在MPMoviePlayerController中播放压缩后的视频。我使用avurlast压缩该视频,压缩后我会得到一个输出URL,当我播放该URL时,它会显示以下内容Err0r:-“内部一致性异常”,原因:“属性存储找不到预期的每线程存储数据 这是密码 [[NSFileManager defaultManager] removeItemAtURL:outputURL error:nil]; AVURLAsset *asset = [AVURLA
MPMoviePlayerController
中播放压缩后的视频。我使用avurlast
压缩该视频,压缩后我会得到一个输出URL,当我播放该URL时,它会显示以下内容Err0r:-“内部一致性异常”,原因:“属性存储找不到预期的每线程存储数据
这是密码
[[NSFileManager defaultManager] removeItemAtURL:outputURL error:nil];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:inputURL options:nil];
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetMediumQuality];
exportSession.outputURL = outputURL;
exportSession.outputFileType = AVFileTypeQuickTimeMovie;
[exportSession exportAsynchronouslyWithCompletionHandler:^(void) { handler(exportSession);
}];
如何解决此问题。
帮帮我吧请发布您的代码,以便我们能够帮助您。@RamkrishnaSharma请参考我的此答案以制作视频并播放完整的MPMoviePlayerController查看此答案请发布代码snippet@RamkrishnaSharma[[NSFileManager defaultManager]RemoveItemAttribute:outputURL错误:nil];AVURLAsset*asset=[AVURLAsset URLAssetWithURL:inputURL选项:nil];AVAssetExportSession*exportSession=[[AVAssetExportSession alloc]initWithAsset:asset presetName:AVAssetExportPresetMediumQuality];exportSession.outputURL=outputURL;exportSession.outputFileType=AVFileTypeQuickTimeMovie;[exportSession exportAsynchronouslyWithCompletionHandler:^(void){handler(exportSession);}];这些行用于压缩视频,请发布您的代码,以便我们能够帮助您。@RamkrishnaSharma请参考我的此答案以编写视频并播放完整的MPMoviePlayerController查看此答案请发布代码snippet@RamkrishnaSharma[[NSFileManager defaultManager]RemoveItemAttribute:outputURL错误:nil];AVURLAsset*asset=[AVURLAsset URLAssetWithURL:inputURL选项:nil];AVAssetExportSession*exportSession=[[AVAssetExportSession alloc]initWithAsset:asset presetName:AVAssetExportPresetMediumQuality];exportSession.outputURL=outputURL;exportSession.outputFileType=AVFileTypeQuickTimeMovie;[exportSession exportAsynchronouslyWithCompletionHandler:^(void){handler(exportSession);}];这些行用于压缩视频