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
-1
Question by aiibee · Nov 18, 2012 at 01:31 AM · audiovideosync

Video is not playing Audio

I have a Video with sound. I have attached it on a Cube to play before the Game starts.

however the audio is not playing only if i save it separately and drag it on to the cube. Than it is still out of sync.

here is the Code

 function Start () {  
 renderer.material.mainTexture.Play();
 }
 
 function Update(){
 if(!renderer.material.mainTexture.isPlaying)
 Application.LoadLevel("Scene_01_Gmaeplay");
 }
 

Help needed Please

Also, what format will the Video need to be saved out. ex: mp4 or mov or ????

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 liszto · Nov 19, 2012 at 10:51 PM 0
Share

which above ? just validate the good answer;)

4 Replies

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

Answer by aiibee · Nov 19, 2012 at 08:56 PM

Ok, I have figured out this problem that everyone is having.

its really simple.

render out your video with sound make cube or plane drag the movie onto the object with a new material assigned to it. than grab your audio and also drag it onto the object. In your inspector find "Audio Source" and just change the "Pan Level" to "0" and increase your priority Levels. after you do all this the audio will match up the Video perfectly.

If you have any other question, please feel free to leave a Comment.

 function Start () {  
 renderer.material.mainTexture.Play();
 }
 
 function Update(){
 if(!renderer.material.mainTexture.isPlaying)
 Application.LoadLevel(1);
 }

Code I used

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 Graham-Dunnett · Nov 18, 2012 at 10:58 AM

I think the following documentation page tells you pretty much everything you'll need to know.

http://docs.unity3d.com/Documentation/Components/class-MovieTexture.html

Comment
Add comment · Show 4 · 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 aiibee · Nov 19, 2012 at 07:49 PM 0
Share

i tried all of this and it is still not playing the audio with the video. its always like 0.5 off with the Video

avatar image aiibee · Nov 19, 2012 at 10:38 PM 0
Share

it is working now, above is the solution.

avatar image liszto · Nov 19, 2012 at 10:52 PM 0
Share

Validate good solution just to help others ppl ;)

avatar image aiibee · Nov 19, 2012 at 10:58 PM 0
Share

thanks, sorry i just started using this like 2 weeks ago. thank you for your help :)

avatar image
0

Answer by liszto · Nov 18, 2012 at 11:05 AM

As Graham said read documentation before ask a question ^^

You can use my script to do that :

http://pastebin.com/rEAZ2LFq

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 Travis1125 · Oct 26, 2015 at 12:02 PM

You can add [RequireComponent(typeof(AudioSource))]

before your C sharp class and it'll tack on the audio with the video

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

12 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

Related Questions

AVPro QuickTime Plugin A-V Not in Sync Problem 2 Answers

How do I sync up the video and audio from my movie? 1 Answer

Syncing separate video and audio 0 Answers

How to get perfect sync between audio and video? 0 Answers

Play VideoTexture's audio only 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