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 Jonathan-E · Apr 01, 2016 at 08:30 AM · c#androidmobilevideoplayback

Android MP4 Video Playback

Hello world! I'm having problems playing a video on a scene I'm doing. The scene only plays the video and then jump to another scene. All I need is the scene to play a video in an android device, still, I don't know what I'm doing wrong, but there's no video the camera shows the skybox and jumps to the next scene instantly. (The video is in the assets folder, named "Intro.mp4" and the script is attached to an empty).

 using UnityEngine;
 using System.Collections;
 using UnityEngine.SceneManagement;
 
 public class VideoController : MonoBehaviour {
     void Start () {
         StartCoroutine(PlayMovie());
     }
 
     private IEnumerator PlayMovie() {
         Handheld.PlayFullScreenMovie("Intro.mp4", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);
         yield return new WaitForEndOfFrame();
         yield return new WaitForEndOfFrame();
         SceneManager.LoadScene("MainGUI");
     }
 }
 
Comment
Add comment · Show 1
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 MatthieuP · Jun 16, 2016 at 08:22 AM 0
Share

I am having the same problem. Seems to happen on Adreno devices only.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by HarshadK · Jun 16, 2016 at 08:43 AM

From the Handheld.PlayFullScreenMovie documentation page:

You will have to create a folder named StreamingAssets inside your Unity project (inside your Assets folder). Store your movies inside that folder. Unity will automatically copy contents of that folder into the application bundle.

So you need to store the video in a folder named StreamingAssets.

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 MatthieuP · Jun 16, 2016 at 08:50 AM 0
Share

The video is already in Strea$$anonymous$$gAssets for me. I have just tried to one more line " yield return new WaitForEndOfFrame();" and it doesn't crash the first time on Adreno devices. Then it crashes again with an OpenGL error.

avatar image
0

Answer by tonyarabish · Oct 25, 2018 at 06:29 AM

Convert any other unsupported WMV, MKV, FLV, MOV, MP4, WTV, etc to any Android product supported video formats.https://www.avdshare.com/convert-avi-to-android-supported-video-formats

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

6 People are following this question.

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

Related Questions

How to display a video behind gui on mobile 2 Answers

Handheld.PlayFullScreenMovie memory leak? 1 Answer

onControllerHide() crash 0 Answers

Programmatically changing brightness setting on Android using c# 0 Answers

Unity3d Get Cube Pressed On Mobile 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