A fork of mpv-copyTime with a few bugfixes from unmerged PRs and a couple new features.
Features:
-
Copy the current time (formatted as
HH:MM:SS.sss
) or estimated frame number to clipboard. -
Read a time from your clipboard to seek to it. Same format as above but the hours, minutes, and miliseconds are optional (e.g.
HH:MM:SS
,MM:SS
,SS
,S.s
, etc.)
Note: Seeking to an estimated frame number is not supported. Only timecodes. Copying estimated frame numbers is most useful for working with other tools (like the handbrake GUI which truncates miliseconds: frame number can be useful to differentiate keyframes). Times with miliseconds should provide adequate resolution, as it's typically frame-perfect.
This script requires mpv-clipboard be installed.
Windows users may prefer dyphire's fork as it appears to have some improvements.
Put copyPasteTime.lua
in your scripts folder, usually in:
- Windows:
"%APPDATA%\mpv\scripts"
. - Linux and Mac:
"~/.config/mpv/scripts/"
.
There are two ways to do this.
Either...
- Modify the lines at the bottom of the script by changing
nil
to your desired keybinds. e.g.
mp.add_key_binding("ctrl+c", "copyFrame", copyFrame)
mp.add_key_binding("shift+c", "copyTime", copyTime)
mp.add_key_binding("ctrl+v", "pasteTime", pasteTime)
or
- Add your preferred keybinds to your
inputs.conf
file. e.g.
ctrl+c script-message-to copyPasteTime copyTime
shift+c script-message-to copyPasteTime copyFrame
shift+v script-message-to copyPasteTime pasteTime
Note: these example keybinds may conflict with your existing keybinds or MPV's defaults.