x


Lag of video loading

Hi, everyone. I have been working on a project which has several videos in it. Then I have had a problem, one video loads really very very slow(one has to wait 7s before seeing the video). I have 4 videos in the project for now, the other 3 works fine, and these 3 are captured videos; the 4th, which loads slow, is a computer-made video (3d models, etc).

Unity is not clear on how it deals with video. It uses Quicktime and convert all to ogg/theora format. So I really want to know what is the problem?

The video is somehow big: 70MB. So preloading them may not be a good idea since we could add new videos to the application.

Thanks in advance for your help :)

more ▼

asked Jun 07 '12 at 11:50 AM

DustInTheAir gravatar image

DustInTheAir
1 1 2 3

Have you tried re-encoding the particular video that is slow? You might find some answers here: http://answers.unity3d.com/questions/17409/best-video-preparation-for-unity.html

Jun 07 '12 at 12:51 PM save

Thanks you for that! I have tried the method of Paul Clay and that works. It is a good idea to avoid the importer of Unity. Only problem is that Unity can't get the right duration of the video, you have to set it manually.

Jun 13 '12 at 02:50 PM DustInTheAir
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

We use videos that are over 100MB. Your best bet on this (especially if you have many of them in your game) is to use the WWW class to stream them off of a well known location on the disk. There is an example here of how to do that. Have you tried playing that movie in an external player? If you are still having trouble with that one movie there may be a problem in the source movie converting it so that the decoder is having trouble dealing with it up front. For a while we had these big movies in asset bundles and that does take a while to load as it loads the entire thing into memory.

more ▼

answered Jun 11 '12 at 01:09 PM

raypendergraph gravatar image

raypendergraph
1.6k 15 21 37

Thanks you Ray! It sounds nice your method. But I propose you to try the method mentioned by Paul Clay at this URL: http://answers.unity3d.com/questions/17409/best-video-preparation-for-unity.html I have used that method and it works!

Jun 13 '12 at 02:51 PM DustInTheAir
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x283
x196
x108

asked: Jun 07 '12 at 11:50 AM

Seen: 682 times

Last Updated: Jun 13 '12 at 02:51 PM