This script adds Picture-in-Picture functionality to MPV media player, allowing you to watch videos in a small floating window while working with other applications. It is tested only on Windows system.
- Toggle Picture-in-Picture mode with a single keypress.
- Borderless floating window that stays on top of other applications.
- Automatically exits PiP mode when entering fullscreen.
- Ensure you have MPV Media Player installed on your system.
- Copy the
mpv-PiP.luascript into your MPV scripts directory, e.g.:C:\Users\<YourUsername>\AppData\Roaming\mpv\scripts\
- Restart MPV.
Press Alt+p to toggle Picture-in-Picture mode on/off. Then you can use the mouse to freely resize the window and adjust its position.
- Entering fullscreen while in PiP mode will automatically disable PiP and enter fullscreen normally.
- The script handles file transitions properly - PiP mode persists when loading new videos.
- Original window settings are preserved even when MPV saves state via watchlater when
save-position-on-quitis true.
- Original script by Wanakachi.