VideoPlayer.Prepare() & using lot of videos in sequence on IOS (== Hell)

Hi,

I want to use a bunch of videos in a sequence (about 100 videos), so when one video finishes, another one starts. So I create a videoplayer for each video and used a 3d plane (material video player mode) to Play the video. Each video has its own plane.

The most large video has 250kb file size and 480x480. Doesn’t have any audio clip, and the format is right (h264-mp4, Profiler: Baseline, Level: 3.0)

In windows & Mac everything works perfect, the problem is making it work in IOS.

When my script starts preparing (Video.Prepare() function) the videos on IOS it launches an error (can’t decode video) when I get to the 13th video. I suppose it’s a platform limitation since the videoclip it’s ok (I tested it putting that video at the first place in the sequence and it works: Prepare() and Play() just works fine). So, when the script arrives to that video (the 13 or 12 in some cases), I get a black screen (because Prepare() failed at Inicialization I assume).

So, I created a cache function that only prepares a few videos in the sequence and, as you go playing the videos, starts Preparing() the next videos in the sequence and Stopping() the videos already played.
This cache systen works but every time a video starts Preparing or Stopping, the entire game has a huge frame drop. I notice -using the profiler- that this video functions are very, very expensive.
I suppose a work around is to get that video functions to work in another thread.

Any ideas about all this? (IOS Platform limittation preparing a bunch of video and lagg problem the Prepare() or Stop)( are called). This problem It’s already killing me softly!!!

Thanks in advance.

Seeing how expensive Video.Prepare() & Video.Stop() are, I have decided to put a few cutsecenes between my series of key videos (these cutscenes in many cases have an integrated fadein) so I can use those moments in which an cutscene plays to release the videos already played and prepare the next batch of videos.

Is the only way to go as far as I can see. I’m using a lot of little videos in a sequence and the Prepare() and Stop() functions from Unitys API are too expensive right now. It works Ok if you want to Play a few videos, but in my case it just don’t work properly. The hole application have a massive fps drop while preparing videos.

I don’t know if Unity have any plan to internally move the Prepare(), Stop() funcion to another thread (not the MAIN one). That could be the solution for this particular problem (use a lot of videos in an game or app).