- Home /
Is WWW.movie supposed to be this slow?
I am streaming an ogg video from the server and when I do so my gmae slows from around 60-70fps to around 20-30fps.(even with the movie not actually displayed but just playing.. eg myMovieTexture.isPlaying)
There are no additional lines of code being run during the video so its just the streaming and playing thats making the game take such a hit.
Does this sound correct? Also my movie is set to looping so surely if unity were sensible it would only download it once and then keep playing the downloaded data right??
Is this run through the editor, a standalone, web build, or something other?
This is through a webplayer and I am strea$$anonymous$$g the video from a http:// online source. BTW I looked in the profiler and the 'overhead' is eating 60-70% of the cpu with a single call. What's the 'overhead'?
Oh also, I am testing this in the editor..but the video source is still from online.
Answer by jonas-echterhoff · Dec 09, 2010 at 04:44 PM
As long as a Movie as playing, it will use CPU cycles, whether it is visible or not. Otherwise, the movie playback would have to jump to different positions when it becomes visible again, which our movie class cannot currently do (and also it requires decoding all the frames from the last keyframe in the movie to the current position, so it could cause jerkiness whenever a movie becomes visible).
However, you could try making the movie resolution smaller to reduce the impact of movie playback, or experiment with the compression settings. Maybe you will find a setup which is satisfactory for your use.
Yeah the end I've compressed the movie right down..(resolution & quality) and this way I still have the movie play without it affecting the gameplay (too much)
Answer by Grimmy · Dec 08, 2010 at 10:19 PM
I just read in the Movie.play help...
Note that a running MovieTexture will use a lot of CPU power, and it will continue running until it is manually stopped or a new level is loaded.
So I'm guessing I can do nothing about the rubbish frame rate then... :(
BTW the original idea was to have a picture in picture movie running alongside the gameplay, but if the gameplay is affected this badly then thats a no go.
Your answer
Follow this Question
Related Questions
Streaming large texture through WWW or otherwise. (multiple passes) 1 Answer
Unity for showing a html stream 0 Answers
Getting a youtube vid , applying it as a texture to a gameobject and playing it with sound 3 Answers
unity and databases 1 Answer
Wait for texture to be loaded before starting game 0 Answers