Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Guardian2300 · Nov 25, 2013 at 08:20 PM · audiowwwmovietexturemovie

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.

alt text

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

movieissue.png (263.0 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Guardian2300 · Nov 26, 2013 at 06:14 PM 0
Share

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?

avatar image Julien-Lynge · Nov 26, 2013 at 06:36 PM 0
Share

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

avatar image Guardian2300 · Nov 26, 2013 at 07:06 PM 0
Share

This is my code to start video

void Start$$anonymous$$ovie(int WindowID) {

     if(duration >= Temp$$anonymous$$ovie.duration)
     {
         Temp$$anonymous$$ovie.Stop();
         isDuration = false;
         duration = 0;
     }
     if(isDuration)
     {
         duration += Time.deltaTime/2;
     }
     if(GUI.Button(new Rect(0,Screen.height-50,100,50),"Close"))
     {
         is$$anonymous$$ovie = false;
         is$$anonymous$$ovieSelection = true;

         isDuration = false;
         Temp$$anonymous$$ovie.Stop();
         TempStart.Stop();
         //TempStart.clip = null;
         //Temp$$anonymous$$ovie = null;
         duration = 0;
     }
     if(GUI.Button(new Rect($$anonymous$$ovieWindow.width/2-100,Screen.height-100,50,50),Play))
     {
         isDuration = true;
         TempStart.clip = Temp$$anonymous$$ovie.audioClip;
         Temp$$anonymous$$ovie.Play();
         TempStart.Play();
     }
     if(GUI.Button(new Rect($$anonymous$$ovieWindow.width/2-25,Screen.height-100,50,50),Pause))
     {
         isDuration = false;
         TempStart.clip = Temp$$anonymous$$ovie.audioClip;
         Temp$$anonymous$$ovie.Pause();
         TempStart.Pause();
     }
     if(GUI.Button(new Rect($$anonymous$$ovieWindow.width/2+50,Screen.height-100,50,50),Stop))
     {
         isDuration = false;
         duration = 0;
         TempStart.clip = Temp$$anonymous$$ovie.audioClip;
         Temp$$anonymous$$ovie.Stop();
         TempStart.Stop();
     }
     string DuraStr = string.Format("{0:0.0}",duration);
     //GUI.Label(new Rect(0,0,$$anonymous$$ovieWindow.width,$$anonymous$$ovieWindow.height),Temp$$anonymous$$ovie);
     GUI.DrawTexture(new Rect(0,0,$$anonymous$$ovieWindow.width,$$anonymous$$ovieWindow.height-100),Temp$$anonymous$$ovie);
     GUI.Label(new Rect($$anonymous$$ovieWindow.width/2-20,$$anonymous$$ovieWindow.height-50,60,50),DuraStr+"/"+Temp$$anonymous$$ovie.duration.ToString());
 }

The Problem isn't in this function though, the problem is that www.movie isn't downloading the video requested. To note that its finding file on local drive and www doesn't give any errors to the file not being correct

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ZeoWorks · Nov 26, 2013 at 07:01 PM

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: http://video.online-convert.com/convert-to-ogg - It has never failed me when importing to Unity. I hope this helps. :)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Guardian2300 · Nov 26, 2013 at 07:25 PM 0
Share

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

avatar image Guardian2300 · Nov 27, 2013 at 06:26 PM 0
Share

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.

avatar image Guardian2300 · Jan 22, 2015 at 10:53 PM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

www.movie on GUI Texture in front of Camera 0 Answers

Problem streaming large movie 1 Answer

'movie' is not a member of 'UnityEngine.WWW' 1 Answer

www.movie.other formats 1 Answer

UnityWebRequest hangs on isDone but not always 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges