I'm trying to work around this behavior in Ubuntu 23.04. When running multiple instances of VLC each playing different content, the volume level (including mute state) resets to the last set volume/mute state from any running instance of VLC when ever the media advances to the next item in the playlist, or restarts if on a loop, (or newly started instances of VLC but this is okay).
I did have a work around that worked the way I wanted, but it relied on PulseAudio. Now that Ubuntu has changed to PipeWire it no longer works and I haven't been able to find any other workaround. I'm wondering if someone might be able to help or point me in the right direction.
Steps to Replicate
- Start VLC playing any content (Set to loop continuous)
- Start a second instance of VLC playing any content (Set to loop continuous)
- Change the volume of (or mute) the second instance
- Advance the first instance by clicking next track
- Observe the volume of the first instance is now the same as the second instance
Each instance of VLC should be able to control its own volume, advancing to the next item in the playlist or loop should maintain the volume set within this instance. Changing the volume in one instance should have no impact on the current or future state of the other instances.
PulseAudio Work Around
I found that PulseAudio was using the Application Name as the key to save and restore the volume settings. There was also an environment variable that by setting overwrites the Application Name used by PulseAudio, I did this before starting each instance using a unique value for each. This prevented each instance from affecting the others.
PULSE_PROP=[application.name=vlc_726263]
Help
I'm wondering if there is some configuration option I haven't been able to find yet or some other way to force VLC to isolate each instance or to ignore the system restore value, or some way to overwrite an instance of VLC to have a different namespace (App Name) than the others, or some configuration option for PipeWire that forces the behavior.
I did find a similar thread, however there was no solution. Thanks in advance for any assistance you might be able to give me.
Versions
VLC media player 3.0.18 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC version 3.0.18 Vetinari (3.0.13-8-g41878ff4f2)
Compiled by Ubuntu buildd for lunar on Ubuntu amd64 buildd (Jan 4 2023 16:50:08)
Compiler: gcc version 12.2.0 (Ubuntu 12.2.0-12ubuntu1)
Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar