• 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 fawnha · May 23, 2014 at 12:21 AM · videotexturevideo streamingaudio source

How do I stop sound skipping when buffering streaming MovieTextures?

I am trying to play videos with MovieTexture but I have a persistent and terrible problem. Whenever I stream a video to a MovieTexture and the video pauses to buffer the sound skips back a bit and plays that bit over and over again during the buffering rather than just pausing like happens when you watch a video on Youtube or whatever. The script I use to play the movie texture is really simple:

IEnumerator Start () {

      // Start download
      var www = new WWW(url);
     // Make sure the movie is ready to start before we start playing
      var movieTexture = www.movie;
      while (!movieTexture.isReadyToPlay)
      {
          yield return 0;
      }
     // Initialize texture to be 1:1 resolution
      renderer.material.mainTexture = movieTexture;
     // Assign clip to audio source
      // Sync playback with audio
      audio.clip = movieTexture.audioClip;
     // Play both movie & sound
      movieTexture.Play();
      audio.Play();

}

This happens in the Webplayer and the editor. I haven't tested other platforms. It makes MovieTexture useless for streaming videos with sound. I am surprised that Unity would release the system with this problem because it is such a fatal bug. I have tried a wide variety of source video formats downloaded from the web already in ogg format and also converted others to ogg using ffmpeg. All these videos have the same problem. I have been using libvorbis as my sound codec. Has anyone got around this problem or does anyone not have this problem at all? If so what codecs do you use? How do you create your ogg videos? Should I give up on MovieTexture? Are there any other movie players for Unity that anyone can recommend that work on Webplayer and do a better job?

Thanks

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

20 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 avatar image avatar image

Related Questions

How do I paste an frame of a video source to a specified area of an object surface? (Or how do I manipulate specific pixels of a texture?) 0 Answers

How to play video on WEBGL 0 Answers

Playing a video as part of the scene on mobile 2 Answers

How to fix flicker with VideoPlayer/Skybox/XR setup 1 Answer

Playing Video in Unity 5 (on mobile) 4 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges