GoTime Video (Linux version)
unlistedby Willy Pregliasco
Annotate videos with responsive md links to timestamps.
GoTime Video — Obsidian Plugin
Open video files at specific timestamps directly from your Obsidian notes using mpv.
Works on Linux, Windows, and macOS.
Features
- Click
gotime://links pointing to video files to open them in mpv - Portable paths: Supports
gotime://~/relative/pathlinks that resolve via evidence profile — same notes work across machines - Supports timestamp fragments (
#t=90.00) to seek to a specific time - Supports rectangle coordinates (
&rect=x,y,w,h) for region selection - Wall-clock overlay: When the linked video has an Evidence note tagged
evidence+lockwith async_hora1property, the plugin auto-injects--h1so mpv shows a running clock - Per-clip overlay: For clipped files (notes with
clip_*properties, taggedcliplock), the plugin auto-injects--clipsso mpv shows a per-clipID.Nlabel plus each clip's own running wall-clock - If the video is already open, seeks instead of opening a new window
- Automatically detects video files:
.mp4,.mov,.mkv,.avi,.webm,.flv,.wmv,.m4v - Opens at 0:00 if no timestamp is specified
- Configurable path to the
gotimeexecutable
Prerequisites
- mpv media player installed
- mpv-gotime CLI tool installed
- Non-Flatpak Obsidian (Linux only) — Flatpak sandboxing prevents launching GUI applications. Use the AppImage or native package instead.
Installation
-
Clone this repository into your vault's plugin folder:
cd /path/to/vault/.obsidian/plugins git clone https://github.com/wpregliasco/obsidian-gotime-plugin.git gotime-video -
In Obsidian: Settings → Community Plugins → Enable "GoTime Video"
Alternative: symlink
git clone https://github.com/wpregliasco/obsidian-gotime-plugin.git
ln -s "$(pwd)/obsidian-gotime-plugin" /path/to/vault/.obsidian/plugins/gotime-video
Usage
Create timestamp links in your notes:
# Absolute paths (work on the machine where they were created)
[Video @ 00:01:30](gotime:///home/user/Videos/video.mp4#t=90.00)
[My Clip](gotime:///home/user/Videos/clip.mov)
# Portable paths (work across machines with evidence profile configured)
[Video @ 00:01:30](gotime://~/video.mp4#t=90.00)
[My Clip @ 00:05:00](gotime://~/subdir/clip.mov#t=300.00&rect=100,200,50,50)
Click the link in reading mode to open the video in mpv.
Opening videos from the terminal
# By file path
gotime /path/to/video.mp4 00:01:30
# By Evidence ID (requires mpvg shell function and fname utility)
mpvg G296
The mpvg helper resolves an Evidence ID to a file path via fname and opens it with gotime. Add this to your ~/.bashrc:
mpvg() { gotime "$(fname "$1")"; }
Generating links from mpv
The mpv-gotime CLI provides keyboard shortcuts while watching a video:
| Shortcut | Clipboard format |
|---|---|
Ctrl+C | [HH:MM:SS](gotime://~/video.mp4#t=90.00) |
Ctrl+T | HH:MM:SS (plain text) |
Ctrl+F | [VideoName](gotime://~/video.mp4) |
Ctrl+I | [G296](gotime://~/video.mp4) — Evidence ID link |
Ctrl+L | [G296 @ HH:MM:SS](gotime://~/video.mp4#t=90.00) — full with ID |
Ctrl+H | HH:MM:SS.sss (plain text wall-clock; only when --h1 is active) |
Ctrl+S | Screenshot to clipboard (captures current frame with zoom, pan, rectangle) |
Ctrl+Shift+C/F/I/L | Shareable https://gotime-redirect.pages.dev/... links (WhatsApp, Google Docs, Slack) |
Ctrl+Shift+S | Screenshot to clipboard (same as Ctrl+S) |
When an evidence profile is configured, links use portable gotime://~/ format. Otherwise, absolute paths are used.
Paste the copied link into your Obsidian note.
Rectangle selection
Draw a rectangle overlay on the video to mark a region of interest. Coordinates are included in copied links (&rect=x,y,w,h).
- Pause the video (
Space) - Press
bto activate the rectangle (defaults to 1/3 of video size, centered) - While active, arrow keys are temporarily rebound (hold for continuous movement):
| Key | Action |
|---|---|
← / → / ↑ / ↓ | Move rectangle |
Shift+← / Shift+→ | Shrink / grow width |
Shift+↑ / Shift+↓ | Shrink / grow height |
+ | Expand from center (preserves aspect ratio) |
- | Contract from center (preserves aspect ratio) |
b | Deactivate rectangle (restores arrow keys) |
- Press any copy key (
Ctrl+C/T/F/I/L) — link will include rectangle coordinates - The rectangle auto-deactivates on unpause or frame change (arrow keys restored)
Wall-clock overlay (auto --h1)
If the video you click on has an Evidence note in the vault that satisfies all of the following, the plugin automatically appends --h1 <sync_hora1> to the gotime invocation:
- The note's basename equals the video's Evidence ID (resolved via the
fidCLI from evidence-utils). - The note's frontmatter has both tags
evidenceandlock(matchesMDReader.istagsemantics:tagsmay be a string or a list). - The note's frontmatter contains a
sync_hora1property inHH:MM:SS[.sss]format.
When all three conditions are met, mpv renders a running clock in the bottom-right corner that advances as sync_hora1 + playback time. While the clock is on screen, Ctrl+H copies the current wall-clock time as plain text.
Clipped files (per-clip overlay)
Some evidence files are cut into several clips (takes), each with its own wall-clock. These notes carry clip_<n>_in/clip_<n>_out (and, once synced, clip_<n>_hora1) and are tagged cliplock instead of lock.
For such files the plugin injects --clips instead of --h1. mpv then shows, while playback is inside each clip's media range:
- a top-left
ID.Nlabel for every clip (e.g.G045.2), and - a bottom-right running wall-clock for clips that have a
clip_<n>_hora1(i.e. that were synced).
Outside every clip range, no overlay is shown. The --clips string is built automatically from the note's frontmatter; see the mpv-gotime README for the CLI format.
Notes:
- The font is proportional to the video height (with a minimum size for low-res footage), so it stays readable across resolutions.
- The clock and the rectangle filter (
@rect) are independent and can be used together. - If
fidis not on the plugin'sPATH, lookup falls back to matching the video's filename stem against<stem>.mdin the vault. - The plugin keeps emitting helpful logs in the developer console (
Ctrl+Shift+I):GoTime click handler href: ...,GoTime fid → ...,GoTime executing: gotime [...].
Settings
- GoTime command path: Path to the
gotimeexecutable. Default:gotime. Use a full path if it's not in your PATH. - Evidence base path: Base directory for resolving portable
gotime://~/links. Required for portable paths to work.
Setting up portable paths
Portable paths allow the same Obsidian notes to work across different machines where video files live in different root directories.
- Configure an evidence profile with
evidence-setup— gotime reads the base path fromprofiles.tomlautomatically. - Set the same base path in the plugin: Settings → GoTime Video → Evidence base path (used for resolving links inside Obsidian).
- Links using
gotime://~/relative/pathwill resolve to the configured base path.
Each machine only needs its own local path configured — the links in your notes stay the same.
Contributing
See CONTRIBUTING.md.
Related
- mpv-gotime — The CLI tool that powers this plugin
License
MIT
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.