Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 iclyde1179 · Sep 14, 2017 at 07:29 PM · mp4

Question about looping mp4s

I am creating an animated children's book. I am making mp4s that loop in order to have richly animated backgrounds. If I have a 30 second mp4 is it possible to have the mp4 play out to 20 seconds and then loop from 10 seconds to 20 seconds? This is in order to have an intro to the animation and then be able to loop. Once the user hits next the animation would play out to 30 seconds in order to have an outro. Possible?

Another solution would be to just have three 10 seconds mp4s and once the first one is over it loops the middle one. I'm just worried that you might be able to see a break between the two mp4s.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by TheSOULDev · Sep 14, 2017 at 08:53 PM

I'm assuming you're using a movie texture? In that case you should separate your intro into one file, and once it finished play the looping animation of the other one. In the Unity documentation there is sadly no funciton that manipulates the current time of the movie, so you can't just define a starting and ending time for a loop and make it loop like that. If you want greater control, perhaps you should convert your movie into an animation - animations have frames and you have much greater control with them than with movie textures.

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

Answer by iclyde1179 · Sep 14, 2017 at 09:06 PM

When converting it to an animation does that create individual images? And in that case wouldn't that be hundreds if not thousands of images for a 30fps mp4? Sorry newbie here. I also thought that maybe I could use the video player instead of using the mp4 as a texture.

Comment
Add comment · Show 1 · 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 TheSOULDev · Sep 14, 2017 at 10:56 PM 0
Share

Yes. 30 frames * 30 seconds is 900 frames. However, with that, you can directly control the animation play from specific frames. Without it, you'll have to cut your video and hope loading it won't cause a lag spike (it shouldn't, but still). Thats why, when making some moving behaviour we don't use pure animations, but a mix of animations, position transformations etc. If you're asking if it'll be performance intensive, I'd say not. Shouldn't be hard to manage too. If the video you have is high quality, you can't turn it into a bunch of sprite sheets, so you should use the video editing approach.

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

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

Related Questions

Windows standalone build fails to load VideoPlayer 0 Answers

Movie texture will not play on startup 0 Answers

MP4 converted from M4V crashes Unity 4 Answers

Let the user record game screen 0 Answers

Basic 4.1 version of the mp4 files as textures can be used in? 0 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