Skip to content

Respect EnableSubtitleExtraction setting in subtitle delivery#16380

Merged
Bond-009 merged 1 commit intojellyfin:masterfrom
LTe:fix-subtitle-extraction-setting
Apr 11, 2026
Merged

Respect EnableSubtitleExtraction setting in subtitle delivery#16380
Bond-009 merged 1 commit intojellyfin:masterfrom
LTe:fix-subtitle-extraction-setting

Conversation

@LTe
Copy link
Copy Markdown
Contributor

@LTe LTe commented Mar 10, 2026

Changes

Make MediaEncoder.CanExtractSubtitles() check the EnableSubtitleExtraction encoding option instead of always returning true. This causes StreamBuilder to select burn-in (Encode) instead of external delivery for embedded subtitles during transcoding, preventing a separate ffmpeg extraction process from competing with the transcode for network bandwidth.

The check is scoped to transcoding only — during DirectPlay, subtitle extraction is still allowed since there is no competing transcode process.

Issues

Fixes #1163

Related #935

@LTe LTe force-pushed the fix-subtitle-extraction-setting branch from 10dd218 to 7a194b0 Compare March 10, 2026 08:21
@LTe LTe force-pushed the fix-subtitle-extraction-setting branch 2 times, most recently from d7857ba to 23e8d22 Compare March 13, 2026 15:32
Wire up EnableSubtitleExtraction config to MediaEncoder.CanExtractSubtitles
so the setting is actually respected. Gate subtitle extraction check behind
PlayMethod.Transcode since DirectPlay has no competing ffmpeg process.

Add parameterized tests for StreamBuilder.GetSubtitleProfile covering
text and graphical codecs, profile format matching, and extraction
setting behavior. Remove misplaced SubtitleEncoder extraction test.
@LTe LTe force-pushed the fix-subtitle-extraction-setting branch from 23e8d22 to 37983c9 Compare March 13, 2026 15:34
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@nyanmisaka nyanmisaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make sense. I applied it locally and did some testing, and it doesn't appear to cause any regressions in PlayMethod.Transcode.

@Bond-009 Bond-009 merged commit 046023b into jellyfin:master Apr 11, 2026
18 of 19 checks 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.

Disabling "Allow subtitle extraction on the fly" broken

5 participants