BRiAN1
November 12, 2023, 4:42am
1
Just installed MPV .
and i want a shortcut key/hotkey for automatically pausing the playing media and minimizing it to the shortcut.
In windows KMPLAYER had it by defauly
and previously VLC had that feature “BOSS KEY”
but cant find that in MPV
anyone can help in that ?
doppler
November 12, 2023, 10:36am
2
You cold copy the /usr/share/doc/mpv/input.conf
file to your ~/.config/mpv
folder and edit it to your liking.
1 Like
Also, you might want to edit your mpv.conf
file like the screenshot below. But you decide how you want things.
By default, screenshots are set to ‘S’.
Here’s the text in case you’d like to copy and paste it:
input.conf
WHEEL_UP add volume 5
WHEEL_DOWN add volume -5
WHEEL_LEFT ignore
WHEEL_RIGHT ignore
shift+s screenshot each-frame
ctrl+RIGHT frame-step
ctrl+LEFT frame-back-step
ctrl+UP playlist-shuffle
ctrl+DOWN playlist-unshuffle
mpv.conf
volume-max=150
--loop-playlist=inf
--screenshot-template=%F-%03n
--volume=25
--osd-font-size=20
screenshot-directory=~/Downloads/New folder/
All of this and a lot more can be found at https://mpv.io/manual/stable/
1 Like
BRiAN1
November 22, 2023, 10:53am
4
can you say for
automatically pausing and minimizing in the taskbar ? through ESC
The settings I pasted are the only settings I need, so I don’t know. You’ll have to scan the manual for that.
Also, I run MPV through Celluloid - it’s nicer-looking and provides some GUI settings, particularly a setting that allows me to link to and use my MPV settings.
But there are other MPV-based apps you can try as well.
Here is a script to pause mpv when it’s minimized:
-- This script pauses playback when minimizing the window, and resumes playback
-- if it's brought back again. If the player was already paused when minimizing,
-- then try not to mess with the pause state.
local did_minimize = false
mp.observe_property("window-minimized", "bool", function(_, value)
local pause = mp.get_property_native("pause")
if value == true then
if pause == false then
mp.set_property_native("pause", true)
did_minimize = true
end
elseif value == false then
if did_minimize and (pause == true) then
mp.set_property_native("pause", false)
end
did_minimize = false
end
end)