Subtitle styles¶
The subtitle style button with the text icon (text_fields) in the controls bar, or Alt+t, opens a Subtitle style menu with three groups (in hikari's language; Subtítulos in Spanish). Picking an option applies it straight away and the menu stays open, with the new choice marked, so several things can be adjusted in a row.
- Style: Original (sets nothing: mpv's defaults or your own
sub-*lines inmpv.conf), Dark box (white text on a translucent black box, Netflix-like), Thick outline (bold white text, thick black outline, soft shadow, Crunchyroll-like) and Classic yellow (yellow text, black outline and shadow). - Size:
sub-scale0.85, Normal, 1.2 or 1.4. - Height:
sub-posNormal, 95 or 90.
Original and Normal set nothing, so whatever your mpv.conf says (or mpv's default: sub-scale=1, sub-pos=100) stays in charge. Choosing them again puts back the values mpv had when the script started; if mpv was started with another choice saved, those values were already the choice's, so mpv's built-in defaults are used instead until the next start, when your mpv.conf applies again.
The choice is saved to ~~/hikari-subs.conf, which mpv.conf includes on start-up. The styles are defined in portable_config/scripts/hikari-subs.lua. Colours use mpv's #AARRGGBB, where the alpha is opacity (FF opaque, 00 invisible), the reverse of ASS. To bind another key, use script-binding hikari_subs/open-menu in input.conf.
ASS subtitles keep their own styling: hikari leaves mpv's sub-ass-override=scale alone, so the style only applies to text subtitles (SRT, WebVTT...). With that setting mpv still applies sub-scale to ASS, so the size options do change them. sub-pos is passed to libass as the line position and moves ASS dialogue too; lines placed with \pos (signs, karaoke) should stay where they are. This last point still has to be checked in mpv with real files.
mpv 0.39 changed the subtitle border options, and the script adapts to the version it runs on, always writing the real option name (never an alias):
- mpv 0.39 and newer:
sub-outline-color/sub-outline-size,sub-back-colorfor the shadow colour (sub-shadow-coloris an alias of it), andsub-border-style. Dark box usessub-border-style=opaque-box. - mpv 0.38 and older:
sub-border-color/sub-border-size, a separatesub-shadow-color, and nosub-border-style. Dark box still gets its box: a translucentsub-back-colormakes mpv draw a background box in that colour. The other styles never givesub-back-colorany opacity of their own (they put back the value it had at start-up), so no box appears with them.
A hikari-subs.conf written by mpv 0.39 or newer uses option names that mpv 0.38 and older don't know: if the same config folder is used with an older mpv, it logs an unknown-option error for those lines and starts normally, without that style until it is picked again.