Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast video skimming in AVFoundation or MPMoviePlayerViewController ios

I am trying to create an iPad app that reads a video on a server. I would like to be able to seek through the video very quickly and smoothly.

I have noticed that MPMoviePlayerViewController and AVFoundation are very slow and jump around when skimming through.

The solution I currently have is to get frames from MPMoviePlayerViewController and then do my own operations. What worries me is that I do this every 10th of a second for 3 videos (different views) and it gives me a huge time and memory overhead.

I have also tried placing the video on the iPad device itself and it doesn't help.

The question is if anyone knows a better solution to this seeking problem?

I am also open to using libraries or other frameworks. :)

Any help and tips are greaty appreciated!

like image 445
user1035839 Avatar asked Jan 24 '12 06:01

user1035839


1 Answers

If anyone comes across this, then the answer is to use AVFoundation. Set up an AVPlayer and then get the AVPlayerItem from the AVPlayer using the currentItem method. Then you have to use stepByCount method to move in either direction by an int.

like image 155
user1035839 Avatar answered Oct 12 '22 19:10

user1035839