• 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
5
Question by Arx · Sep 23, 2015 at 08:29 AM · unity5videomovietexturecutscene

MovieTexture cutscene - performance issues (stuttering) in Unity5

I'm using uGUI Raw Image component to play 720p .ogv (Theora) video, 31 seconds long, 45MB of size, using Unity 5.1.3. My setup is like t$$anonymous$$s: inspector

The CutscenePlayer assigns the MovieTexture demo_intro_cutscene_720p to RawImage.texture and calls Play().

T$$anonymous$$s indeed works, but I experience very noticeable stutter of the cutscene - in the Editor and in the build too - and I can't seem to find any way to mitigate t$$anonymous$$s. I've tried setting the Quality of the video (in the import settings of the video asset) to 0, but it doesn't help with the stutter at all and honestly, I can't even see any quality difference on t$$anonymous$$s setting.

import settings

Is there anyt$$anonymous$$ng I can do to increase the performance? My computer runs other 720p videos with no problems.

T$$anonymous$$ngs I've tried so far (to no avail):

  • lowering the Quality of the video in import settings of the video asset

  • using Plane object to play the video on, instead of uGUI's RawImage

  • just calling Play() on MovieTexture and rendering it via GUI.DrawTexture() called in OnGUI() method

  • creating a clean scene containing not$$anonymous$$ng but the cutscene player to see if other objects/scripts don't cause t$$anonymous$$s performance loss

  • turning the VSync off - not sure if t$$anonymous$$s is even supposed to change anyt$$anonymous$$ng about the cutscene performance

Many thanks!

Edit 1:

Here's the CutscenePlayer script:

 using UnityEngine;
 using UnityEngine.UI;
 
 public class CutscenePlayer : MonoBehaviour
 {
     public bool EnableLogging = true;
     public MovieTexture Cutscene;
     private RawImage T$$anonymous$$sRawImage;
 
     void Start()
     {
         T$$anonymous$$sRawImage = GetComponent<RawImage>();
         T$$anonymous$$sRawImage.enabled = true;
         T$$anonymous$$sRawImage.texture = Cutscene;
         Cutscene.Play();
     }
 }

Also, w$$anonymous$$le checking FPS with t$$anonymous$$s script I've noticed the FPS is around 30-60, 30 in the time positions where it stutters most.

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 Nerevar · Sep 23, 2015 at 07:27 AM 0
Share

Can we see the script CutscenePlayer.cs ? you may want to add a script to check the fps in your scene (wiki), to know if the scene is lagging or if it is a problem with the video. Have you tried other ogv videos and/or other formats?

avatar image Arx Nerevar · Sep 23, 2015 at 08:05 AM 0
Share

I added the CutscenePlayer script to the question (it is now awaiting moderation again as I understand it). Also, trying the FPS script you suggested, I see the FPS is around 30 in time positions where the cutscene stutters the most, otherwise it's 50-60. As for other formats - frankly, as I'm not very knowledgeable in this area, I had problems importing any other formats into Unity, but if you have any specific formats in mind, I'd gladly take a look if I can manage to export it from AfterEffects and import to Unity in that way.

avatar image Tomer-Barkan · Jan 04, 2017 at 07:26 PM 0
Share

Having similar issues. It feels like MovieTexture is meant to display movies within a game object, like billboards in a 3D scene, and suffers from needless performance issues when playing full screen. It probably goes through shading and all.

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

What are the best codecs and formats for importing video? 0 Answers

Intro Video 0 Answers

problem with movie texture 1 Answer

Is it possible to have scalable or non-full screen video animations on mobile devices using Unity? 0 Answers

MovieTexture will not play in Build - Black Screen 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