- Home /
Playing external movie file on Windows: WWW Problem
Hi, i have a list of external videos which i have to play on a GUITexture (or any texture which works, in fact). I just want to play one video at a time.
When i use WWW, the movie loads and works quite well, but when i load the next movie the memory always increases. So it is a memory leak. I've tried disposing WWW, i've tried destroying the gameobject and creating another one, and i've tried using QTPlayback plugin of the wiki, but it is not working on Windows on Unity 4.1 Pro (i've tried to change the texture pointer as they suggest in the wiki, didn't work).
Unfortunately, i can't affod AVPro. Could you help me?
Here's when i load the video:
string pathPrefix = @"file://";
string fullFilename = pathPrefix + movPath;
WWW www = new WWW(fullFilename);
movTexture = www.movie;
I've found one memory leak in my code. I was doing
Texture2D texTmp = new Texture2D(512, 512, TextureFormat.DXT5, false);
every time I wanted to load and display a new file. It turns out that this memory is never freed automatically. $$anonymous$$aybe I'm able to dispose it by myself. So I don't know about WWW, but I noticed that I should avoid allocating new Texture2D since it is not disposed automatically.
Answer by Graham-Dunnett · May 29, 2013 at 03:51 PM
It's not a memory leak. Movie textures are intended to be short clips that are used on 3d geometry. These movies are fetched but never freed up. This feature is not a movie streaming service (which throws data away once it's been decoded and presented).
Your answer
Follow this Question
Related Questions
Movie Texture and EndUser's PC 0 Answers
Movie Texture 0 Answers
www.movie.other formats 1 Answer
MovieTexture stops playing after first frame 0 Answers
On movie end 1 Answer