You are not logged in.

#1 2013-05-14 07:58:52

axelectrik
Member
Registered: 2012-01-25
Posts: 126

[Pulseaudio] Set volume per application at start

Hey, I use mplayer as a wallpaper playing movies, anime, music vids, etc, but I want to start it muted, so then if I wanna watch I just have to unmute it.
Pulseaudio can control volume per application but I can't seem to find a way to define the volume level by cmd, except for "Master"

Offline

#2 2013-05-14 20:48:08

Vorbis
Member
Registered: 2013-05-05
Posts: 3

Re: [Pulseaudio] Set volume per application at start

You can use pactl command

 pactl set-sink-input-volume <number of sink input> <volume>

Offline

#3 2013-05-14 21:39:23

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: [Pulseaudio] Set volume per application at start

If you only want to have this happen with mplayer, you can use the volume config parameter in ~/.mplayer/config.


since 2009

Offline

#4 2013-05-15 21:07:16

axelectrik
Member
Registered: 2012-01-25
Posts: 126

Re: [Pulseaudio] Set volume per application at start

Thank you both.
About the first one looks interesting but I really don't understand too much the use of pactl, I mean how can I get the sink number?

About mplayer is fine, actaully I do start it with "-volume 0" parameter, the problem about this is that it applies to every movie so if I watch a video with sound on, the next one will start again with sound off and I have to be "unmuting" for every video.

Offline

#5 2013-05-17 20:23:28

Vorbis
Member
Registered: 2013-05-05
Posts: 3

Re: [Pulseaudio] Set volume per application at start

Add volume=100 to ~/.mplayer/config
-volume in command line override config option.
If non volume is set pulseaudio will set last mplayer volume

Offline

#6 2013-05-17 21:11:28

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: [Pulseaudio] Set volume per application at start

Vorbis wrote:

Add volume=100 to ~/.mplayer/config
.....
If non volume is set pulseaudio will set last mplayer volume

thansk for the tip!

Last edited by sl1pkn07 (2013-05-17 21:11:55)

Offline

#7 2013-05-25 18:25:28

axelectrik
Member
Registered: 2012-01-25
Posts: 126

Re: [Pulseaudio] Set volume per application at start

Thanks! Unfortunately it didn't work out for me
the config file does not override the command line, the sound starts off, but then if I set it on and change the volume level it remains muted by the command line option :S

Offline

Board footer

Powered by FluxBB