sub: add sub-lines property - #17730
Conversation
|
The API used in the |
|
Removed. |
bd8f1bb to
2089586
Compare
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.
kasper93
left a comment
There was a problem hiding this comment.
I'm fine with this if it works.
|
Since |
| } | ||
|
|
||
| static void dedup_sub_lines(struct sub_lines *lines) | ||
| { |
There was a problem hiding this comment.
Is this really necessary?
Even if the same text has overlapping time windows, they may be located at different positions. In such cases, they should not be counted as the same line.
ASS file content
[Script Info]
ScriptType: v4.00+
PlayResX: 1920
PlayResY: 1080
Aspect Ratio: 1920:1080
Collisions: Normal
WrapStyle: 2
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.601
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Foo, sans-serif, 45, &H73FFFFFF, &H73FFFFFF, &H73000000, &H73000000, 0, 0, 0, 0, 100, 100, 0.00, 0.00, 1, 2, 0, 7, 0, 0, 0, 0
[Events]
Dialogue: 2,0:00:00.00,0:00:10.00,Foo,,0000,0000,0000,,{\move(1920, 0, -45, 0)}W
Dialogue: 2,0:00:05.00,0:00:15.00,Foo,,0000,0000,0000,,{\move(1920, 45, -45, 45)}W
There was a problem hiding this comment.
Yeah or you end up like #15936 (comment)
There was a problem hiding this comment.
Displaying ASS without styles in a list is broken by design. You want to select subtitle, but at the same time you remove subtitles from the list.
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:
(but holding the up key works)this depends if you enable the cache.