diff options
| author | gnattu <gnattuoc@me.com> | 2024-09-22 00:34:47 +0800 |
|---|---|---|
| committer | gnattu <gnattuoc@me.com> | 2024-09-22 00:35:41 +0800 |
| commit | d944f415f3cc0e5433d94b11a16684ca3f0131ec (patch) | |
| tree | cfa42406c11a612af0683c2459b42df2b5741b2e /Jellyfin.Api/Helpers | |
| parent | 9ff7575c85d05714a497502f95ee38f6f3b87752 (diff) | |
Let HLS Controller decide if subtitle should be burn in
Previously, we predicted whether the subtitle should be burned in with transcode reasons, but that was not accurate because the actual transcoding codec is only determined after the client has requested the stream. This pass through the option to the `DynamicHlsController` to handle the subtitle burn-in during the actual transcoding process. Now the client should be responsible to conditionally load the subtitle when this option is enabled.
Diffstat (limited to 'Jellyfin.Api/Helpers')
| -rw-r--r-- | Jellyfin.Api/Helpers/MediaInfoHelper.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs index 5050cab41..2d9ecd4f0 100644 --- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs +++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs @@ -293,6 +293,7 @@ public class MediaInfoHelper mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false"; mediaSource.TranscodingContainer = streamInfo.Container; mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol; + mediaSource.TranscodingUrl += "&alwaysBurnInSubtitleWhenTranscoding=true"; } else { @@ -310,6 +311,11 @@ public class MediaInfoHelper { mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false"; } + + if (streamInfo.AlwaysBurnInSubtitleWhenTranscoding) + { + mediaSource.TranscodingUrl += "&alwaysBurnInSubtitleWhenTranscoding=true"; + } } } |
