MovieTexture.Duration is -1

Hi all,

I’m trying to load .ogv file as a MovieTexture.

Everything is fine, until I find that some .ogv files Duration is always -1. Depending on the file, sometimes the Duration is loaded correctly.

Sample .ogv file that the duration is always -1:
https://s3.amazonaws.com/labsterim/media/videos/small.ogv

Another file that the duration is correct:
http://unity3d.com/files/docs/sample.ogg

Any idea why this is happening? Is it because the movie settings is different or something? Any help is greatly appreciated. Thanks!

According to the MovieTexture.duration docs this is the intended behavior. Until the movie is started duration will return -1. Your best bet is to do as the docs say and simply store the duration you need in a public int/float.