Skip to content

sub: add sub-lines property#17730

Open
guidocella wants to merge 3 commits intompv-player:masterfrom
guidocella:sub-lines
Open

sub: add sub-lines property#17730
guidocella wants to merge 3 commits intompv-player:masterfrom
guidocella:sub-lines

Conversation

@guidocella
Copy link
Copy Markdown
Contributor

@guidocella guidocella commented Apr 9, 2026

sub: add sub-lines property

Return all subtitle lines in memory with text, start and end.

I did not name this sub-all so it cannot be misinterpreted as referring to all subtitle tracks.

Closes #12810.

Mostly generated by Claude.

select.lua: use sub-lines instead of forking to ffmpeg

This:

  • Removes the dependency of ffmpeg in PATH - useful on Windows, macOS (?), Flatpak.
  • Will support subrandr.
  • Avoids redownloading network subtitles.
  • Avoids slow demuxing of large mkvs.
  • But no longer returns future lines of embedded subtitles.
  • No longer returns embedded lines of regions you seeked beyond without playing them (but holding the up key works) this depends if you enable the cache.
  • Changing sub track drops cached subtitles.

Comment thread player/lua/select.lua
Comment thread player/lua/select.lua Outdated
@afishhh
Copy link
Copy Markdown
Contributor

afishhh commented Apr 16, 2026

The API used in the sd_sbr commit is something I conjured yesterday and is not released or in master yet, I'll open a separate PR for that once ready.

@guidocella
Copy link
Copy Markdown
Contributor Author

Removed.

@guidocella guidocella force-pushed the sub-lines branch 2 times, most recently from bd8f1bb to 2089586 Compare April 18, 2026 16:13
Comment thread sub/dec_sub.c Outdated
Comment thread sub/sd_ass.c
Comment thread DOCS/man/input.rst Outdated
guidocella and others added 3 commits April 20, 2026 22:08
Return all subtitle lines in memory with text, start and end.

I did not name this sub-all so it cannot be misinterpreted as referring
to all subtitle tracks.

Closes mpv-player#12810.
This:

- Removes the dependency of ffmpeg in PATH - useful on Windows, macOS
  (?), Flatpak.
- Will support subrandr.
- Avoids redownloading network subtitles.
- Avoids slow demuxing of large mkvs.
- But no longer returns future lines of embedded subtitles.
- No longer returns embedded lines of regions you seeked beyond without
  playing them.
- Changing sub track drops cached subtitles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add sub-text-all property

3 participants