MPMoviePlayer 或 AVPlayer 帧前进
有没有办法使用 MPMoviePlayer 或 AVPlayer 逐帧播放视频文件? 或者甚至是另一个我不知道的电影播放器?
这就是我想做的。我想将视频加载到全屏播放器中,并根据用户交互一次移动一帧内容。这需要非常可靠,因为我需要准确控制电影播放器在任何时候显示的帧。
理想情况下,我很想知道是否可以加载视频并使用代码控制显示的帧。
我知道我可以使用 UIImageView 动画来做到这一点,但测试表明这会使用大量内存。
Is there a way to playback a video file frame by frame using either MPMoviePlayer or AVPlayer?
Or even another movie player that I do not know about?
Here is what I want to do. I want to load a video into a fullscreen player and move the content one frame at a time based on user interaction. This will need to be pretty solid as I would need to accurately control what frame the movie player was displaying at any one time.
Ideally I would love to know if it were possible to load a video and control the frame displayed using code.
I know that I could do this using a UIImageView animation but tests show that this uses FAR to much memory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 AVPlayer 时,可以使用其当前 AVPlayerItem 的 - (void)stepByCount:(NSInteger)stepCount 方法前进或后退。
When using AVPlayer, you can use the - (void)stepByCount:(NSInteger)stepCount method of its current AVPlayerItem to step forward or backward.