- Summary
- Install
- Basic Usage
- Keyboard Shortcuts
- Config
- Scripts
- Start Video At Double Speed
- Resuming Playback At Last Position
- Auto-Delete Video File After Played to Completion
- Screenshot Video
Excellent open source video player with Lua scripting capabilities to customize its behaviours.
Based on MPlayer but more features like being able to skip to a specific time in the video by clicking the time tracker bar at the bottom.
On macOS use Homebrew:
brew install mpvJust give a file argument to the mpv command:
mpv "$file"| Key | Description |
|---|---|
] |
Increase Speed |
[ |
Decrease Speed |
Backspace |
Reset Speed to 1 |
Space |
Pause / Unpause |
s |
Take a screenshot |
Option-s |
Rapid continual screenshots |
You can find my MPV config here - it is symlinked along with my other configs by make link in that project:
HariSekhon/DevOps-Bash-tools - configs/.config/mpv/mpv.conf
You can find my MPV scripts here:
HariSekhon/DevOps-Bash-tools - configs/.config/mpv/scripts/
This is much better than using a hotkey to speed up QuickTime to play a video because MPV keeps the same playback speed so when you pause and unpause (even if you set the speed with a hotkey), whereas QuickTime unpauses back to slow 1x speed.
Yes I really watch most videos at double speed because most humans are simply far too slow.
mpv --speed=2 "$file"You can either append the --save-position-on-quit command line switch:
mpv --save-position-on-quit "$file"or for more permanence, put it in the MPV config file as shown above.
HariSekhon/DevOps-Bash-tools - configs/.config/mpv/mpv.conf
For more advanced conditional resume, I now instead use this Lua code so I only resume for videos of a certain length and only if I am a certain amount of time into them:
HariSekhon/DevOps-Bash-tools - configs/.config/mpv/scripts/resume-conditions.lua
I use the following code to auto-delete a video if it is played to completion for videos I only ever intend to watch once:
HariSekhon/DevOps-Bash-tools - configs/.config/mpv/scripts/resume-conditions.lua
It is only activated if you set the environment variable:
MPV_DELETE_ON_EOF=1 mpv "$file"
In DevOps-Bash-tools .bash.d/ I set the alias mpvd alias to make this shorter:
alias mpvd='MPV_DELETE_ON_EOF=1 mpv --speed 2In mpv hitting the s key takes a screenshot.
But if you type Option-s on macOS then it takes continual screenshots until you stop it.
Warning: this can run up GB of space in thousands of screenshots quite quickly though