Would it be possible to add a configuration option to remember the volume level after mpv closes?
For example, using the VLC player as an example, if you set the volume to 75%, and then close VLC, next time you open VLC, it will still be set to 75% volume - it doesn't forget it each time it closes.
Quit with Shift+Q or write save-position-on-quit in your config file. Not sure if this will also save the current volume.
Hmm, I just checked - it saves position as well as volume but only for that _one_ file - as in, it doesn't preserve the volume between files.
VLC seems to preserve volume by default between files - there isn't a separate volume for each file.
For me, I find 100% volume at mpv always too loud (almost painfully so), whenever I open a new video the first thing I have to do is crank the volume right down with 9. It's annoying that it resets to 100% every time. However, if I change my listening environment, I might want to use a new default level - and it'd be nice to remember that between files.
(Another thing is that I find using 9/0 to change volume not as intuitive as using the scroll mouse (default in VLC) - however, that's really more a personal preference, or what I'm used to, as opposed to an actual issue...lol).
Does putting volume=75 in the config work?
(Another thing is that I find using 9/0 to change volume not as intuitive as using the scroll mouse (default in VLC)
This can be changed in the input.conf file.
How often do you change your listening environment?
Just put volume=50 into your config. Please note this is a percentage, so when you use softvol=200 a volume=50 results in half the specified softvol value.
mpv is not a GUI program. We don't have persistent settings. The only exception is the watch later feature, but it's per-file, and not global.
why don't you just reduce the system master volume?
To clarify, I'm not just saying that to be a dick, but because the results will generally be superior.
a) you won't have volume discrepancies between different apps
b) softvol is done in software which introduces rounding errors, whereas there's a good chance that the system master volume is actually done in hardware after the DAC.
If you _really_ need persistent per-stream/per-application volume controls for whatever reason, you could use PulseAudio.
Thanks everybody for their tips.
I ended up putting volume=25 in ~/.config/mpv/mpv.conf, which seems to be a good level for most videos. I can use 9/0 to tweak the volume after that. (I might look at trying to get the trackpad scrolling to adjust volume though).
To be honest, I'm still used to VLC's behaviour (single persistent volume per app), but I can probably get used to mpv's behaviour.
@haasn Hmm, interesting - I'm on OSX - I suppose you could build PulseAudio on it, but have you or anybody else had much success on it? Assuming I was able to get it to compile and install correctly, I can use this to set per-app volume?
@victorhooi Doesn't OS X provide a decent mixer that can remember the volume per application?
Anyway, I don't think this should be mpv's responsibility, but the responsibility of the audio mixer.
I guess on OSX there's no need for the audio API to handle this, since unlike on Linux, most applications follow a consistent framework which at least partially does it for them. I'm just guessing, though. mpv itself will likely not get anything like this.
Made a script for this: https://github.com/d87/mpv-persist-properties
Most helpful comment
Made a script for this: https://github.com/d87/mpv-persist-properties