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 oroddem · Jul 08, 2014 at 03:02 PM · videomovieplayback

I can't get my .mov or .mp4 to play in unity pro

Hello, I have tried to get a video to play in unity but can't seem to get it to work! The steps i took; put a .mov in my assets folder, that didn't convert to the unity video asset and would not drag onto a material as a texture put a .mp4 in my assets folder, that did convert to the unity video asset and would drag onto a material as a texture made a script.

 public MovieTexture movTexture;

 // Use this for initialization
 void Start () {
     renderer.material.mainTexture = movTexture;
     movTexture.Play();
 }

made a plane put the script on it and dragged the texture onto the variable in the editor; What am i doing wrong, i have watch/read a few tuts and followed everything i can find.

Important points; unity version 4.5.1f3 pro (free trial), using a .mp4 file currently, using c#.

Thanks

Comment
Add comment · Show 4
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 · Jul 08, 2014 at 03:05 PM 0
Share

Are you on windows or $$anonymous$$acOS?

Because :

$$anonymous$$ovie Textures are not supported on iOS. Ins$$anonymous$$d, full-screen strea$$anonymous$$g playback is provided using Handheld.PlayFullScreen$$anonymous$$ovie.

see here

If you really need a texture there are some plugins in the asset store (not free)

avatar image robertbu · Jul 08, 2014 at 03:44 PM 0
Share

I find that playing video is fussy with respect to codex, aspect ratio and the like, both with movie textures and with other methods of playing video (Handheld.PlayFullScreen$$anonymous$$ovie() or Prime31 plugin). I recommend you start by walking through a tutorial to make sure you have everything setup correctly. If so, you can then narrow the focus to figuring out the video format that works. A quick search yielded this tutorial:

https://www.youtube.com/watch?v=LEVkNcwYCvA

avatar image oroddem · Jul 08, 2014 at 03:44 PM 0
Share

Im on $$anonymous$$ac and I'm not building for iOS

avatar image Jasonea · Oct 18, 2014 at 12:55 PM 0
Share

$$anonymous$$aybe you can try Adoreshare i$$anonymous$$ovie Video Converter, I found this on Google and don't know if it works, you can try

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Nerevar · Jul 08, 2014 at 04:03 PM

try the sample_sorenson.mov on this website, I followed the guidelines unity documentation provides and everything worked fine : )

1) make sure movie is imported correctly

2) create a plane (oriented toward camera, add some light in the scene)

3) attach the code you have (it works) to the plane

4) drag and drop the movie on your plane

5) reference the movie texture from inspector (assign it to your movie)

6) hit play

it should work :p

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 DVFrance · Jun 10, 2015 at 09:08 PM 0
Share

Tks Nerevar it's working for me, I now know that it was a format pb. But I don't know how to export a video with the good parameters. I have after effect and try H264 - mp4, $$anonymous$$ov / mp4 too and I still can't read the video in the editor ?

avatar image
1

Answer by Wolfram · Sep 12, 2015 at 12:10 PM

Unity seems to have trouble with certain video files or file formats. One way is to use ffmpeg2theora to manually convert your videos into the format that Unity uses internally for MovieTextures (=.ogv).

One of the advantages: you can play them directly, without the need to import them in Unity or have them processed by Unity.

See here: http://answers.unity3d.com/questions/916921/video-intro-problem-post-unity-5.html

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 Johnhans93 · Aug 23, 2015 at 05:12 AM

Have you tried attaching another object like a cube?

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Movie playback on Playstation Mobile? 0 Answers

Playing from a specific point using Handheld.PlayFullScreenMovie 0 Answers

Android video playback 2 Answers

Using VideoPlayer to stream a video from a website 3 Answers

How can I download and play a movie not using the WWW class? 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