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 pjylocca · Sep 12, 2014 at 09:49 PM · videovideo streamingwww class

WWW streaming ogg video problems

I am trying to display a ogg video stream as a texture on an object using WWW. When I use an ogv file (file://path/myfile.ogv), everything works fine. When I use a video stream (http://mycomputer:8080), isDone is never true, isReadyToPlay is never true and yield return on the object never returns although the video will play fine most of the time if I go ahead and just use it without the checks. Sometimes though it will cause the editor (or the build) to just crash. Why doesn't it work with a stream? coroutine code:

 IEnumerator StartVideo()  
     {  
             wwwData = new WWW(sourceString);  
 
     //        yield return wwwData; - this will hang
             yield return new WaitForSeconds(3.0f); // using instead
 
     //        yield return wwwData; - this will hang
     //        while (!wwwData.isDone) -- this will never complete
     //    {
     //        yield return new WaitForSeconds(1.0f);
     //    }
             if (wwwData != null)
             {
                 movieObj = wwwData.movie;
                 string error = wwwData.error;
                 if (string.IsNullOrEmpty(error))
                 {    
     //                while (!movieObj.isReadyToPlay) - never completes
     //                {
     //                    yield return new WaitForSeconds(1.0f);
     //                }
                     renderer.material.mainTexture = movieObj;
                     movieObj.Play();
                 }
             }
     }

Comment
Add comment · Show 1
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 Dave-Hampson ♦♦ · Dec 22, 2014 at 01:05 PM 0
Share

isDone not going true sounds about right, after all it's a stream

It could be that 'WWW' simply doesn't support what you are trying to do, the web page at http://docs.unity3d.com/ScriptReference/WWW.html suggests it is more about "retrieving the contents of URLs". Although it does mention 'stream', I think it's more referring to asset bundles being streamed off the net rather than a video stream.

That Editor crash does worry me a bit though. I guess there is no harm in submitting a bug report using the Bug Reporter tool though. $$anonymous$$ake sure you tell QA in the report exactly how you have your video stream set up (what software to install, what hardware you have etc) so that they can try to reproduce the issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Paulius-Liekis · Dec 22, 2014 at 01:14 PM

isDone does not become true if it's not done and with stream it's never done. So the behaviour that you're describing makes sense.

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

VideoPlayer streaming and buffering 0 Answers

Is it possible to access a file from the android Internal storage on to a Unity app during run time? 0 Answers

Integrating Intel-Media SDK with Unity 0 Answers

Streaming Video In and Out of Unity 0 Answers

How to integrate a video with alpha channel (rgb+alpha) in the new 5.6 videoplayer? 5 Answers


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