Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: AxelG on January 02, 2020, 10:08:00 PM

Title: Videoclip Set Volume[SOLVED]
Post by: AxelG on January 02, 2020, 10:08:00 PM
Hello,

In my current project I'd like to be able to control the volume of a videoclip with a float variable.
There is no action for in Playmaker so I tried the "Set Property" action and at my surprise, there is most of the videoclip property but not the "Volume" one.
Is it on purpose or it's an oversight?

In any case does someone know how to achieve that?

Best,
Axel
Title: Re: Videoclip Set Volume
Post by: AxelG on January 06, 2020, 10:22:52 AM
Up before it goes on second page.
Anyone?
Title: Re: Videoclip Set Volume
Post by: billsclass on January 10, 2020, 08:32:24 AM
Try running it through an Audio Mixer and control levels...?
Title: Re: Videoclip Set Volume
Post by: AxelG on January 12, 2020, 12:00:31 AM
Hey there,
Thanks, already tried. Couldn't solve my problem, so I went for an other way:
Separating the audio from the video. It's quite sad that there is no other solution but it works.

Best,
Axel
Title: Re: Videoclip Set Volume
Post by: jeanfabre on January 13, 2020, 03:48:25 AM
Hi,

 I think you have to redirect the audio first to an audio source

https://docs.unity3d.com/ScriptReference/Video.VideoAudioOutputMode.html

Bye,

 Jean
Title: Re: Videoclip Set Volume
Post by: jeanfabre on January 13, 2020, 03:49:55 AM
Hi,

 you also have this: https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.SetDirectAudioVolume.html

can you use the action VideoPlayerGetCanSetDirectAudioVolume, does it says yes or no?

Bye,

 Jean
Title: Re: Videoclip Set Volume
Post by: AxelG on January 16, 2020, 01:46:42 PM
Hi Jean,

Thanks for your tips, I already tried the VideoPlayerGetCanSetDirectAudioVolume.
It says yes but the value is a boolean that I created. Maybe I'm not using it correctly.

Redirect the audio from an audio sources is what I did :)

Best,
Axel
Title: Re: Videoclip Set Volume[SOLVED]
Post by: jeanfabre on January 21, 2020, 08:10:14 AM
Hi,

 that must be it then, anyway, for all my video needs, I have to say that relying to AVPro was a great move, but it's not free.

Bye,

 Jean
Title: Re: Videoclip Set Volume[SOLVED]
Post by: AxelG on January 27, 2020, 06:22:11 PM
Hi Jean,

Thanks for the tips I'll think of it, but it's rather expensive for now.
Also, the post wasn't really solved, since I'm using the solution I came-up with from the beginning. I still can't set the volume directly to the videoplayer.
Title: Re: Videoclip Set Volume[SOLVED]
Post by: jeanfabre on February 03, 2020, 02:37:38 AM
Hi,

 I uploaded on the Ecosystem a new action VideoPlayerSetDirectAudioVolume. Can you get it and check if it works for you?

Bye,

 Jean
Title: Re: Videoclip Set Volume[SOLVED]
Post by: AxelG on February 06, 2020, 06:56:07 PM
Thank you Jean, it works!

Best,
Axel
Title: Re: Videoclip Set Volume[SOLVED]
Post by: Abelius on April 15, 2022, 02:45:15 PM
I uploaded on the Ecosystem a new action VideoPlayerSetDirectAudioVolume. Can you get it and check if it works for you?
Hello Jean, sorry for the necro, but I can't find this action anywhere. Not on the Ecosystem or GitHub.  :-\

I installed the Video Player 'full' package, and yes I get a lot of actions, but not that one.

Could you post it here, please?

Thanks!
Title: Re: Videoclip Set Volume[SOLVED]
Post by: djaydino on April 17, 2022, 10:34:50 AM
Hi.
i found the action on a backup from github.
I have attached it below, i have not tested if this is working tho.
Let me know if it works
Title: Re: Videoclip Set Volume[SOLVED]
Post by: Abelius on April 17, 2022, 08:33:30 PM
Thank you so much for taking the time finding it!  ;D

I'll try it tomorrow and get back here to report.