Skip to content

Add subtitle rendering mode to FFmpeg media sources - #242

Merged
anilbeesetti merged 1 commit into
mainfrom
feat/subtitle-rendering-mode
Nov 27, 2026
Merged

anilbeesetti merged 1 commit into
mainfrom
feat/subtitle-rendering-mode

Conversation

@anilbeesetti

Copy link
Copy Markdown
Owner

Summary

FFmpeg progressive sources always route supported subtitles to native rendering today. Next Player needs to select Media3 subtitles while retaining FFmpeg extraction for HW+.

FfmpegMediaSourceFactory(dataSources).createMediaSource(
    item = mediaItem,
    subtitleRenderingMode = SubtitleRenderingMode.MEDIA3,
)

The new overload applies the selected mode to embedded and sidecar subtitles. The existing overload keeps native rendering as its default. Media3 mode supplies compatible ASS initialization data and skips bitmap tracks that lack required initialization data.

Related to Next Player #2128.

Evidence

  • Before, the factory offered only native routing for advanced subtitle formats.
  • After, Android 15 (API 35) instrumentation verified native ASS and Media3 cues for embedded and sidecar ASS, PGS, VobSub, and DVB, including clearing and backward seeking. A VobSub fixture without IDX verified that playback still prepares.
  • :media3ext:testDebugUnitTest passed. The Next Player composite debug build also compiled against this change.

Merge risk

Low. Existing callers retain the same JVM method and default behavior. Callers opting into Media3 get Media3’s subtitle format and styling support.

Created with GPT-6.2 Sol in Codex through T3 Code.

@anilbeesetti
anilbeesetti merged commit 2931b3d into main Nov 27, 2026
1 check passed
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.

1 participant