mpv-player / mpv-player/mpv

New add-subtitle command for inserting individual subtitle lines in memory

Open
#18,081 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Expected behavior of the wanted feature

Coming from: https://github.com/ripose-jp/Memento/issues/176

I wanted to know it if possible to create a new add-subtitle command for inserting subtitles into tracks.

With current use of Auto-Speech-Recognition (ASR) systems and their improvements there are many mpv-based (and not mpv-based) programs that add some ability to do ASR on-the-fly with either local models or API services.

e.g. LLPlayer and whisper-subs, and the issue I've linked.

whisper-mpv and current memento's approach rely on writing subtitles into a file, and repeatedly using the sub-reload command. to update the subtitle list.

This isn't a bad solution, but having subtitles already in-memory means it would be simpler if you could insert them into a subtitle track directly.

Additionally, similar commands could include:

  • remove-subtitle for removing a subtitle line
  • edit-subtitle for editing a subtitle line
  • clear-subtitles to empty clear an entire subtitle track contents

The benefit would be that mpv-based clients could implement ASR solutions in-memory without invoking I/O read/write.

I couldn't find it it either in the feature or the scripts in the wiki.
So sorry if I'm asking for an existing/requested feature.

Alternative behavior of the wanted feature

No response

Log File

No response

Sample Files

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing sub-reload command and the feature or scripts documentation referenced in the issue. Define the behavior and scope of add-subtitle, including how an in-memory subtitle line is selected and inserted, before considering the related remove, edit, and clear commands. Done means the requested command is implemented and its behavior is documented and verifiable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.