You are not logged in.

#1 2017-04-12 22:38:45

Thisguy_
Member
Registered: 2012-12-03
Posts: 41

[Solved] VLC Volume resets on track change

I've been having a problem for a while now wherein no matter what the situation with VLC, if I advance tracks, the volume resets itself to 100%.

Once it got on my nerves enough, I went to IRC with the VLC boys and ended up guided to their bug tracker, and left this ticket: https://trac.videolan.org/vlc/ticket/18040

The only response it garnered, as you can see, claims that track volume is set by the Pulse daemon, but I don't see why this would be the case. VLC has its own volume control, and I expect when I set it to, say, 65%, it will actually stay there. But it doesn't. I found the flat-volumes setting in the pulse daemon.conf, but it wasn't the source of the issue.

Previously, VLC's behavior was to keep whatever volume you set it to. I don't understand, after fiddling around in pulse's configs and VLC's fancy settings, how to get it to do so again. What's going on here?

EDIT: As an aside and an additional tidbit, VLC's volume controllers are changing the pulse sink's volume settings, they just end up changing back whenever the track changes.

Last edited by Thisguy_ (2017-04-14 06:33:39)

Offline

#2 2017-04-12 23:37:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: [Solved] VLC Volume resets on track change

Are you on KDE and are you using the vlc phonon backend? There's a chance that there's some conflict there because phonon use the same config file and writes a new volume for each connecting stream. Easiest workaround would be switching that to the gstreamer backend which has some additional features anyway. FWIW I don't have the behavior you describe, I can set it to whatever and it will stay there on trackchange.

Offline

#3 2017-04-12 23:54:50

Thisguy_
Member
Registered: 2012-12-03
Posts: 41

Re: [Solved] VLC Volume resets on track change

I'm not running KDE and I'm not on the phonon backend, so I assume I'm on gstreamer. I've tried this with vlc-git from the aur and the standard vlc package from testing, happens with both. I use Openbox, so I might just be missing something VLC assumes is there.

Offline

#4 2017-04-13 00:04:55

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] VLC Volume resets on track change

don't know how things would go if you enabled flat-volume (IMO it's insane), so if, and only if, you have flat-volume disabled, you may want to try capture the output of this:

pacmd list-sink-inputs

right before and after the issue occurs.

Offline

#5 2017-04-13 00:38:18

Thisguy_
Member
Registered: 2012-12-03
Posts: 41

Re: [Solved] VLC Volume resets on track change

Here's the 'before:' https://pastebin.com/1Gkv9pee

And the 'after:' https://pastebin.com/Kc2YsL7M

I notice it shows the volume spiking and the index moves from 11 to 12, which I assume means it respawned itself for some reason? But the session never changed, if that means anything.

Offline

#6 2017-04-13 00:50:05

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] VLC Volume resets on track change

ugh, no pastebin.com please...either use the code tags here, or sane pastebins like ptpb.pw(/f) or ix.io (i can't access gist either, sorry)

Yeah I don't think the index should change because that might mean pulseaudio is treating it as a new stream so it will have new stream volume (which is normal to be 100% I suppose). But I can't really tell now coz I can't see the full capture and I might need to do some testing myself...

Last edited by tom.ty89 (2017-04-13 00:50:45)

Offline

#7 2017-04-13 05:59:31

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] VLC Volume resets on track change

Okay some update here. I tested vlc a bit with archiso (so no X or whatsoever). I can see a few relevant things for VLC:
1. sink input index bump when there is a track (playlist item) change
2. sink input volume remains steady as the set value (in the test 32768, i.e. 50%), expected because of 3, among track/index change
3. module-stream-restore.id remains steady among track/index change
4. module-stream-restore.id is set to "sink-input-by-media-role:video"

While in comparision, these are the difference in behaviour with mpv:
1. no index bump on track change
2. module-stream-restore.id is set to "sink-input-by-application-name:mpv Media Player"

Would be great if you can repaste your captures in better form. Here are mine:
https://ptpb.pw/JV8S
https://ptpb.pw/1Pqy

Captures of mpv for reference:
https://ptpb.pw/RpLd
https://ptpb.pw/IE2J

Last edited by tom.ty89 (2017-04-13 06:13:47)

Offline

#8 2017-04-13 07:21:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: [Solved] VLC Volume resets on track change

You have teamspeak running at the same time, this might be a side effect of a cork event. Is

load-module module-role-cork

enabled in your /etc/pulse/default.pa ? You also seem to be loading your audio card manually as opposed to let automatic detection take care of it, but this shouldn't have a bearing on this behaviour. But as tom.ty notices you lack a stream-restore-id, have you disabled volume restore for some reason? In that case this behaviour would make sense, can you paste your /etc/pulse/default.pa and /etc/pulse/daemon.conf and/or ~/.config/pulse/default.pa if present? You seem to deviate from a lot of the default settings for pulseaudio.

Offline

#9 2017-04-14 06:33:19

Thisguy_
Member
Registered: 2012-12-03
Posts: 41

Re: [Solved] VLC Volume resets on track change

This turned out to be a result of ancient, decrepit, and rotting configuration files from long-gone Pulse versions. I have updated my config files to the ones packaged with the latest Pulseaudio and the problem is solved.

I should have thought of that! Whoops.

Offline

Board footer

Powered by FluxBB