WWW.movie doesn't work

I can’t seem to download the movie and play the movie, I keep getting this red box then it doesn’t download. The WWW.error is not reporting any problems but it seems to refuse to download. I even have a while loop that only goes through once and I believe it shouldn’t be.

Here is my code for it

IEnumerator GetMovie(string Path)
	{
		WWW www = new WWW("file:///"+Path);
		MovieTexture DownloadedMovie;
		DownloadedMovie = www.movie;
		while(!www.isDone)
		{
			yield return new WaitForFixedUpdate();
			Debug.Log("Waiting");
		}
		yield return www;

		if(www.error == null)
		{
			isMovie = true;
			isMovieSelection = false;
			TempMovie = DownloadedMovie;
			TempClip = TempMovie.audioClip;

		}
		else
		{
			Debug.Log(www.error);
		}


	}

And this is the picture of the result.

So if anyone has any suggestions that would be great, I did look at the www.movie script reference and I believe it should work the way I have it for this code

I would like to also note that the video is in ogg format using the "vlc" player. Does anyone else have a problem with this?

Where are you assigning the MovieTexture to the renderer in-scene? We'll need to see that code and where you're calling Play() before we can help you.

1 Answer

1

Are you sure the path string states “.ogv” and not “.ogg”? It could also depend on encryption. I recommend converting a video format to .ogv here: Convert video to OGV Theora online - It has never failed me when importing to Unity. I hope this helps. :slight_smile:

its not really the importing the problem, my intentions is to load the video off the harddrive into my program. I have tried the ogv, ogg and I believe now the video does load but all I get is a black screen and duration is -1

unity is only letting me watch video if its on a website and not on the computer itself. Are you experiencing this issue. Its not on the editor this is going to be a add and delete in the build.

I'm updating that this was a bug and was fixed a while back. Sorry about the delay. I'll mark your answer as correct for having the only answer on here.