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 mdespault · Feb 18, 2016 at 09:09 AM · iosstandalonemovietexturestreamingassetsmp4

working with mp4 files when supporting both Standalone and iOS builds

Basically I'm asking the same thing as this user posted: http://answers.unity3d.com/questions/1096180/how-to-use-video-files-twice-once-as-resources-and.html#comment-1143145

I have a project which supports both Standalone PC/OSX builds as well as iOS builds. I'm using a third-party package to support rendering a movie to a texture for iOS, which has the requirement that the assets are in the StreamingAssets folder. For the Standalone build, I want to simply use a MovieTexture format, however for this to work I keep my MP4 file in the Resources folder and use Resources.Load.

I tried having a copy of my mp4 files in both places, but iOS won't compile as it's complaining about not supporting MovieTextures, despite the fact that I'm not referencing the files anywhere, they just sit in the Resources folder. Even if that did work, requiring two copies of each mp4 movie seems like a poor workaround. I've tried using the WWW class, but wasn't having any luck with the MovieTexture format, it just wouldn't load the video.

What's everyone else doing to support video's across Standalone and mobile (iOS in my case)?

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

1 Reply

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

Answer by mdespault · Feb 23, 2016 at 02:29 PM

It seems like the best way to handle this particular situation is to use AssetBundles.

I take the version of the mp4 file that Unity converts to a "MovieTexture" on import for PC/OSX builds, and the regular unconverted mp4 file (non MovieTexture, inside StreamingAssets folder). I create an AssetBundle containing both versions of the movie, and place that bundle in the StreamingAssets folder. This way, I can load the proper version of the mp4 file and circumvent the compile errors you normaly get for having a MovieTexture file anywhere when building for iOS.

If I wanted to keep the movie files on a server somewhere, I could simply use a WWW request to stream in the appropriate AssetBundle, eliminating the need to have two different versions of the same movie files.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Movie texture not playing in standalone build 1 Answer

HandHeld video compression setting doesn't work in editor? 1 Answer

How to dynamically change a movie texture from Streaming Assets for a windows build 0 Answers

Accessing external asset bundles from local iOS files. 1 Answer

iOS Streaming Assets inaccessible 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