whatisgithub

What is mpv-agent?

jonny-gm/mpv-agent — explained in plain English

Analysis updated 2026-05-18

2JavaScriptAudience · generalComplexity · 3/5LicenseSetup · moderate

In one sentence

An AI assistant built into the mpv media player that lets you control playback, subtitles, and audio tracks by typing plain language instead of commands.

Mindmap

mindmap
  root((mpv-agent))
    What it does
      Plain language mpv control
      Per window AI conversation
      Validates actions before running
    Tech stack
      Node.js
      Lua
      mpv
    Use cases
      Subtitle control
      Audio track switching
      Local AI via Ollama
    Audience
      mpv power users
      AI tool experimenters

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Control subtitle language and delay settings by typing what you want instead of digging through menus.

USE CASE 2

Switch audio devices and tracks like 5.1 sound using natural language requests.

USE CASE 3

Set up local AI models through Ollama for private mpv control without sending data to the cloud.

What is it built with?

JavaScriptNode.jsLuampv

How does it compare?

jonny-gm/mpv-agent3imed-jaberi/cryptography-si-isamm3imed-jaberi/koa-isomorphic-router
Stars222
LanguageJavaScriptJavaScriptJavaScript
Last pushed2021-09-252021-02-06
MaintenanceDormantDormant
Setup difficultymoderateeasyeasy
Complexity3/51/52/5
Audiencegeneralresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Node.js 20+ and a supported AI backend such as Claude Code or an OpenAI-compatible API.

Use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

So what is it?

mpv-agent adds an AI assistant to mpv, the open source media player, so you can control playback by typing plain language instead of memorizing keyboard shortcuts or command syntax. You open a panel inside the player and type requests like "set bottom subs to english and top subs to spanish" or "download hungarian subs" or "switch to my speakers and use the 5.1 track," and the tool works out what mpv commands to run and checks them before they touch the player. Each mpv window keeps its own separate AI conversation, so if you have several videos open at once each one remembers its own context. Behind the scenes you choose a backend: Codex, Claude Code, and OpenCode keep a running conversation with the AI provider and can use its tools within limits you set, while an OpenAI-compatible option, including OpenRouter or a locally run vLLM server, treats every request separately and returns a plan of actions that gets checked before running, with no memory kept between requests. OpenCode can also run fully local models through Ollama if you prefer not to send anything to an outside provider. mpv-agent sends your requests and basic playback details to whichever provider you pick, but not the video or audio content itself. Two settings, agent_access and mpv_access, control how much the AI is allowed to do: whether it can touch your shell, filesystem, or network, and whether changes it wants to make to mpv need your approval first. The project recommends starting in a restricted, guarded mode. You can also write a personal instructions file so the assistant remembers preferences, such as which subtitle languages you like. To use it you need mpv 0.41 or newer, Node.js 20 or newer, and either one of the supported AI command line tools or access to an OpenAI-compatible API. It installs with a single script on Windows, Linux, or macOS, and is released under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through installing mpv-agent on Windows and configuring a Claude Code backend for it.
Prompt 2
Explain the difference between mpv-agent's session agents and action proposers, and help me pick agent_access settings for a shared computer.
Prompt 3
Write a personal instructions.md file for mpv-agent that sets my preferred subtitle language to Spanish and a concise response style.
Prompt 4
Show me how to use script-message mpv-agent-ask from another mpv script to submit a playback request.

Frequently asked questions

What is mpv-agent?

An AI assistant built into the mpv media player that lets you control playback, subtitles, and audio tracks by typing plain language instead of commands.

What language is mpv-agent written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, Lua.

What license does mpv-agent use?

Use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

How hard is mpv-agent to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mpv-agent for?

Mainly general.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.