unflick

v1.0.2
io.github.zhitongblog/unflick Checked 4 days ago Published 20 days ago

Control the unflick video player: play files/URLs, search transcripts, cut clips, 114 MCP tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

play

Play a video file or URL. URLs from supported streaming sites (YouTube, Bilibili, Twitch, Vimeo, etc.) are extracted via the bundled yt-dlp before playback.

ParameterTypeDescription
file *stringPath to a local video file, or HTTP(S) URL to a streaming site.
proxystringOptional proxy URL forwarded to yt-dlp for URL extraction (e.g. http://127.0.0.1:7890)
seeknumberSeek to position in seconds
speednumberPlayback speed multiplier
volumeintegerVolume level (0-100)

pause

Pause playback. Acts on the player the user is watching — when the unflick window is open, this pauses the video on screen.

resume

Resume playback after a pause. From end-of-file this rewinds to the start rather than doing nothing.

stop

Stop playback and unload the file. The resume point is saved unless the file was watched to the end.

seek

Seek to a position in seconds

ParameterTypeDescription
seconds *numberPosition in seconds

set_volume

Set volume level

ParameterTypeDescription
level *integerVolume level (0-100)

set_speed

Get or set the playback speed of the window the user is watching. Call with no arguments to read the current rate. Pitch is corrected by default, so speech stays natural — see the `pitch` CLI command to turn that off.

ParameterTypeDescription
ratenumberSpeed multiplier between 0.01 and 100 (e.g. 1.5). Omit to read the current rate.
relativebooleanTreat `rate` as an offset from the current speed instead of an absolute multiplier. Clamped to the valid range.

get_status

Get current playback status including state, file, position, duration, volume, and speed. `file` is the path the user gave; `key` is what resume points and bookmarks are filed under (the same string, except for a mounted disc, where it identifies the disc rather than the drive) and `label` is a disc's volume name.

file_info

Get media file metadata (duration, resolution, codecs) without affecting current playback

ParameterTypeDescription
file *stringPath to the media file

playlist_add

Add a file to the playlist

ParameterTypeDescription
file *stringPath to the media file

playlist_remove

Remove a playlist entry by index

ParameterTypeDescription
index *integerIndex of the entry to remove

playlist_list

List all playlist entries with index, path, and current track indicator

playlist_next

Advance to and play the next track in the playlist

playlist_prev

Go back to and play the previous track in the playlist

playlist_clear

Clear all entries from the playlist

playlist_play

Play a specific playlist entry by index

ParameterTypeDescription
index *integerIndex of the playlist entry to play

load_subtitle

Load an external subtitle file

ParameterTypeDescription
file *stringPath to the subtitle file (.srt, .ass, .sub)

subtitle_list

List all subtitle tracks (embedded and external)

subtitle_select

Select a subtitle track by ID (0 to disable subtitles). Choosing a single track turns bilingual mode off.

ParameterTypeDescription
id *integerSubtitle track ID (0 to disable)

audio_list

List all audio tracks (embedded)

audio_select

Select an audio track by ID (0 to disable audio)

ParameterTypeDescription
id *integerAudio track ID (0 to disable)

generate_subtitles

Generate subtitles for a video using whisper. Mode 'local' uses bundled or supplied whisper.cpp; mode 'api' uses OpenAI. Returns the path of the generated .srt file.

ParameterTypeDescription
video *stringPath to the video file
api_keystringOpenAI API key (api mode)
modestringTranscription mode (auto-detected from arguments if omitted)
modelstringPath to whisper model (local mode; auto-detects bundled if omitted)
output_dirstringOutput directory for the .srt file
whisperstringPath to whisper-cli (local mode; auto-detects bundled if omitted)

translate_subtitles

Translate an SRT file to another language using OpenAI. Returns the path of the translated .srt file.

ParameterTypeDescription
api_key *stringOpenAI API key
srt *stringPath to the source .srt file
target_lang *stringTarget language (e.g. 'Chinese', 'Spanish')
output_dirstringOutput directory

library_scan

Scan a directory for video files and add them to the library

ParameterTypeDescription
dir *stringDirectory path to scan

library_list

List all media files in the library

library_remove

Remove a media entry from the library by ID

ParameterTypeDescription
id *integerMedia entry ID to remove

clip

Extract a video clip segment, optionally as GIF. Requires ffmpeg in PATH.

ParameterTypeDescription
end *numberEnd time in seconds
start *numberStart time in seconds
filestringInput file path (uses currently playing file if omitted)
gifbooleanExport as GIF instead of MP4
outputstringOutput file path (auto-generated if omitted)

screenshot

Take a screenshot of the current video frame

ParameterTypeDescription
outputstringOutput file path (optional, auto-generated if omitted)

save_position

Save playback position for a file (for resume playback)

ParameterTypeDescription
path *stringPath to the media file
position *numberPosition in seconds

get_position

Get saved playback position for a file

ParameterTypeDescription
path *stringPath to the media file

settings_path

Get the absolute path of the settings.json file

settings_get

Read all settings, or a single key if provided

ParameterTypeDescription
keystringOptional key name; omit to read all settings

settings_set

Set a single settings key to the given JSON value

ParameterTypeDescription
key *stringKey name
value *Any JSON value (string, number, bool, object, array)

settings_unset

Remove a single settings key

ParameterTypeDescription
key *stringKey name to remove

filter_list

List current video filter values (brightness, contrast, saturation, gamma, hue)

filter_set

Set a video filter (brightness | contrast | saturation | gamma | hue) to a value in -100..100

ParameterTypeDescription
name *string
value *integer

filter_reset

Reset all video filters to 0 (neutral)

sponsor_segments

Fetch SponsorBlock skip segments for a YouTube URL. Returns the configured categories plus a list of {start, end, category, action_type, uuid} segments. Empty list when none exist (404). Errors only on network/parse failure or non-YouTube URLs.

ParameterTypeDescription
url *stringYouTube URL (watch / shorts / youtu.be / embed)

subtitle_delay

Get or set the subtitle delay in seconds. Positive values show subtitles later. Call with no arguments to read the current delay. Useful for correcting AI-generated subtitles, which often drift a few hundred milliseconds from the dialogue.

ParameterTypeDescription
relativebooleanTreat `seconds` as an offset from the current delay instead of an absolute value
secondsnumberDelay in seconds. Omit to read the current value.

audio_delay

Get or set the audio delay in seconds, for fixing lip-sync. Positive values play audio later. Call with no arguments to read the current delay.

ParameterTypeDescription
relativebooleanTreat `seconds` as an offset from the current delay instead of an absolute value
secondsnumberDelay in seconds. Omit to read the current value.

subtitle_style_get

Read subtitle appearance: scale, vertical position, colour, border size, bold.

subtitle_style_set

Set one subtitle appearance property. Returns the full style after the change.

ParameterTypeDescription
name *string
value *scale: 0.1-10 · pos: 0-150 (100 = bottom) · color: #RRGGBBAA · border_size: 0-20 · bold: boolean

subtitle_bilingual

Show two subtitle tracks at once — typically the original plus a translation. Call with no arguments to read the current state. `primary` is the bottom line and the one `subtitle_select` refers to; `secondary` is drawn just above it. Each accepts a track id from subtitle_list or a path to a subtitle file, which is loaded if it is not already. With no tracks named, the original and the translation are picked automatically. Selecting a single track with subtitle_select turns this off.

ParameterTypeDescription
enabledbooleanTurn it on or off. Omit to read; omitting it while naming a track or layout turns it on.
layoutstringstacked (just above the first line, the default) or top of the frame
primarystring | integerBottom line: a track id, or a path to a subtitle file
secondarystring | integerThe line above it: a track id, or a path to a subtitle file

chapter_list

List the chapters of the currently playing file: index, title, start time, and which one is playing. Returns an empty list for files without chapters.

chapter_seek

Jump to a chapter by 0-based index.

ParameterTypeDescription
index *integer0-based chapter index

chapter_next

Jump to the next chapter. Clamps at the last chapter.

chapter_prev

Jump to the previous chapter. Clamps at the first chapter.

ab_loop

Control the A-B loop, which repeats a section of the current file. Set point A and point B to start looping; clear to stop. Omit `position` to use the current playback position.

ParameterTypeDescription
action *stringa/b set a loop bound, clear removes both, status reads them
positionnumberPosition in seconds for the a/b actions. Defaults to the current position.

frame_step

Step forward exactly one frame. Pauses playback, as frame stepping is for inspecting a still.

frame_back_step

Step back exactly one frame. Pauses playback.

playlist_repeat

Get or set the playlist repeat mode. 'off' stops after the last entry, 'one' loops the current file, 'all' wraps around. Call with no arguments to read the current mode.

ParameterTypeDescription
modestring

playlist_shuffle

Get or set playlist shuffle. Enabling it reorders playback without renumbering entries, and keeps the current track playing. Call with no arguments to read the current setting.

ParameterTypeDescription
enabledboolean

shutdown

Shut down the unflick daemon. Declined when the control port is held by the GUI — close the window instead.

get_subtitles

Find and load subtitles for the playing video from OpenSubtitles, in one step. Picks the best match: a subtitle synced against this exact file if one exists (checked by file hash, so the timing is correct), otherwise the most-downloaded subtitle for the title. Prefer this over generate_subtitles when the video is a released film or show — a human-made subtitle is more accurate and arrives in a second rather than minutes. Requires the user's own OpenSubtitles API key in the `opensubtitles_api_key` setting; it fails with instructions if unset. Costs one of the user's limited daily downloads, s…

ParameterTypeDescription
filestringVideo to match against. Defaults to the playing file.
languagesstringComma-separated OpenSubtitles language codes, e.g. "zh-CN,en". Defaults to the opensubtitles_languages setting, else English.
loadbooleanLoad the subtitle into the player after downloading (default true)
querystringSearch text. Omit to derive a title from the playing file's name.

find_subtitles

Search OpenSubtitles and return the candidates without downloading anything. Use this when the user should choose, or to check what exists before spending a download. Each result carries a file_id for download_subtitle, plus `moviehash_match` — true means it is synced to this exact file. Costs no download quota. Requires the user's own OpenSubtitles API key in the `opensubtitles_api_key` setting.

ParameterTypeDescription
filestringVideo to match against. Defaults to the playing file.
hashbooleanMatch by file hash as well as title (default true). Set false to search by title only.
languagesstringComma-separated OpenSubtitles language codes, e.g. "zh-CN,en"
querystringSearch text. Omit to derive a title from the playing file's name.

download_subtitle

Download one subtitle chosen from find_subtitles and load it into the player. Saved next to the video when that directory is writable, so it loads automatically next time. Costs one of the user's limited daily OpenSubtitles downloads.

ParameterTypeDescription
file_id *integerThe file_id from a find_subtitles result
filestringVideo to save the subtitle beside. Defaults to the playing file.
languagestringLanguage code of the chosen subtitle, used in the saved filename
loadbooleanLoad it into the player after downloading (default true)

search_transcript

Search the currently playing file's subtitles for a phrase and return every match with its timestamp and speaker (if known). Works with loaded subtitle files, sidecar .srt/.vtt/.ass/.ssa files, embedded text tracks, and subtitles you generated with generate_subtitles. Use this to answer questions about what is said in a video, or to find the moment to jump to. Case-insensitive substring match, not regex.

ParameterTypeDescription
query *stringPhrase to look for
filestringOptional path to a video or subtitle file; defaults to the playing file
limitintegerMaximum matches to return (default 20, max 200)
speakerstringOptional speaker filter (case-insensitive substring match)

seek_to_text

Jump playback to where a phrase is spoken. Finds the phrase in the subtitles (optionally filtered by speaker) and seeks just before that line, so the sentence is heard from its start. This is the 'skip to the part where they talk about X' tool.

ParameterTypeDescription
query *stringPhrase to jump to
filestringOptional path to a video or subtitle file; defaults to the playing file
occurrenceintegerWhich occurrence, 1-based (default 1)
speakerstringOptional speaker filter

transcript_get

Return the full transcript of the currently playing file as timed cues (including speaker labels when present), plus where it came from. Use it to read or summarise a video, or as input for writing your own chapter list with set_chapters. Long videos produce a lot of text — prefer search_transcript or transcript_summary when you only need a passage or overview.

ParameterTypeDescription
filestringOptional path to a video or subtitle file; defaults to the playing file
speakerstringOptional speaker filter (case-insensitive)

transcript_summary

Return a compact, structured overview of a video's transcript: cue count, word count, speaking duration, top keywords, and timeline segments with representative lead lines. Much smaller than transcript_get on a long video, so reach for this first when asked what a video is about or how it is structured.

ParameterTypeDescription
filestringOptional path to a video or subtitle file; defaults to the playing file
segmentsintegerNumber of timeline segments to divide the transcript into (1-20, default 5)

generate_chapters

Give a file that has no chapters a set of them, derived from the pauses in its transcript. The result becomes real navigation: it shows up in chapter_list, marks the progress bar, and responds to chapter_seek. This is a rough heuristic — if you have read the transcript, set_chapters will give better titles and boundaries.

ParameterTypeDescription
countintegerRoughly how many chapters to aim for (2-50, default 8)

set_chapters

Set the chapter list for a file that has none, from your own reading of its content. Times are in seconds; they are sorted and clamped to the file automatically. These become real chapters — navigable with chapter_seek and drawn on the progress bar. Fails if the file already ships with its own chapters.

ParameterTypeDescription
chapters *arrayChapter marks in playback order

clear_chapters

Remove chapters added by generate_chapters or set_chapters. A file's own built-in chapters are not affected.

keybind_list

List every keyboard shortcut: action id, label, current key, default, and whether the user has changed it. Keys read as Mod+Alt+Shift+key, where Mod is Ctrl on Windows/Linux and Cmd on macOS.

keybind_set

Rebind a keyboard shortcut. Fails if the key is already taken by another action, naming the conflict rather than silently stealing it.

ParameterTypeDescription
action *stringAction id from keybind_list, e.g. play_pause
key *stringKey, e.g. k · Shift+z · Mod+o · PageUp

keybind_reset

Restore a shortcut to its default. Omit `action` to reset every binding at once.

ParameterTypeDescription
actionstringAction id. Omit to reset all.

video_transform_get

Read how the picture is fitted to the window: aspect override, rotation, zoom multiplier, pan-scan and deinterlace. Distinct from filter_list, which is colour rather than geometry.

video_transform_set

Fix a squashed aspect ratio, straighten a video recorded sideways, crop black bars, or deinterlace broadcast footage.

ParameterTypeDescription
name *string
value *aspect: "auto" | "16:9" | 1.78 · rotate: 0|90|180|270 · zoom: multiplier, 1 = fit · panscan: 0-1 · deinterlace: boolean

video_transform_reset

Restore the file's own geometry — no aspect override, no rotation, no zoom or pan-scan, deinterlace off.

incognito

Read or set incognito mode. While on, nothing is written to the play history — including plays started from the CLI or by you. Call with no arguments to read it.

ParameterTypeDescription
enabledboolean

recent_files

Recently played files, newest first, with how many times each was played and when. Covers files opened directly, not just ones scanned into the library.

ParameterTypeDescription
limitintegerHow many to return (1-200, default 20)

recent_clear

Forget the play history. Scanned library metadata is kept — only the played-at times and counts are cleared.

bookmark_add

Save a named position in a file, so it can be jumped back to later. Defaults to where playback is right now in the file the user is watching. Bookmarks persist across sessions and are recorded even in incognito mode, since they are asked for explicitly.

ParameterTypeDescription
filestringPath or URL. Defaults to what's playing.
namestringLabel for the spot. Omit and it shows as its timestamp.
positionnumberSeconds into the file. Defaults to the current position; required when bookmarking a file that isn't playing.

bookmark_list

Bookmarks for the file being watched, in timeline order. Pass all=true for every file, or file to ask about a specific one. Each entry carries the id that bookmark_goto takes, and the `key` it is filed under — the path for a file, the disc's own identity for a disc.

ParameterTypeDescription
allbooleanEvery file instead of just one.
filestringPath or URL. Defaults to what's playing. A drive path resolves to the disc currently in it.
keystringExactly this identity, unresolved — from disc_list, get_status, or the `key` on a listed bookmark. Use it to reach bookmarks left under a drive letter before discs had an identity.

bookmark_goto

Jump to a bookmark by id. Seeks if its file is already playing; otherwise opens that file at the bookmarked position, saving a resume point for the outgoing one. A bookmark on a disc is refused, without loading anything, when that disc is not the one in the drive.

ParameterTypeDescription
id *integerBookmark id from bookmark_list

bookmark_rename

Give a bookmark a name, or drop the one it has by omitting name.

ParameterTypeDescription
id *integerBookmark id from bookmark_list
namestringNew label. Omit to remove the name.

bookmark_remove

Delete one bookmark by id.

ParameterTypeDescription
id *integerBookmark id from bookmark_list

bookmark_clear

Delete every bookmark for the file being watched, or for the file named. Pass all=true to delete them for every file — that scope is never reached by default.

ParameterTypeDescription
allbooleanEvery bookmark, for every file.
filestringPath or URL. Defaults to what's playing. A drive path resolves to the disc currently in it.
keystringExactly this identity, unresolved — from disc_list, get_status, or the `key` on a listed bookmark. This is how bookmarks orphaned under a drive letter are deleted.

mouse_list

List mouse bindings: wheel up/down, click, double click, middle click, and the four right-drag gestures, each with the action it runs.

mouse_set

Point a mouse trigger at an action. Unlike keys, two triggers may share an action — wheel-up and drag-up both raising volume is fine, since the inputs are distinct. Pass "none" as the action to disable a trigger.

ParameterTypeDescription
action *stringAction id from keybind_list, or "none"
trigger *stringTrigger id from mouse_list, e.g. wheel_up, gesture_left

mouse_reset

Restore a mouse trigger to its default. Omit `trigger` to reset all of them.

ParameterTypeDescription
triggerstring

script_list

List installed mpv user scripts (.lua and .js) in the config scripts folder, with each script's path, language, description, and whether it is enabled.

script_add

Install a .lua or .js mpv user script into the config scripts directory, enable it, and load it into the running player immediately.

ParameterTypeDescription
path *stringPath to the .lua or .js script file to install

script_toggle

Enable or disable an installed mpv user script by filename (e.g. "autocrop.lua") or stem ("autocrop"). Enabling loads the script immediately; disabling takes effect on the next launch.

ParameterTypeDescription
enabled *booleanTrue to enable, false to disable
name *stringScript filename or stem

script_remove

Delete an installed mpv user script from the config scripts directory.

ParameterTypeDescription
name *stringScript filename or stem to remove

describe_frame

Return the frame showing right now as an image, so you can see what is on screen. Optionally seek to a position first. The picture is the one the viewer is watching — GUI, CLI and MCP share a single player. Downscaled to keep the response small; subtitles and on-screen controls are not burned in.

ParameterTypeDescription
max_edgeintegerLongest edge in pixels (64-2048, default 768)
positionnumberSeek here (seconds) before capturing

transcript_speakers

List all speakers in the transcript with cue count, word count, speaking duration, and first/last timestamp. Pass `detect: true` to run lightweight acoustic + conversational turn diarization when subtitles do not already carry speaker labels.

ParameterTypeDescription
countintegerTarget number of speakers when detect=true (2-8)
detectbooleanRun automatic speaker diarization if true (default false)
filestringOptional path to a video or subtitle file; defaults to the playing file

transcript_rename_speaker

Rename a speaker label across the transcript (e.g. from "Speaker 1" to "Host" or "Alice"). The rename is persisted in cache so subsequent transcript_get, search_transcript, and transcript_summary calls reflect it.

ParameterTypeDescription
from *stringExisting speaker name to replace
to *stringNew speaker name
filestringOptional path to a video or subtitle file; defaults to the playing file

transcript_export

Export the transcript to a formatted string or file in `txt`, `srt`, `vtt`, or `json` format, optionally filtered to a single speaker.

ParameterTypeDescription
filestringOptional path to a video or subtitle file; defaults to the playing file
formatstringOutput format (default txt)
outputstringOptional output file path. Omit to receive the formatted text in the response.
speakerstringOptional speaker filter

frame_contact_sheet

Sample a grid of frames (cols × rows) evenly across a time range of the video and return a single tiled JPEG image plus the exact timestamp of every cell. Ideal for surveying what visually happens across a video or section in one multimodal tool call instead of calling describe_frame a dozen times.

ParameterTypeDescription
colsintegerGrid columns (1-6, default 4)
endnumberEnd time in seconds (default: file duration)
filestringOptional video file path; defaults to the playing file
max_edgeintegerTarget sheet width in pixels (256-2048, default 1280)
rowsintegerGrid rows (1-6, default 3)
startnumberStart time in seconds (default 0)

detect_scenes

Detect visual scene cuts / shot boundaries in the video using ffmpeg's scene-change filter. Useful for videos without dialogue or transcripts (screen recordings, silent footage, music videos). Set `to_chapters: true` to immediately install the detected scenes as navigable chapters on the playing file.

ParameterTypeDescription
filestringOptional video file path; defaults to the playing file
max_scenesintegerMaximum number of scenes to return (1-100, default 20)
thresholdnumberScene change sensitivity threshold between 0.05 and 0.95 (default 0.3; lower detects more subtle cuts)
to_chaptersbooleanApply detected scenes as virtual chapters on the playing file

playlist_save

Save the current playlist to an `.m3u`, `.m3u8`, or `.pls` file.

ParameterTypeDescription
path *stringDestination file path (.m3u, .m3u8, or .pls)

playlist_load

Load an `.m3u`, `.m3u8`, or `.pls` playlist file into the player's queue. Relative paths inside the playlist are resolved against the playlist file's directory.

ParameterTypeDescription
path *stringPath to the .m3u, .m3u8, or .pls playlist file
appendbooleanAppend to the existing playlist instead of replacing it (default false)

equalizer_get

Read the 10-band equaliser: per-band gains in dB, the band centre frequencies they correspond to, the preamp, whether loudness normalisation is on, and the filter chain mpv is actually running. Read this before changing a band so you adjust the user's curve instead of replacing it.

equalizer_set

Adjust the equaliser. Set one band with `band` (0-9, low to high) plus `gain` in dB, or the whole curve at once with `bands`. `enabled` switches the equaliser in and out without discarding the curve, `normalize` evens out quiet dialogue against loud action, and `preamp` makes headroom so boosted bands don't clip. Gains are clamped to ±12 dB. Every change rebuilds mpv's audio filter chain, so set a whole curve in one call rather than nine.

ParameterTypeDescription
bandintegerBand index 0-9: 31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, 16000 Hz
bandsarrayAll ten gains in dB, low frequency first
enabledbooleanSwitch the equaliser on or off, keeping the curve
gainnumberGain in dB for that band, -12 to 12
normalizebooleanDynamic loudness normalisation
preampnumberPreamp in dB, -20 to 12

equalizer_preset

Apply a named equaliser curve and switch the equaliser on. Use equalizer_presets to see what exists and what each is for. 'speech' lifts dialogue out of a loud mix and 'night' tames explosions while keeping voices — those two answer most requests about not being able to hear what people are saying.

ParameterTypeDescription
name *stringPreset name, e.g. speech, night, bass, treble, headphones, flat

equalizer_presets

List the available equaliser presets with a description of what each is for and the curve it applies.

equalizer_reset

Remove every audio filter: flat curve, no preamp, no normalisation.

pitch_correction

Read or set whether changing playback speed keeps the original pitch. On by default, which is what makes 1.5x speech listenable rather than chipmunk-like. Turn it off only when the pitch shift is the point, such as checking a musical tempo change.

ParameterTypeDescription
enabledbooleanOmit to read the current setting

window_mode

Get or set the shape of the player window the user is looking at. `normal` is the full player, `pip` is a small always-on-top video window, `music` is the compact audio layout with cover art and tags. Call with no arguments to read the current mode. Only works while the unflick GUI is running — the headless daemon has no window and says so.

ParameterTypeDescription
modestringMode to switch to. Omit to read the current one.

cleanup

Find files an older unflick left behind — on Windows, upgrading from v0.9 moved the install directory and stranded roughly half a gigabyte with no uninstall entry. Reports by default; pass `apply` to delete. The live thumbnail and cover caches share that folder and are never touched.

ParameterTypeDescription
applybooleanDelete what was found. Omit to report only.

cast

Send what is playing to a television on the network over DLNA. "list" finds renderers; "to" starts a cast (naming a renderer, or omitting it when there is only one) and pauses playback here so it is not heard twice; "stop", "pause", "resume", "seek" and "status" drive it once it is running. Only local files can be cast — the television fetches them from this machine.

ParameterTypeDescription
actionstringDefaults to status.
filestringA file to cast instead of what is playing.
rendererstringWhich renderer, by name or part of it. Omit when there is only one.
secondsnumberFor seek, where to go. For list and to, how long to wait for renderers to answer (default 3).

disc_list

Optical drives on this machine and whether each holds a DVD or Blu-ray, plus whether this build can play them at all. Play one with `play` and the drive path ("D:\\"), a disc image ("film.iso"), or a folder holding VIDEO_TS / BDMV; a specific title is mpv's own syntax, "dvd://3". Each drive, and each probed path, also reports `key` — the identity its bookmarks and resume point are filed under, which changes when the disc does — and `label`, the volume name.

ParameterTypeDescription
pathstringAsk about one path instead of listing drives — reports what it is without opening it.

session

What the user was last watching and how far in — and, with action "restore", reopen it there. unflick writes this down every few seconds while playing, so it survives a closed window or a crash. Use it when someone asks to get back to what they were watching without naming the file. "clear" forgets it.

ParameterTypeDescription
actionstringDefaults to show, which only reports.

startup

The last launch's startup timeline, phase by phase, in milliseconds from process start — process init, video pipeline, window shown, the launch file opening, React mounting, the control port. Use it to say where a slow start went rather than that it was slow.

now_playing

What is playing, described the way a person would: title, artist, album, and whether there is any picture (an embedded cover is not video). Use this rather than `get_status` when the question is 'what is this', and `get_status` when it is 'where are we'.

ParameterTypeDescription
coverbooleanAlso extract the embedded cover art and return its path on disk. Costs one ffmpeg run the first time per file.

dev_snapshot

The accessibility tree of the unflick window: every visible element with its role, accessible name, state and a CSS selector that feeds straight back into dev_click and dev_text. Reach for this first — it is how you find out what is on screen. Invisible nodes and unnamed wrappers are elided, so what comes back is what a person would see. Needs the GUI running, started with --allow-dev.

ParameterTypeDescription
depthintegerHow deep to descend. Default 12.
selectorstringScope to a subtree instead of the whole document.

dev_click

Click an element in the unflick window. Polls for the selector first, so a click issued right after an action does not race the render, then hit-tests the point before dispatching: if something else is on top, the click is refused and the covering element is named rather than reported as a success. A selector matching several elements is refused unless `index` says which.

ParameterTypeDescription
selector *stringCSS selector. Take it from dev_snapshot.
indexintegerWhich match, 0-based, when the selector is ambiguous.
timeout_secondsnumberHow long to wait for the selector to appear. Default 5.

dev_text

Visible text of every element matching a selector, each with its index. Several matches are returned rather than refused — reading is not acting. Use it to check what a list, a menu or a label actually says, which is where 'undefined' shows up.

ParameterTypeDescription
selector *stringCSS selector.

dev_wait

Wait for an element to appear, or with `gone` for it to leave the page. The second half is not optional: verifying that a panel closed is impossible without it.

ParameterTypeDescription
selector *stringCSS selector.
gonebooleanWait for it to disappear instead of appear.
timeout_secondsnumberHow long to wait. Default 10.

dev_capture

A picture of the unflick interface. This is the UI layer, not the decoded video: mpv draws on its own surface, which sits above the webview on Windows and below it on macOS and Linux, so no single grab means the same thing on all three. Use describe_frame for the picture itself — it comes from mpv, at higher fidelity than any compositor grab.

ParameterTypeDescription
max_edgeintegerLongest edge of the returned image in pixels. Default 768.

dev_eval

Run JavaScript in the unflick window and get back what it evaluated to. Either an expression or statements with an explicit `return`. The escape hatch for what the other five verbs do not cover — prefer them where they fit, because they report their own refusals in terms of the page.

ParameterTypeDescription
script *stringJavaScript to run.
timeout_secondsnumberHow long to wait for an answer. Default 5.