Skip to content

fix(subtitles): remove the subtitle outline when it is disabled - #1

Merged
RakshithBhat03 merged 1 commit into
enhancedfrom
fix/subtitle-outline-off
Sep 10, 2026
Merged

RakshithBhat03 merged 1 commit into
enhancedfrom
fix/subtitle-outline-off

Conversation

@RakshithBhat03

Copy link
Copy Markdown
Owner

Summary

With custom subtitle styling enabled, the macOS and Windows desktop bridges pushed the subtitle outline as sub-outline-size / sub-outline-color. The bundled mpv revision (c0dd2b32d52c66b9efa85a7ee69965569503f6b8, the revision documented in native/macos/mpv/README.md) does not define either property, so both writes were rejected silently: mpv kept drawing its default outline, Outline: Off changed nothing, and the outline color swatches were dead for the same reason.

The bridges now write sub-border-size / sub-border-color, which exist in every mpv revision — newer builds alias --sub-outline-* to them. The iOS bridge in this repository carried the same two names and is fixed in the same commit.

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

The subtitle outline toggle and outline color had no effect whenever custom styling was on. The bundled runtime rejects sub-outline-size and sub-outline-color with property not found, so the player never applied the user's setting and always rendered mpv's default outline. Writing --sub-border-* makes the size and color apply on the bundled revision while staying valid on newer mpv builds.

Desktop scope

  • macOS: composeApp/src/desktopMain/native/macos/player_bridge.mm
  • Windows: composeApp/src/desktopMain/native/windows/player_bridge.cpp

Linux desktop already used --sub-border-* and is unchanged. The same property names in iosApp/iosApp/Player/MPVPlayerBridge.swift are fixed in this commit because that bridge lives in this repository.

Issue or approval

Root cause of NuvioMedia#593. Fork-only PR, based on the enhanced branch of this fork; nothing is submitted upstream from here.

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Scope boundaries

  • The bundled mpv runtime is untouched: same revision, same dependency dylibs, no version or provenance change.
  • No UI change. The outline width control proposed upstream (Fix macOS subtitle outline toggle and add outline width NuvioMedia/NuvioDesktop#444) is not part of this PR, so the desktop keeps sending the stored width.
  • Linux and Android bridges unchanged — they already set the names this runtime accepts.
  • sub-border-style is left as written: it is a no-op on the bundled revision, where outline-vs-box follows --sub-back-color alpha, and it is required on newer mpv builds.
  • Settings storage, wire contracts, and packaging are unchanged.

Testing

  • Runtime probe of the bundled macOS libmpv.2.dylib on arm64 and on x86_64 under Rosetta (mpv-version reads back mpv c0dd2b32d52c66b9efa85a7ee69965569503f6b8-dirty): sub-outline-size / sub-outline-colorMPV_ERROR_PROPERTY_NOT_FOUND; sub-border-size / sub-border-color → accepted.
  • Offscreen OpenGL render of an ffmpeg-generated MKV with an ASS track (1280x720, sub-ass-override=force, red outline on black video, red-pixel count): sub-outline-size=0 → 8921 outline pixels (outline still drawn), sub-border-size=0 → 0 outline pixels, sub-border-size=2 → 6163 outline pixels. Identical results on the x86_64 runtime under Rosetta.
  • macOS bridge compiled with clang++ -fsyntax-only against the bundled headers, then ./gradlew :composeApp:packageReleaseDmg --rerun-tasks on macOS 26.6.2 (Apple Silicon) succeeded. The packaged libplayer_bridge.dylib inside the DMG contains sub-border-size / sub-border-color and no sub-outline-*.
  • Not run: the Windows bridge (the bundled libmpv-2.dll is an unmaterialized Git LFS pointer in this checkout, and there is no Windows host available) and the iOS bridge (no MPVKit/Xcode build). Both are the same one-line rename to property names that every mpv revision accepts.
  • The DMG built for this check is ad-hoc signed — no Developer ID identity is available in the keychain — and was not notarized, so no signed-release verification is claimed.

Screenshots / Video

Not a UI change.

Breaking changes

None.

Linked issues

Fixes NuvioMedia#593.

The desktop and iOS bridges pushed the outline as --sub-outline-size and
--sub-outline-color. The bundled mpv revision (c0dd2b32) does not define those
properties, so both writes failed silently and mpv kept drawing its default
outline whenever custom styling was on; the outline color setting was dead for
the same reason.

--sub-border-size and --sub-border-color carry the outline on this revision and
on newer mpv builds, where those names are aliases of --sub-outline-*.
@RakshithBhat03
RakshithBhat03 merged commit c822e7a into enhanced Sep 10, 2026
1 check passed
@RakshithBhat03
RakshithBhat03 deleted the fix/subtitle-outline-off branch September 10, 2026 13:11
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.

[Bug]: Subtitle outline remains on macOS when Outline is disabled

1 participant