Log in or register to post comments

Unity for Android: Video Playback from multiple Image Targets

June 13, 2018 - 6:35am #1

I am loading 5 different videos from 5 different targets in one scene, and around 30% of the time, one or more videos don't prepare in time and show up as white planes.

In android debug, I can see that it is random as to which video doesn't get prepared.

The videos are webm with transparency and range in size from 8MB to 15MB.

As the AR app is part of a public exhibition, we expected that some phones might cope worse with the load than others, but this also happens on my main development phone which is a Samsung S8.

Is there any way to call something similar to prepare later on, e.g. at OnTrackingFound? Some of the videos don't need to be ready at Start / Awake, but I haven't managed to successfully call prepare again later in the script.

I am quite concerned by this issue, as the plan is to include even more videos in the scene at a later production point.

Unity for Android: Video Playback from multiple Image Targets

June 14, 2018 - 1:49am #3

Mmh, I am already using the prepareCompleted callback.

But I did transcode, as it's webm's I'm using and they showed up black (or not at all, can't remember) without transcoding.

Unity for Android: Video Playback from multiple Image Targets

June 13, 2018 - 11:39am #2

I've seen two things that can cause these type of issues when loading video.  

Not using prepareCompleted callback (you should only make visible after it's prepared) and the video codec you're using.  

It always seemed best to let Unity transcode if you can.  

 

 

Log in or register to post comments