playMaker

Author Topic: Movie audio not playing  (Read 3522 times)

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • View Profile
    • Online Playmaker Courses
Movie audio not playing
« on: November 16, 2013, 09:40:50 PM »
Hi guys,

I have a movie texture with audio but I cannot seem to get the audio part to play at all.

Do I need to do anything extra besides adding a movie texture?

I have tried movie texture audio settings and adding an audio source to the gameobject but no luck.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Movie audio not playing
« Reply #1 on: November 17, 2013, 11:55:57 PM »
Hi,

 -- What platform are you publishing too? Are you sure you have the right sound codec and all?

-- Can you preview the movie in Unity? does it has sound there?

I seem to remember I had to mess with sounds indeed. Can you try triggering the audi track manually? does that work?


bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • View Profile
    • Online Playmaker Courses
Re: Movie audio not playing
« Reply #2 on: November 18, 2013, 06:30:35 AM »
I can get the audio to work if I use the Movie audio action and put an audio source on the object.

The problem is that it now plays the first 1-2 seconds of the audio over and over again(when I press play in unity3d)until i click the movie gameobject. Then it will play the audio and movie fine.

I am using the Vuforia plugin to make it and AR application. But I am just testing it in playmode at the moment.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Movie audio not playing
« Reply #3 on: November 18, 2013, 10:58:05 PM »
Hi,

 I don't think its related to PlayMaker isn't it?

bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • View Profile
    • Online Playmaker Courses
Re: Movie audio not playing
« Reply #4 on: November 19, 2013, 07:02:30 PM »
Hi Jean,

I re-created the scene so that it is not in AR and the same problem is there.
I also can only get the sound to play by adding the 'audio source' to the movie gameobject and putting the movie clip in the audio source.

I also have the 'movie audio action' working alongside the 'play movie action'.

What is the setup I should be using to play the movie? Maybe I am doing it wrong.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Movie audio not playing
« Reply #5 on: November 19, 2013, 10:33:43 PM »
Hi,

 you are on the right path: I looked up that project and indeed I did the same:

Code: [Select]
                _movieTexture = renderer.material.mainTexture as MovieTexture;
_movieTexture.loop = true;

_movieTexture.Play();
if (_movieTexture.audioClip!=null){
audio.clip = _movieTexture.audioClip;
audio.Play();
}

Bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • View Profile
    • Online Playmaker Courses
Re: Movie audio not playing
« Reply #6 on: November 20, 2013, 03:19:14 AM »
Hi Jean,

I followed your code snippet and made a custom action.

The audio now plays. There is a weird jitter or sound mix up at the start and then it plays smooth. The more I play the file while in play mode the less it shows up.

Could the audio be begining to play at one point then reset to the start? Its the only logical thing I can think of.

Thanks for all your help.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Movie audio not playing
« Reply #7 on: November 20, 2013, 09:03:38 PM »
Hi,

 Thanks for this! Much appreciated that you share back your work!

I am not sure what's happening with the sound jitter. I can't really have a proper look right now as I am travelling, but maybe the audio should be compressed differently, or indeed you could the audio itself having a top at the very beginning, did you made the video yourself?

bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • View Profile
    • Online Playmaker Courses
Re: Movie audio not playing
« Reply #8 on: November 30, 2013, 12:19:38 AM »
Thanks Jean,

Sorry for late reply. I'll share any of the scripts that I make.
I did make the video in blender. I have to adjust the lighting though.

I am currently trying to get it to display in AR mode.

I am also trying to get the animation to show seperate in AR mode.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith