Depends what operating system you're using. I run Linux (Mint).
And I use mpv a lot... it’s probably the application I’m the most stupidly fond of, as a user I find it amazingly good.
I use it mostly through the Nemo file explorer (through its custom actions) as my video/music music player. But I also use it to listen to podcasts, using newsboat as my feed aggregator and yt-dlp to actually download/stream whatever multimedia content I want mpv to play. And, well, for everything else that contains video and/or audio.
You can launch mpv with --no-video and no window will be displayed, say if you want to play only the audio from a video file. You can also launch it using the save-position-on-quit. I've mine set by default to yes (in mpv.conf), so it remembers position in whatever I play next time I play it, and on specific scripts/occasions it is set to ‘no’ (see example below).
in my ~/.config.mpv/mpv.conf I have set volume=65 which is the level I want it to start with, while defining custom keyboard shortcuts and mouse scrolling buttons to change volume in the ~/.config.mpv/input.conf. I've never tried it but you might be able to add a volume parameter each time you launch mpv (maybe store the actual value in a hidden text file somewhere for it to load from, using a script?)
Your 3, I'm not sure to understand what you want to do. But in order to keep mpv open after it’s done playing whatever, add this to your mpv.conf: keep-open=yes
As an example, here is one of the 'Nemo Actions' I use to make mpv randomly play audio (even from video) from the folder I right-click on, without mpv opening any window. If you don’t know them already, custom Nemo Actions must be saved in ~/.local/share/nemo/some-file-name.nemo_action :
[Nemo Action]
Active=true
Name=MPV shuffle NOVID
Comment=Play at random the content of selected folder into mpv AUDIO only, no position save
Exec=sh -c "mpv --no-video --save-position-on-quit=no --shuffle %F"
Icon-Name=multimedia-video-player
Selection=any
Extensions=any
The 'exec' part of that action uses standards mpv parameters next to Nemo's own stuff.
I also use the socat utility that lets me connect a series of tiny (they're one-liners) custom shell scripts directly to mpv, using system-wide keyboard shortcuts. I'm really not an expert about any of that, I just learned to use it to get what I wanted out of it which is a … universal mpv remote-control.
I don't mean just the Play/Pause buttons but almost any of the controls I need with mpv.
For example, I started using it to let me skip forward/backward a couple seconds and resume playback while I'm listening to audio notes, as I recently started using a pocket voice recorder. Which makes mpv great when I’m transcribing said notes. Not as good but quite close to one of those dedicated old-school foot pedal people into that kind of tech used to use in the 80s and 90s… Yep, don't tell anyone but I’m that old that I remember them ;)
Edit: I hope any of that can help you with your script.