- Home /
Problem streaming large movie
I'm having trouble streaming large (700MB+) movie files. It loads the movie, starts playing it, then the unity editor crashed completely.
This code is attached to a GUITexture to load and play the movie:
void Start () { StartCoroutine(LoadMovie()); }
IEnumerator LoadMovie() { WWW w = new WWW(@"file:///C:/movie.ogg");
MovieTexture tx = w.movie;
while (!tx.isReadyToPlay) yield return 0;
guiTexture.texture = tx;
transform.localScale = new Vector3 (0f,0f,0f);
transform.position = new Vector3 (0.5f,0.5f,0f);
// Play both movie & sound
tx.Play();
}
The movie is in ogg format, and smaller movies (<200MB) work fine.
Even just starting the streaming and not playing the movie at all fails in the same way causing a complete editor crash:
IEnumerator LoadMovie()
{
WWW w = new WWW(@"file:///C:/movie.ogg");
MovieTexture tx = w.movie;
while (!tx.isReadyToPlay) yield return 0;
}
The movie actually loads and starts playing, but about 5 seconds in it crashes the editor. This does not happen with smaller files. Also, if you try to import the movie directly (i.e. put it in the assets folder) the editor crashes with and Out of Memory error.
Looks very much like a nasty bug to me, anyone got a solution?
Help much appreciated!
Your answer
Follow this Question
Related Questions
WWW.movie doesn't work 1 Answer
www.movie on GUI Texture in front of Camera 0 Answers
'movie' is not a member of 'UnityEngine.WWW' 1 Answer
www.movie.other formats 1 Answer
Problems with movies - delayed play or silent failure 2 Answers