我有一个以120FPS录制的Slow_Mo视频。我的QuickTime播放器和Ipad的视频播放器能够以慢动作效果播放该视频,而不会出现任何问题。
现在,我尝试使用 AVPlayer和AVPlayerViewController 播放它。但这不会产生慢动作效果。它像普通视频一样播放。以下是我的代码。
NSString *fullpath = [[self documentsDirectory] stringByAppendingPathComponent:@"12032018_105305_Test_User/Videos/VIDEO_000079.mov"];
NSURL *vedioURL =[NSURL fileURLWithPath:fullpath];
AVPlayerItem* playerItem = [AVPlayerItem playerItemWithURL:vedioURL];
AVPlayer* playVideo = [[AVPlayer alloc] initWithPlayerItem:playerItem];
playerViewController = [[AVPlayerViewController alloc] init];
playerViewController.player = playVideo;
playerViewController.player.volume = 0;
playerViewController.view.frame = self.view.bounds;
[self.view addSubview:playerViewController.view];
[playVideo play];
请帮助我。我是AVFoundation的新手。