mpv lua script implements Picture-in-Picture, only for Windows System,it is implemented based on luajit call win32api.
- Note: mpv builds with luajit is required, shinchiro/mpv-winbuild-cmake and zhongfly/mpv-winbuild is recommended.
- put
pip.lua
into~~/scripts
, putpip.conf
into~~/scripts-opts
, like this:.../mpv/ │ ... └─ /portable_config/ ├─ /scripts/ │ pip.lua ├─ /script-opts/ │ pip.conf
You can customize the keybinding, window size and window alignment in pip.conf
.
If you use the --no-input-default-bindings option, you need to customize your keybinding in input.conf
:
KEY script-binding pip/toggle
-- get whether the Picture-in-Picture is on
local pip_is_on = mp.get_property_bool('user-data/pip/on', false)
-- turn on, turn off and toggle opertions
mp.commandv('script-message-to', 'pip', 'on')
mp.commandv('script-message-to', 'pip', 'off')
mp.commandv('script-message-to', 'pip', 'toggle')