开发者

MPMoviePlayerController blank frame after seeking to particular time-line

I am developing an iPhone application in which I play a video using MPMoviePlayerController. I use custom controls to play the video.

I have a slider that shows video time line. Using this user can seek the movie to any time-line of the movie.

When user continuously moves the slider:

  1. Pause the video only for first time; [MPMoviePlayerController-obj pause]
  2. MPMoviePlayerController-obj.currentPlaybackTime = slider.value开发者_开发知识库

When slider action ends:

  1. Play the video; [MPMoviePlayerController-obj play]

This plays the movie from the position where user had left the slider. But, it leads to blank frame when movie completes playing. This defect occurs randomly; i.e not for all the seek'd time.

What is the reason for getting the blank frame? How do I solve this?


I'm not sure if this will work, but try setting the initialPlaybackTime to either the slider.value or to currentPlaybackTime.


For being sure that your content is not flawed, hence possibly triggering that issue, you should try to replicate your faulty MPMoviePlayerController results using Apple's reference video content.

  • HTTP-Streaming: bipbop.m3u8
  • Progressive Download & Local Playback: sample_mpeg4.mp4

I have personally observed many issues in connection with improper encoding. Weird things tend to happen when working with lossy compressed content. This is true for video (i-frames vs. p-frames) as well as audio (variable bitrate).

One being improper playback durations being reported. Such issue may result into an unexpected finished-state. I have seen cases where MPMoviePlayerController still shows a bunch of seconds to play even though the actual video has obviously finished. Those cases occur frequently once the user seeks around within the video.

Once you made sure that the issue occurs using the given sample files as well, you should file a bug-report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜